diff --git a/koala_tools/.gitignore b/koala_tools/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..de29e615ac1b19120100561353585fe0ce9c0183 --- /dev/null +++ b/koala_tools/.gitignore @@ -0,0 +1,40 @@ +**/node_modules +build +build-m3* +arkoala-arkts/arkui/build-recheck +dist +arkoala/tools/peer-generator/arkoala +**/package-lock.json +.vscode +**.code-workspace +.idea +**/target +**/cjpm.lock +**/CallsiteKey.o +interface_sdk-js +.ninja_log +**/.hvigor +**/js_output +**/command-line-tools +**/libs +**/lib +!incremental/tools/ets-tsc/lib +**/*.abc +cachegrind.out.* +perf.data* +/ui2abc/memo-plugin/tests/out +*.tsbuildinfo +ui2abc/libarkts/lib +ui2abc/memo-plugin/lib +ui2abc/ui-plugins/lib +incremetal-cj/runtime/ck +.rollup.cache +tsconfig.tsbuildinfo +*.meta.json +.cache +incremental/benchmarks/memo-benchmark/ets +koala_mirror +koala_tools +out +sdk +koala_build.log diff --git a/koala_tools/gn/__pycache__/npm_util.cpython-310.pyc b/koala_tools/gn/__pycache__/npm_util.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..384813106ad7fbc00d2b8aa908297575234f640e Binary files /dev/null and b/koala_tools/gn/__pycache__/npm_util.cpython-310.pyc differ diff --git a/koala_tools/gn/__pycache__/npm_util.cpython-311.pyc b/koala_tools/gn/__pycache__/npm_util.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7de63ff6afd66de4e137b58fe52f7b3b788fcdf6 Binary files /dev/null and b/koala_tools/gn/__pycache__/npm_util.cpython-311.pyc differ diff --git a/koala_tools/gn/command/npm_util.py b/koala_tools/gn/command/npm_util.py new file mode 100755 index 0000000000000000000000000000000000000000..e32b92f359f790f7a8f7463c54e8a3e123495080 --- /dev/null +++ b/koala_tools/gn/command/npm_util.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import argparse +import shutil +import subprocess +import os +import sys + +NPM_REPO = "https://repo.huaweicloud.com/repository/npm/" + +parser = argparse.ArgumentParser(description="npm command parser") +parser.add_argument("--project-path", help="project directory in koala repo") +parser.add_argument("--node-path", help="nodejs path") +parser.add_argument("--arklink-path", help="ark-link path") +parser.add_argument("--es2panda-path", help="es2panda path") +parser.add_argument("--stdlib-path", help="stdlib path") +parser.add_argument("--target-out-path", help="out directory of built target") +parser.add_argument("--built-file-path", help="result of building") +parser.add_argument("--install", action="store_true", help="request npm install") +parser.add_argument("--install-path", help="path to install in") +parser.add_argument("--run-tasks", nargs='+', help="npm run tasks") + +args = parser.parse_args() + +project_path = args.project_path +koala_log = os.path.join(project_path, "koala_build.log") + +if args.node_path is None: + print("Error: --node-path is expected") + sys.exit(1) + +os.environ["PATH"] = f"{args.node_path}:{os.environ['PATH']}" + +if args.es2panda_path: + os.environ["ES2PANDA_PATH"] = args.es2panda_path +if args.arklink_path: + os.environ["ARKLINK_PATH"] = args.arklink_path +if args.stdlib_path: + os.environ["ETS_STDLIB_PATH"] = args.stdlib_path + +os.environ["PANDA_SDK_PATH"] = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../ui2abc/build/sdk") + +def run(args, dir = None): + os.chdir(dir or project_path) + + if os.environ.get("KOALA_LOG_STDOUT"): + subprocess.run(["npm"] + args, env=os.environ, text=True, check=True, stderr=subprocess.STDOUT) + return + + result = subprocess.run(["npm"] + args, capture_output=True, env=os.environ, text=True) + with open(koala_log, "a+") as f: + f.write(f"npm args: {args}; project: {project_path}:\n" + result.stdout) + if result.returncode != 0: + f.write(f"npm args: {args}; project: {project_path}:\n" + result.stderr) + print(open(koala_log, "r").read()) + raise Exception("npm failed") + f.close() + +def install(dir = None): + run(["install", "--registry", NPM_REPO, "--verbose"], dir or project_path) + +def copy_target(): + if not os.path.exists(args.built_file_path): + print(f"Error: Built file not found at {args.built_file_path}") + sys.exit(1) + shutil.copy(args.built_file_path, args.target_out_path) + +def main(): + if args.install: + install(args.install_path) + if args.run_tasks: + for task in args.run_tasks: + run(["run", task]) + if args.target_out_path and args.built_file_path: + copy_target() + +if __name__ == '__main__': + main() diff --git a/koala_tools/gn/npm_util.gni b/koala_tools/gn/npm_util.gni new file mode 100644 index 0000000000000000000000000000000000000000..bf1f906cd36a03192b2931e51ecc5d6504678f08 --- /dev/null +++ b/koala_tools/gn/npm_util.gni @@ -0,0 +1,63 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/components/ets_frontend/ets2abc_config.gni") + +node_version = "v16.20.2" +host_arch = "${host_os}-${host_cpu}" + +template("npm_cmd") { + action("$target_name") { + script = "//foundation/arkui/ace_engine/frameworks/bridge/arkts_frontend/koala_mirror/gn/command/npm_util.py" + outputs = invoker.outputs + if (defined(invoker.deps)) { + deps = invoker.deps + } + if (defined(invoker.inputs)) { + inputs = invoker.inputs + } + if (defined(invoker.external_deps)) { + external_deps = invoker.external_deps + } + args = [ + "--node-path", rebase_path("//prebuilts/build-tools/common/nodejs/node-${node_version}-${host_arch}/bin"), + "--arklink-path", rebase_path("${static_linker_build_path}"), + "--es2panda-path", rebase_path("${ets2abc_build_path}"), + "--stdlib-path", rebase_path("//arkcompiler/runtime_core/static_core/plugins/ets/stdlib"), + "--project-path", invoker.project_path + ] + if (defined(invoker.target_out_path)) { + args += [ "--target-out-path", invoker.target_out_path ] + } + if (defined(invoker.built_file_path)) { + args += [ "--built-file-path", invoker.built_file_path ] + } + if (defined(invoker.install) && invoker.install) { + args += [ "--install" ] + } + if (defined(invoker.install_path)) { + args += [ "--install-path", invoker.install_path ] + } + if (defined(invoker.run_tasks)) { + args += [ "--run-tasks" ] + invoker.run_tasks + } + } +} + +template("npm_install") { + assert(current_toolchain == host_toolchain, "must be executed with host_toolchain") + forward_variables_from(invoker, "*") + npm_cmd(target_name) { + install = true + } +} \ No newline at end of file diff --git a/koala_tools/incremental/BUILD.gn b/koala_tools/incremental/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..02b5b1aac446cf16b9fc9605c59d6d9a4beea64c --- /dev/null +++ b/koala_tools/incremental/BUILD.gn @@ -0,0 +1,59 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/components/ets_frontend/ets2abc_config.gni") +import("//build/ohos.gni") +import("//foundation/arkui/ace_engine/ace_config.gni") +import("//foundation/arkui/ace_engine/frameworks/bridge/arkts_frontend/koala_mirror/gn/npm_util.gni") +import("./incremental_components.gni") + +koala_root = ".." + +node_version = "v16.20.2" +host_arch = "${host_os}-${host_cpu}" + +if (current_toolchain == host_toolchain) { + npm_install("incremental_install") { + outputs = [ + "$target_out_dir/incremental_install" + ] + project_path = rebase_path(".") + } +} + +npm_cmd("incremental_build") { + outputs = [ + "$target_out_dir/incremental.abc" + ] + project_path = rebase_path(".") + run_tasks = [ "build" ] + inputs = incremental_files + + deps = [ + "$koala_root/ui2abc:ui2abc" + ] + + external_deps = [ + ets2abc_build_deps, + static_linker_build_deps, + "ets_frontend:libes2panda_public(${host_toolchain})" + ] + built_file_path = rebase_path("./runtime/build/incremental.abc") + target_out_path = rebase_path("$target_out_dir/incremental.abc") +} + +group("incremental_abc") { + deps = [ + ":incremental_build" + ] +} \ No newline at end of file diff --git a/koala_tools/incremental/build-common/package.json b/koala_tools/incremental/build-common/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0668d2a49fa558775681caaff70e97673dba4231 --- /dev/null +++ b/koala_tools/incremental/build-common/package.json @@ -0,0 +1,11 @@ +{ + "name": "@koalaui/build-common", + "version": "1.7.9+devel", + "description": "", + "files": [ + "tsconfig.json" + ], + "scripts": { + "compile:release": "" + } +} \ No newline at end of file diff --git a/koala_tools/incremental/build-common/tsconfig.json b/koala_tools/incremental/build-common/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..02ca836732ea922edcb061e64008364e67b8f1e9 --- /dev/null +++ b/koala_tools/incremental/build-common/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "es2017", + "module": "ESNext", + "lib": ["ESNext", "ESNext.WeakRef"], + "moduleResolution": "node", + "composite": true, + "incremental": true, + "declarationMap": true, + "sourceMap": true, + "declaration": true, + "noEmitOnError": true, + "strict": true, + "skipLibCheck": true, + "removeComments": false + } +} diff --git a/koala_tools/incremental/common/empty.js b/koala_tools/incremental/common/empty.js new file mode 100644 index 0000000000000000000000000000000000000000..ac57d1240ec618f291f4624f135240eb8c6bde18 --- /dev/null +++ b/koala_tools/incremental/common/empty.js @@ -0,0 +1,15 @@ +/* + * 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. + */ + diff --git a/koala_tools/incremental/common/package.json b/koala_tools/incremental/common/package.json new file mode 100644 index 0000000000000000000000000000000000000000..0cab425a221789d624df2e5d55fb07d93c875ae9 --- /dev/null +++ b/koala_tools/incremental/common/package.json @@ -0,0 +1,45 @@ +{ + "name": "@koalaui/common", + "version": "1.7.9+devel", + "description": "", + "main": "build/lib/src/index.js", + "types": "./index.d.ts", + "files": [ + "build/lib/**/*.js", + "build/lib/**/*.d.ts", + "src/**/*" + ], + "exports": { + ".": "./build/lib/src/index.js" + }, + "typesVersions": { + "*": { + "*": [ + "build/lib/src/*", + "build/lib/typescript/*" + ] + } + }, + "scripts": { + "compile": "ets-tsc -b .", + "compile:release": "ets-tsc -b .", + "clean": "rimraf build", + "test": "mocha", + "test:coverage": "nyc mocha", + "build": "node ../../ui2abc/fast-arktsc --config ./ui2abcconfig.json --compiler ../tools/panda/arkts/ui2abc --link-name ./build/common.abc --simultaneous && PANDA_SDK_PATH=${PANDA_SDK_PATH:=../tools/panda/node_modules/@panda/sdk} ninja ${NINJA_OPTIONS} -f build/abc/build.ninja" + }, + "keywords": [], + "dependencies": { + "@koalaui/compat": "1.7.9+devel" + }, + "devDependencies": { + "@ohos/hypium": "1.0.6", + "@types/mocha": "^9.1.0", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", + "eslint-plugin-unused-imports": "^2.0.0", + "mocha": "^9.2.2", + "source-map-support": "^0.5.21" + } +} \ No newline at end of file diff --git a/koala_tools/incremental/common/src/Finalization.ts b/koala_tools/incremental/common/src/Finalization.ts new file mode 100644 index 0000000000000000000000000000000000000000..2ba480ca2d549e5299bb8d71454f9c7b0294c57f --- /dev/null +++ b/koala_tools/incremental/common/src/Finalization.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2024 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 { finalizerRegister as finalizerRegisterCompat, finalizerUnregister as finalizerUnregisterCompat, Thunk } from "@koalaui/compat" + +export { Thunk } from "@koalaui/compat" + +export function finalizerRegister(target: object, thunk: Thunk) { + finalizerRegisterCompat(target, thunk) +} + +export function finalizerRegisterWithCleaner(target: object, cleaner: () => void) { + finalizerRegisterCompat(target, new CleanerThunk(cleaner)) +} + +export function finalizerUnregister(target: object) { + finalizerUnregisterCompat(target) +} + +class CleanerThunk implements Thunk { + private cleaner: () => void + constructor(cleaner: () => void) { + this.cleaner = cleaner + } + clean() { + this.cleaner() + } +} diff --git a/koala_tools/incremental/common/src/index.ts b/koala_tools/incremental/common/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..0533296ef8e6b1a150114df1a463e6d371fec255 --- /dev/null +++ b/koala_tools/incremental/common/src/index.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2022-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. + */ + +export { + int8, uint8, + int32, int32toFloat32, int32toFloat64, int32to64, + uint32, + int64, int64toFloat32, int64toFloat64, int64to32, + uint64, + float32, float32to64, float32toInt32, float32toInt64, + float64, float64to32, float64toInt32, float64toInt64, + asArray, + asFloat64, + Array_from_set, + AtomicRef, + CustomTextDecoder, + CustomTextEncoder, + className, lcClassName, + functionOverValue, + Observed, + Observable, + ObservableHandler, + observableProxy, + observableProxyArray, + TrackableProperties, + trackableProperties, + isFunction, + propDeepCopy, + refEqual, + int8Array, + errorAsString, + unsafeCast, + CoroutineLocalValue, + scheduleCoroutine, + memoryStats, + launchJob +} from "@koalaui/compat" +export { clamp, lerp, modulo, parseNumber, isFiniteNumber, getDistancePx } from "./math" +export { hashCodeFromString } from "./stringUtils" +export * from "./Finalization" +export { SHA1Hash, createSha1 } from "./sha1" +export { UniqueId } from "./uniqueId" +export * from "./koalaKey" diff --git a/koala_tools/incremental/common/src/koalaKey.ts b/koala_tools/incremental/common/src/koalaKey.ts new file mode 100644 index 0000000000000000000000000000000000000000..109a306d5cf637dafd7ca104f6043f158f1bb176 --- /dev/null +++ b/koala_tools/incremental/common/src/koalaKey.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { int32 } from "@koalaui/compat" + +export type KoalaCallsiteKey = int32 + +export class KoalaCallsiteKeys { + static readonly empty: KoalaCallsiteKey = 0 + + static combine(key1: KoalaCallsiteKey, key2: KoalaCallsiteKey): KoalaCallsiteKey { + return key1 + key2 + } + + static asString(key: KoalaCallsiteKey): string { + return key.toString(16) + } +} diff --git a/koala_tools/incremental/common/src/math.ts b/koala_tools/incremental/common/src/math.ts new file mode 100644 index 0000000000000000000000000000000000000000..95bf2b8bd4925d5c62451a2acd56dc7f1a672354 --- /dev/null +++ b/koala_tools/incremental/common/src/math.ts @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { asFloat64, float64 } from "@koalaui/compat" + +/** + * Computes the linear interpolation between `source` and `target` based on `weight`. + * + * @param weight - interpolation factor in the range [0..1] + * @param source - a value corresponding to weight 0 + * @param target - a value corresponding to weight 1 + * @returns interpolated value + */ +export function lerp(weight: float64, source: float64, target: float64): float64 { + return source * (1.0 - weight) + target * weight +} + +/** + * Clamps a {@link value} within the specified range. + * + * @param value - a value to clamp + * @param min - the lower boundary of the range + * @param max - the upper boundary of the range + * @returns `min` if `value` is less than `min`, + * `max` if `value` is greater than `max`, + * `value` otherwise + */ +export function clamp(value: float64, min: float64, max: float64): float64 { + return value <= min ? min : value >= max ? max : value +} + +/** + * Calculates the difference between the argument and + * the largest (closest to positive infinity) integer value + * that is less than or equal to the argument. + * + * @param value a floating-point value to process + * @returns a floor modulus of the given value in the range [0..1) + */ +export function modulo(value: float64): float64 { + // The casts below are needed since floor returns double in ArkTS + const modulo: float64 = value - Math.floor(value) + return (modulo < 1.0) ? modulo : 0.0 +} + +/** + * @param str a string to parse + * @param name a name for error message + * @param verify whether to verify parsing validity + * @returns a floating-point number + * @throws Error if `str` cannot be parsed + */ +export function parseNumber(str: string, name: string = "number", verify: boolean = false): float64 { + if (str != "") { // do not parse empty string to 0 + // ArkTS does not support NaN, isNaN, parseFloat + const value = asFloat64(str) + if (verify) { + const reverseStr = value.toString() + if (reverseStr !== undefined && reverseStr?.length == str.length && reverseStr == str) { + return value + } + } + else { + return value + } + } + throw new Error(`cannot parse ${name}: "${str}"`) +} + +/** + * An ArkTS-compliant replacement for {@link isFinite}. + */ +export function isFiniteNumber(number: float64): boolean { + // With Node.js: + // isFiniteNumber(Number.NEGATIVE_INFINITY) == false + // isFiniteNumber(Number.POSITIVE_INFINITY) == false + // isFiniteNumber(NaN) == false + return number >= Number.MIN_SAFE_INTEGER && number <= Number.MAX_SAFE_INTEGER +} + +export function getDistancePx(startX: float64, startY: float64, endX: float64, endY: float64): float64 { + const cathetA = Math.abs(endX - startX) + const cathetB = Math.abs(endY - startY) + return Math.sqrt(cathetA * cathetA + cathetB * cathetB) as float64 +} \ No newline at end of file diff --git a/koala_tools/incremental/common/src/sha1.ts b/koala_tools/incremental/common/src/sha1.ts new file mode 100644 index 0000000000000000000000000000000000000000..ad4ec9bfdec31d858431071cd89cc98503d96402 --- /dev/null +++ b/koala_tools/incremental/common/src/sha1.ts @@ -0,0 +1,354 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { CustomTextDecoder, float64toInt32, int64to32 } from "@koalaui/compat" +import { int32 } from "@koalaui/compat" + +const K = [ + 0x5a827999 | 0, + 0x6ed9eba1 | 0, + 0x8f1bbcdc | 0, + 0xca62c1d6 | 0, +] + +const inputBytes = 64 +const inputWords = inputBytes / 4 +const highIndex = inputWords - 2 +const lowIndex = inputWords - 1 +const workWords = 80 +const allocBytes = 80 +const allocWords = allocBytes / 4 +const allocTotal = allocBytes * 100 + +export function createSha1(): SHA1Hash { + return new SHA1Hash() +} + +export class SHA1Hash { + private A = 0x67452301 | 0 + private B = 0xefcdab89 | 0 + private C = 0x98badcfe | 0 + private D = 0x10325476 | 0 + private E = 0xc3d2e1f0 | 0 + private readonly _byte: Uint8Array + private readonly _word: Int32Array + private _size = 0 + private _sp = 0 // surrogate pair + + constructor() { + if (!sharedBuffer || sharedOffset >= allocTotal) { + sharedBuffer = new ArrayBuffer(allocTotal) + sharedOffset = 0 + } + + this._byte = new Uint8Array(sharedBuffer, sharedOffset, allocBytes) + this._word = new Int32Array(sharedBuffer, sharedOffset, allocWords) + sharedOffset += allocBytes + } + + updateString(data: string, encoding?: string): SHA1Hash { + return this._utf8(data) + } + updateInt32(data: int32): SHA1Hash { + const buffer = new Int32Array(1) + buffer[0] = data + return this.update(buffer) + } + + update(data: Int32Array | Float32Array | Uint32Array | Uint8Array): SHA1Hash { + if (data == null) { + throw new TypeError("SHA1Hash expected non-null data: ") + } + + let byteOffset: int32 = 0 + let length: int32 = 0 + let buffer: ArrayBufferLike | undefined = undefined + + // Improve: an attempt to wrie this in a generic form causes + // es2panda to segfault. + let BYTES_PER_ELEMENT = 4 + if (data instanceof Int32Array) { + byteOffset = float64toInt32(data.byteOffset) + length = float64toInt32(data.byteLength) + buffer = data.buffer + } else if (data instanceof Uint32Array) { + byteOffset = float64toInt32(data.byteOffset) + length = float64toInt32(data.byteLength) + buffer = data.buffer + } else if (data instanceof Float32Array) { + byteOffset = float64toInt32(data.byteOffset) + length = float64toInt32(data.byteLength) + buffer = data.buffer + } else if (data instanceof Uint8Array) { + byteOffset = float64toInt32(data.byteOffset) + length = float64toInt32(data.byteLength) + buffer = data.buffer + BYTES_PER_ELEMENT = 1 + } + + let blocks: int32 = (length / inputBytes) | 0 + let offset: int32 = 0 + + // longer than 1 block + if ((blocks != 0) && !(byteOffset & 3) && !(this._size % inputBytes)) { + const block = new Int32Array(buffer!, byteOffset, blocks * inputWords) + while (blocks--) { + this._int32(block, offset >> 2) + offset += inputBytes + } + this._size += offset + } + + // data: TypedArray | DataView + if ((BYTES_PER_ELEMENT != 1) && buffer != undefined) { + const rest = new Uint8Array(buffer, byteOffset + offset, length - offset) + return this._uint8(rest) + } + + // no more bytes + if (offset == length) return this + + return this._uint8(new Uint8Array(buffer!), offset) + } + + private _uint8(data: Uint8Array, offset?: int32): SHA1Hash { + const _byte = this._byte + const _word = this._word + const length = data.length + offset = (offset ?? 0) | 0 + + while (offset < length) { + const start = this._size % inputBytes + let index = start + + while (offset < length && index < inputBytes) { + _byte[index++] = data[offset++] + } + + if (index >= inputBytes) { + this._int32(_word) + } + + this._size += index - start + } + + return this + } + + private _utf8(text: string): SHA1Hash { + const _byte = this._byte + const _word = this._word + const length = text.length + let surrogate = this._sp + + for (let offset = 0; offset < length; ) { + const start = this._size % inputBytes + let index = start + + while (offset < length && index < inputBytes) { + let code = float64toInt32(text.charCodeAt(offset++)) | 0 + if (code < 0x80) { + // ASCII characters + _byte[index++] = code + } else if (code < 0x800) { + // 2 bytes + _byte[index++] = 0xC0 | (code >>> 6) + _byte[index++] = 0x80 | (code & 0x3F) + } else if (code < 0xD800 || code > 0xDFFF) { + // 3 bytes + _byte[index++] = 0xE0 | (code >>> 12) + _byte[index++] = 0x80 | ((code >>> 6) & 0x3F) + _byte[index++] = 0x80 | (code & 0x3F) + } else if (surrogate) { + // 4 bytes - surrogate pair + code = ((surrogate & 0x3FF) << 10) + (code & 0x3FF) + 0x10000 + _byte[index++] = 0xF0 | (code >>> 18) + _byte[index++] = 0x80 | ((code >>> 12) & 0x3F) + _byte[index++] = 0x80 | ((code >>> 6) & 0x3F) + _byte[index++] = 0x80 | (code & 0x3F) + surrogate = 0 + } else { + surrogate = int64to32(code) + } + } + + if (index >= inputBytes) { + this._int32(_word) + _word[0] = _word[inputWords] + } + + this._size += index - start + } + + this._sp = surrogate + return this + } + + private _int32(data: Int32Array, offset?: int32): void { + let A = this.A + let B = this.B + let C = this.C + let D = this.D + let E = this.E + let i = 0 + offset = (offset ?? 0) | 0 + + while (i < inputWords) { + W[i++] = swap32(float64toInt32(data[offset!++])) + } + + for (i = inputWords; i < workWords; i++) { + W[i] = rotate1(float64toInt32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])) + } + + for (i = 0; i < workWords; i++) { + const S = (i / 20) | 0 + const T = float64toInt32((rotate5(A) + ft(S, B, C, D) + E + W[i] + K[S]) | 0) + E = D + D = C + C = rotate30(B) + B = A + A = T + } + + this.A = (A + this.A) | 0 + this.B = (B + this.B) | 0 + this.C = (C + this.C) | 0 + this.D = (D + this.D) | 0 + this.E = (E + this.E) | 0 + } + + // digest(): Uint8Array + // digest(encoding: string): string + digest(encoding?: string): Uint8Array | string { + const _byte = this._byte + const _word = this._word + let i = (this._size % inputBytes) | 0 + _byte[i++] = 0x80 + + // pad 0 for current word + while (i & 3) { + _byte[i++] = 0 + } + i >>= 2 + + if (i > highIndex) { + while (i < inputWords) { + _word[i++] = 0 + } + i = 0 + this._int32(_word) + } + + // pad 0 for rest words + while (i < inputWords) { + _word[i++] = 0 + } + + // input size + const bits64: int32 = this._size * 8 + const low32: int32 = float64toInt32((bits64 & 0xffffffff) >>> 0) + const high32: int32 = float64toInt32((bits64 - low32) / 0x100000000) + if (high32) _word[highIndex] = swap32(high32) + if (low32) _word[lowIndex] = swap32(low32) + + this._int32(_word) + + return (encoding === "hex") ? this._hex() : this._bin() + } + + private _hex(): string { + let A = this.A + let B = this.B + let C = this.C + let D = this.D + let E = this.E + + return hex32Str(A, B, C, D, E) + } + + private _bin(): Uint8Array { + let A = this.A + let B = this.B + let C = this.C + let D = this.D + let E = this.E + const _byte = this._byte + const _word = this._word + + _word[0] = swap32(A) + _word[1] = swap32(B) + _word[2] = swap32(C) + _word[3] = swap32(D) + _word[4] = swap32(E) + + return _byte.slice(0, 20) + } +} + +type NS = (num: int32) => string +type NN = (num: int32) => int32 + +const W = new Int32Array(workWords) + +let sharedBuffer: ArrayBuffer +let sharedOffset: int32 = 0 + +const swapLE: NN = ((c:int32):int32 => (((c << 24) & 0xff000000) | ((c << 8) & 0xff0000) | ((c >> 8) & 0xff00) | ((c >> 24) & 0xff))) +const swapBE: NN = ((c:int32):int32 => c) +const swap32: NN = isBE() ? swapBE : swapLE +const rotate1: NN = (num: int32): int32 => (num << 1) | (num >>> 31) +const rotate5: NN = (num: int32): int32 => (num << 5) | (num >>> 27) +const rotate30: NN = (num: int32): int32 => (num << 30) | (num >>> 2) + +function isBE(): boolean { + let a16 = new Uint16Array(1) + a16[0] = 0xFEFF + let a8 = new Uint8Array(a16.buffer) + return a8[0] == 0xFE // BOM +} + + +function ft(s: int32, b: int32, c: int32, d: int32) { + if (s == 0) return (b & c) | ((~b) & d) + if (s == 2) return (b & c) | (b & d) | (c & d) + return b ^ c ^ d +} + +const hex32Decoder = new CustomTextDecoder() +const hex32DecodeBuffer = new Uint8Array(40) +function hex32Str(A: int32, B: int32, C: int32, D: int32, E: int32): string { + writeIntAsHexUTF8(A, hex32DecodeBuffer, 0) + writeIntAsHexUTF8(B, hex32DecodeBuffer, 8) + writeIntAsHexUTF8(C, hex32DecodeBuffer, 16) + writeIntAsHexUTF8(D, hex32DecodeBuffer, 24) + writeIntAsHexUTF8(E, hex32DecodeBuffer, 32) + return hex32Decoder.decode(hex32DecodeBuffer) +} + +function writeIntAsHexUTF8(value: int32, buffer: Uint8Array, byteOffset: int32) { + buffer[byteOffset++] = nibbleToHexCode((value >> 28) & 0xF) + buffer[byteOffset++] = nibbleToHexCode((value >> 24) & 0xF) + buffer[byteOffset++] = nibbleToHexCode((value >> 20) & 0xF) + buffer[byteOffset++] = nibbleToHexCode((value >> 16) & 0xF) + buffer[byteOffset++] = nibbleToHexCode((value >> 12) & 0xF) + buffer[byteOffset++] = nibbleToHexCode((value >> 8 ) & 0xF) + buffer[byteOffset++] = nibbleToHexCode((value >> 4 ) & 0xF) + buffer[byteOffset++] = nibbleToHexCode((value >> 0 ) & 0xF) +} + +function nibbleToHexCode(nibble: int32) { + return nibble > 9 ? nibble + 87 : nibble + 48 +} diff --git a/koala_tools/incremental/common/src/stringUtils.ts b/koala_tools/incremental/common/src/stringUtils.ts new file mode 100644 index 0000000000000000000000000000000000000000..439460fe08088b7b9ee27de5e2716194b99b490e --- /dev/null +++ b/koala_tools/incremental/common/src/stringUtils.ts @@ -0,0 +1,28 @@ +/* + * 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 { float64toInt32, int32, int64to32 } from "@koalaui/compat" + + +/** + * Computes a hash code from the string {@link value}. + */ +export function hashCodeFromString(value: string): int32 { + let hash = 5381 + for(let i = 0; i < value.length; i++) { + hash = int64to32((hash * 33) ^ float64toInt32(value.charCodeAt(i))) + } + return hash +} diff --git a/koala_tools/incremental/common/src/uniqueId.ts b/koala_tools/incremental/common/src/uniqueId.ts new file mode 100644 index 0000000000000000000000000000000000000000..8087362c32705b3a3d110c9f8a1bb5721b4f8594 --- /dev/null +++ b/koala_tools/incremental/common/src/uniqueId.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { float64toInt32, int32 } from "@koalaui/compat" +import { createSha1 } from "./sha1"; + +export class UniqueId { + private sha = createSha1() + + public addString(data: string): UniqueId { + this.sha.updateString(data) + return this + } + + public addI32(data: int32): UniqueId { + this.sha.updateInt32(data) + return this + } + + public addF32Array(data: Float32Array): UniqueId { + this.sha.update(data) + return this + } + + public addI32Array(data: Int32Array): UniqueId { + this.sha.update(data) + return this + } + + public addU32Array(data: Uint32Array): UniqueId { + this.sha.update(data) + return this + } + + public addU8Array(data: Uint8Array): UniqueId { + this.sha.update(data) + return this + } + + public addPtr(data: Uint32Array | number): UniqueId { + if (data instanceof Uint32Array) { + return this.addU32Array(data) + } + return this.addI32(float64toInt32(data)) + } + + public compute(): string { + return this.sha.digest("hex") as string + } +} diff --git a/koala_tools/incremental/common/tsconfig.json b/koala_tools/incremental/common/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..443ddd555f10cccdf26ec4a7c46345652c18b6ca --- /dev/null +++ b/koala_tools/incremental/common/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "@koalaui/build-common/tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "build/lib", + "module": "CommonJS", + "paths": { + "@koalaui/compat": ["../compat/typescript"] + } + }, + "include": ["./src/**/*"], + "exclude": ["./src/ohos"], + "references": [ + {"path": "../compat"} + ] +} diff --git a/koala_tools/incremental/common/ui2abcconfig.json b/koala_tools/incremental/common/ui2abcconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..dcacec76b99a9d7f60c6f2f3a3b18c1a87480bea --- /dev/null +++ b/koala_tools/incremental/common/ui2abcconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "package": "@koalaui/common", + "outDir": "build/abc", + "baseUrl": "./src", + "paths": { + "@koalaui/compat": ["../../compat/src/arkts"] + } + }, + "include": ["src/**/*.ts"], + "references": [ + { "path": "../compat" } + ] +} diff --git a/koala_tools/incremental/compat/package.json b/koala_tools/incremental/compat/package.json new file mode 100644 index 0000000000000000000000000000000000000000..667b7cb0e7204b8a50b60012c6094583b6865432 --- /dev/null +++ b/koala_tools/incremental/compat/package.json @@ -0,0 +1,39 @@ +{ + "name": "@koalaui/compat", + "version": "1.7.9+devel", + "description": "", + "main": "build/src/index.js", + "types": "build/src/index.d.ts", + "files": [ + "build/src/**/*.js", + "build/src/**/*.d.ts", + "src/**/*" + ], + "imports": { + "#platform": { + "ark": "./build/src/ohos/index.js", + "ios": "./build/src/typescript/index.js", + "browser": "./build/src/typescript/index.js", + "node": "./build/src/typescript/index.js", + "default": "./build/src/typescript/index.js" + } + }, + "exports": { + ".": "./build/src/index.js" + }, + "scripts": { + "clean": "rimraf build dist", + "compile": "ets-tsc -b .", + "compile:release": "ets-tsc -b .", + "build": "node ../../ui2abc/fast-arktsc --config ./ui2abcconfig.json --compiler ../tools/panda/arkts/ui2abc --link-name ./build/compat.abc --simultaneous && PANDA_SDK_PATH=${PANDA_SDK_PATH:=../tools/panda/node_modules/@panda/sdk} ninja ${NINJA_OPTIONS} -f build/abc/build.ninja" + }, + "keywords": [], + "dependencies": {}, + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", + "eslint-plugin-unused-imports": "^2.0.0", + "source-map-support": "^0.5.21" + } +} \ No newline at end of file diff --git a/koala_tools/incremental/compat/src/arkts/array.ts b/koala_tools/incremental/compat/src/arkts/array.ts new file mode 100644 index 0000000000000000000000000000000000000000..e6d3eaf2b1dcf0e71bd6ede7241f911cd331c8fa --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/array.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2022-2024 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 { float64, int32, int8 } from "./types" + +// Improve: this can be a performance disaster +// just wait for the library to provide the proper functionality. +export function asArray(value: T[]): Array { + return Array.of(...value) +} + +// Improve: this can be a performance disaster +// just wait for the library to provide the proper functionality. +export function Array_from_set(set: Set): Array { + const array = new Array() // to avoid creation of undefined content + const values = set.values() + for (let it = values.next(); it.done != true; it = values.next()) { + array.push(it.value as T) + } + return array +} + +// Improve: this can be a performance disaster +// just wait for the library to provide the proper functionality. +export function Array_from_int32(data: Int32Array): number[] { + const result: number[] = [] + for (let i: int32 = 0; i < data.length; i++) { + result[i] = data.at(i) as number + } + return result +} + +// Improve: this can be a performance disaster +// just wait for the library to provide the proper functionality. +export function Array_from_number(data: float64[]): Array { + const result = new Array(data.length) + for (let i: int32 = 0; i < data.length; i++) { + result[i] = data[i] + } + return result +} + +export function int8Array(size: int32): FixedArray { + const array: FixedArray = new int8[size] + return array +} + diff --git a/koala_tools/incremental/compat/src/arkts/atomic.ts b/koala_tools/incremental/compat/src/arkts/atomic.ts new file mode 100644 index 0000000000000000000000000000000000000000..bbe71d19e2eb31df68cb7e48385699260b0727c0 --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/atomic.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +/** + * A reference that may be updated atomically. + */ +export class AtomicRef { + value: Value + + /** + * Creates a new reference object with the given initial value. + * @param value - the new value + */ + constructor(value: Value) { + this.value = value + } + + /** + * Atomically sets the reference value to the given value and returns the previous one. + * @param value - the new value + * @returns the previous value + */ + getAndSet(value: Value): Value { + // Improve: replace with the implementation from ArkTS language when it is ready + const result = this.value + this.value = value + return result + } +} diff --git a/koala_tools/incremental/compat/src/arkts/finalization.ts b/koala_tools/incremental/compat/src/arkts/finalization.ts new file mode 100644 index 0000000000000000000000000000000000000000..021bc1d43f17c58b07110041d506202183097f1f --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/finalization.ts @@ -0,0 +1,31 @@ + +/* + * Copyright (c) 2024 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. + */ + +export interface Thunk { + clean(): void +} + +const registry = new FinalizationRegistry((thunk: Thunk) => { + thunk.clean() +}) + +export function finalizerRegister(target: Object, thunk: Object) { + registry.register(target, thunk as Thunk) +} + +export function finalizerUnregister(target: Object) { + registry.unregister(target) +} diff --git a/koala_tools/incremental/compat/src/arkts/index.ts b/koala_tools/incremental/compat/src/arkts/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..610fafc3ffb8b55ef552769eb184e54d1eec36e1 --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/index.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +export * from "./array" +export * from "./atomic" +export * from "./primitive" +export * from "./finalization" +export * from "./performance" +export * from "./prop-deep-copy" +export * from "./observable" +export * from "./reflection" +export * from "./strings" +export * from "./ts-reflection" +export * from "./types" +export * from "./utils" diff --git a/koala_tools/incremental/compat/src/arkts/observable.ts b/koala_tools/incremental/compat/src/arkts/observable.ts new file mode 100644 index 0000000000000000000000000000000000000000..b9b3038124db9918ae8f10199ca2fe20ae983d24 --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/observable.ts @@ -0,0 +1,1255 @@ +/* + * Copyright (c) 2022-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. + */ + +export function getObservableTarget(proxy0: Object): Object { + try { + // do not use proxy for own observables + if (proxy0 instanceof ObservableArray + || proxy0 instanceof ObservableDate + || proxy0 instanceof ObservableMap + || proxy0 instanceof ObservableSet ) { + return proxy0 + } + return (proxy.Proxy.tryGetTarget(proxy0) as Object|undefined|null) ?? proxy0 + } catch (error) { + return proxy0 + } +} + +/** + * Data class decorator that makes all child fields trackable. + */ +export function Observed() { + throw new Error("TypeScript class decorators are not supported yet") +} + +/** @internal */ +export interface Observable { + /** + * It is called when the observable value is accessed. + * @param propertyName - Optional name of the accessed property. + * Should be provided when tracking individual properties. + * */ + onAccess(propertyName?: string): void + /** + * It is called when the observable value is modified. + * @param propertyName - Optional name of the modified property. + * Should be provided when tracking individual properties. + * */ + onModify(propertyName?: string): void +} + +/** @internal */ +export class ObservableHandler implements Observable { + private static handlers: WeakMap | undefined = undefined + + private parents = new Set() + private children = new Map() + + private readonly observables = new Set() + private _modified = false + + readonly observed: boolean + constructor(parent?: ObservableHandler, observed: boolean = false) { + this.observed = observed + if (parent) this.addParent(parent) + } + + onAccess(propertyName?: string): void { + if (this.observables.size > 0) { + const it = this.observables.keys() + while (true) { + const result = it.next() + if (result.done) break + result.value?.onAccess(propertyName) + } + } + } + + onModify(propertyName?: string): void { + const set = new Set() + this.collect(true, set) + set.forEach((handler: ObservableHandler) => { + handler._modified = true + if (handler.observables.size > 0) { + const it = handler.observables.keys() + while (true) { + const result = it.next() + if (result.done) break + result.value?.onModify(propertyName) + } + } + }) + } + + static dropModified(value: Value): boolean { + const handler = ObservableHandler.findIfObject(value) + if (handler === undefined) return false + const result = handler._modified + handler._modified = false + return result + } + + /** Adds the specified `observable` to the handler corresponding to the given `value`. */ + static attach(value: Value, observable: Observable): void { + const handler = ObservableHandler.findIfObject(value) + if (handler) handler.observables.add(observable) + } + + /** Deletes the specified `observable` from the handler corresponding to the given `value`. */ + static detach(value: Value, observable: Observable): void { + const handler = ObservableHandler.findIfObject(value) + if (handler) handler.observables.delete(observable) + } + + /** @returns the handler corresponding to the given `value` if it was installed */ + private static findIfObject(value: Value): ObservableHandler | undefined { + const handlers = ObservableHandler.handlers + return handlers !== undefined && value instanceof Object ? handlers.get(getObservableTarget(value as Object)) : undefined + } + + /** + * @param value - any non-null object including arrays + * @returns an observable handler or `undefined` if it is not installed + */ + static find(value: Object): ObservableHandler | undefined { + const handlers = ObservableHandler.handlers + return handlers ? handlers.get(getObservableTarget(value)) : undefined + } + + /** + * @param value - any non-null object including arrays + * @param observable - a handler to install on this object + * @throws an error if observable handler cannot be installed + */ + static installOn(value: Object, observable?: ObservableHandler): void { + let handlers = ObservableHandler.handlers + if (handlers === undefined) { + handlers = new WeakMap() + ObservableHandler.handlers = handlers + } + observable + ? handlers.set(getObservableTarget(value), observable) + : handlers.delete(getObservableTarget(value)) + } + + addParent(parent: ObservableHandler) { + const count = parent.children.get(this) ?? 0 + parent.children.set(this, count + 1) + this.parents.add(parent) + } + + hasChild(child: ObservableHandler): boolean { + return this.children.has(child) + } + + removeParent(parent: ObservableHandler) { + const count = parent.children.get(this) ?? 0 + if (count > 1) { + parent.children.set(this, count - 1) + } + else if (count == 1) { + parent.children.delete(this) + this.parents.delete(parent) + } + } + + removeChild(value: Value) { + const child = ObservableHandler.findIfObject(value) + if (child) child.removeParent(this) + } + + private collect(all: boolean, guards: Set) { + if (guards.has(this)) return guards // already collected + guards.add(this) // handler is already guarded + this.parents.forEach((handler: ObservableHandler) => { handler.collect(all, guards) }) + if (all) this.children.forEach((_count: number, handler: ObservableHandler) => { handler.collect(all, guards) }) + return guards + } + + static contains(observable: ObservableHandler, guards?: Set) { + if (observable.observed) return true + if (guards === undefined) guards = new Set() // create if needed + else if (guards!.has(observable)) return false // already checked + guards.add(observable) // handler is already guarded + for (const it of observable.parents.keys()) { + if (ObservableHandler.contains(it, guards)) return true + } + return false + } +} + +/** @internal */ +export function observableProxyArray(...value: Value[]): Array { + return observableProxy(Array.of(...value)) +} + +/** @internal */ +export function observableProxy(value: Value, parent?: ObservableHandler, observed?: boolean, strict: boolean = true): Value { + if (value instanceof ObservableHandler) return value as Value // do not proxy a marker itself + if (value == null || !(value instanceof Object)) return value as Value // only non-null object can be observable + const observable = ObservableHandler.find(value as Object) + if (observable) { + if (parent) { + if (strict) observable.addParent(parent) + if (observed === undefined) observed = ObservableHandler.contains(parent) + } + if (observed) { + if (value instanceof Array) { + for (let index = 0; index < value.length; index++) { + value[index] = observableProxy(value[index], observable, observed, false) + } + } else { + // Improve: proxy fields of the given object + } + } + return value as Value + } + if (value instanceof Array) { + return ObservableArray(value, parent, observed) as Value + } else if (value instanceof Map) { + return ObservableMap(value, parent, observed) as Value + } else if (value instanceof Set) { + return ObservableSet(value, parent, observed) as Value + } else if (value instanceof Date) { + return ObservableDate(value, parent, observed) as Value + } + + // Improve: Fatal error on using proxy with generic types + // see: panda issue #26492 + + const valueType = Type.of(value) + if (valueType instanceof ClassType && !(value instanceof BaseEnum)) { + const isObservable = isObservedV1Class(value as Object) + if (!hasTrackableProperties(value as Object) && !isObservable) { + return value as Value + } + if (valueType.hasEmptyConstructor()) { + const result = proxy.Proxy.create(value as Object, new CustomProxyHandler(isObservable)) as Value + ObservableHandler.installOn(result as Object, new ObservableHandler(parent)) + return result + } else { + throw new Error(`Class '${valueType.getName()}' must contain a default constructor`) + } + } + + return value as Value +} + +class CustomProxyHandler extends proxy.DefaultProxyHandler { + private readonly isObservable: boolean + + constructor(isObservable: boolean) { + super(); + this.isObservable = isObservable + } + + override get(target: T, name: string): Any { + const value = super.get(target, name) + const targetHandler = ObservableHandler.find(target) + if (targetHandler && this.isObservable) { + const valueHandler = ObservableHandler.find(value as Object) + if (valueHandler && !targetHandler.hasChild(valueHandler)) { + valueHandler.addParent(targetHandler) + } + } + targetHandler?.onAccess(name) + return value + } + + override set(target: T, name: string, value: Any): boolean { + const observable = ObservableHandler.find(target) + if (observable) { + observable.onModify(name) + observable.removeChild(super.get(target, name)) + value = observableProxy(value, observable, ObservableHandler.contains(observable)) + } + return super.set(target, name, value) + } +} + +function proxyChildrenOnly(array: T[], parent: ObservableHandler, observed?: boolean) { + for (let i = 0; i < array.length; i++) { + if (observed === undefined) observed = ObservableHandler.contains(parent) + array[i] = observableProxy(array[i], parent, observed) + } +} + +class ObservableArray extends Array { + static $_invoke(array: Array, parent?: ObservableHandler, observed?: boolean): Array { + return new ObservableArray(array, parent, observed); + } + + constructor(array: Array, parent?: ObservableHandler, observed?: boolean) { + super(array.length) + const handler = new ObservableHandler(parent) + for (let i = 0; i < array.length; i++) { + if (observed === undefined) observed = ObservableHandler.contains(handler) + super.$_set(i, observableProxy(array[i], handler, observed)) + } + ObservableHandler.installOn(this, handler) + } + + private get handler(): ObservableHandler | undefined { + return ObservableHandler.find(this) + } + + override get length(): int { + this.handler?.onAccess() + return super.length + } + + override set length(length: int) { + this.handler?.onModify() + super.length = length + } + + override at(index: int): T | undefined { + this.handler?.onAccess() + return super.at(index) + } + + override $_get(index: int): T { + this.handler?.onAccess() + return super.$_get(index) + } + + override $_set(index: int, value: T): void { + const handler = this.handler + if (handler) { + handler.onModify() + handler.removeChild(super.$_get(index)) + value = observableProxy(value, handler) + } + super.$_set(index, value) + } + + override copyWithin(target: int, start: int, end: int): this { + this.handler?.onModify() + super.copyWithin(target, start, end) + return this + } + + override fill(value: T, start: int, end: int): this { + const handler = this.handler + if (handler) { + handler.onModify() + value = observableProxy(value, handler) + } + super.fill(value, start, end) + return this + } + + override pop(): T | undefined { + const handler = this.handler + handler?.onModify() + const result = super.pop() + if (result) handler?.removeChild(result) + return result + } + + override pushArray(...items: T[]): number { + const handler = this.handler + if (handler) { + handler.onModify() + proxyChildrenOnly(items, handler) + } + return super.pushArray(...items) + } + + override pushOne(value: T): number { + const handler = this.handler + if (handler) { + handler.onModify() + value = observableProxy(value, handler) + } + return super.pushOne(value) + } + + override pushECMA(...items: T[]): number { + const handler = this.handler + if (handler) { + handler.onModify() + proxyChildrenOnly(items, handler) + } + return super.pushECMA(...items) + } + + override reverse(): this { + this.handler?.onModify() + super.reverse() + return this + } + + override shift(): T | undefined { + const handler = this.handler + handler?.onModify() + const result = super.shift() + if (result) handler?.removeChild(result) + return result + } + + override sort(comparator?: (a: T, b: T) => number): this { + this.handler?.onModify() + super.sort(comparator) + return this + } + + override splice(index: int, count: int, ...items: T[]): Array { + const handler = this.handler + if (handler) { + handler.onModify() + proxyChildrenOnly(items, handler) + const result = super.splice(index, count, ...items) + for (let i = 0; i < result.length; i++) { + handler.removeChild(result[i]) + } + return result + } + return super.splice(index, count, ...items) + } + + override unshift(...items: T[]): number { + const handler = this.handler + if (handler) { + handler.onModify() + proxyChildrenOnly(items, handler) + } + return super.unshift(...items) + } + + override keys(): IterableIterator { + this.handler?.onAccess() + return super.keys() + } + + // === methods with uncompatible implementation === + + override filter(predicate: (value: T, index: number, array: Array) => boolean): Array { + this.handler?.onAccess() + return super.filter(predicate) + } + + override flat(depth: int): Array { + this.handler?.onAccess() + return super.flat(depth) + } + + override flatMap(fn: (v: T, k: number, arr: Array) => U): Array { + this.handler?.onAccess() + return super.flatMap(fn) + } + + // === methods common among all arrays === + + override concat(...items: FixedArray>): Array { + this.handler?.onAccess() + return super.concat(...items) + } + + override find(predicate: (value: T, index: number, array: Array) => boolean): T | undefined { + this.handler?.onAccess() + return super.find(predicate) + } + + override findIndex(predicate: (value: T, index: number, array: Array) => boolean): number { + this.handler?.onAccess() + return super.findIndex(predicate) + } + + override findLast(predicate: (elem: T, index: number, array: Array) => boolean): T | undefined { + this.handler?.onAccess() + return super.findLast(predicate) + } + + override every(predicate: (value: T, index: number, array: Array) => boolean): boolean { + this.handler?.onAccess() + return super.every(predicate) + } + + override some(predicate: (value: T, index: number, array: Array) => boolean): boolean { + this.handler?.onAccess() + return super.some(predicate) + } + + override findLastIndex(predicate: (element: T, index: number, array: Array) => boolean): number { + this.handler?.onAccess() + return super.findLastIndex(predicate) + } + + override reduce(callbackfn: (previousValue: T, currentValue: T, index: number, array: Array) => T): T { + this.handler?.onAccess() + return super.reduce(callbackfn) + } + + override reduce(callbackfn: (previousValue: U, currentValue: T, index: number, array: Array) => U, initialValue: U): U { + this.handler?.onAccess() + return super.reduce(callbackfn, initialValue) + } + + override reduceRight(callbackfn: (previousValue: T, currentValue: T, index: number, array: Array) => T): T { + this.handler?.onAccess() + return super.reduceRight(callbackfn) + } + + override reduceRight(callbackfn: (previousValue: U, currentValue: T, index: number, array: Array) => U, initialValue: U): U { + this.handler?.onAccess() + return super.reduceRight(callbackfn, initialValue) + } + + override forEach(callbackfn: (value: T, index: number, array: Array) => void): void { + this.handler?.onAccess() + super.forEach(callbackfn) + } + + override slice(start: int, end: int): Array { + this.handler?.onAccess() + return super.slice(start, end) + } + + override lastIndexOf(searchElement: T, fromIndex: int): int { + this.handler?.onAccess() + return super.lastIndexOf(searchElement, fromIndex) + } + + override join(sep?: String): string { + this.handler?.onAccess() + return super.join(sep) + } + + override toLocaleString(): string { + this.handler?.onAccess() + return super.toLocaleString() + } + + override toSpliced(start: int, delete: int, ...items: FixedArray): Array { + this.handler?.onAccess() + return super.toSpliced(start, delete, ...items) + } + + override includes(val: T, fromIndex?: Number): boolean { + this.handler?.onAccess() + return super.includes(val, fromIndex) + } + + override indexOf(val: T, fromIndex?: int): int { + this.handler?.onAccess() + return super.indexOf(val, fromIndex) + } + + override toSorted(): Array { + this.handler?.onAccess() + return super.toSorted() + } + + override toSorted(comparator: (a: T, b: T) => number): Array { + this.handler?.onAccess() + return super.toSorted(comparator) + } + + override toReversed(): Array { + this.handler?.onAccess() + return super.toReversed() + } + + override with(index: int, value: T): Array { + this.handler?.onAccess() + return super.with(index, value) + } + + override values(): IterableIterator { + this.handler?.onAccess() + return super.values() + } + + override entries(): IterableIterator<[number, T]> { + this.handler?.onAccess() + return super.entries() + } + + override map(callbackfn: (value: T, index: number, array: Array) => U): Array { + this.handler?.onAccess() + return super.map(callbackfn) + } +} + +class ObservableMap extends Map { + static $_invoke(data: Map, parent?: ObservableHandler, observed?: boolean): Map { + return new ObservableMap(data, parent, observed); + } + + constructor(data: Map, parent?: ObservableHandler, observed?: boolean) { + super() + const handler = new ObservableHandler(parent) + for (let item: [T, V] of data.entries()) { + if (observed === undefined) observed = ObservableHandler.contains(handler) + super.set(item[0], observableProxy(item[1], handler, observed)) + } + ObservableHandler.installOn(this, handler) + } + + private get handler(): ObservableHandler | undefined { + return ObservableHandler.find(this) + } + + override get size(): int { + this.handler?.onAccess() + return super.size + } + + override has(key: T): boolean { + this.handler?.onAccess() + return super.has(key) + } + + override get(key: T): V | undefined { + this.handler?.onAccess() + return super.get(key) + } + + override set(key: T, value: V): this { + const handler = this.handler + if (handler) { + handler.onModify() + const prev = super.get(key) + if (prev) handler.removeChild(prev) + value = observableProxy(value, handler) + } + super.set(key, value) + return this + } + + override delete(key: T): boolean { + const handler = this.handler + if (handler) { + handler.onModify() + const value = super.get(key) + if (value) handler.removeChild(value) + } + return super.delete(key) + } + + override clear() { + const handler = this.handler + if (handler) { + handler.onModify() + for (let value of super.values()) { + handler!.removeChild(value) + } + } + super.clear() + } + + override keys(): IterableIterator { + this.handler?.onAccess() + return super.keys() + } + + override values(): IterableIterator { + this.handler?.onAccess() + return super.values() + } + + override $_iterator(): IterableIterator<[T, V]> { + this.handler?.onAccess() + return super.$_iterator() + } + + override entries(): IterableIterator<[T, V]> { + this.handler?.onAccess() + return super.entries() + } + + override forEach(callbackfn: (value: V, key: T, map: Map) => void) { + this.handler?.onAccess() + super.forEach(callbackfn) + } + + override toString(): string { + this.handler?.onAccess() + return super.toString() + } +} + +class ObservableSet extends Set { + private readonly elements: Map + + static $_invoke(data: Set, parent?: ObservableHandler, observed?: boolean): Set { + return new ObservableSet(data, parent, observed); + } + + constructor(data: Set, parent?: ObservableHandler, observed?: boolean) { + this.elements = new Map() + const handler = new ObservableHandler(parent) + for (let item of data.values()) { + if (observed === undefined) observed = ObservableHandler.contains(handler) + this.elements.set(item, observableProxy(item, handler, observed)) + } + ObservableHandler.installOn(this, handler) + } + + private get handler(): ObservableHandler | undefined { + return ObservableHandler.find(this) + } + + override toString(): string { + return new Set(this.elements.keys()).toString() + } + + override get size(): int { + this.handler?.onAccess() + return this.elements.size + } + + override has(value: T): boolean { + this.handler?.onAccess() + return this.elements.has(value) + } + + override add(value: T): this { + const handler = this.handler + let observable = value + if (handler) { + if (!this.elements.has(value)) handler.onModify() + const prev = this.elements.get(value) + if (prev) handler.removeChild(prev) + observable = observableProxy(value) + } + this.elements.set(value, observable) + return this + } + + override delete(value: T): boolean { + const handler = this.handler + if (handler) { + handler.onModify() + const prev = this.elements.get(value) + if (prev) handler.removeChild(prev) + } + return this.elements.delete(value) + } + + override clear() { + const handler = this.handler + if (handler) { + handler.onModify() + for (let value of this.elements.values()) { + handler!.removeChild(value) + } + } + this.elements.clear() + } + + override keys(): IterableIterator { + return this.values() + } + + override values(): IterableIterator { + this.handler?.onAccess() + return this.elements.values() + } + + override $_iterator(): IterableIterator { + return this.values() + } + + override entries(): IterableIterator<[T, T]> { + this.handler?.onAccess() + return new MappingIterator(this.elements.values(), (item) => [item, item]) + } + + override forEach(callbackfn: (value: T, key: T, set: Set) => void) { + this.handler?.onAccess() + const it = this.elements.values() + while (true) { + const item = it.next() + if (item.done) return + callbackfn(item.value as T, item.value as T, this) + } + } +} + +class MappingIterator implements IterableIterator { + private it: IterableIterator + private mapper: (value: T) => V + + constructor(it: IterableIterator, fn: (value: T) => V) { + this.it = it + this.mapper = fn + } + + override next(): IteratorResult { + const item = this.it.next() + if (item.done) return new IteratorResult() + return new IteratorResult(this.mapper(item.value as T)) + } + + override $_iterator(): IterableIterator { + return this + } +} + +class ObservableDate extends Date { + static $_invoke(value: Date, parent?: ObservableHandler, observed?: boolean): Date { + return new ObservableDate(value, parent, observed); + } + + constructor(value: Date, parent?: ObservableHandler, observed?: boolean) { + super(value) + const handler = new ObservableHandler(parent) + ObservableHandler.installOn(this, handler) + } + + private get handler(): ObservableHandler | undefined { + return ObservableHandler.find(this) + } + + override isDateValid(): boolean { + this.handler?.onAccess() + return super.isDateValid() + } + + override valueOf(): number { + this.handler?.onAccess() + return super.valueOf() + } + + override toLocaleTimeString(): string { + this.handler?.onAccess() + return super.toLocaleTimeString() + } + + override toLocaleString(): string { + this.handler?.onAccess() + return super.toLocaleString() + } + + override toLocaleDateString(): string { + this.handler?.onAccess() + return super.toLocaleDateString() + } + + override toISOString(): string { + this.handler?.onAccess() + return super.toISOString() + } + + override toTimeString(): string { + this.handler?.onAccess() + return super.toTimeString() + } + + override toDateString(): string { + this.handler?.onAccess() + return super.toDateString() + } + + override toString(): string { + this.handler?.onAccess() + return super.toString() + } + + override toUTCString(): string { + this.handler?.onAccess() + return super.toUTCString() + } + + override getDate(): number { + this.handler?.onAccess() + return super.getDate() + } + + override setDate(value: byte) { + this.handler?.onModify() + super.setDate(value) + } + + override setDate(value: number): number { + this.handler?.onModify() + return super.setDate(value) + } + + override getUTCDate(): number { + this.handler?.onAccess() + return super.getUTCDate() + } + + override setUTCDate(value: byte) { + this.handler?.onModify() + super.setUTCDate(value) + } + + override setUTCDate(value: number): number { + this.handler?.onModify() + return super.setUTCDate(value) + } + + override getDay(): number { + this.handler?.onAccess() + return super.getDay() + } + + override setDay(value: byte) { + this.handler?.onModify() + super.setDay(value) + } + + override getUTCDay(): number { + this.handler?.onAccess() + return super.getUTCDay() + } + + override setUTCDay(value: byte) { + this.handler?.onModify() + super.setUTCDay(value) + } + + override setUTCDay(value: number): number { + this.handler?.onModify() + return super.setUTCDay(value) + } + + override getMonth(): number { + this.handler?.onAccess() + return super.getMonth() + } + + override setMonth(value: int) { + this.handler?.onModify() + super.setMonth(value) + } + + override setMonth(value: number, date?: number): number { + this.handler?.onModify() + return super.setMonth(value, date) + } + + override getUTCMonth(): number { + this.handler?.onAccess() + return super.getUTCMonth() + } + + override setUTCMonth(value: int) { + this.handler?.onModify() + super.setUTCMonth(value) + } + + override setUTCMonth(value: number, date?: number): number { + this.handler?.onModify() + return super.setUTCMonth(value, date) + } + + override getYear(): int { + this.handler?.onAccess() + return super.getYear() + } + + override setYear(value: int) { + this.handler?.onModify() + super.setYear(value) + } + + override setYear(value: number) { + this.handler?.onModify() + super.setYear(value) + } + + override getFullYear(): number { + this.handler?.onAccess() + return super.getFullYear() + } + + override setFullYear(value: number, month?: number, date?: number): number { + this.handler?.onModify() + return super.setFullYear(value, month, date) + } + + override setFullYear(value: int) { + this.handler?.onModify() + super.setFullYear(value) + } + + override getUTCFullYear(): number { + this.handler?.onAccess() + return super.getUTCFullYear() + } + + override setUTCFullYear(value: number, month?: number, date?: number): number { + this.handler?.onModify() + return super.setUTCFullYear(value, month, date) + } + + override setUTCFullYear(value: int) { + this.handler?.onModify() + super.setUTCFullYear(value) + } + + override getTime(): number { + this.handler?.onAccess() + return super.getTime() + } + + override setTime(value: long) { + this.handler?.onModify() + super.setTime(value) + } + + override setTime(value: number): number { + this.handler?.onModify() + return super.setTime(value) + } + + override getHours(): number { + this.handler?.onAccess() + return super.getHours() + } + + override setHours(value: number, min?: number, sec?: number, ms?: number): number { + this.handler?.onModify() + return super.setHours(value, min, sec, ms) + } + + override setHours(value: byte) { + this.handler?.onModify() + super.setHours(value) + } + + override getUTCHours(): number { + this.handler?.onAccess() + return super.getUTCHours() + } + + override setUTCHours(value: number, min?: number, sec?: number, ms?: number): number { + this.handler?.onModify() + return super.setUTCHours(value, min, sec, ms) + } + + override setUTCHours(value: byte) { + this.handler?.onModify() + super.setUTCHours(value) + } + + override getMilliseconds(): number { + this.handler?.onAccess() + return super.getMilliseconds() + } + + override setMilliseconds(value: short) { + this.handler?.onModify() + super.setMilliseconds(value) + } + + override setMilliseconds(value: number): number { + this.handler?.onModify() + return super.setMilliseconds(value) + } + + override getUTCMilliseconds(): number { + this.handler?.onAccess() + return super.getUTCMilliseconds() + } + + override setUTCMilliseconds(value: short) { + this.handler?.onModify() + super.setUTCMilliseconds(value) + } + + override setUTCMilliseconds(value: number): number { + this.handler?.onModify() + return super.setUTCMilliseconds(value) + } + + override getSeconds(): number { + this.handler?.onAccess() + return super.getSeconds() + } + + override setSeconds(value: byte) { + this.handler?.onModify() + super.setSeconds(value) + } + + override setSeconds(value: number, ms?: number): number { + this.handler?.onModify() + return super.setSeconds(value, ms) + } + + override getUTCSeconds(): number { + this.handler?.onAccess() + return super.getUTCSeconds() + } + + override setUTCSeconds(value: byte) { + this.handler?.onModify() + super.setUTCSeconds(value) + } + + override setUTCSeconds(value: number, ms?: number): number { + this.handler?.onModify() + return super.setUTCSeconds(value, ms) + } + + override getMinutes(): number { + this.handler?.onAccess() + return super.getMinutes() + } + + override setMinutes(value: byte) { + this.handler?.onModify() + super.setMinutes(value) + } + + override setMinutes(value: number, sec?: Number, ms?: number): number { + this.handler?.onModify() + return super.setMinutes(value, sec, ms) + } + + override getUTCMinutes(): number { + this.handler?.onAccess() + return super.getUTCMinutes() + } + + override setUTCMinutes(value: byte) { + this.handler?.onModify() + super.setUTCMinutes(value) + } + + override setUTCMinutes(value: number, sec?: Number, ms?: number): number { + this.handler?.onModify() + return super.setUTCMinutes(value, sec, ms) + } +} + +function getClassMetadata(value: T): ClassMetadata | undefined { + return value instanceof ObservableClass ? value.getClassMetadata() : undefined +} + +function isObservedV1Class(value: Object): boolean { + return getClassMetadata(value)?.isObservedV1(value) ?? false +} + +function hasTrackableProperties(value: Object): boolean { + return getClassMetadata(value)?.hasTrackableProperties() ?? false +} + +/** + * Interface for getting the observability status of a class + */ +export interface ObservableClass { + getClassMetadata(): ClassMetadata | undefined +} + +/** + * Interface for checking the observed properties of a class + */ +export interface TrackableProperties { + isTrackable(propertyName: string): boolean +} + +/** + * If value is a class, then returns a list of trackable properties + * @param value + */ +export function trackableProperties(value: T): TrackableProperties | undefined { + return getClassMetadata(value) +} + +export class ClassMetadata implements TrackableProperties { + private readonly parent: ClassMetadata | undefined + private readonly markAsObservedV1: boolean + private readonly markAsObservedV2: boolean + private readonly targetClass: Class + private static readonly metadataPropName = "__classMetadata" + + /** + * Class property names marked with the @Track or @Trace decorator + * @private + */ + private readonly trackableProperties: ReadonlySet | undefined + + /** + * Contains fields marked with the @Type decorator. + * The key of the map is the property name and the value is the typename of the corresponding field. + * @private + */ + private readonly typedProperties: ReadonlyMap | undefined + + constructor(parent: ClassMetadata | undefined, + markAsObservedV1: boolean, + markAsObservedV2: boolean, + trackable: string[] | undefined, + typed: [string, string][] | undefined) { + const target = Class.ofCaller() + if (target == undefined) { + throw new Error("ClassMetadata must be created in the class context") + } + this.targetClass = target! + this.parent = parent + this.markAsObservedV1 = markAsObservedV1 + this.markAsObservedV2 = markAsObservedV2 + if (trackable) { + this.trackableProperties = new Set(trackable) + } + if (typed) { + this.typedProperties = new Map(typed) + } + } + + isObservedV1(value: Object): boolean { + return this.markAsObservedV1 && Class.of(value) == this.targetClass + } + + isObservedV2(value: Object): boolean { + return this.markAsObservedV2 && Class.of(value) == this.targetClass + } + + isTrackable(propertyName: string): boolean { + return (this.trackableProperties?.has(propertyName) || this.parent?.isTrackable(propertyName)) ?? false + } + + hasTrackableProperties(): boolean { + if (this.trackableProperties) { + return this.trackableProperties!.size > 0 + } + return this.parent?.hasTrackableProperties() ?? false + } + + getTypenameTypeDecorator(propertyName: string): string | undefined { + if (this.typedProperties) { + return this.typedProperties?.get(propertyName) + } + if (this.parent) { + return this.parent!.getTypenameTypeDecorator(propertyName) + } + return undefined + } + + static findClassMetadata(type: Type): ClassMetadata | undefined { + if (type instanceof ClassType) { + const fieldsNum = type.getFieldsNum() + for (let i = 0; i < fieldsNum; i++) { + const field = type.getField(i) + if (field.isStatic() && field.getName() == ClassMetadata.metadataPropName) { + const meta = field.getStaticValue() + if (meta != undefined && meta instanceof ClassMetadata) { + return meta + } + break + } + } + } + return undefined + } +} \ No newline at end of file diff --git a/koala_tools/incremental/compat/src/arkts/performance.ts b/koala_tools/incremental/compat/src/arkts/performance.ts new file mode 100644 index 0000000000000000000000000000000000000000..8926ff8519d1a22bb9a26c81d4d0bae7476ddd9b --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/performance.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +/** + * @returns the number of milliseconds elapsed since midnight, + * January 1, 1970 Universal Coordinated Time (UTC). + */ +export function timeNow(): number { + return Date.now() +} + +/** + * @param fractionDigits - number of digits after the decimal point [0 - 20] + * @returns a string representing a number in fixed-point notation + */ +export function numberToFixed(value: number, fractionDigits: number): string { + return new Number(value).toFixed(fractionDigits) +} diff --git a/koala_tools/incremental/compat/src/arkts/primitive.ts b/koala_tools/incremental/compat/src/arkts/primitive.ts new file mode 100644 index 0000000000000000000000000000000000000000..6f66d673451e91e6cb8baebca1634ec89a4db283 --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/primitive.ts @@ -0,0 +1,60 @@ + +/* + * 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. + */ +import { float32, float64, int32, int64 } from "./types" + +export function float32to64(value: float32): float64 { + return value.toDouble() +} +export function float32toInt32(value: float32): int32 { + return value.toInt() +} +export function float32toInt64(value: float32): int64 { + return value.toLong() +} + +export function float64to32(value: float64): float32 { + return value.toFloat() +} +export function float64toInt32(value: float64): int32 { + return value.toInt() +} +export function float64toInt64(value: float64): int64 { + return value.toLong() +} + +export function int32toFloat32(value: int32): float32 { + return value.toFloat() +} +export function int32toFloat64(value: int32): float64 { + return value.toDouble() +} +export function int32to64(value: int32): int64 { + return value.toLong() +} + +export function int64toFloat32(value: int64): float32 { + return value.toFloat() +} +export function int64toFloat64(value: int64): float64 { + return value.toDouble() +} +export function int64to32(value: int64): int32 { + return value.toInt() +} + +export function asFloat64(value: string): float64 { + return (new Number(value)).valueOf() +} diff --git a/koala_tools/incremental/compat/src/arkts/prop-deep-copy.ts b/koala_tools/incremental/compat/src/arkts/prop-deep-copy.ts new file mode 100644 index 0000000000000000000000000000000000000000..0835da8b568b153178a7fbec02882b6eed460d36 --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/prop-deep-copy.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +/* + When decorating variables of complex types, + @Prop makes a deep copy, during which all types, + except primitive types, Map, Set, Date, and Array, will be lost. + */ +import { getObservableTarget } from "./observable.ts" + +export function propDeepCopy(sourceObject: T): T { + // at the moment of intergation deepcopy from the stdlib requires a default constructor + // but default constructor is not available for ObservableDate, so we + // add a special case for Date (a parent for ObservableDate) + if (sourceObject instanceof Date) { + const copy : Date = new Date(sourceObject.valueOf()) + return copy as T + } + return deepcopy(getObservableTarget(sourceObject as Object) as T) as T +} diff --git a/koala_tools/incremental/compat/src/arkts/reflection.ts b/koala_tools/incremental/compat/src/arkts/reflection.ts new file mode 100644 index 0000000000000000000000000000000000000000..7961ab53e335fea16eec61cd8444bc890e318790 --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/reflection.ts @@ -0,0 +1,20 @@ + +/* + * 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 { className } from "./ts-reflection" + +export function lcClassName(object: Object) { + return className(object).toLowerCase() +} diff --git a/koala_tools/incremental/compat/src/arkts/strings.ts b/koala_tools/incremental/compat/src/arkts/strings.ts new file mode 100644 index 0000000000000000000000000000000000000000..66442a51c036426dd868104f6ee1900edd4dfe78 --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/strings.ts @@ -0,0 +1,214 @@ +/* + * 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 { int32, uint8 } from "./types" +import { Array_from_int32 } from "./array" + + +interface SystemTextEncoder { + encode(input?: string): Uint8Array; + encodeInto(src: string, dest: Uint8Array): void; +} + +interface WithStreamOption { + stream: Boolean | undefined; +} + +interface SystemTextDecoder { + decode( + input: ArrayBuffer | null | undefined | Uint8Array, + options: WithStreamOption | undefined + ): string; +} + +export class CustomTextEncoder { + static readonly HeaderLen: int32 = Int32Array.BYTES_PER_ELEMENT + + constructor(encoder:SystemTextEncoder|undefined = undefined) { + this.encoder = encoder + } + + private readonly encoder: SystemTextEncoder|undefined + + public static stringLength(input: string): int32 { + let length = 0 + for (let i = 0; i < input.length; i++) { + length++ + let cp = input.codePointAt(i)! + if (cp >= 0x10000) { + i++ + } + } + return length + } + + encodedLength(input: string): int32 { + let length = 0 + for (let i = 0; i < input.length; i++) { + let cp = input.codePointAt(i)! + if (cp < 0x80) { + length += 1 + } else if (cp < 0x800) { + length += 2 + } else if (cp < 0x10000) { + length += 3 + } else { + length += 4 + i++ + } + } + return length + } + + private addLength(array: Uint8Array, offset: int32, length: int32 | number): void { + const len = length.toInt() + array.set(offset, len & 0xff) + array.set(offset + 1, (len >> 8) & 0xff) + array.set(offset + 2, (len >> 16) & 0xff) + array.set(offset + 3, (len >> 24) & 0xff) + } + + static getHeaderLength(array: Uint8Array, offset: int32 = 0): int32 { + return ( + (array.at(offset)!.toInt()) | + (array.at(((offset + 1) << 8))!.toInt()) | + (array.at((offset + 2) << 16)!.toInt()) | + (array.at((offset + 3) << 24))!.toInt()) + } + + // Produces array of bytes with encoded string headed by 4 bytes (little endian) size information: + // [s0][s1][s2][s3] [c_0] ... [c_size-1] + encode(input: string | undefined, addLength: boolean = true): Uint8Array { + let headerLen = addLength ? CustomTextEncoder.HeaderLen : 0 + let result: Uint8Array + if (!input) { + result = new Uint8Array(headerLen) + } else if (this.encoder !== undefined) { + result = this.encoder!.encode('s'.repeat(headerLen) + input) + } else { + let length = this.encodedLength(input) + result = new Uint8Array(length + headerLen) + this.encodeInto(input, result, headerLen) + } + if (addLength) { + this.addLength(result, 0, (result.length - headerLen).toInt()) + } + return result + } + + // Produces encoded array of strings with size information. + encodeArray(strings: Array): Uint8Array { + let totalBytes = CustomTextEncoder.HeaderLen + let lengths = new Int32Array(strings.length) + for (let i = 0; i < lengths.length; i++) { + let len = this.encodedLength(strings[i]) + lengths[i] = len + totalBytes += len + CustomTextEncoder.HeaderLen + } + let array = new Uint8Array(totalBytes) + let position = 0 + this.addLength(array, position, lengths.length.toInt()) + position += CustomTextEncoder.HeaderLen + for (let i = 0; i < lengths.length; i++) { + this.addLength(array, position, lengths[i].toInt()) + position += CustomTextEncoder.HeaderLen + this.encodeInto(strings[i], array, position) + position += lengths[i] + } + return array + } + + encodeInto(input: string, result: Uint8Array, position: int32): Uint8Array { + if (this.encoder !== undefined) { + this.encoder!.encodeInto(input, result.subarray(position, result.length)) + return result + } + let index = position + for (let stringPosition = 0; stringPosition < input.length; stringPosition++) { + let cp = input.codePointAt(stringPosition)! + if (cp < 0x80) { + result[index++] = (cp | 0) + } else if (cp < 0x800) { + result[index++] = ((cp >> 6) | 0xc0) + result[index++] = ((cp & 0x3f) | 0x80) + } else if (cp < 0x10000) { + result[index++] = ((cp >> 12) | 0xe0) + result[index++] = (((cp >> 6) & 0x3f) | 0x80) + result[index++] = ((cp & 0x3f) | 0x80) + } else { + result[index++] = ((cp >> 18) | 0xf0) + result[index++] = (((cp >> 12) & 0x3f) | 0x80) + result[index++] = (((cp >> 6) & 0x3f) | 0x80) + result[index++] = ((cp & 0x3f) | 0x80) + stringPosition++ + } + } + result[index] = 0 + return result + } +} + +export class CustomTextDecoder { + static cpArrayMaxSize = 128 + constructor(decoder: SystemTextDecoder|undefined = undefined) { + this.decoder = decoder + } + + private readonly decoder: SystemTextDecoder|undefined + + decode(input: Uint8Array): string { + if (this.decoder !== undefined) { + return this.decoder!.decode(input, undefined) + } + + const cpSize = Math.min(CustomTextDecoder.cpArrayMaxSize, input.length) + let codePoints = new Int32Array(cpSize) + let cpIndex = 0; + let index = 0 + let result = "" + while (index < input.length) { + let elem = input[index].toByte() + let lead = elem & 0xff + let count = 0 + let value = 0 + if (lead < 0x80) { + count = 1 + value = elem + } else if ((lead >> 5) == 0x6) { + value = (((elem << 6) & 0x7ff) + (input[index + 1] & 0x3f)).toInt() + count = 2 + } else if ((lead >> 4) == 0xe) { + value = (((elem << 12) & 0xffff) + ((input[index + 1] << 6) & 0xfff) + + (input[index + 2] & 0x3f)).toInt() + count = 3 + } else if ((lead >> 3) == 0x1e) { + value = (((elem << 18) & 0x1fffff) + ((input[index + 1] << 12) & 0x3ffff) + + ((input[index + 2] << 6) & 0xfff) + (input[index + 3] & 0x3f)).toInt() + count = 4 + } + codePoints[cpIndex++] = value + if (cpIndex == cpSize) { + cpIndex = 0 + //result += String.fromCodePoint(...codePoints) + result += String.fromCodePoint(...Array_from_int32(codePoints)) + } + index += count + } + if (cpIndex > 0) { + result += String.fromCodePoint(...Array_from_int32(codePoints.slice(0, cpIndex))) + } + return result + } +} diff --git a/koala_tools/incremental/compat/src/arkts/ts-reflection.ts b/koala_tools/incremental/compat/src/arkts/ts-reflection.ts new file mode 100644 index 0000000000000000000000000000000000000000..f9f80694482030a254ec166534ba660a3551fbc5 --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/ts-reflection.ts @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +export function className(object?: Object): string { + return object ? (Type.of(object) as ClassType).getName() : "null" +} + +export function isFunction(object?: Object): boolean { + return Type.of(object) instanceof FunctionType +} + +// Improve: This is an very ad hoc function, +// but I could not find in ArkTS stdlib enough functionality +// for a more generic way. +export function functionOverValue(value: Value|(()=>Value)): boolean { + return Type.of(value) instanceof FunctionType +} + +// Somehow es2panda only allows === on reference types. +export function refEqual(a: Value, b: Value): boolean { + return a == b +} + +export function isNotPrimitive(value: Object): boolean { + return !Type.of(value).isPrimitive() +} diff --git a/koala_tools/incremental/compat/src/arkts/types.ts b/koala_tools/incremental/compat/src/arkts/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..b0edbd27a4e7da12223d11fdf834cd34739ac413 --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/types.ts @@ -0,0 +1,25 @@ +/* + * 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. + */ + +export type uint8 = byte +export type int8 = byte +export type unt16 = short +export type int16 = short +export type int32 = int +export type uint32 = int +export type int64 = long +export type uint64 = long +export type float32 = float +export type float64 = double \ No newline at end of file diff --git a/koala_tools/incremental/compat/src/arkts/utils.ts b/koala_tools/incremental/compat/src/arkts/utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..ec855ec898564683a16314c9a42ca7adf74030ea --- /dev/null +++ b/koala_tools/incremental/compat/src/arkts/utils.ts @@ -0,0 +1,54 @@ +/* + * 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. + */ + +export function errorAsString(error: Any): string { + if (error instanceof Error) { + const stack = error.stack + return stack + ? error.toString() + '\n' + stack + : error.toString() + } + return JSON.stringify(error) +} + +export function unsafeCast(value: Object): T { + return value as T +} + +export function scheduleCoroutine(): void { + Coroutine.Schedule() +} + +export function memoryStats(): string { + return `used ${GC.getUsedHeapSize()} free ${GC.getFreeHeapSize()}` +} + +export function launchJob(task: () => void): Promise { + return taskpool.execute(task) +} + +export class CoroutineLocalValue { + private map = new containers.ConcurrentHashMap + get(): T | undefined { + return this.map.get(CoroutineExtras.getWorkerId()) + } + set(value: T | undefined) { + if (value) { + this.map.set(CoroutineExtras.getWorkerId(), value) + } else { + this.map.delete(CoroutineExtras.getWorkerId()) + } + } +} diff --git a/koala_tools/incremental/compat/src/index.ts b/koala_tools/incremental/compat/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..d068f170afefa359a4ac4d8fd1f976dca122fd50 --- /dev/null +++ b/koala_tools/incremental/compat/src/index.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2022-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. + */ + +export { + asArray, + Array_from_set, + Array_from_int32, + Array_from_number, + AtomicRef, + asFloat64, + Thunk, + finalizerRegister, + finalizerUnregister, + timeNow, + numberToFixed, + Observed, + Observable, + ObservableHandler, + ObservableClass, + TrackableProperties, + trackableProperties, + ClassMetadata, + observableProxy, + observableProxyArray, + propDeepCopy, + lcClassName, + CustomTextEncoder, + CustomTextDecoder, + className, + isFunction, + functionOverValue, + refEqual, + isNotPrimitive, + uint8, + int8, + int16, + int32, int32toFloat32, int32toFloat64, int32to64, + uint32, + int64, int64toFloat32, int64toFloat64, int64to32, + uint64, + float32, float32to64, float32toInt32, float32toInt64, + float64, float64to32, float64toInt32, float64toInt64, + int8Array, + errorAsString, + unsafeCast, + CoroutineLocalValue, + scheduleCoroutine, + memoryStats, + launchJob +} from "#platform" diff --git a/koala_tools/incremental/compat/src/ohos/index.ts b/koala_tools/incremental/compat/src/ohos/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..892265e6691bc3bd0423b50d01327d3293bc1952 --- /dev/null +++ b/koala_tools/incremental/compat/src/ohos/index.ts @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2022-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. + */ + +export { + asArray, + Array_from_set, + Array_from_int32, + Array_from_number, + AtomicRef, + asFloat64, + Thunk, + finalizerRegister, + finalizerUnregister, + Observed, + Observable, + ObservableHandler, + observableProxy, + ObservableClass, + TrackableProperties, + trackableProperties, + ClassMetadata, + observableProxyArray, + propDeepCopy, + lcClassName, + CustomTextEncoder, + CustomTextDecoder, + className, + isFunction, + functionOverValue, + refEqual, + isNotPrimitive, + uint8, + int8, + int16, + int32, int32toFloat32, int32toFloat64, int32to64, + uint32, + int64, int64toFloat32, int64toFloat64, int64to32, + uint64, + float32, float32to64, float32toInt32, float32toInt64, + float64, float64to32, float64toInt32, float64toInt64, + int8Array, + errorAsString, + unsafeCast, + CoroutineLocalValue, + scheduleCoroutine, + memoryStats, + launchJob +} from "../typescript" + +export { + timeNow, + numberToFixed, +} from "./performance" diff --git a/koala_tools/incremental/compat/src/ohos/performance.ts b/koala_tools/incremental/compat/src/ohos/performance.ts new file mode 100644 index 0000000000000000000000000000000000000000..8926ff8519d1a22bb9a26c81d4d0bae7476ddd9b --- /dev/null +++ b/koala_tools/incremental/compat/src/ohos/performance.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +/** + * @returns the number of milliseconds elapsed since midnight, + * January 1, 1970 Universal Coordinated Time (UTC). + */ +export function timeNow(): number { + return Date.now() +} + +/** + * @param fractionDigits - number of digits after the decimal point [0 - 20] + * @returns a string representing a number in fixed-point notation + */ +export function numberToFixed(value: number, fractionDigits: number): string { + return new Number(value).toFixed(fractionDigits) +} diff --git a/koala_tools/incremental/compat/src/typescript/Types.d.ts b/koala_tools/incremental/compat/src/typescript/Types.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..4d42fbbf5de01bc8cb67946a38e9d8c42b70bc9a --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/Types.d.ts @@ -0,0 +1,19 @@ +/* + * 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. + */ + +type int = number +type long = number +type float = number +type double = number diff --git a/koala_tools/incremental/compat/src/typescript/array.ts b/koala_tools/incremental/compat/src/typescript/array.ts new file mode 100644 index 0000000000000000000000000000000000000000..156ea36f2e31b66ebb1fdfa8aaa564dfd32c29ef --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/array.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2022-2024 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 { float64, int32, int8 } from "./types" + +export function asArray(value: T[]): Array { + return value +} + +export function Array_from_set(set: Set): Array { + return Array.from(set) +} + +export function Array_from_int32(data: Int32Array): int32[] { + return Array.from(data) +} + +export function Array_from_number(data: float64[]): Array { + return data +} + +export function int8Array(size: int32): int8[] { + return [] +} diff --git a/koala_tools/incremental/compat/src/typescript/atomic.ts b/koala_tools/incremental/compat/src/typescript/atomic.ts new file mode 100644 index 0000000000000000000000000000000000000000..b3b12b85fa0b57555b12e219c515c26ca97ebb15 --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/atomic.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +/** + * A reference that may be updated atomically. + */ +export class AtomicRef { + value: Value + + /** + * Creates a new reference object with the given initial value. + * @param value - the new value + */ + constructor(value: Value) { + this.value = value + } + + /** + * Atomically sets the reference value to the given value and returns the previous one. + * @param value - the new value + * @returns the previous value + */ + getAndSet(value: Value): Value { + const result = this.value + this.value = value + return result + } +} diff --git a/koala_tools/incremental/compat/src/typescript/finalization.ts b/koala_tools/incremental/compat/src/typescript/finalization.ts new file mode 100644 index 0000000000000000000000000000000000000000..c7d5e05e8462a886f38ab969e3752c16d109e181 --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/finalization.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2024 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. + */ + +export interface Thunk { + clean(): void +} + +interface FinalizationRegistry { + register(target: object, value: any, token?: object): void; + unregister(token: object): void; +} + +interface FinalizationRegistryConstructor { + readonly prototype: FinalizationRegistry; + new(callback: (value: any) => void): FinalizationRegistry; +} + +declare const FinalizationRegistry: FinalizationRegistryConstructor + +const registry = new FinalizationRegistry((thunk: Thunk) => { + thunk.clean() +}) + +export function finalizerRegister(target: object, thunk: object) { + registry.register(target, thunk) +} + +export function finalizerUnregister(target: object) { + registry.unregister(target) +} diff --git a/koala_tools/incremental/compat/src/typescript/index.ts b/koala_tools/incremental/compat/src/typescript/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..e5ca0c3be7c24d909bb2bfb5d9f36946e9437ca6 --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/index.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +export * from "./array" +export * from "./atomic" +export * from "./primitive" +export * from "./finalization" +export * from "./observable" +export * from "./performance" +export * from "./prop-deep-copy" +export * from "./reflection" +export * from "./strings" +export * from "./ts-reflection" +export * from "./types" +export * from "./utils" diff --git a/koala_tools/incremental/compat/src/typescript/observable.ts b/koala_tools/incremental/compat/src/typescript/observable.ts new file mode 100644 index 0000000000000000000000000000000000000000..31d9f74cd32af3928946c723f831f8e90d06c477 --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/observable.ts @@ -0,0 +1,628 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +const OBSERVABLE_TARGET = "__proxy_observable_target__" + +export function getObservableTarget(proxy: Object): Object { + return getPropertyValue(OBSERVABLE_TARGET, proxy) ?? proxy +} + +function getPropertyValue(name: string, object: any): any { + return object[name] +} + +/** + * Data class decorator that makes all child fields trackable. + */ +export function Observed(constructorFunction: Function) { + constructorFunction.prototype[OBSERVED] = true +} + +const OBSERVED = "__ObservedByArkUI__" +function isObserved(value: any): boolean { + return value[OBSERVED] === true +} + +/** @internal */ +export interface Observable { + /** It is called when the observable value is accessed. */ + onAccess(): void + /** It is called when the observable value is modified. */ + onModify(): void +} + +/** @internal */ +export class ObservableHandler implements Observable { + private static handlers: WeakMap | undefined = undefined + + private parents = new Set() + private children = new Map() + + private readonly observables = new Set() + private _modified = false + + readonly observed: boolean + constructor(parent?: ObservableHandler, observed: boolean = false) { + this.observed = observed + if (parent) this.addParent(parent) + } + + onAccess(): void { + if (this.observables.size > 0) { + const it = this.observables.keys() + while (true) { + const result = it.next() + if (result.done) break + result.value?.onAccess() + } + } + } + + onModify(): void { + const set = new Set() + this.collect(true, set) + set.forEach((handler: ObservableHandler) => { + handler._modified = true + if (handler.observables.size > 0) { + const it = handler.observables.keys() + while (true) { + const result = it.next() + if (result.done) break + result.value?.onModify() + } + } + }) + } + + static dropModified(value: Value): boolean { + const handler = ObservableHandler.findIfObject(value) + if (handler === undefined) return false + const result = handler._modified + handler._modified = false + return result + } + + /** Adds the specified `observable` to the handler corresponding to the given `value`. */ + static attach(value: Value, observable: Observable): void { + const handler = ObservableHandler.findIfObject(value) + if (handler) handler.observables.add(observable) + } + + /** Deletes the specified `observable` from the handler corresponding to the given `value`. */ + static detach(value: Value, observable: Observable): void { + const handler = ObservableHandler.findIfObject(value) + if (handler) handler.observables.delete(observable) + } + + /** @returns the handler corresponding to the given `value` if it was installed */ + private static findIfObject(value: Value): ObservableHandler | undefined { + const handlers = ObservableHandler.handlers + return handlers !== undefined && value instanceof Object ? handlers.get(getObservableTarget(value as Object)) : undefined + } + + /** + * @param value - any non-null object including arrays + * @returns an observable handler or `undefined` if it is not installed + */ + static find(value: Object): ObservableHandler | undefined { + const handlers = ObservableHandler.handlers + return handlers ? handlers.get(getObservableTarget(value)) : undefined + } + + /** + * @param value - any non-null object including arrays + * @param observable - a handler to install on this object + * @throws an error if observable handler cannot be installed + */ + static installOn(value: Object, observable?: ObservableHandler): void { + let handlers = ObservableHandler.handlers + if (handlers === undefined) { + handlers = new WeakMap() + ObservableHandler.handlers = handlers + } + observable + ? handlers.set(getObservableTarget(value), observable) + : handlers.delete(getObservableTarget(value)) + } + + addParent(parent: ObservableHandler) { + const count = parent.children.get(this) ?? 0 + parent.children.set(this, count + 1) + this.parents.add(parent) + } + + removeParent(parent: ObservableHandler) { + const count = parent.children.get(this) ?? 0 + if (count > 1) { + parent.children.set(this, count - 1) + } + else if (count == 1) { + parent.children.delete(this) + this.parents.delete(parent) + } + } + + removeChild(value: Value) { + const child = ObservableHandler.findIfObject(value) + if (child) child.removeParent(this) + } + + private collect(all: boolean, guards = new Set()) { + if (guards.has(this)) return guards // already collected + guards.add(this) // handler is already guarded + this.parents.forEach(handler => handler.collect(all, guards)) + if (all) this.children.forEach((_count, handler) => handler.collect(all, guards)) + return guards + } + + static contains(observable: ObservableHandler, guards?: Set) { + if (observable.observed) return true + if (guards === undefined) guards = new Set() // create if needed + else if (guards.has(observable)) return false // already checked + guards.add(observable) // handler is already guarded + for (const it of observable.parents.keys()) { + if (ObservableHandler.contains(it, guards)) return true + } + return false + } +} + +/** @internal */ +export function observableProxyArray(...value: Value[]): Array { + return observableProxy(value) +} + +/** @internal */ +export function observableProxy(value: Value, parent?: ObservableHandler, observed?: boolean, strict = true): Value { + if (value instanceof ObservableHandler) return value // do not proxy a marker itself + if (value === null || !(value instanceof Object)) return value // only non-null object can be observable + const observable = ObservableHandler.find(value) + if (observable) { + if (parent) { + if (strict) observable.addParent(parent) + if (observed === undefined) observed = ObservableHandler.contains(parent) + } + if (observed) { + if (Array.isArray(value)) { + for (let index = 0; index < value.length; index++) { + value[index] = observableProxy(value[index], observable, observed, false) + } + } else { + proxyFields(value, false, observable) + } + } + return value + } + if (Array.isArray(value)) { + const handler = new ObservableHandler(parent) + const array = proxyChildrenOnly(value, handler, observed) + copyWithinObservable(array) + fillObservable(array) + popObservable(array) + pushObservable(array) + reverseObservable(array) + shiftObservable(array) + sortObservable(array) + spliceObservable(array) + unshiftObservable(array) + return proxyObject(array, handler) + } + if (value instanceof Date) { + const valueAsAny = (value as any) + const handler = new ObservableHandler(parent) + const setMethods = new Set([ + "setFullYear", "setMonth", "setDate", "setHours", "setMinutes", "setSeconds", + "setMilliseconds", "setTime", "setUTCFullYear", "setUTCMonth", "setUTCDate", + "setUTCHours", "setUTCMinutes", "setUTCSeconds", "setUTCMilliseconds" + ]) + setMethods.forEach((method: string) => { + const originalMethod = method + 'Original' + if (valueAsAny[originalMethod] !== undefined) { + return + } + valueAsAny[originalMethod] = valueAsAny[method] + valueAsAny[method] = function (...args: any[]) { + ObservableHandler.find(this)?.onModify() + return this[originalMethod](...args) + } + }) + return proxyObject(value, handler) + } + if (value instanceof Map) { + const handler = new ObservableHandler(parent) + const data = proxyMapValues(value, handler, observed) + setObservable(data) + deleteObservable(data) + clearObservable(data) + return proxyMapOrSet(data, handler) + } + if (value instanceof Set) { + const handler = new ObservableHandler(parent) + const data = proxySetValues(value, handler, observed) + addObservable(data) + deleteObservable(data) + clearObservable(data) + return proxyMapOrSet(data, handler) + } + const handler = new ObservableHandler(parent, isObserved(value)) + if (handler.observed || observed) proxyFields(value, true, handler) + return proxyObject(value, handler) +} + +function proxyObject(value: any, observable: ObservableHandler) { + ObservableHandler.installOn(value, observable) + return new Proxy(value, { + get(target, property, receiver) { + if (property == OBSERVABLE_TARGET) return target + const value: any = Reflect.get(target, property, receiver) + ObservableHandler.find(target)?.onAccess() + return typeof value == "function" + ? value.bind(target) + : value + }, + set(target, property, value, receiver) { + const old = Reflect.get(target, property, receiver) + if (value === old) return true + const observable = ObservableHandler.find(target) + if (observable) { + observable.onModify() + observable.removeChild(old) + const observed = ObservableHandler.contains(observable) + if (observed || Array.isArray(target)) { + value = observableProxy(value, observable, observed) + } + } + return Reflect.set(target, property, value, receiver) + }, + deleteProperty(target, property) { + ObservableHandler.find(target)?.onModify() + delete target[property] + return true + }, + }) +} + +function proxyFields(value: any, strict: boolean, parent?: ObservableHandler) { + for (const name of Object.getOwnPropertyNames(value)) { + const descriptor = Object.getOwnPropertyDescriptor(value, name) + if (descriptor?.writable) value[name] = observableProxy(value[name], parent, true, strict) + } +} + +function proxyChildrenOnly(array: any[], parent: ObservableHandler, observed?: boolean): any[] { + if (observed === undefined) observed = ObservableHandler.contains(parent) + return array.map(it => observableProxy(it, parent, observed)) +} + +function copyWithinObservable(array: any) { + if (array.copyWithinOriginal === undefined) { + array.copyWithinOriginal = array.copyWithin + array.copyWithin = function (this, target: number, start: number, end?: number) { + const observable = ObservableHandler.find(this) + observable?.onModify() + return this.copyWithinOriginal(target, start, end) + } + } +} + +function fillObservable(array: any) { + if (array.fillOriginal === undefined) { + array.fillOriginal = array.fill + array.fill = function (this, value: any, start?: number, end?: number) { + const observable = ObservableHandler.find(this) + observable?.onModify() + if (observable) value = observableProxy(value, observable) + return this.fillOriginal(value, start, end) + } + } +} + +function popObservable(array: any) { + if (array.popOriginal === undefined) { + array.popOriginal = array.pop + array.pop = function (...args: any[]) { + const observable = ObservableHandler.find(this) + observable?.onModify() + const result = this.popOriginal(...args) + if (observable) observable.removeChild(result) + return result + } + } +} + +function pushObservable(array: any) { + if (array.pushOriginal === undefined) { + array.pushOriginal = array.push + array.push = function (this, ...args: any[]) { + const observable = ObservableHandler.find(this) + observable?.onModify() + if (observable) args = proxyChildrenOnly(args, observable) + return this.pushOriginal(...args) + } + } +} + +function reverseObservable(array: any) { + if (array.reverseOriginal === undefined) { + array.reverseOriginal = array.reverse + array.reverse = function (this) { + const observable = ObservableHandler.find(this) + observable?.onModify() + return this.reverseOriginal() + } + } +} + +function shiftObservable(array: any) { + if (array.shiftOriginal === undefined) { + array.shiftOriginal = array.shift + array.shift = function (this, ...args: any[]) { + const observable = ObservableHandler.find(this) + observable?.onModify() + const result = this.shiftOriginal(...args) + if (observable) observable.removeChild(result) + return result + } + } +} + +function sortObservable(array: any) { + if (array.sortOriginal === undefined) { + array.sortOriginal = array.sort + array.sort = function (this, compareFn?: (a: any, b: any) => number) { + const observable = ObservableHandler.find(this) + observable?.onModify() + return this.sortOriginal(compareFn) + } + } +} + +function spliceObservable(array: any) { + if (array.spliceOriginal === undefined) { + array.spliceOriginal = array.splice + array.splice = function (this, start: number, deleteCount: number, ...items: any[]) { + const observable = ObservableHandler.find(this) + observable?.onModify() + if (observable) items = proxyChildrenOnly(items, observable) + if (deleteCount === undefined) deleteCount = array.length + const result = this.spliceOriginal(start, deleteCount, ...items) + if (observable && Array.isArray(result)) { + result.forEach(it => observable.removeChild(it)) + } + return result + } + } +} + +function unshiftObservable(array: any) { + if (array.unshiftOriginal === undefined) { + array.unshiftOriginal = array.unshift + array.unshift = function (this, ...items: any[]) { + const observable = ObservableHandler.find(this) + observable?.onModify() + if (observable) items = proxyChildrenOnly(items, observable) + return this.unshiftOriginal(...items) + } + } +} + +function proxyMapValues(data: Map, parent: ObservableHandler, observed?: boolean): Map { + if (observed === undefined) observed = ObservableHandler.contains(parent) + const result = new Map() + for (const [key, value] of data.entries()) { + result.set(key, observableProxy(value, parent, observed)) + } + return result +} + +function proxySetValues(data: Set, parent: ObservableHandler, observed?: boolean): Set { + // Improve: check if necessary to replace items of the set with observed objects as + // for complex objects add() function won't find original object inside the set of proxies + /* + if (observed === undefined) observed = ObservableHandler.contains(parent) + const result = new Set() + for (const value of data.values()) { + result.add(observableProxy(value, parent, observed)) + } + return result + */ + return data +} + +function proxyMapOrSet(value: any, observable: ObservableHandler) { + ObservableHandler.installOn(value, observable) + return new Proxy(value, { + get(target, property, receiver) { + if (property == OBSERVABLE_TARGET) return target + if (property == 'size') { + ObservableHandler.find(target)?.onAccess() + return target.size + } + const value: any = Reflect.get(target, property, receiver) + ObservableHandler.find(target)?.onAccess() + return typeof value == "function" + ? value.bind(target) + : value + }, + }) +} + +function addObservable(data: any) { + if (data.addOriginal === undefined) { + data.addOriginal = data.add + data.add = function (this, value: any) { + const observable = ObservableHandler.find(this) + if (observable && !this.has(value)) { + observable.onModify() + // Improve: check if necessary to replace items of the set with observed objects as + // for complex objects add() function won't find original object inside the set of proxies + // value = observableProxy(value, observable) + } + return this.addOriginal(value) + } + } +} + +function setObservable(data: any) { + if (data.setOriginal === undefined) { + data.setOriginal = data.set + data.set = function (this, key: any, value: any) { + const observable = ObservableHandler.find(this) + if (observable) { + observable.onModify() + observable.removeChild(this.get(key)) + value = observableProxy(value, observable) + } + return this.setOriginal(key, value) + } + } +} + +function deleteObservable(data: any) { + if (data.deleteOriginal === undefined) { + data.deleteOriginal = data.delete + data.delete = function (this, key: any) { + const observable = ObservableHandler.find(this) + if (observable) { + observable.onModify() + if (this instanceof Map) { + observable.removeChild(this.get(key)) + } else if (this instanceof Set) { + observable.removeChild(key) + } + } + return this.deleteOriginal(key) + } + } +} + +function clearObservable(data: any) { + if (data.clearOriginal === undefined) { + data.clearOriginal = data.clear + data.clear = function (this) { + const observable = ObservableHandler.find(this) + if (observable) { + observable.onModify() + Array.from(this.values()).forEach(it => observable.removeChild(it)) + } + return this.clearOriginal() + } + } +} + +function getClassMetadata(value: any): ClassMetadata | undefined { + if (value !== undefined && typeof value.getClassMetadata === 'function') { + return (value as ObservableClass).getClassMetadata() + } + return undefined +} + +/** + * Interface for getting the observability status of a class + */ +export interface ObservableClass { + getClassMetadata(): ClassMetadata | undefined +} + +/** + * Interface for checking the observed properties of a class + */ +export interface TrackableProperties { + isTrackable(propertyName: string): boolean +} + +/** + * If value is a class, then returns a list of trackable properties + * @param value + */ +export function trackableProperties(value: T): TrackableProperties | undefined { + return getClassMetadata(value) +} + +export class ClassMetadata implements TrackableProperties { + private readonly parent: ClassMetadata | undefined + private readonly markAsObservedV1: boolean + private readonly markAsObservedV2: boolean + private static readonly metadataPropName = "__classMetadata" + + /** + * Class property names marked with the @Track or @Trace decorator + * @private + */ + private readonly trackableProperties: ReadonlySet | undefined + + /** + * Contains fields marked with the @Type decorator. + * The key of the map is the property name and the value is the typename of the corresponding field. + * @private + */ + private readonly typedProperties: ReadonlyMap | undefined + + constructor(parent: ClassMetadata | undefined, + markAsObservedV1: boolean, + markAsObservedV2: boolean, + trackable: string[] | undefined, + typed: [string, string][] | undefined) { + this.parent = parent + this.markAsObservedV1 = markAsObservedV1 + this.markAsObservedV2 = markAsObservedV2 + if (trackable) { + this.trackableProperties = new Set(trackable) + } + if (typed) { + this.typedProperties = new Map(typed) + } + } + + isObservedV1(value: Object): boolean { + return this.markAsObservedV1 + } + + isObservedV2(value: Object): boolean { + return this.markAsObservedV2 + } + + isTrackable(propertyName: string): boolean { + return (this.trackableProperties?.has(propertyName) || this.parent?.isTrackable(propertyName)) ?? false + } + + hasTrackableProperties(): boolean { + if (this.trackableProperties) { + return this.trackableProperties!.size > 0 + } + return this.parent?.hasTrackableProperties() ?? false + } + + getTypenameTypeDecorator(propertyName: string): string | undefined { + if (this.typedProperties) { + return this.typedProperties?.get(propertyName) + } + if (this.parent) { + return this.parent!.getTypenameTypeDecorator(propertyName) + } + return undefined + } + + private static findClassMetadata(type: any): ClassMetadata | undefined { + let prototype = Object.getPrototypeOf(type) + while (prototype) { + if (prototype.hasOwnProperty(ClassMetadata.metadataPropName) && prototype.__classMetadata !== undefined) { + return prototype.__classMetadata + } + prototype = Object.getPrototypeOf(prototype) + } + return undefined + } +} \ No newline at end of file diff --git a/koala_tools/incremental/compat/src/typescript/performance.ts b/koala_tools/incremental/compat/src/typescript/performance.ts new file mode 100644 index 0000000000000000000000000000000000000000..9451185bcdcd9caa514e08d22f7c54d1d315eca9 --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/performance.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +/** + * @returns the number of milliseconds elapsed since midnight, + * January 1, 1970 Universal Coordinated Time (UTC). + */ +export function timeNow(): number { + return performance.now() +} + +/** + * @param fractionDigits - number of digits after the decimal point [0 - 20] + * @returns a string representing a number in fixed-point notation + */ +export function numberToFixed(value: number, fractionDigits: number): string { + return value.toFixed(fractionDigits) +} diff --git a/koala_tools/incremental/compat/src/typescript/primitive.ts b/koala_tools/incremental/compat/src/typescript/primitive.ts new file mode 100644 index 0000000000000000000000000000000000000000..642a98ecc705cd27c1be52c9c375a79e68815070 --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/primitive.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { float32, float64, int32, int64 } from "./types" + +export function float32to64(value: float32): float64 { + return value // toDouble() +} +export function float32toInt32(value: float32): int32 { + return value | 0 // toInt() +} +export function float32toInt64(value: float32): int64 { + return Math.trunc(value) // toLong() +} + +export function float64to32(value: float64): float32 { + return value // toFloat() +} +export function float64toInt32(value: float64): int32 { + return value | 0 // toInt() +} +export function float64toInt64(value: float64): int64 { + return Math.trunc(value) // toLong() +} + +export function int32toFloat32(value: int32): float32 { + return value // toFloat() +} +export function int32toFloat64(value: int32): float64 { + return value // toDouble() +} +export function int32to64(value: int32): int64 { + return Math.trunc(value) // toLong() +} + +export function int64toFloat32(value: int64): float32 { + return value // toFloat() +} +export function int64toFloat64(value: int64): float64 { + return value // toDouble() +} +export function int64to32(value: int64): int32 { + return value | 0 // toInt() +} + +export function asFloat64(value: string): float64 { + return Number(value) +} diff --git a/koala_tools/incremental/compat/src/typescript/prop-deep-copy.ts b/koala_tools/incremental/compat/src/typescript/prop-deep-copy.ts new file mode 100644 index 0000000000000000000000000000000000000000..3dd13819df356a5701b8e7bbb9d8f9769cd1e33e --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/prop-deep-copy.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2022-2024 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 { getObservableTarget } from "./observable" + +/* + When decorating variables of complex types, + @Prop makes a deep copy, during which all types, + except primitive types, Map, Set, Date, and Array, will be lost. + */ + +export function propDeepCopy(sourceObject: T): T { + if (!sourceObject || typeof sourceObject !== 'object') { + return sourceObject + } + + const copiedObjects = new Map() + return recursiveDeepCopy(sourceObject) as T + + function recursiveDeepCopy(sourceObject: Object): Object { + if (!sourceObject || typeof sourceObject !== 'object') { + return sourceObject + } + + const storedObject = copiedObjects.get(sourceObject) + if (storedObject !== undefined) { + return storedObject + } + + const copy: any = copyDeepTrackable(sourceObject) + + const objectToCopyFrom = getObservableTarget(sourceObject) + Object.keys(objectToCopyFrom) + .forEach((key) => { + const property = objectToCopyFrom[key as keyof Object] + + if (typeof property === "function") { + Reflect.set(copy, key, property) + copy[key] = copy[key].bind(copy) + return + } + Reflect.set(copy, key, recursiveDeepCopy(property)); + }) + + return copy + } + + function copyDeepTrackable(sourceObject: T): T { + if (sourceObject instanceof Set) { + const copy = new Set() + Object.setPrototypeOf(copy, Object.getPrototypeOf(sourceObject)) + copiedObjects.set(sourceObject, copy) + for (const setKey of sourceObject.keys()) { + copy.add(recursiveDeepCopy(setKey)) + } + return copy as T + } + if (sourceObject instanceof Map) { + const copy = new Map() + Object.setPrototypeOf(copy, Object.getPrototypeOf(sourceObject)) + copiedObjects.set(sourceObject, copy) + for (const mapKey of sourceObject.keys()) { + copy.set(mapKey, recursiveDeepCopy(sourceObject.get(mapKey))) + } + return copy as T + } + if (sourceObject instanceof Date) { + const copy = new Date() + copy.setTime(sourceObject.getTime()) + Object.setPrototypeOf(copy, Object.getPrototypeOf(sourceObject)) + copiedObjects.set(sourceObject, copy) + return copy as T + } + if (sourceObject instanceof Object) { + const copy = Array.isArray(sourceObject) ? [] : {} + Object.setPrototypeOf(copy, Object.getPrototypeOf(sourceObject)) + copiedObjects.set(sourceObject, copy) + return copy as T + } + + return sourceObject + } +} diff --git a/koala_tools/incremental/compat/src/typescript/reflection.ts b/koala_tools/incremental/compat/src/typescript/reflection.ts new file mode 100644 index 0000000000000000000000000000000000000000..7961ab53e335fea16eec61cd8444bc890e318790 --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/reflection.ts @@ -0,0 +1,20 @@ + +/* + * 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 { className } from "./ts-reflection" + +export function lcClassName(object: Object) { + return className(object).toLowerCase() +} diff --git a/koala_tools/incremental/compat/src/typescript/strings.ts b/koala_tools/incremental/compat/src/typescript/strings.ts new file mode 100644 index 0000000000000000000000000000000000000000..3fd4a2a78db63831b19f9c026a1911e3e62a0196 --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/strings.ts @@ -0,0 +1,205 @@ +/* + * 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 { int32 } from "./types" + +interface SystemTextEncoder { + encode(input?: string): Uint8Array; + encodeInto(src: string, dest: Uint8Array): void; +} + +interface WithStreamOption { + stream?: boolean | undefined; +} + +interface SystemTextDecoder { + decode( + input?: ArrayBuffer | null, + options?: WithStreamOption + ): string; +} + +export class CustomTextEncoder { + static readonly HeaderLen: int32 = Int32Array.BYTES_PER_ELEMENT + + constructor(encoder: SystemTextEncoder|undefined = ((typeof TextEncoder != "undefined") ? new TextEncoder() : undefined)) { + this.encoder = encoder + } + + private readonly encoder: SystemTextEncoder|undefined + + public static stringLength(input: string): int32 { + let length = 0 + for (let i = 0; i < input.length; i++) { + length++ + let cp = input.codePointAt(i)! + if (cp >= 0x10000) { + i++ + } + } + return length + } + + encodedLength(input: string): int32 { + let length = 0 + for (let i = 0; i < input.length; i++) { + let cp = input.codePointAt(i)! + if (cp < 0x80) { + length += 1 + } else if (cp < 0x800) { + length += 2 + } else if (cp < 0x10000) { + length += 3 + } else { + length += 4 + i++ + } + } + return length + } + + private addLength(array: Uint8Array, offset: int32, len: int32): void { + array[offset] = (len & 0xff) + array[offset + 1] = ((len >> 8) & 0xff) + array[offset + 2] = ((len >> 16) & 0xff) + array[offset + 3] = ((len >> 24) & 0xff) + } + + static getHeaderLength(array: Uint8Array, offset: int32 = 0): int32 { + return (array[offset] | (array[offset + 1] << 8) | (array[offset + 2] << 16) | (array[offset + 3] << 24)) + } + + // Produces array of bytes with encoded string headed by 4 bytes (little endian) size information: + // [s0][s1][s2][s3] [c_0] ... [c_size-1] + encode(input: string | undefined, addLength: boolean = true): Uint8Array { + let headerLen = addLength ? CustomTextEncoder.HeaderLen : 0 + let result: Uint8Array + if (!input) { + result = new Uint8Array(headerLen) + } else if (this.encoder !== undefined) { + result = this.encoder!.encode('s'.repeat(headerLen) + input) + } else { + let length = this.encodedLength(input) + result = new Uint8Array(length + headerLen) + this.encodeInto(input, result, headerLen) + } + if (addLength) { + this.addLength(result, 0, result.length - headerLen) + } + return result + } + + // Produces encoded array of strings with size information. + encodeArray(strings: Array): Uint8Array { + let totalBytes = CustomTextEncoder.HeaderLen + let lengths = new Int32Array(strings.length) + for (let i = 0; i < lengths.length; i++) { + let len = this.encodedLength(strings[i]) + lengths[i] = len + totalBytes += len + CustomTextEncoder.HeaderLen + } + let array = new Uint8Array(totalBytes) + let position = 0 + this.addLength(array, position, lengths.length) + position += CustomTextEncoder.HeaderLen + for (let i = 0; i < lengths.length; i++) { + this.addLength(array, position, lengths[i]) + position += CustomTextEncoder.HeaderLen + this.encodeInto(strings[i], array, position) + position += lengths[i] + } + return array + } + + encodeInto(input: string, result: Uint8Array, position: int32): Uint8Array { + if (this.encoder !== undefined) { + this.encoder!.encodeInto(input, result.subarray(position, result.length)) + return result + } + let index = position + for (let stringPosition = 0; stringPosition < input.length; stringPosition++) { + let cp = input.codePointAt(stringPosition)! + if (cp < 0x80) { + result[index++] = (cp | 0) + } else if (cp < 0x800) { + result[index++] = ((cp >> 6) | 0xc0) + result[index++] = ((cp & 0x3f) | 0x80) + } else if (cp < 0x10000) { + result[index++] = ((cp >> 12) | 0xe0) + result[index++] = (((cp >> 6) & 0x3f) | 0x80) + result[index++] = ((cp & 0x3f) | 0x80) + } else { + result[index++] = ((cp >> 18) | 0xf0) + result[index++] = (((cp >> 12) & 0x3f) | 0x80) + result[index++] = (((cp >> 6) & 0x3f) | 0x80) + result[index++] = ((cp & 0x3f) | 0x80) + stringPosition++ + } + } + result[index] = 0 + return result + } +} + +export class CustomTextDecoder { + static cpArrayMaxSize = 128 + constructor(decoder: SystemTextDecoder|undefined = ((typeof TextDecoder != "undefined") ? new TextDecoder() : undefined)) { + this.decoder = decoder + } + + private readonly decoder: SystemTextDecoder|undefined + + decode(input: Uint8Array): string { + if (this.decoder !== undefined) { + return this.decoder!.decode(input) + } + const cpSize = Math.min(CustomTextDecoder.cpArrayMaxSize, input.length) + let codePoints = new Int32Array(cpSize) + let cpIndex = 0; + let index = 0 + let result = "" + while (index < input.length) { + let elem = input[index] + let lead = elem & 0xff + let count = 0 + let value = 0 + if (lead < 0x80) { + count = 1 + value = elem + } else if ((lead >> 5) == 0x6) { + value = ((elem << 6) & 0x7ff) + (input[index + 1] & 0x3f) + count = 2 + } else if ((lead >> 4) == 0xe) { + value = ((elem << 12) & 0xffff) + ((input[index + 1] << 6) & 0xfff) + + (input[index + 2] & 0x3f) + count = 3 + } else if ((lead >> 3) == 0x1e) { + value = ((elem << 18) & 0x1fffff) + ((input[index + 1] << 12) & 0x3ffff) + + ((input[index + 2] << 6) & 0xfff) + (input[index + 3] & 0x3f) + count = 4 + } + codePoints[cpIndex++] = value + if (cpIndex == cpSize) { + cpIndex = 0 + result += String.fromCodePoint(...codePoints) + } + index += count + } + if (cpIndex > 0) { + result += String.fromCodePoint(...codePoints.slice(0, cpIndex)) + } + return result + } +} diff --git a/koala_tools/incremental/compat/src/typescript/ts-reflection.ts b/koala_tools/incremental/compat/src/typescript/ts-reflection.ts new file mode 100644 index 0000000000000000000000000000000000000000..8afbf82663e19eb4ab341e6d3ac7692c28321f40 --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/ts-reflection.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +export function className(object?: Object): string { + return object?.constructor.name ?? "" +} + +export function isFunction(object?: Object): boolean { + return typeof object === 'function' +} + +// Improve: this is to match arkts counterpart +export function functionOverValue(value: Value|(()=>Value)): boolean { + return typeof value === 'function' +} + +export function refEqual(a: Value, b: Value): boolean { + return a === b +} + +export function isNotPrimitive(value: Object): boolean { + return true +} diff --git a/koala_tools/incremental/compat/src/typescript/types.ts b/koala_tools/incremental/compat/src/typescript/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ae746ed00df3168a192c2f837c9f9ade45b6159 --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/types.ts @@ -0,0 +1,48 @@ +/* + * 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. + */ + +/// +export type uint8 = int +export type int8 = int +export type int16 = int +export type int32 = int +export type uint32 = int +export type int64 = long +export type uint64 = long +export type float32 = float +export type float64 = double + +export {} +declare global { + export interface Number { + toByte(): int + toShort(): int + toInt(): int + toLong(): long + toFloat(): float + toDouble(): double + } +} +Number.prototype.toByte = function() { return (this as Number | 0) as number; } + +Number.prototype.toShort = function() { return (this as Number | 0) as number; } + +Number.prototype.toInt = function() { return (this as Number | 0) as number; } + +Number.prototype.toLong = function() { return (this as Number | 0) as number; } + +Number.prototype.toFloat = function() { return this as number; } + +Number.prototype.toDouble = function() { return this as number; } diff --git a/koala_tools/incremental/compat/src/typescript/utils.ts b/koala_tools/incremental/compat/src/typescript/utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..1169707fa520b1284d29a1a5d3f7422460d31a4e --- /dev/null +++ b/koala_tools/incremental/compat/src/typescript/utils.ts @@ -0,0 +1,52 @@ +/* + * 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. + */ + +export function errorAsString(error: any): string { + if (error instanceof Error) { + return error.stack ?? error.toString() + } + return JSON.stringify(error) +} + +export function unsafeCast(value: unknown): T { + return value as unknown as T +} + +export function scheduleCoroutine(): void {} + +export function memoryStats(): string { + return `none` +} + +export function launchJob(task: () => void): Promise { + return new Promise((resolve, reject) => { + try { + task() + resolve(undefined) + } catch (error) { + reject(error) + } + }) +} + +export class CoroutineLocalValue { + private value: T | undefined = undefined + get(): T | undefined { + return this.value + } + set(value: T | undefined) { + this.value = value + } +} diff --git a/koala_tools/incremental/compat/tsconfig.json b/koala_tools/incremental/compat/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..595bc28a0a80e17714720a214ec119cb15774206 --- /dev/null +++ b/koala_tools/incremental/compat/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@koalaui/build-common/tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "rootDir": ".", + "outDir": "build/", + "module": "CommonJS", + "paths": { + "#platform": ["./src/typescript"] + } + }, + "include": ["./src/index.ts", "./src/typescript/**/*"] +} diff --git a/koala_tools/incremental/compat/ui2abcconfig.json b/koala_tools/incremental/compat/ui2abcconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..fcb140e0b5d235f8337b881d9c3763f10e618a33 --- /dev/null +++ b/koala_tools/incremental/compat/ui2abcconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "package": "@koalaui/compat", + "outDir": "build/abc", + "rootDir": "./src/arkts", + "baseUrl": "./src/arkts", + "paths": { + "#platform": ["./"], + "@koalaui/compat": ["../"] + } + }, + "include": ["src/arkts/**/*.ts"] +} diff --git a/koala_tools/incremental/compiler-plugin/package.json b/koala_tools/incremental/compiler-plugin/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e48683988822f5bdfa3e04c212bf57d6870e18e7 --- /dev/null +++ b/koala_tools/incremental/compiler-plugin/package.json @@ -0,0 +1,5 @@ +{ + "name": "@koalaui/compiler-plugin", + "version": "1.7.9+devel", + "description": "stub" +} \ No newline at end of file diff --git a/koala_tools/incremental/harness/.mocharc.json b/koala_tools/incremental/harness/.mocharc.json new file mode 100644 index 0000000000000000000000000000000000000000..fba4c55b0e4952e1ef019b1f94cd0a854eac2599 --- /dev/null +++ b/koala_tools/incremental/harness/.mocharc.json @@ -0,0 +1,7 @@ +{ + "ui": "tdd", + "spec": "./test/**/*.test.ts", + "exclude": "./test/browser/**/*", + "extension": ["ts"], + "require": ["../test-utils/scripts/register"] +} diff --git a/koala_tools/incremental/harness/js/golden.js b/koala_tools/incremental/harness/js/golden.js new file mode 100644 index 0000000000000000000000000000000000000000..52c48305e1ba01138c6fbdb20b9973810a9e3d29 --- /dev/null +++ b/koala_tools/incremental/harness/js/golden.js @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2022-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. + */ + +const path = require("path") +const process = require("process") + +function goldenSetup(resDir, testDir) { + const root = path.resolve(".", resDir) + const testRoot = path.resolve(testDir) + if (root != testRoot) { + process.env.KOALAUI_RESOURCE_ROOT = root + } + process.env.KOALAUI_TEST_ROOT = path.relative(root, testRoot) + const argGenGolden = "--gen-golden" + for (let str of process.argv) { + if (str.startsWith(argGenGolden)) { + process.env.KOALAUI_TEST_GOLDEN_GEN_DIR = path.relative(root, path.resolve(testRoot, "test", "resources", "golden")) + if (str.length > argGenGolden.length + 1) { + const gdir = str.substring(argGenGolden.length + 1); + if (gdir.length > 0 && gdir != "true") { + process.env.KOALAUI_TEST_GOLDEN_GEN_DIR = path.relative(root, path.resolve(gdir)) + } + } + break + } + } +} + +exports.goldenSetup = goldenSetup diff --git a/koala_tools/incremental/harness/js/register.js b/koala_tools/incremental/harness/js/register.js new file mode 100644 index 0000000000000000000000000000000000000000..c87312c19b58b9ab7a5961d80417953c323ff017 --- /dev/null +++ b/koala_tools/incremental/harness/js/register.js @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { goldenSetup } from "./golden.js" + +const tsNode = require("ts-node") +const path = require("path") + +goldenSetup('.', '.') + +unmemoized_suffix = process.env.UNMEMOIZED_SUFFIX +if (unmemoized_suffix == undefined) { + unmemoized_suffix = '' +} + +tsNode.register({ + files: true, + // If uncommented, running tests doesn't perform type checks. + // transpileOnly: true, + project: path.resolve(`test`, `tsconfig${unmemoized_suffix}.json`), + compiler: "@koalaui/ets-tsc" +}) diff --git a/koala_tools/incremental/harness/package.json b/koala_tools/incremental/harness/package.json new file mode 100644 index 0000000000000000000000000000000000000000..21b7f4c3ce02a55da5f3c2c390c695d56d425706 --- /dev/null +++ b/koala_tools/incremental/harness/package.json @@ -0,0 +1,54 @@ +{ + "name": "@koalaui/harness", + "version": "1.7.9+devel", + "description": "A harness library compatible with OHOS and ArkTS", + "main": "build/src/index.js", + "types": "build/src/index.d.ts", + "files": [ + "js/golden.js", + "js/register.js", + "build/src/**/*.js", + "build/src/**/*.d.ts" + ], + "imports": { + "#harness": { + "ark": "./build/src/ohos/index.js", + "ios": "./build/src/typescript/index.js", + "browser": "./build/src/typescript/index.js", + "node": "./build/src/typescript/index.js", + "default": "./build/src/typescript/index.js" + } + }, + "exports": { + "./golden": "./js/golden.js", + "./golden.js": "./js/golden.js", + "./register": "./js/register.js", + "./register.js": "./js/register.js", + ".": "./build/src/index.js" + }, + "scripts": { + "clean": "rimraf build dist", + "compile": "ets-tsc -b .", + "compile:release": "ets-tsc -b .", + "test": "mocha", + "fast-arktsc": "npm run compile --prefix ../../ui2abc/fast-arktsc", + "build": "node ../../ui2abc/fast-arktsc --config ./ui2abcconfig.json --link-name ./build/harness.abc --compiler ../tools/panda/arkts/ui2abc --simultaneous && PANDA_SDK_PATH=${PANDA_SDK_PATH:=../tools/panda/node_modules/@panda/sdk} ninja ${NINJA_OPTIONS} -f build/abc/build.ninja", + "build:all": "npm run compile && npm run build" + }, + "keywords": [], + "dependencies": { + "@koalaui/common": "1.7.9+devel", + "@koalaui/compat": "1.7.9+devel" + }, + "devDependencies": { + "@ohos/hypium": "1.0.6", + "@types/mocha": "^9.1.0", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", + "eslint-plugin-unused-imports": "^2.0.0", + "mocha": "^9.2.2", + "rimraf": "^3.0.2", + "source-map-support": "^0.5.21" + } +} \ No newline at end of file diff --git a/koala_tools/incremental/harness/src/arkts/assert.ts b/koala_tools/incremental/harness/src/arkts/assert.ts new file mode 100644 index 0000000000000000000000000000000000000000..3e1039d2bccb9bc987cb10fc25d32b582a7657db --- /dev/null +++ b/koala_tools/incremental/harness/src/arkts/assert.ts @@ -0,0 +1,803 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { float64toInt32, int32 } from "@koalaui/common" + +export class Assert { + static $_invoke(value: boolean, message?: string) { + if (!value) Assert.fail(message) + } + + /** + * Throws a failure. + * @param message - message to display on error + */ + static fail(message?: string): never { + throw new Error(message ?? "assert") + } + + /** + * Asserts that object is truthy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + static isOk(value: T, message?: string): void { + Assert.fail("Assert.isOk unsupported") + } + + /** + * Asserts that object is truthy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + static ok(value: T, message?: string): void { + Assert.fail("Assert.ok unsupported") + } + + /** + * Asserts that object is falsy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + static isNotOk(value: T, message?: string): void { + Assert.fail("Assert.isNotOk unsupported") + } + + /** + * Asserts that object is falsy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + static notOk(value: T, message?: string): void { + Assert.fail("Assert.notOk unsupported") + } + + /** + * Asserts non-strict equality (==) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + static equal(actual: T, expected: T, message?: string): void { + if (actual == expected) return + Assert.fail(message ?? `actual '${actual}' is not equal to expected '${expected}'`) + } + + /** + * Asserts non-strict inequality (!=) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + static notEqual(actual: T, expected: T, message?: string): void { + if (actual != expected) return + Assert.fail(message ?? `actual '${actual}' is equal to expected '${expected}'`) + } + + /** + * Asserts strict equality (===) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + static strictEqual(actual: T, expected: T, message?: string): void { + if (actual === expected) return + Assert.fail(message ?? `actual '${actual}' is not strictly equal to expected '${expected}'`) + } + + /** + * Asserts strict inequality (!==) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + static notStrictEqual(actual: T, expected: T, message?: string): void { + if (actual !== expected) return + Assert.fail(message ?? `actual '${actual}' is strictly equal to expected '${expected}'`) + } + + /** + * Asserts that actual is deeply equal to expected. + * @param actual - actual value array + * @param expected - potential expected value array + * @param message - message to display on error + */ + static deepEqual(actual: Array, expected: Array, message?: string): void { + if (equalArrayContent(actual, expected)) return + Assert.fail(message ?? `actual '${actual}' is not deeply equal to expected '${expected}'`) + } + + /** + * Asserts that actual is not deeply equal to expected. + * @param actual - actual value array + * @param expected - potential expected value array + * @param message - message to display on error + */ + static notDeepEqual(actual: Array, expected: Array, message?: string): void { + if (!equalArrayContent(actual, expected)) return + Assert.fail(message ?? `actual '${actual}' is deeply equal to expected '${expected}'`) + } + + /** + * Asserts valueToCheck is strictly greater than (>) valueToBeAbove. + * + * @param valueToCheck Actual value. + * @param valueToBeAbove Minimum Potential expected value. + * @param message Message to display on error. + */ + static isAbove(valueToCheck: number, valueToBeAbove: number, message?: string): void { + Assert.fail("Assert.isAbove unsupported") + } + + /** + * Asserts valueToCheck is greater than or equal to (>=) valueToBeAtLeast. + * + * @param valueToCheck Actual value. + * @param valueToBeAtLeast Minimum Potential expected value. + * @param message Message to display on error. + */ + static isAtLeast(valueToCheck: number, valueToBeAtLeast: number, message?: string): void { + Assert.fail("Assert.isAtLeast unsupported") + } + + /** + * Asserts valueToCheck is strictly less than (<) valueToBeBelow. + * + * @param valueToCheck Actual value. + * @param valueToBeBelow Minimum Potential expected value. + * @param message Message to display on error. + */ + static isBelow(valueToCheck: number, valueToBeBelow: number, message?: string): void { + Assert.fail("Assert.isBelow unsupported") + } + + /** + * Asserts valueToCheck is less than or equal to (<=) valueToBeAtMost. + * + * @param valueToCheck Actual value. + * @param valueToBeAtMost Minimum Potential expected value. + * @param message Message to display on error. + */ + static isAtMost(valueToCheck: number, valueToBeAtMost: number, message?: string): void { + Assert.fail("Assert.isAtMost unsupported") + } + + /** + * Asserts that value is true. + * @param value - actual value + * @param message - message to display on error + */ + static isTrue(value?: boolean, message?: string): void { + if (value == true) return + Assert.fail(message ?? `actual '${value}' is not true unexpectedly`) + } + + /** + * Asserts that value is not true. + * @param value - actual value + * @param message - message to display on error + */ + static isNotTrue(value?: boolean, message?: string): void { + if (value != true) return + Assert.fail(message ?? `actual '${value}' is true unexpectedly`) + } + + /** + * Asserts that value is false. + * @param value - actual value + * @param message - message to display on error + */ + static isFalse(value?: boolean, message?: string): void { + if (value == false) return + Assert.fail(message ?? `actual '${value}' is not false unexpectedly`) + } + + /** + * Asserts that value is not false. + * @param value - actual value + * @param message - message to display on error + */ + static isNotFalse(value?: boolean, message?: string): void { + if (value != false) return + Assert.fail(message ?? `actual '${value}' is false unexpectedly`) + } + + /** + * Asserts that value is null. + * @param value - actual value + * @param message - message to display on error + */ + static isNull(value: T, message?: string): void { + if (value == null) return // replace with '===' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' is not null unexpectedly`) + } + + /** + * Asserts that value is not null. + * @param value - actual value + * @param message - message to display on error + */ + static isNotNull(value: T, message?: string): void { + if (value != null) return // replace with '!==' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' is null unexpectedly`) + } + + /** + * Asserts that value is NaN. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isNaN(value: T, message?: string): void { + Assert.fail("Assert.isNaN unsupported") + } + + /** + * Asserts that value is not NaN. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isNotNaN(value: T, message?: string): void { + Assert.fail("Assert.isNotNaN unsupported") + } + + /** + * Asserts that the target is neither null nor undefined. + * @param value - actual value + * @param message - message to display on error + */ + static exists(value: T, message?: string): void { + if (value == undefined || value == null) return // replace with '===' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' does not exist unexpectedly`) + } + + /** + * Asserts that the target is either null or undefined. + * @param value - actual value + * @param message - message to display on error + */ + static notExists(value: T, message?: string): void { + if (value != undefined && value != null) return // replace with '!==' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' exists unexpectedly`) + } + + /** + * Asserts that value is undefined. + * @param value - actual value + * @param message - message to display on error + */ + static isUndefined(value: T, message?: string): void { + if (value == undefined) return // replace with '===' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' is defined unexpectedly`) + } + + /** + * Asserts that value is not undefined. + * @param value - actual value + * @param message - message to display on error + */ + static isDefined(value: T, message?: string): void { + if (value != undefined) return // replace with '!==' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' is undefined unexpectedly`) + } + + /** + * Asserts that value is a function. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isFunction(value: T, message?: string): void { + Assert.fail("Assert.isFunction unsupported") + } + + /** + * Asserts that value is not a function. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isNotFunction(value: T, message?: string): void { + Assert.fail("Assert.isNotFunction unsupported") + } + + /** + * Asserts that value is an object of type 'Object' + * (as revealed by Object.prototype.toString). + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + * @remarks The assertion does not match subclassed objects. + */ + static isObject(value: T, message?: string): void { + Assert.fail("Assert.isObject unsupported") + } + + /** + * Asserts that value is not an object of type 'Object' + * (as revealed by Object.prototype.toString). + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isNotObject(value: T, message?: string): void { + Assert.fail("Assert.isNotObject unsupported") + } + + /** + * Asserts that value is an array. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isArray(value: T, message?: string): void { + Assert.fail("Assert.isArray unsupported") + } + + /** + * Asserts that value is not an array. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isNotArray(value: T, message?: string): void { + Assert.fail("Assert.isNotArray unsupported") + } + + /** + * Asserts that value is a string. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isString(value: T, message?: string): void { + Assert.fail("Assert.isString unsupported") + } + + /** + * Asserts that value is not a string. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isNotString(value: T, message?: string): void { + Assert.fail("Assert.isNotString unsupported") + } + + /** + * Asserts that value is a number. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isNumber(value: T, message?: string): void { + Assert.fail("Assert.isNumber unsupported") + } + + /** + * Asserts that value is not a number. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isNotNumber(value: T, message?: string): void { + Assert.fail("Assert.isNotNumber unsupported") + } + + /** + * Asserts that value is a finite number. + * Unlike `.isNumber`, this will fail for `NaN` and `Infinity`. + * + * T Type of value + * @param value Actual value + * @param message Message to display on error. + */ + static isFinite(value: T, message?: string): void { + Assert.fail("Assert.isFinite unsupported") + } + + /** + * Asserts that value is a boolean. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isBoolean(value: T, message?: string): void { + Assert.fail("Assert.isBoolean unsupported") + } + + /** + * Asserts that value is not a boolean. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + static isNotBoolean(value: T, message?: string): void { + Assert.fail("Assert.isNotBoolean unsupported") + } + + /** + * Asserts that value's type is name, as determined by Object.prototype.toString. + * + * T Type of value. + * @param value Actual value. + * @param name Potential expected type name of value. + * @param message Message to display on error. + */ + static typeOf(value: T, name: string, message?: string): void { + Assert.fail("Assert.typeOf unsupported") + } + + /** + * Asserts that value's type is not name, as determined by Object.prototype.toString. + * + * T Type of value. + * @param value Actual value. + * @param name Potential expected type name of value. + * @param message Message to display on error. + */ + static notTypeOf(value: T, name: string, message?: string): void { + Assert.fail("Assert.notTypeOf unsupported") + } + + /** + * Asserts that value is an instance of constructor. + * + * T Type of value. + * @param value Actual value. + * @param construct Potential expected contructor of value. + * @param message Message to display on error. + * / + static instanceOf(value: T, construct: Function, message?: string): void*/ + + /** + * Asserts that value is not an instance of constructor. + * + * T Type of value. + * @param value Actual value. + * @param constructor Potential expected contructor of value. + * @param message Message to display on error. + * / + static notInstanceOf(value: T, type: Function, message?: string): void*/ + + /** + * Asserts that haystack includes needle. + * + * @param haystack Container string. + * @param needle Potential substring of haystack. + * @param message Message to display on error. + */ + static include(haystack: string, needle: string, message?: string): void { + if (haystack.includes(needle)) return + Assert.fail(message ?? `'${needle}' is not in '${haystack}'`) + } + + /** + * Asserts that haystack includes needle. + * + * T Type of values in haystack. + * @param haystack Container array, set or map. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static include( + haystack: ReadonlyArray | ReadonlySet | ReadonlyMap, + needle: T, + message?: string, + ): void;*/ + + /** + * Asserts that haystack includes needle. + * + * T Type of values in haystack. + * @param haystack WeakSet container. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static include(haystack: WeakSet, needle: T, message?: string): void;*/ + + /** + * Asserts that haystack includes needle. + * + * T Type of haystack. + * @param haystack Object. + * @param needle Potential subset of the haystack's properties. + * @param message Message to display on error. + * / + static include(haystack: T, needle: Partial, message?: string): void;*/ + + /** + * Asserts that haystack does not includes needle. + * + * @param haystack Container string. + * @param needle Potential substring of haystack. + * @param message Message to display on error. + */ + static notInclude(haystack: string, needle: string, message?: string): void { + if (!haystack.includes(needle)) return + Assert.fail(message ?? `'${needle}' is in '${haystack}'`) + } + + /** + * Asserts that haystack does not includes needle. + * + * T Type of values in haystack. + * @param haystack Container array, set or map. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static notInclude( + haystack: ReadonlyArray | ReadonlySet | ReadonlyMap, + needle: T, + message?: string, + ): void;*/ + + /** + * Asserts that haystack does not includes needle. + * + * T Type of values in haystack. + * @param haystack WeakSet container. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static notInclude(haystack: WeakSet, needle: T, message?: string): void;*/ + + /** + * Asserts that haystack does not includes needle. + * + * T Type of haystack. + * @param haystack Object. + * @param needle Potential subset of the haystack's properties. + * @param message Message to display on error. + * / + static notInclude(haystack: T, needle: Partial, message?: string): void;*/ + + /** + * Asserts that value matches the regular expression regexp. + * + * @param value Actual value. + * @param regexp Potential match of value. + * @param message Message to display on error. + */ + static match(value: string, regexp: RegExp, message?: string): void { + Assert.fail("Assert.match unsupported") + } + + /** + * Asserts that value does not match the regular expression regexp. + * + * @param value Actual value. + * @param regexp Potential match of value. + * @param message Message to display on error. + */ + static notMatch(expected: string, regexp: RegExp, message?: string): void { + Assert.fail("Assert.notMatch unsupported") + } + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errMsgMatcher Expected error message matcher. + * @param ignored Ignored parameter. + * @param message Message to display on error. + * / + static throw(fn: () => void, errMsgMatcher?: RegExp | string, ignored?: any, message?: string): void;*/ + + /** + * Asserts that the given function will throw an error. + * @param func - a function that may throw an error + * / + static throw(func: () => void): void { + Assert.throws(func) + } + + /** + * Asserts that the given function will throw an error. + * @param func - a function that may throw an error + */ + static throws(func: () => void): void { + let expected: Error | undefined = undefined + try { + func() + } catch (error) { + expected = error as Error + } + if (expected) return + Assert.fail("expected error is not thrown") + } + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errorLike Expected error constructor or error instance. + * @param errMsgMatcher Expected error message matcher. + * @param message Message to display on error. + * / + static throws( + fn: () => void, + errorLike?: ErrorConstructor | Error | null, + errMsgMatcher?: RegExp | string | null, + message?: string, + ): void;*/ + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errMsgMatcher Expected error message matcher. + * @param ignored Ignored parameter. + * @param message Message to display on error. + * / + static Throw(fn: () => void, errMsgMatcher?: RegExp | string, ignored?: any, message?: string): void;*/ + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errorLike Expected error constructor or error instance. + * @param errMsgMatcher Expected error message matcher. + * @param message Message to display on error. + * / + static Throw( + fn: () => void, + errorLike?: ErrorConstructor | Error | null, + errMsgMatcher?: RegExp | string | null, + message?: string, + ): void;*/ + + /** + * Asserts that fn will not throw an error. + * + * @param fn Function that may throw. + * @param errMsgMatcher Expected error message matcher. + * @param ignored Ignored parameter. + * @param message Message to display on error. + * / + static doesNotThrow(fn: () => void, errMsgMatcher?: RegExp | string, ignored?: any, message?: string): void;*/ + + /** + * Asserts that fn will not throw an error. + * + * @param fn Function that may throw. + * @param errorLike Expected error constructor or error instance. + * @param errMsgMatcher Expected error message matcher. + * @param message Message to display on error. + * / + static doesNotThrow( + fn: () => void, + errorLike?: ErrorConstructor | Error | null, + errMsgMatcher?: RegExp | string | null, + message?: string, + ): void;*/ + + /** + * Compares two values using operator. + * + * @param val1 Left value during comparison. + * @param operator Comparison operator. + * @param val2 Right value during comparison. + * @param message Message to display on error. + * / + static operator(val1: OperatorComparable, operator: Operator, val2: OperatorComparable, message?: string): void;*/ + + /** + * Asserts that the target is equal to expected, to within a +/- delta range. + * + * @param actual Actual value + * @param expected Potential expected value. + * @param delta Maximum differenced between values. + * @param message Message to display on error. + * / + static closeTo(actual: number, expected: number, delta: number, message?: string): void;*/ + + /** + * Asserts that the target is equal to expected, to within a +/- delta range. + * + * @param actual Actual value + * @param expected Potential expected value. + * @param delta Maximum differenced between values. + * @param message Message to display on error. + * / + static approximately(act: number, exp: number, delta: number, message?: string): void;*/ + + /** + * Asserts that non-object, non-array value inList appears in the flat array list. + * + * T Type of list values. + * @param inList Value expected to be in the list. + * @param list List of values. + * @param message Message to display on error. + */ + static oneOf(inList: T, list: T[], message?: string): void { + Assert.fail("Assert.oneOf unsupported") + } + + /** + * Asserts that the target does not contain any values. For arrays and + * strings, it checks the length property. For Map and Set instances, it + * checks the size property. For non-function objects, it gets the count + * of own enumerable string keys. + * + * T Type of object + * @param object Actual value. + * @param message Message to display on error. + */ + static isEmpty(object: T, message?: string): void { + const size = getContainerSize(object) + if (size != 0) Assert.fail(message ?? (size < 0 ? "unsupported container" : "container is not empty unexpectedly")) + } + + /** + * Asserts that the target contains values. For arrays and strings, it checks + * the length property. For Map and Set instances, it checks the size property. + * For non-function objects, it gets the count of own enumerable string keys. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + static isNotEmpty(object: T, message?: string): void { + const size = getContainerSize(object) + if (size <= 0) Assert.fail(message ?? (size < 0 ? "unsupported container" : "container is empty unexpectedly")) + } +} + +function equalArrayContent(actual: Array, expected: Array): boolean { + const length = actual.length + if (expected.length != length) return false + for (let i = 0; i < length; i++) { + if (expected[i] != actual[i]) return false + } + return true +} + +/** + * @param object - a container to check + * @returns a container size, or -1 if the given container is not supported + */ +function getContainerSize(container: T): int32 { + if (container instanceof Map) return float64toInt32(container.size) + if (container instanceof Set) return float64toInt32(container.size) + if (container instanceof Array) return float64toInt32(container.length) + if (container instanceof String) return float64toInt32(container.length) + return -1 +} + +export type assert = Assert diff --git a/koala_tools/incremental/harness/src/arkts/index.ts b/koala_tools/incremental/harness/src/arkts/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..e4e301948ffd0b90bae5c219868289fa250bcfb1 --- /dev/null +++ b/koala_tools/incremental/harness/src/arkts/index.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { doTest, TestKind } from "./shared" +export { Assert, assert } from "./assert" +export { TestFilter, setTestFilter } from "./shared" + +export class test { + static $_invoke(name: string, content?: () => void) { + doTest(TestKind.PASS, name, `test: "${name}"`, content) + } + + static skip(name: string, content?: () => void) { + doTest(TestKind.SKIP, name, `test: "${name}"`, content) + } + + static expectFailure(reason: string, name: string, content?: () => void) { + doTest(TestKind.FAIL, name, `test: "${name}"; reason: "${reason}"`, content) + } + + static conditional(condition: boolean, name: string, content?: () => void) { + if (condition) { + doTest(TestKind.PASS, name, `test: "${name}"`, content) + } else { + test.skip(name, content) + } + } + + static expect(expectSuccess: boolean, name: string, content?: () => void) { + if (expectSuccess) { + doTest(TestKind.PASS, name, `test: "${name}"`, content) + } else { + test.expectFailure("Description of the problem", name, content) + } + } +} + +export class suite { + static $_invoke(name: string, content?: () => void) { + doTest(TestKind.PASS, name, `suite: "${name}"`, content, true) + } + + static skip(name: string, content?: () => void) { + doTest(TestKind.SKIP, name, `suite: "${name}"`, content) + } +} + +export function suiteSetup(name: string, content?: () => void) { + throw new Error("unsupported suiteSetup: " + name) +} + +export function startTests(generateGolden: boolean = false) { + throw new Error("unsupported startTests: " + generateGolden) +} diff --git a/koala_tools/incremental/harness/src/arkts/shared.ts b/koala_tools/incremental/harness/src/arkts/shared.ts new file mode 100644 index 0000000000000000000000000000000000000000..75b5a181738f49ed230c572d4f8f3c81f8ff281e --- /dev/null +++ b/koala_tools/incremental/harness/src/arkts/shared.ts @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { errorAsString, int32 } from "@koalaui/common" + +const stack = new Array() +const array = new Array() + +const PASSED_PREFIX = "✅ \x1b[32m passed \x1b[0m" +const FAILED_PREFIX = "❌ \x1b[31m failed \x1b[0m" +const SKIPPED_PREFIX = "➡️ \x1b[36m skipped \x1b[0m" +const FAILED_AS_EXPECTED_PREFIX = "⚠️ \x1b[33m expected failed \x1b[0m" +const PASSED_UNEXPECTEDLY_PREFIX = "❌ \x1b[31m passed unexpectedly \x1b[0m" + +export enum TestKind { + PASS, // test something and expect it is passed + FAIL, // test something and expect it is failed + SKIP, // skip something from testing +} + +export type TestFilter = (id: string, suite: boolean) => boolean + +let globalFilter: TestFilter | undefined = undefined + +/** + * Sets a filter function to run only desirable suites and tests. + * @param filter Function to filter suites and test + */ +export function setTestFilter(filter?: TestFilter) { + globalFilter = filter +} + +export function doTest(kind: TestKind, id: string, name: string, content?: () => void, suite: boolean = false) { + if (globalFilter && globalFilter?.(id, suite)) return + const time = Date.now() + const test = new Test(kind, name, suite) + console.log(`start processing ${name}`) + array.push(test) + const length = stack.length + const parent = 0 < length ? stack[length - 1] : undefined + if (parent?.suite == false) throw new Error("test is already running") + + try { + stack.push(test) + if (kind != TestKind.SKIP) content?.() + } catch (error) { + const stack = errorAsString(error) + test.error = stack // mark test as failed with error's stacktrace + const array = stack.replaceAll("Error:", "Assert:").split("\n") + const length = array.length + if (length > 0) { + console.log(array[0]) + if (length > 0) { + let index = 1 + if (array[index].indexOf(" (etsstdlib.ets:") > 0) { + index++ // workaround for ArkTS stacktrace + } + while (index < length && array[index].indexOf("/assert.ts:") > 0) { + index++ + } + while (index < length && array[index].indexOf("/shared.ts:") < 0) { + console.log(array[index]) + index++ + } + } + } + } finally { + stack.pop() + console.log(`${Date.now() - time}ms to process ${name}`) + if (parent) { + if (test.passed == (test.kind == TestKind.FAIL)) parent.error = "" + } else { + logResults(array.splice(0, array.length)) + if (!test.passed) throw new Error("TEST FAILED") + } + } +} + +function logResults(array: ReadonlyArray) { + console.log("-".repeat(50)) + const map = new Map + array.forEach((test: Test) => { + const result = test.result + console.log(test.prefix + result + test.name) + if (!test.suite) map.set(result, (map.get(result) ?? 0) + 1) + }) + console.log("-".repeat(50)) + logResult(map, PASSED_PREFIX) + logResult(map, SKIPPED_PREFIX) + logResult(map, FAILED_AS_EXPECTED_PREFIX) + logResult(map, PASSED_UNEXPECTEDLY_PREFIX) + logResult(map, FAILED_PREFIX) +} + +function logResult(map: Map, key: string) { + const count = map.get(key) ?? 0 + if (count > 0) console.log(key + "tests: " + count) +} + +class Test { + readonly kind: TestKind + readonly name: string + readonly suite: boolean + readonly prefix: string + error: string | undefined = undefined + constructor(kind: TestKind, name: string, suite: boolean = false) { + this.kind = kind + this.name = name + this.suite = suite + this.prefix = " ".repeat(stack.length + 1) + } + get passed(): boolean { + return this.error === undefined + } + get result(): string { + if (this.kind == TestKind.PASS) { + return this.passed ? PASSED_PREFIX : FAILED_PREFIX + } + if (this.kind == TestKind.FAIL) { + return this.passed ? PASSED_UNEXPECTEDLY_PREFIX : FAILED_AS_EXPECTED_PREFIX + } + return SKIPPED_PREFIX + } +} diff --git a/koala_tools/incremental/harness/src/index.ts b/koala_tools/incremental/harness/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..2500be1b9828ef957cc7de8b11405184909d4315 --- /dev/null +++ b/koala_tools/incremental/harness/src/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2022-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. + */ + +export { Assert, assert, suite, test, TestFilter, setTestFilter } from "#harness" diff --git a/koala_tools/incremental/harness/src/ohos/assert.ts b/koala_tools/incremental/harness/src/ohos/assert.ts new file mode 100644 index 0000000000000000000000000000000000000000..9f8fcc0d41defc4271ebe06cb07601e618649a75 --- /dev/null +++ b/koala_tools/incremental/harness/src/ohos/assert.ts @@ -0,0 +1,786 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { expect } from "@ohos/hypium" + +export function Assert(value: boolean, message?: string) { + if (!value) Assert.fail(message) +} + +export namespace Assert { + /** + * Throws a failure. + * @param message - message to display on error + */ + export function fail(message?: string): never { + expect().assertFail() + throw new Error("OHOS failed: " + message) + } + + /** + * Asserts that object is truthy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + export function isOk(value: T, message?: string): void { + Assert.fail("Assert.isOk unsupported") + } + + /** + * Asserts that object is truthy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + export function ok(value: T, message?: string): void { + Assert.fail("Assert.ok unsupported") + } + + /** + * Asserts that object is falsy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + export function isNotOk(value: T, message?: string): void { + Assert.fail("Assert.isNotOk unsupported") + } + + /** + * Asserts that object is falsy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + export function notOk(value: T, message?: string): void { + Assert.fail("Assert.notOk unsupported") + } + + /** + * Asserts non-strict equality (==) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + export function equal(actual: T, expected: T, message?: string): void { + expect(actual).assertEqual(expected) + } + + /** + * Asserts non-strict inequality (!=) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + export function notEqual(actual: T, expected: T, message?: string): void { + // Improve: not accurate impl, because compared values are not printed + expect(actual != expected).assertTrue() + } + + /** + * Asserts strict equality (===) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + export function strictEqual(actual: T, expected: T, message?: string): void { + // Improve: not accurate impl, because compared values are not printed + expect(actual === expected).assertTrue() + } + + /** + * Asserts strict inequality (!==) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + export function notStrictEqual(actual: T, expected: T, message?: string): void { + // Improve: not accurate impl, because compared values are not printed + expect(actual !== expected).assertTrue() + } + + /** + * Asserts that actual is deeply equal to expected. + * @param actual - actual value array + * @param expected - potential expected value array + * @param message - message to display on error + */ + export function deepEqual(actual: Array, expected: Array, message?: string): void { + // Improve: implement + expect(actual).assertEqual(actual/*expected*/) + } + + /** + * Asserts that actual is not deeply equal to expected. + * @param actual - actual value array + * @param expected - potential expected value array + * @param message - message to display on error + */ + export function notDeepEqual(actual: Array, expected: Array, message?: string): void { + // Improve: implement + expect(actual).assertEqual(actual/*expected*/) + } + + /** + * Asserts valueToCheck is strictly greater than (>) valueToBeAbove. + * + * @param valueToCheck Actual value. + * @param valueToBeAbove Minimum Potential expected value. + * @param message Message to display on error. + */ + export function isAbove(valueToCheck: number, valueToBeAbove: number, message?: string): void { + expect(valueToCheck).assertLarger(valueToBeAbove) + } + + /** + * Asserts valueToCheck is greater than or equal to (>=) valueToBeAtLeast. + * + * @param valueToCheck Actual value. + * @param valueToBeAtLeast Minimum Potential expected value. + * @param message Message to display on error. + */ + export function isAtLeast(valueToCheck: number, valueToBeAtLeast: number, message?: string): void { + if (valueToCheck == valueToBeAtLeast) + expect(valueToCheck).assertEqual(valueToBeAtLeast) + else + expect(valueToCheck).assertLarger(valueToBeAtLeast) + } + + /** + * Asserts valueToCheck is strictly less than (<) valueToBeBelow. + * + * @param valueToCheck Actual value. + * @param valueToBeBelow Minimum Potential expected value. + * @param message Message to display on error. + */ + export function isBelow(valueToCheck: number, valueToBeBelow: number, message?: string): void { + expect(valueToCheck).assertLess(valueToBeBelow) + } + + /** + * Asserts valueToCheck is less than or equal to (<=) valueToBeAtMost. + * + * @param valueToCheck Actual value. + * @param valueToBeAtMost Minimum Potential expected value. + * @param message Message to display on error. + */ + export function isAtMost(valueToCheck: number, valueToBeAtMost: number, message?: string): void { + Assert.fail("Assert.isAtMost unsupported") + } + + /** + * Asserts that value is true. + * @param value - actual value + * @param message - message to display on error + */ + export function isTrue(value?: boolean, message?: string): void { + expect(value).assertTrue() + } + + /** + * Asserts that value is not true. + * @param value - actual value + * @param message - message to display on error + */ + export function isNotTrue(value?: boolean, message?: string): void { + if (value != true) return + Assert.fail(message ?? `actual '${value}' is true unexpectedly`) + } + + /** + * Asserts that value is false. + * @param value - actual value + * @param message - message to display on error + */ + export function isFalse(value?: boolean, message?: string): void { + expect(value).assertFalse() + } + + /** + * Asserts that value is not false. + * @param value - actual value + * @param message - message to display on error + */ + export function isNotFalse(value?: boolean, message?: string): void { + if (value != false) return + Assert.fail(message ?? `actual '${value}' is false unexpectedly`) + } + + /** + * Asserts that value is null. + * @param value - actual value + * @param message - message to display on error + */ + export function isNull(value: T | null, message?: string): void { + expect(value).assertNull() + } + + /** + * Asserts that value is not null. + * @param value - actual value + * @param message - message to display on error + */ + export function isNotNull(value: T | null, message?: string): void { + expect(value ? null : value).assertNull() + } + + /** + * Asserts that value is NaN. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNaN(value: T, message?: string): void { + Assert.fail("Assert.isNaN unsupported") + } + + /** + * Asserts that value is not NaN. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotNaN(value: T, message?: string): void { + Assert.fail("Assert.isNotNaN unsupported") + } + + /** + * Asserts that the target is neither null nor undefined. + * @param value - actual value + * @param message - message to display on error + */ + export function exists(value?: T | null, message?: string): void { + // Improve: not accurate impl + expect(value == null).assertFalse() + } + + /** + * Asserts that the target is either null or undefined. + * @param value - actual value + * @param message - message to display on error + */ + export function notExists(value?: T | null, message?: string): void { + if (value !== undefined && value !== null) return + Assert.fail(message ?? `actual '${value}' exists unexpectedly`) + } + + /** + * Asserts that value is undefined. + * @param value - actual value + * @param message - message to display on error + */ + export function isUndefined(value?: T, message?: string): void { + expect(value).assertUndefined() + } + + /** + * Asserts that value is not undefined. + * @param value - actual value + * @param message - message to display on error + */ + export function isDefined(value?: T, message?: string): void { + // Improve: not accurate impl + expect(value === undefined).assertFalse() + } + + /** + * Asserts that value is a function. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isFunction(value: T, message?: string): void { + Assert.fail("Assert.isFunction unsupported") + } + + /** + * Asserts that value is not a function. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotFunction(value: T, message?: string): void { + Assert.fail("Assert.isNotFunction unsupported") + } + + /** + * Asserts that value is an object of type 'Object' + * (as revealed by Object.prototype.toString). + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + * @remarks The assertion does not match subclassed objects. + */ + export function isObject(value: T, message?: string): void { + Assert.fail("Assert.isObject unsupported") + } + + /** + * Asserts that value is not an object of type 'Object' + * (as revealed by Object.prototype.toString). + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotObject(value: T, message?: string): void { + Assert.fail("Assert.isNotObject unsupported") + } + + /** + * Asserts that value is an array. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isArray(value: T, message?: string): void { + Assert.fail("Assert.isArray unsupported") + } + + /** + * Asserts that value is not an array. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotArray(value: T, message?: string): void { + Assert.fail("Assert.isNotArray unsupported") + } + + /** + * Asserts that value is a string. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isString(value: T, message?: string): void { + Assert.fail("Assert.isString unsupported") + } + + /** + * Asserts that value is not a string. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotString(value: T, message?: string): void { + Assert.fail("Assert.isNotString unsupported") + } + + /** + * Asserts that value is a number. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNumber(value: T, message?: string): void { + Assert.fail("Assert.isNumber unsupported") + } + + /** + * Asserts that value is not a number. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotNumber(value: T, message?: string): void { + Assert.fail("Assert.isNotNumber unsupported") + } + + /** + * Asserts that value is a finite number. + * Unlike `.isNumber`, this will fail for `NaN` and `Infinity`. + * + * T Type of value + * @param value Actual value + * @param message Message to display on error. + */ + export function isFinite(value: T, message?: string): void { + Assert.fail("Assert.isFinite unsupported") + } + + /** + * Asserts that value is a boolean. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isBoolean(value: T, message?: string): void { + Assert.fail("Assert.isBoolean unsupported") + } + + /** + * Asserts that value is not a boolean. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotBoolean(value: T, message?: string): void { + Assert.fail("Assert.isNotBoolean unsupported") + } + + /** + * Asserts that value's type is name, as determined by Object.prototype.toString. + * + * T Type of value. + * @param value Actual value. + * @param name Potential expected type name of value. + * @param message Message to display on error. + */ + export function typeOf(value: T, name: string, message?: string): void { + Assert.fail("Assert.typeOf unsupported") + } + + /** + * Asserts that value's type is not name, as determined by Object.prototype.toString. + * + * T Type of value. + * @param value Actual value. + * @param name Potential expected type name of value. + * @param message Message to display on error. + */ + export function notTypeOf(value: T, name: string, message?: string): void { + Assert.fail("Assert.notTypeOf unsupported") + } + + /** + * Asserts that value is an instance of constructor. + * + * T Type of value. + * @param value Actual value. + * @param construct Potential expected contructor of value. + * @param message Message to display on error. + */ + export function instanceOf(value: T, construct: Function, message?: string): void { + // Improve: not accurate impl + // expect(value).assertInstanceOf(construct.name) + expect(value instanceof construct).assertTrue() + } + + /** + * Asserts that value is not an instance of constructor. + * + * T Type of value. + * @param value Actual value. + * @param constructor Potential expected contructor of value. + * @param message Message to display on error. + * / + static notInstanceOf(value: T, type: Function, message?: string): void*/ + + /** + * Asserts that haystack includes needle. + * + * @param haystack Container string. + * @param needle Potential substring of haystack. + * @param message Message to display on error. + * / + static include(haystack: string, needle: string, message?: string): void*/ + + /** + * Asserts that haystack includes needle. + * + * T Type of values in haystack. + * @param haystack Container array, set or map. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static include( + haystack: ReadonlyArray | ReadonlySet | ReadonlyMap, + needle: T, + message?: string, + ): void;*/ + + /** + * Asserts that haystack includes needle. + * + * T Type of values in haystack. + * @param haystack WeakSet container. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static include(haystack: WeakSet, needle: T, message?: string): void;*/ + + /** + * Asserts that haystack includes needle. + * + * T Type of haystack. + * @param haystack Object. + * @param needle Potential subset of the haystack's properties. + * @param message Message to display on error. + * / + static include(haystack: T, needle: Partial, message?: string): void;*/ + + /** + * Asserts that haystack does not includes needle. + * + * @param haystack Container string. + * @param needle Potential substring of haystack. + * @param message Message to display on error. + * / + static notInclude(haystack: string, needle: string, message?: string): void;*/ + + /** + * Asserts that haystack does not includes needle. + * + * T Type of values in haystack. + * @param haystack Container array, set or map. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static notInclude( + haystack: ReadonlyArray | ReadonlySet | ReadonlyMap, + needle: T, + message?: string, + ): void;*/ + + /** + * Asserts that haystack does not includes needle. + * + * T Type of values in haystack. + * @param haystack WeakSet container. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static notInclude(haystack: WeakSet, needle: T, message?: string): void;*/ + + /** + * Asserts that haystack does not includes needle. + * + * T Type of haystack. + * @param haystack Object. + * @param needle Potential subset of the haystack's properties. + * @param message Message to display on error. + * / + static notInclude(haystack: T, needle: Partial, message?: string): void;*/ + + /** + * Asserts that value matches the regular expression regexp. + * + * @param value Actual value. + * @param regexp Potential match of value. + * @param message Message to display on error. + */ + export function match(value: string, regexp: RegExp, message?: string): void { + // Improve: not accurate impl + expect(regexp.test(value)).assertTrue() + } + + /** + * Asserts that value does not match the regular expression regexp. + * + * @param value Actual value. + * @param regexp Potential match of value. + * @param message Message to display on error. + */ + export function notMatch(expected: string, regexp: RegExp, message?: string): void { + Assert.fail("Assert.notMatch unsupported") + } + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errMsgMatcher Expected error message matcher. + * @param ignored Ignored parameter. + * @param message Message to display on error. + * / + static throw(fn: () => void, errMsgMatcher?: RegExp | string, ignored?: any, message?: string): void;*/ + + /** + * Asserts that the given function will throw an error. + * @param func - a function that may throw an error + * / + export function throw(func: () => void): void { + Assert.throws(func) + } + + /** + * Asserts that the given function will throw an error. + * @param func - a function that may throw an error + */ + export function throws(func: () => void): void { + let fnWrapper = () => { + try { + func() + } catch (e) { + throw new Error("fn thrown exception") + } + } + expect(fnWrapper).assertThrowError("fn thrown exception") + } + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errorLike Expected error constructor or error instance. + * @param errMsgMatcher Expected error message matcher. + * @param message Message to display on error. + * / + static throws( + fn: () => void, + errorLike?: ErrorConstructor | Error | null, + errMsgMatcher?: RegExp | string | null, + message?: string, + ): void;*/ + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errMsgMatcher Expected error message matcher. + * @param ignored Ignored parameter. + * @param message Message to display on error. + * / + static Throw(fn: () => void, errMsgMatcher?: RegExp | string, ignored?: any, message?: string): void;*/ + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errorLike Expected error constructor or error instance. + * @param errMsgMatcher Expected error message matcher. + * @param message Message to display on error. + * / + static Throw( + fn: () => void, + errorLike?: ErrorConstructor | Error | null, + errMsgMatcher?: RegExp | string | null, + message?: string, + ): void;*/ + + /** + * Asserts that fn will not throw an error. + * + * @param fn Function that may throw. + * @param errMsgMatcher Expected error message matcher. + * @param ignored Ignored parameter. + * @param message Message to display on error. + * / + static doesNotThrow(fn: () => void, errMsgMatcher?: RegExp | string, ignored?: any, message?: string): void;*/ + + /** + * Asserts that fn will not throw an error. + * + * @param fn Function that may throw. + * @param errorLike Expected error constructor or error instance. + * @param errMsgMatcher Expected error message matcher. + * @param message Message to display on error. + * / + static doesNotThrow( + fn: () => void, + errorLike?: ErrorConstructor | Error | null, + errMsgMatcher?: RegExp | string | null, + message?: string, + ): void;*/ + + /** + * Compares two values using operator. + * + * @param val1 Left value during comparison. + * @param operator Comparison operator. + * @param val2 Right value during comparison. + * @param message Message to display on error. + * / + static operator(val1: OperatorComparable, operator: Operator, val2: OperatorComparable, message?: string): void;*/ + + /** + * Asserts that the target is equal to expected, to within a +/- delta range. + * + * @param actual Actual value + * @param expected Potential expected value. + * @param delta Maximum differenced between values. + * @param message Message to display on error. + */ + export function closeTo(actual: number, expected: number, delta: number, message?: string): void { + // implementation of 'assertClose' does not fit: + // expect(actual).assertClose(expected, delta) + + const diff = Math.abs(actual - expected) + if (diff == delta) + expect(diff).assertEqual(delta) + else + expect(diff).assertLess(delta) + } + + /** + * Asserts that the target is equal to expected, to within a +/- delta range. + * + * @param actual Actual value + * @param expected Potential expected value. + * @param delta Maximum differenced between values. + * @param message Message to display on error. + * / + static approximately(act: number, exp: number, delta: number, message?: string): void;*/ + + /** + * Asserts that non-object, non-array value inList appears in the flat array list. + * + * T Type of list values. + * @param inList Value expected to be in the list. + * @param list List of values. + * @param message Message to display on error. + */ + export function oneOf(inList: T, list: T[], message?: string): void { + Assert.fail("Assert.oneOf unsupported") + } + + /** + * Asserts that the target does not contain any values. For arrays and + * strings, it checks the length property. For Map and Set instances, it + * checks the size property. For non-function objects, it gets the count + * of own enumerable string keys. + * + * T Type of object + * @param object Actual value. + * @param message Message to display on error. + */ + export function isEmpty(object: T, message?: string): void { + // Improve: implement + expect(object !== undefined).assertTrue() + } + + /** + * Asserts that the target contains values. For arrays and strings, it checks + * the length property. For Map and Set instances, it checks the size property. + * For non-function objects, it gets the count of own enumerable string keys. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + export function isNotEmpty(object: T, message?: string): void { + // Improve: implement + expect(object !== undefined).assertTrue() + } +} diff --git a/koala_tools/incremental/harness/src/ohos/index.ts b/koala_tools/incremental/harness/src/ohos/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..dfad42e32a59273802b33f20a1e9bf9578c04fb3 --- /dev/null +++ b/koala_tools/incremental/harness/src/ohos/index.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2022-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. + */ + +export { Assert, Assert as assert } from "./assert" +export { startTests } from "./mocha" +export { TestFilter, setTestFilter } from "../arkts/shared" + + +export function test(title: any, fn?: any) { + throw new Error("unsupported test: " + title) +} + +export function suite(title: any, fn?: any) { + throw new Error("unsupported suite: " + title) +} + +export function suiteSetup(title: any, fn?: any) { + throw new Error("unsupported suiteSetup: " + title) +} diff --git a/koala_tools/incremental/harness/src/ohos/mocha.ts b/koala_tools/incremental/harness/src/ohos/mocha.ts new file mode 100644 index 0000000000000000000000000000000000000000..ba874380c52d1260d3f8a6c098f69316bcc9ee42 --- /dev/null +++ b/koala_tools/incremental/harness/src/ohos/mocha.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { describe, beforeEach, it, Size } from "@ohos/hypium" + +declare namespace globalThis { + let __OpenHarmony: boolean + let __generateGolden: boolean +} + +globalThis.__OpenHarmony = true + +type Fn = () => void + +const suiteMap = new Map() + +export function startTests(generateGolden: boolean = false) { + globalThis.__generateGolden = generateGolden + suiteMap.forEach((fn: Fn, title: string) => { + describe(title, function () { + fn() + }) + }) +} + +(suiteSetup as any) = (title: string, fn: Fn): void => { + beforeEach(fn) +} + +(suite as any) = (title: string, fn: Fn): void => { + suiteMap.set(title, fn) +} + +(test as any) = (title: string, fn?: Fn): void => { + it(fn ? title : `[SKIP] ${title}`, Size.MEDIUMTEST, fn ? fn : () => { }) +} + +(test as any).skip = (title: string, fn?: Fn): void => { + it(`[SKIP] ${title}`, Size.MEDIUMTEST, () => { }) +} + + +interface TimeFn { + now: () => number +} + +(performance as TimeFn) = { + now: (): number => { + return Date.now() + } +} diff --git a/koala_tools/incremental/harness/src/typescript/assert.ts b/koala_tools/incremental/harness/src/typescript/assert.ts new file mode 100644 index 0000000000000000000000000000000000000000..672a2c83664aad985821005c4f49ff380b295ae0 --- /dev/null +++ b/koala_tools/incremental/harness/src/typescript/assert.ts @@ -0,0 +1,799 @@ +/* + * Copyright (c) 2022-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. + */ + +export function Assert(value: boolean, message?: string) { + if (!value) Assert.fail(message) +} + +export namespace Assert { + /** + * Throws a failure. + * @param message - message to display on error + */ + export function fail(message?: string): never { + throw new Error(message ?? "assert") + } + + /** + * Asserts that object is truthy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + export function isOk(value: T, message?: string): void { + Assert.fail("Assert.isOk unsupported") + } + + /** + * Asserts that object is truthy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + export function ok(value: T, message?: string): void { + Assert.fail("Assert.ok unsupported") + } + + /** + * Asserts that object is falsy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + export function isNotOk(value: T, message?: string): void { + Assert.fail("Assert.isNotOk unsupported") + } + + /** + * Asserts that object is falsy. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + export function notOk(value: T, message?: string): void { + Assert.fail("Assert.notOk unsupported") + } + + /** + * Asserts non-strict equality (==) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + export function equal(actual: T, expected: T, message?: string): void { + if (actual == expected) return + Assert.fail(message ?? `actual '${actual}' is not equal to expected '${expected}'`) + } + + /** + * Asserts non-strict inequality (!=) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + export function notEqual(actual: T, expected: T, message?: string): void { + if (actual != expected) return + Assert.fail(message ?? `actual '${actual}' is equal to expected '${expected}'`) + } + + /** + * Asserts strict equality (===) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + export function strictEqual(actual: T, expected: T, message?: string): void { + if (actual === expected) return + Assert.fail(message ?? `actual '${actual}' is not strictly equal to expected '${expected}'`) + } + + /** + * Asserts strict inequality (!==) of actual and expected. + * @param actual - actual value + * @param expected - potential expected value + * @param message - message to display on error + */ + export function notStrictEqual(actual: T, expected: T, message?: string): void { + if (actual !== expected) return + Assert.fail(message ?? `actual '${actual}' is strictly equal to expected '${expected}'`) + } + + /** + * Asserts that actual is deeply equal to expected. + * @param actual - actual value array + * @param expected - potential expected value array + * @param message - message to display on error + */ + export function deepEqual(actual: Array, expected: Array, message?: string): void { + if (equalArrayContent(actual, expected)) return + Assert.fail(message ?? `actual '${actual}' is not deeply equal to expected '${expected}'`) + } + + /** + * Asserts that actual is not deeply equal to expected. + * @param actual - actual value array + * @param expected - potential expected value array + * @param message - message to display on error + */ + export function notDeepEqual(actual: Array, expected: Array, message?: string): void { + if (!equalArrayContent(actual, expected)) return + Assert.fail(message ?? `actual '${actual}' is deeply equal to expected '${expected}'`) + } + + /** + * Asserts valueToCheck is strictly greater than (>) valueToBeAbove. + * + * @param valueToCheck Actual value. + * @param valueToBeAbove Minimum Potential expected value. + * @param message Message to display on error. + */ + export function isAbove(valueToCheck: number, valueToBeAbove: number, message?: string): void { + Assert.fail("Assert.isAbove unsupported") + } + + /** + * Asserts valueToCheck is greater than or equal to (>=) valueToBeAtLeast. + * + * @param valueToCheck Actual value. + * @param valueToBeAtLeast Minimum Potential expected value. + * @param message Message to display on error. + */ + export function isAtLeast(valueToCheck: number, valueToBeAtLeast: number, message?: string): void { + Assert.fail("Assert.isAtLeast unsupported") + } + + /** + * Asserts valueToCheck is strictly less than (<) valueToBeBelow. + * + * @param valueToCheck Actual value. + * @param valueToBeBelow Minimum Potential expected value. + * @param message Message to display on error. + */ + export function isBelow(valueToCheck: number, valueToBeBelow: number, message?: string): void { + Assert.fail("Assert.isBelow unsupported") + } + + /** + * Asserts valueToCheck is less than or equal to (<=) valueToBeAtMost. + * + * @param valueToCheck Actual value. + * @param valueToBeAtMost Minimum Potential expected value. + * @param message Message to display on error. + */ + export function isAtMost(valueToCheck: number, valueToBeAtMost: number, message?: string): void { + Assert.fail("Assert.isAtMost unsupported") + } + + /** + * Asserts that value is true. + * @param value - actual value + * @param message - message to display on error + */ + export function isTrue(value?: boolean, message?: string): void { + if (value == true) return + Assert.fail(message ?? `actual '${value}' is not true unexpectedly`) + } + + /** + * Asserts that value is not true. + * @param value - actual value + * @param message - message to display on error + */ + export function isNotTrue(value?: boolean, message?: string): void { + if (value != true) return + Assert.fail(message ?? `actual '${value}' is true unexpectedly`) + } + + /** + * Asserts that value is false. + * @param value - actual value + * @param message - message to display on error + */ + export function isFalse(value?: boolean, message?: string): void { + if (value == false) return + Assert.fail(message ?? `actual '${value}' is not false unexpectedly`) + } + + /** + * Asserts that value is not false. + * @param value - actual value + * @param message - message to display on error + */ + export function isNotFalse(value?: boolean, message?: string): void { + if (value != false) return + Assert.fail(message ?? `actual '${value}' is false unexpectedly`) + } + + /** + * Asserts that value is null. + * @param value - actual value + * @param message - message to display on error + */ + export function isNull(value: T, message?: string): void { + if (value == null) return // replace with '===' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' is not null unexpectedly`) + } + + /** + * Asserts that value is not null. + * @param value - actual value + * @param message - message to display on error + */ + export function isNotNull(value: T, message?: string): void { + if (value != null) return // replace with '!==' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' is null unexpectedly`) + } + + /** + * Asserts that value is NaN. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNaN(value: T, message?: string): void { + Assert.fail("Assert.isNaN unsupported") + } + + /** + * Asserts that value is not NaN. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotNaN(value: T, message?: string): void { + Assert.fail("Assert.isNotNaN unsupported") + } + + /** + * Asserts that the target is neither null nor undefined. + * @param value - actual value + * @param message - message to display on error + */ + export function exists(value: T, message?: string): void { + if (value == undefined || value == null) return // replace with '===' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' does not exist unexpectedly`) + } + + /** + * Asserts that the target is either null or undefined. + * @param value - actual value + * @param message - message to display on error + */ + export function notExists(value: T, message?: string): void { + if (value != undefined && value != null) return // replace with '!==' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' exists unexpectedly`) + } + + /** + * Asserts that value is undefined. + * @param value - actual value + * @param message - message to display on error + */ + export function isUndefined(value: T, message?: string): void { + if (value == undefined) return // replace with '===' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' is defined unexpectedly`) + } + + /** + * Asserts that value is not undefined. + * @param value - actual value + * @param message - message to display on error + */ + export function isDefined(value: T, message?: string): void { + if (value != undefined) return // replace with '!==' when panda-issue-19588 is fixed + Assert.fail(message ?? `actual '${value}' is undefined unexpectedly`) + } + + /** + * Asserts that value is a function. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isFunction(value: T, message?: string): void { + Assert.fail("Assert.isFunction unsupported") + } + + /** + * Asserts that value is not a function. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotFunction(value: T, message?: string): void { + Assert.fail("Assert.isNotFunction unsupported") + } + + /** + * Asserts that value is an object of type 'Object' + * (as revealed by Object.prototype.toString). + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + * @remarks The assertion does not match subclassed objects. + */ + export function isObject(value: T, message?: string): void { + Assert.fail("Assert.isObject unsupported") + } + + /** + * Asserts that value is not an object of type 'Object' + * (as revealed by Object.prototype.toString). + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotObject(value: T, message?: string): void { + Assert.fail("Assert.isNotObject unsupported") + } + + /** + * Asserts that value is an array. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isArray(value: T, message?: string): void { + Assert.fail("Assert.isArray unsupported") + } + + /** + * Asserts that value is not an array. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotArray(value: T, message?: string): void { + Assert.fail("Assert.isNotArray unsupported") + } + + /** + * Asserts that value is a string. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isString(value: T, message?: string): void { + Assert.fail("Assert.isString unsupported") + } + + /** + * Asserts that value is not a string. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotString(value: T, message?: string): void { + Assert.fail("Assert.isNotString unsupported") + } + + /** + * Asserts that value is a number. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNumber(value: T, message?: string): void { + Assert.fail("Assert.isNumber unsupported") + } + + /** + * Asserts that value is not a number. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotNumber(value: T, message?: string): void { + Assert.fail("Assert.isNotNumber unsupported") + } + + /** + * Asserts that value is a finite number. + * Unlike `.isNumber`, this will fail for `NaN` and `Infinity`. + * + * T Type of value + * @param value Actual value + * @param message Message to display on error. + */ + export function isFinite(value: T, message?: string): void { + Assert.fail("Assert.isFinite unsupported") + } + + /** + * Asserts that value is a boolean. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isBoolean(value: T, message?: string): void { + Assert.fail("Assert.isBoolean unsupported") + } + + /** + * Asserts that value is not a boolean. + * + * T Type of value. + * @param value Actual value. + * @param message Message to display on error. + */ + export function isNotBoolean(value: T, message?: string): void { + Assert.fail("Assert.isNotBoolean unsupported") + } + + /** + * Asserts that value's type is name, as determined by Object.prototype.toString. + * + * T Type of value. + * @param value Actual value. + * @param name Potential expected type name of value. + * @param message Message to display on error. + */ + export function typeOf(value: T, name: string, message?: string): void { + Assert.fail("Assert.typeOf unsupported") + } + + /** + * Asserts that value's type is not name, as determined by Object.prototype.toString. + * + * T Type of value. + * @param value Actual value. + * @param name Potential expected type name of value. + * @param message Message to display on error. + */ + export function notTypeOf(value: T, name: string, message?: string): void { + Assert.fail("Assert.notTypeOf unsupported") + } + + /** + * Asserts that value is an instance of constructor. + * + * T Type of value. + * @param value Actual value. + * @param construct Potential expected contructor of value. + * @param message Message to display on error. + * / + static instanceOf(value: T, construct: Function, message?: string): void*/ + + /** + * Asserts that value is not an instance of constructor. + * + * T Type of value. + * @param value Actual value. + * @param constructor Potential expected contructor of value. + * @param message Message to display on error. + * / + static notInstanceOf(value: T, type: Function, message?: string): void*/ + + /** + * Asserts that haystack includes needle. + * + * @param haystack Container string. + * @param needle Potential substring of haystack. + * @param message Message to display on error. + */ + export function include(haystack: string, needle: string, message?: string): void { + if (haystack.includes(needle)) return + Assert.fail(message ?? `'${needle}' is not in '${haystack}'`) + } + + /** + * Asserts that haystack includes needle. + * + * T Type of values in haystack. + * @param haystack Container array, set or map. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static include( + haystack: ReadonlyArray | ReadonlySet | ReadonlyMap, + needle: T, + message?: string, + ): void;*/ + + /** + * Asserts that haystack includes needle. + * + * T Type of values in haystack. + * @param haystack WeakSet container. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static include(haystack: WeakSet, needle: T, message?: string): void;*/ + + /** + * Asserts that haystack includes needle. + * + * T Type of haystack. + * @param haystack Object. + * @param needle Potential subset of the haystack's properties. + * @param message Message to display on error. + * / + static include(haystack: T, needle: Partial, message?: string): void;*/ + + /** + * Asserts that haystack does not includes needle. + * + * @param haystack Container string. + * @param needle Potential substring of haystack. + * @param message Message to display on error. + */ + export function notInclude(haystack: string, needle: string, message?: string): void { + if (!haystack.includes(needle)) return + Assert.fail(message ?? `actual '${needle}' is in '${haystack}'`) + } + + /** + * Asserts that haystack does not includes needle. + * + * T Type of values in haystack. + * @param haystack Container array, set or map. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static notInclude( + haystack: ReadonlyArray | ReadonlySet | ReadonlyMap, + needle: T, + message?: string, + ): void;*/ + + /** + * Asserts that haystack does not includes needle. + * + * T Type of values in haystack. + * @param haystack WeakSet container. + * @param needle Potential value contained in haystack. + * @param message Message to display on error. + * / + static notInclude(haystack: WeakSet, needle: T, message?: string): void;*/ + + /** + * Asserts that haystack does not includes needle. + * + * T Type of haystack. + * @param haystack Object. + * @param needle Potential subset of the haystack's properties. + * @param message Message to display on error. + * / + static notInclude(haystack: T, needle: Partial, message?: string): void;*/ + + /** + * Asserts that value matches the regular expression regexp. + * + * @param value Actual value. + * @param regexp Potential match of value. + * @param message Message to display on error. + */ + export function match(value: string, regexp: RegExp, message?: string): void { + Assert.fail("Assert.match unsupported") + } + + /** + * Asserts that value does not match the regular expression regexp. + * + * @param value Actual value. + * @param regexp Potential match of value. + * @param message Message to display on error. + */ + export function notMatch(expected: string, regexp: RegExp, message?: string): void { + Assert.fail("Assert.notMatch unsupported") + } + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errMsgMatcher Expected error message matcher. + * @param ignored Ignored parameter. + * @param message Message to display on error. + * / + static throw(fn: () => void, errMsgMatcher?: RegExp | string, ignored?: any, message?: string): void;*/ + + /** + * Asserts that the given function will throw an error. + * @param func - a function that may throw an error + * / + static throw(func: () => void): void { + Assert.throws(func) + } + + /** + * Asserts that the given function will throw an error. + * @param func - a function that may throw an error + */ + export function throws(func: () => void): void { + let expected: Error | undefined = undefined + try { + func() + } catch (error) { + expected = error as Error + } + if (expected) return + Assert.fail("expected error is not thrown") + } + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errorLike Expected error constructor or error instance. + * @param errMsgMatcher Expected error message matcher. + * @param message Message to display on error. + * / + static throws( + fn: () => void, + errorLike?: ErrorConstructor | Error | null, + errMsgMatcher?: RegExp | string | null, + message?: string, + ): void;*/ + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errMsgMatcher Expected error message matcher. + * @param ignored Ignored parameter. + * @param message Message to display on error. + * / + static Throw(fn: () => void, errMsgMatcher?: RegExp | string, ignored?: any, message?: string): void;*/ + + /** + * Asserts that fn will throw an error. + * + * @param fn Function that may throw. + * @param errorLike Expected error constructor or error instance. + * @param errMsgMatcher Expected error message matcher. + * @param message Message to display on error. + * / + static Throw( + fn: () => void, + errorLike?: ErrorConstructor | Error | null, + errMsgMatcher?: RegExp | string | null, + message?: string, + ): void;*/ + + /** + * Asserts that fn will not throw an error. + * + * @param fn Function that may throw. + * @param errMsgMatcher Expected error message matcher. + * @param ignored Ignored parameter. + * @param message Message to display on error. + * / + static doesNotThrow(fn: () => void, errMsgMatcher?: RegExp | string, ignored?: any, message?: string): void;*/ + + /** + * Asserts that fn will not throw an error. + * + * @param fn Function that may throw. + * @param errorLike Expected error constructor or error instance. + * @param errMsgMatcher Expected error message matcher. + * @param message Message to display on error. + * / + static doesNotThrow( + fn: () => void, + errorLike?: ErrorConstructor | Error | null, + errMsgMatcher?: RegExp | string | null, + message?: string, + ): void;*/ + + /** + * Compares two values using operator. + * + * @param val1 Left value during comparison. + * @param operator Comparison operator. + * @param val2 Right value during comparison. + * @param message Message to display on error. + * / + static operator(val1: OperatorComparable, operator: Operator, val2: OperatorComparable, message?: string): void;*/ + + /** + * Asserts that the target is equal to expected, to within a +/- delta range. + * + * @param actual Actual value + * @param expected Potential expected value. + * @param delta Maximum differenced between values. + * @param message Message to display on error. + * / + static closeTo(actual: number, expected: number, delta: number, message?: string): void;*/ + + /** + * Asserts that the target is equal to expected, to within a +/- delta range. + * + * @param actual Actual value + * @param expected Potential expected value. + * @param delta Maximum differenced between values. + * @param message Message to display on error. + * / + static approximately(act: number, exp: number, delta: number, message?: string): void;*/ + + /** + * Asserts that non-object, non-array value inList appears in the flat array list. + * + * T Type of list values. + * @param inList Value expected to be in the list. + * @param list List of values. + * @param message Message to display on error. + */ + export function oneOf(inList: T, list: T[], message?: string): void { + Assert.fail("Assert.oneOf unsupported") + } + + /** + * Asserts that the target does not contain any values. For arrays and + * strings, it checks the length property. For Map and Set instances, it + * checks the size property. For non-function objects, it gets the count + * of own enumerable string keys. + * + * T Type of object + * @param object Actual value. + * @param message Message to display on error. + */ + export function isEmpty(object: T, message?: string): void { + const size = getContainerSize(object) + if (size != 0) Assert.fail(message ?? (size < 0 ? "unsupported container" : "container is not empty unexpectedly")) + } + + /** + * Asserts that the target contains values. For arrays and strings, it checks + * the length property. For Map and Set instances, it checks the size property. + * For non-function objects, it gets the count of own enumerable string keys. + * + * T Type of object. + * @param object Object to test. + * @param message Message to display on error. + */ + export function isNotEmpty(object: T, message?: string): void { + const size = getContainerSize(object) + if (size <= 0) Assert.fail(message ?? (size < 0 ? "unsupported container" : "container is empty unexpectedly")) + } +} + +function equalArrayContent(actual: Array, expected: Array): boolean { + const length = actual.length + if (expected.length != length) return false + for (let i = 0; i < length; i++) { + if (expected[i] != actual[i]) return false + } + return true +} + +/** + * @param object - a container to check + * @returns a container size, or -1 if the given container is not supported + */ +function getContainerSize(container: T): number { + if (container instanceof Map) return container.size + if (container instanceof Set) return container.size + if (container instanceof Array) return container.length + if (container instanceof String) return container.length + return -1 +} diff --git a/koala_tools/incremental/harness/src/typescript/index.ts b/koala_tools/incremental/harness/src/typescript/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..2d2474743cf7b041f1e11beba8af4ac5cb85592a --- /dev/null +++ b/koala_tools/incremental/harness/src/typescript/index.ts @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { doTest, TestKind } from "../arkts/shared" +export { Assert, Assert as assert } from "./assert" +export { TestFilter, setTestFilter } from "../arkts/shared" + +export function test(name: string, content?: () => void) { + doTest(TestKind.PASS, name, `test: "${name}"`, content) +} + +export namespace test { + export function skip(name: string, content?: () => void) { + doTest(TestKind.SKIP, name, `test: "${name}"`, content) + } + + export function expectFailure(reason: string, name: string, content?: () => void) { + doTest(TestKind.FAIL, name, `test: "${name}"; reason: "${reason}"`, content) + } + + export function conditional(condition: boolean, name: string, content?: () => void) { + if (condition) { + test(name, content) + } else { + test.skip(name, content) + } + } + + export function expect(expectSuccess: boolean, name: string, content?: () => void) { + if (expectSuccess) { + test(name, content) + } else { + test.expectFailure("Description of the problem", name, content) + } + } +} + +export function suite(name: string, content?: () => void) { + doTest(TestKind.PASS, name, `suite: "${name}"`, content, true) +} + +export namespace suite { + export function skip(name: string, content?: () => void) { + doTest(TestKind.SKIP, name, `suite: "${name}"`, content) + } +} diff --git a/koala_tools/incremental/harness/test/CheckKind.test.ts b/koala_tools/incremental/harness/test/CheckKind.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..0c9dd754c308d77e8377bfa7c3960034516edf12 --- /dev/null +++ b/koala_tools/incremental/harness/test/CheckKind.test.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { assert, suite, test } from "@koalaui/harness" + +function checkKind(actual: string, expected: string) { + assert.equal(actual, expected) +} + +suite("CheckTestKind", () => { + test("passed", () => { checkKind("passed", "passed") }) + test("failed", () => { checkKind("failed", "fail failed") }) + + test.expectFailure("because", "expected failed", () => { checkKind("expected failed", "expected failed - fail!") }) + test.expectFailure("because", "unexpectedly passed", () => { checkKind("unexpectedly passed", "unexpectedly passed") }) + + test.skip("skipped", () => { checkKind("skipped", "skipped") }) + suite.skip("skip several tests", () => { + test("skip1", () => {}) + test("skip2", () => {}) + test("skip3", () => {}) + }) +}) diff --git a/koala_tools/incremental/harness/test/tsconfig.json b/koala_tools/incremental/harness/test/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..b7d6499a4bdc78869a40dfae5a6b74880efdcd7a --- /dev/null +++ b/koala_tools/incremental/harness/test/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "baseUrl": "./", + "outDir": "build/test", + "module": "CommonJS" + } +} diff --git a/koala_tools/incremental/harness/tsconfig.json b/koala_tools/incremental/harness/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..cc00e19fc0a7083e1d4caed5ba84057049d84515 --- /dev/null +++ b/koala_tools/incremental/harness/tsconfig.json @@ -0,0 +1,23 @@ +{ + "extends": "@koalaui/build-common/tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "rootDir": ".", + "outDir": "build", + "module": "CommonJS", + "paths": { + "@koalaui/compat": ["../compat/src/typescript"], + "@koalaui/common": ["../common/src"], + "#harness": ["./src/typescript"] + } + }, + "include": [ + "./src/index.ts", + "./src/arkts/shared.ts", + "./src/typescript/**/*" + ], + "references": [ + { "path": "../common" }, + { "path": "../compat" } + ] +} diff --git a/koala_tools/incremental/harness/ui2abcconfig.json b/koala_tools/incremental/harness/ui2abcconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..48b291c54a50a0d8c802b4ed30cbb8323ed85b50 --- /dev/null +++ b/koala_tools/incremental/harness/ui2abcconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "package": "@koalaui/harness", + "outDir": "build/abc", + "rootDir": "./src/arkts", + "baseUrl": "./src/arkts", + "paths": { + "@koalaui/compat": ["../../../compat/src/arkts"], + "@koalaui/common": ["../../../common/src"] + } + }, + "include": ["./src/arkts/**/*.ts"] +} diff --git a/koala_tools/incremental/incremental_components.gni b/koala_tools/incremental/incremental_components.gni new file mode 100644 index 0000000000000000000000000000000000000000..62afc69e366356276aab34dbf286d73204c016f5 --- /dev/null +++ b/koala_tools/incremental/incremental_components.gni @@ -0,0 +1,93 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# DO NOT MODIFY THIS FILE MANUALLY. + +incremental_files = [ + "common/src/Finalization.ts", + "common/src/index.ts", + "common/src/koalaKey.ts", + "common/src/math.ts", + "common/src/sha1.ts", + "common/src/stringUtils.ts", + "common/src/uniqueId.ts", + "compat/src/arkts/array.ts", + "compat/src/arkts/atomic.ts", + "compat/src/arkts/finalization.ts", + "compat/src/arkts/index.ts", + "compat/src/arkts/observable.ts", + "compat/src/arkts/performance.ts", + "compat/src/arkts/primitive.ts", + "compat/src/arkts/prop-deep-copy.ts", + "compat/src/arkts/reflection.ts", + "compat/src/arkts/strings.ts", + "compat/src/arkts/ts-reflection.ts", + "compat/src/arkts/types.ts", + "compat/src/arkts/utils.ts", + "compat/src/index.ts", + "compat/src/ohos/index.ts", + "compat/src/ohos/performance.ts", + "compat/src/typescript/Types.d.ts", + "compat/src/typescript/array.ts", + "compat/src/typescript/atomic.ts", + "compat/src/typescript/finalization.ts", + "compat/src/typescript/index.ts", + "compat/src/typescript/observable.ts", + "compat/src/typescript/performance.ts", + "compat/src/typescript/primitive.ts", + "compat/src/typescript/prop-deep-copy.ts", + "compat/src/typescript/reflection.ts", + "compat/src/typescript/strings.ts", + "compat/src/typescript/ts-reflection.ts", + "compat/src/typescript/types.ts", + "compat/src/typescript/utils.ts", + "runtime/annotations/index.ts", + "runtime/src/animation/AnimatedState.ts", + "runtime/src/animation/AnimationRange.ts", + "runtime/src/animation/Easing.ts", + "runtime/src/animation/EasingSupport.ts", + "runtime/src/animation/GlobalTimer.ts", + "runtime/src/animation/TimeAnimation.ts", + "runtime/src/animation/memo.ts", + "runtime/src/common/MarkableQueue.ts", + "runtime/src/common/RuntimeProfiler.ts", + "runtime/src/common/Unique.ts", + "runtime/src/index.ts", + "runtime/src/internals.ts", + "runtime/src/memo/bind.ts", + "runtime/src/memo/changeListener.ts", + "runtime/src/memo/contextLocal.ts", + "runtime/src/memo/entry.ts", + "runtime/src/memo/node.ts", + "runtime/src/memo/remember.ts", + "runtime/src/memo/repeat.ts", + "runtime/src/memo/testing.ts", + "runtime/src/states/Dependency.ts", + "runtime/src/states/Disposable.ts", + "runtime/src/states/GlobalStateManager.ts", + "runtime/src/states/Journal.ts", + "runtime/src/states/State.ts", + "runtime/src/tree/IncrementalNode.ts", + "runtime/src/tree/PrimeNumbers.ts", + "runtime/src/tree/ReadonlyTreeNode.ts", + "runtime/src/tree/TreeNode.ts", + "runtime/src/tree/TreePath.ts", + "runtime/src/tree/TreeUpdater.ts", + "runtime/types/State.d.ts", +] + +incremental_path_keys = [ +] + +incremental_path_values = [ +] diff --git a/koala_tools/incremental/package.json b/koala_tools/incremental/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f37b8b330311dafb096a159244fa6c85e7b47486 --- /dev/null +++ b/koala_tools/incremental/package.json @@ -0,0 +1,41 @@ +{ + "name": "incremental", + "private": true, + "workspaces": [ + "build-common", + "compat", + "common", + "harness", + "runtime", + "demo-playground", + "compiler-plugin" + ], + "devDependencies": { + "ts-node": "^10.7.0", + "ts-patch": "^2.1.0", + "tslib": "^2.3.1", + "typescript": "4.9.5", + "rimraf": "^6.0.1", + "webpack": "^5.93.0", + "webpack-cli": "^5.1.4", + "copy-webpack-plugin": "^12.0.2" + + }, + "scripts": { + "compile:prepare": "cd node_modules/typescript && ts-patch install", + "all:clean": "npm run clean --ws --if-present -s", + "compile": "npm run compile:prepare && npm run compile -w ./compat && npm run compile -w ./common && npm run compile -w ./harness && npm run compile -w ./runtime && npm run compile -w ./demo-playground && npm run compile -w ./compiler-plugin", + "link": "./tools/panda/arkts/arklink --output runtime/build/incremental.abc -- ./compat/build/compat.abc ./common/build/common.abc ./runtime/build/runtime.abc", + "build": "npm run build --prefix compat && npm run build --prefix common && npm run build --prefix runtime && npm run link" + }, + "dependencies": { + "@koalaui/build-common": "file:./build-common", + "@koalaui/common": "file:./common", + "@koalaui/compat": "file:./compat", + "@koalaui/fast-arktsc": "file:../ui2abc/fast-arktsc", + "@koalaui/ets-tsc": "4.9.5-r6", + "circular-dependency-plugin": "^5.2.2", + "source-map-loader": "^5.0.0", + "ts-loader": "^9.5.1" + } +} diff --git a/koala_tools/incremental/test-utils/scripts/register.js b/koala_tools/incremental/test-utils/scripts/register.js new file mode 100644 index 0000000000000000000000000000000000000000..482d7074a246f07e176bbc72ce0e02175338a205 --- /dev/null +++ b/koala_tools/incremental/test-utils/scripts/register.js @@ -0,0 +1,33 @@ +/* + * 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. + */ + +const tsNode = require("ts-node") +const path = require("path") +const { goldenSetup } = require("@koalaui/harness/golden") + +goldenSetup('.', '.') + +unmemoized_suffix = process.env.UNMEMOIZED_SUFFIX +if (unmemoized_suffix == undefined) { + unmemoized_suffix = '' +} + +tsNode.register({ + files: true, + // If uncommented, running tests doesn't perform type checks. + // transpileOnly: true, + project: path.resolve(`test`, `tsconfig${unmemoized_suffix}.json`), + compiler: "@koalaui/ets-tsc" +}) diff --git a/koala_tools/incremental/tools/link_prebuilts.js b/koala_tools/incremental/tools/link_prebuilts.js new file mode 100644 index 0000000000000000000000000000000000000000..6d43fdc37862ce6812d95ee9964ca3e46e08a729 --- /dev/null +++ b/koala_tools/incremental/tools/link_prebuilts.js @@ -0,0 +1,51 @@ +/* + * 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. + */ + +const fs = require('fs') +const path = require('path') +const os = require('os'); + +const dir = path.join(process.cwd(), '.runtime-prebuilt') + +function install_pkg(file) { + + const absolutePrebuiltPath = path.resolve('.runtime-prebuilt/', file) + const packageJsonPath = path.join(absolutePrebuiltPath, "package.json") + + if (!(fs.existsSync(packageJsonPath))) return 0 + + const packageJson = fs.readFileSync(packageJsonPath, {encoding: 'utf-8'}).trim() + const name = JSON.parse(packageJson).name + packageDir = `node_modules/${name}` + + if (fs.existsSync(packageDir)) { + fs.rmSync(packageDir, { recursive: true}) + } + + if (os.type() === 'Windows_NT') { + fs.mkdirSync(packageDir, { recursive: true }) + fs.cpSync(absolutePrebuiltPath + "/", packageDir, { recursive: true, force: true }) + } else { + fs.symlinkSync(absolutePrebuiltPath, packageDir, 'dir') + } + +} + +if (fs.existsSync(dir)) { + var files = fs.readdirSync(dir) + files.forEach(file => { + install_pkg(file) + }) +} \ No newline at end of file diff --git a/koala_tools/incremental/tools/multi-pass/package.json b/koala_tools/incremental/tools/multi-pass/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b689a85c634b0640f7c0911445378044f4786f81 --- /dev/null +++ b/koala_tools/incremental/tools/multi-pass/package.json @@ -0,0 +1,29 @@ +{ + "name": "@koalaui/multi-pass", + "version": "1.0.0", + "description": "", + "main": "lib/index.js", + "bin": "lib/index.js", + "files": [ + "lib/*.js", + "rules.json" + ], + "scripts": { + "clean": "rimraf out lib", + "run": "npm run compile && node . --input-dirs ../../../arkoala-arkts/user/build/unmemoized/ --rules rules.json --output-dir ./tmp", + "compile": "WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.node.js" + }, + "keywords": [], + "dependencies": { + "@types/node": "^18.0.0", + "commander": "^10.0.0", + "typescript": "^4.9.5" + }, + "devDependencies": { + "copy-webpack-plugin": "^12.0.2", + "rimraf": "^6.0.1", + "ts-loader": "^9.5.1", + "webpack": "^5.95.0", + "webpack-cli": "^5.1.4" + } +} diff --git a/koala_tools/incremental/tools/multi-pass/rules.json b/koala_tools/incremental/tools/multi-pass/rules.json new file mode 100644 index 0000000000000000000000000000000000000000..a7ee6635265c91f21dd04492912bc2e2419eec07 --- /dev/null +++ b/koala_tools/incremental/tools/multi-pass/rules.json @@ -0,0 +1,4 @@ +[ + ["construct(\\.*)", "CONSTRUCT($1)"], + ["onClick(\\.*)", "ON_CLICK($1)"] +] \ No newline at end of file diff --git a/koala_tools/incremental/tools/multi-pass/src/main.ts b/koala_tools/incremental/tools/multi-pass/src/main.ts new file mode 100644 index 0000000000000000000000000000000000000000..6420044e82469aafae737c937b3f33666c257127 --- /dev/null +++ b/koala_tools/incremental/tools/multi-pass/src/main.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 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 { program } from "commander" +import * as fs from "fs" +import * as path from "path" +import { minimatch } from 'minimatch' + +let replacedLines = 0 + +const options = program + .option('--input-dirs ', 'Path to input file(s), comma separated') + .option('--output-dir ', 'Path to output') + .option('--rules ', 'Path JSON file with rules') + .option('--includes ', 'Which files to process, *.ts by default') + .parse() + .opts() + +main(options.inputDirs, options.rules, options.outputDir, options.includes?.split(",") ?? ["**/*.ts"]) + +function findMatching(base: string, include: string[], exclude: string[]): string[] { + return fs.readdirSync(base, { recursive: true, withFileTypes: true }) + .map(it => path.join(it.parentPath, it.name)) + .filter(it => include.some(value => minimatch(it, path.join(base, value), {matchBase: true}))) + .filter(it => !exclude.some(value => minimatch(it, path.join(base, value), {matchBase: true}))) +} + +function main(inputDirs: string, rules: string, outputDir: string, include: string[]) { + let config = JSON.parse(fs.readFileSync(rules, 'utf8')) as string[2][] + let baseDir = path.resolve(inputDirs) + let exclude: string[] = [] + const files = findMatching(baseDir, include, exclude) + if (files.length == 0) { + throw new Error(`No files matching include "${include.join(",")}" exclude "${exclude.join(",")}"`) + } + fs.mkdirSync(outputDir, { recursive: true }) + multiReplace(inputDirs, outputDir, config, files) +} + +function multiReplace(inputDir: string, outputDir: string, config: string[2][], files: string[]) { + console.log(`Replace per ${config.map(it => `${it[0]} => ${it[1]}`)} in ${files.join(", ")} out to ${outputDir}`) + let base = path.resolve(inputDir) + let regexps: [RegExp, string][] = config.map(it => [new RegExp(it[0]), it[1]]) + files.forEach(file => { + const wholeFile = fs.readFileSync(file, 'utf-8').split(/\r?\n/) + const result: string[] = [] + wholeFile.forEach(line => { + result.push(processPerRules(line, regexps)) + }) + let rel = path.relative(base, file) + let newDir = path.join(outputDir, path.dirname(rel)) + fs.mkdirSync(newDir, { recursive: true }) + fs.writeFileSync(path.join(newDir, path.basename(rel)), result.join("\n")) + }) + console.log(`Replaced ${replacedLines} lines`) +} + +function processPerRules(line: string, rules: [RegExp, string][]): string { + let procesedLine = line + rules.forEach(rule => { + procesedLine = procesedLine.replace(rule[0], rule[1]) + }) + if (procesedLine != line) replacedLines++ + return procesedLine +} \ No newline at end of file diff --git a/koala_tools/incremental/tools/multi-pass/tsconfig.json b/koala_tools/incremental/tools/multi-pass/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..6653c5b1dc2f3af4eb156389a7412272f6b9803f --- /dev/null +++ b/koala_tools/incremental/tools/multi-pass/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "es2017", + "moduleResolution": "node", + "composite": true, + "incremental": true, + "declarationMap": true, + "sourceMap": true, + "declaration": true, + "noEmitOnError": true, + "strict": true, + "skipLibCheck": true, + "removeComments": false, + "outDir": "build", + }, + "include": [ + "src/*.ts" + ] +} diff --git a/koala_tools/incremental/tools/panda/arkts/ark b/koala_tools/incremental/tools/panda/arkts/ark new file mode 100755 index 0000000000000000000000000000000000000000..87c7674caadecbed2e23a05cffcc62f4290a857d --- /dev/null +++ b/koala_tools/incremental/tools/panda/arkts/ark @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright (c) 2024 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. + +SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` +node $SCRIPT_DIR/ark.js "$@" diff --git a/koala_tools/incremental/tools/panda/arkts/ark.js b/koala_tools/incremental/tools/panda/arkts/ark.js new file mode 100644 index 0000000000000000000000000000000000000000..d742192138ce6b495542c05bfc881fd1a7bab69a --- /dev/null +++ b/koala_tools/incremental/tools/panda/arkts/ark.js @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +const child_process = require('child_process') +const path = require("node:path") +const fs = require("fs") +const { formatCommand, + extractArgs, + DEFAULT_DRIVER_FLAGS, + PANDA_SDK, + ARCH_TOOLS, + getUsage, + checkForHelp } = require('./common') + +const ARK_BOOT_FILE_SEP = ":" +const ARK_OBJ_FILE_EXT = ".abc" + +ark_path = process.env.ARK_PATH +ark_path = ark_path ?? path.join(PANDA_SDK, ARCH_TOOLS, 'bin', 'ark') + +const ARGS_SPEC = [ + { + flag: '--ark-bin', + help: 'Path to ark binary', + domain: 'string', + default: ark_path + }, + { + flag: '--ark-ets-stdlib', + help: 'ETS stdlib to use for launch', + domain: 'string', + default: path.join(PANDA_SDK, 'ets', 'etsstdlib.abc') + }, + { + flag: '--ark-boot-files', + help: 'Boot panda files to use (either list of files separated by `:` or a single directory)', + domain: 'string', + default: '' + }, + { + flag: '--ark-entry-point', + help: 'Entry point function in format like `ETSGLOBAL::main`', + domain: 'string', + default: 'ETSGLOBAL::main' + }, + ...DEFAULT_DRIVER_FLAGS, +] +const USAGE = getUsage("This runs ark to load and run panda bytecode", ARGS_SPEC) + +checkForHelp(USAGE) +const { recognized: args, unknown: rest } = extractArgs(ARGS_SPEC, process.argv.slice(2)) + +const arkBootFiles = + args.flag('--ark-boot-files') + .split(ARK_BOOT_FILE_SEP) + .flatMap(filePath => fs.statSync(filePath).isDirectory() + ? fs.readdirSync(filePath, {recursive: true, withFileTypes: true}) + .filter(it => path.parse(it.name).ext === ARK_OBJ_FILE_EXT) + .map(it => path.join(it.path, it.name)) + : filePath) + .join(ARK_BOOT_FILE_SEP) + +let cmd = [ + args.flag('--ark-bin'), + '--load-runtimes=ets', + '--boot-panda-files', + args.flag('--ark-ets-stdlib') + ':' + arkBootFiles, + ...rest, + args.flag('--ark-entry-point'), +] +if (args.flag('--driver-log') === 'info') { + console.log(formatCommand(cmd.join(' '), process.cwd())) +} +// console.log(`start ${cmd.join(' ')}`) +const child = child_process.spawn(cmd[0], [...cmd.slice(1)]) +child.stdout.on('data', (data) => { + process.stdout.write(data); +}) +child.stderr.on('data', (data) => { + process.stderr.write(data); +}) +child.on('close', (code) => { + if (code) { + if (args.flag('--driver-log') === 'info') { + console.log(`Command ${formatCommand(cmd.join(' '), process.cwd())} failed with return code ${code}`) + } + process.exit(code) + } +}) +child.on('exit', (code, signal) => { + if (signal) { + console.log(`Received signal: ${signal} from '${formatCommand(cmd.join(' '), process.cwd())}'`) + process.exit(1) + } +}) diff --git a/koala_tools/incremental/tools/panda/arkts/arkdisasm b/koala_tools/incremental/tools/panda/arkts/arkdisasm new file mode 100755 index 0000000000000000000000000000000000000000..15253bba6e1795a8b89cc1e085b66954adb3f84d --- /dev/null +++ b/koala_tools/incremental/tools/panda/arkts/arkdisasm @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright (c) 2024 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. + +SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` +node $SCRIPT_DIR/arkdisasm.js "$@" diff --git a/koala_tools/incremental/tools/panda/arkts/arkdisasm.js b/koala_tools/incremental/tools/panda/arkts/arkdisasm.js new file mode 100644 index 0000000000000000000000000000000000000000..b5f24d3d6662420d6c8e87e41eb0f6626d782bd9 --- /dev/null +++ b/koala_tools/incremental/tools/panda/arkts/arkdisasm.js @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +const child_process = require('child_process') +const path = require("node:path") +const { formatCommand, + extractArgs, + DEFAULT_DRIVER_FLAGS, + PANDA_SDK, + ARCH_TOOLS, + getUsage, + checkForHelp } = require('./common') + +ark_disasm_path = process.env.ARKDISASM_PATH +ark_disasm_path = ark_disasm_path ?? path.join(PANDA_SDK, ARCH_TOOLS, 'bin', 'ark_disasm') + +const ARGS_SPEC = [ + { + flag: '--arkdisasm-bin', + help: 'Path to arkdisasm binary', + domain: 'string', + default: ark_disasm_path + }, + ...DEFAULT_DRIVER_FLAGS, +] +const USAGE = getUsage("This runs ark_disasm to disassemble .abc file", ARGS_SPEC) + +checkForHelp(USAGE) +const { recognized: args, unknown: rest } = extractArgs(ARGS_SPEC, process.argv.slice(2)) +if (rest.length === 1) { + rest.push(rest[0] + ".disasm") +} +let cmd = [ + args.flag('--arkdisasm-bin'), + ...rest +] +if (args.flag('--driver-log') === 'info') { + console.log(formatCommand(cmd.join(' '), process.cwd())) +} +const child = child_process.spawn(cmd[0], [...cmd.slice(1)]) +child.stdout.on('data', (data) => { + process.stdout.write(data); +}) +child.stderr.on('data', (data) => { + process.stderr.write(data); +}) +child.on('close', (code) => { + if (code) { + if (args.flag('--driver-log') === 'info') { + console.log(`Command ${formatCommand(cmd.join(' '), process.cwd())} failed with return code ${code}`) + } + process.exit(code) + } +}) diff --git a/koala_tools/incremental/tools/panda/arkts/arklink b/koala_tools/incremental/tools/panda/arkts/arklink new file mode 100755 index 0000000000000000000000000000000000000000..59570af44a89043f8aa4901fa8cc97d8a4c01281 --- /dev/null +++ b/koala_tools/incremental/tools/panda/arkts/arklink @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright (c) 2024 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. + +SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` +node $SCRIPT_DIR/arklink.js "$@" diff --git a/koala_tools/incremental/tools/panda/arkts/arklink.js b/koala_tools/incremental/tools/panda/arkts/arklink.js new file mode 100644 index 0000000000000000000000000000000000000000..cc6c3d93ea3a6212f8b49f88a2927fe822dc0c2e --- /dev/null +++ b/koala_tools/incremental/tools/panda/arkts/arklink.js @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +const child_process = require('child_process') +const path = require("node:path") +const { formatCommand, + extractArgs, + DEFAULT_DRIVER_FLAGS, + PANDA_SDK, + ARCH_TOOLS, + getUsage, + checkForHelp } = require('./common') + +ark_link_path = process.env.ARKLINK_PATH +ark_link_path = ark_link_path ?? path.join(PANDA_SDK, ARCH_TOOLS, 'bin', 'ark_link') + +const ARGS_SPEC = [ + { + flag: '--arklink-bin', + help: 'Path to arklink binary', + domain: 'string', + default: ark_link_path + }, + ...DEFAULT_DRIVER_FLAGS, +] +const USAGE = getUsage("This runs ark_link to link several .abc files into one", ARGS_SPEC) + +checkForHelp(USAGE) +const { recognized: args, unknown: rest } = extractArgs(ARGS_SPEC, process.argv.slice(2)) +let cmd = [ + args.flag('--arklink-bin'), + ...rest +] +if (args.flag('--driver-log') === 'info') { + console.log(formatCommand(cmd.join(' '), process.cwd())) +} +const child = child_process.spawn(cmd[0], [...cmd.slice(1)]) +child.stdout.on('data', (data) => { + process.stdout.write(data); +}) +child.stderr.on('data', (data) => { + process.stderr.write(data); +}) +child.on('close', (code) => { + if (code) { + if (args.flag('--driver-log') === 'info') { + console.log(`Command ${formatCommand(cmd.join(' '), process.cwd())} failed with return code ${code}`) + } + process.exit(code) + } +}) diff --git a/koala_tools/incremental/tools/panda/arkts/arktsc b/koala_tools/incremental/tools/panda/arkts/arktsc new file mode 100755 index 0000000000000000000000000000000000000000..a0edacd77e234bd887801c9242ab79b097af675a --- /dev/null +++ b/koala_tools/incremental/tools/panda/arkts/arktsc @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright (c) 2022-2024 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. + +SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` +node $SCRIPT_DIR/arktsc.js "$@" diff --git a/koala_tools/incremental/tools/panda/arkts/arktsc.js b/koala_tools/incremental/tools/panda/arkts/arktsc.js new file mode 100644 index 0000000000000000000000000000000000000000..4fd2919dda8b650cb105b9178e9448f5c5105bf2 --- /dev/null +++ b/koala_tools/incremental/tools/panda/arkts/arktsc.js @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +const child_process = require('child_process') +const path = require("node:path") +const { formatCommand, + extractArgs, + DEFAULT_DRIVER_FLAGS, + PANDA_SDK, + ARCH_TOOLS, + getUsage, + checkForHelp } = require('./common') + +es2panda_path = process.env.ES2PANDA_PATH +es2panda_path = es2panda_path ?? path.join(PANDA_SDK, ARCH_TOOLS, 'bin', 'es2panda') +stdlib_path = process.env.ETS_STDLIB_PATH +stdlib_path = stdlib_path ?? path.join(PANDA_SDK, 'ets', 'stdlib') + +const ARGS_SPEC = [ + { + flag: '--es2panda-bin', + help: 'Path to es2panda binary', + domain: 'string', + default: es2panda_path + }, + { + flag: '--es2panda-stdlib', + help: 'Path to es2panda stdlib directory', + domain: 'string', + default: stdlib_path + }, + ...DEFAULT_DRIVER_FLAGS, +] +const USAGE = getUsage("This runs es2panda to compile ts/arkts files to panda bytecode", ARGS_SPEC) + +checkForHelp(USAGE) +const { recognized: args, unknown: rest } = extractArgs(ARGS_SPEC, process.argv.slice(2)) +let cmd = [ + args.flag('--es2panda-bin'), + '--stdlib', args.flag('--es2panda-stdlib'), + '--extension', 'ets', + '--list-files', + ...rest +] +if (args.flag('--driver-log') === 'info') { + console.log(formatCommand(cmd.join(' '), process.cwd())) +} +const child = child_process.spawn(cmd[0], [...cmd.slice(1)]) +child.stdout.on('data', (data) => { + process.stdout.write(data); +}) +child.stderr.on('data', (data) => { + process.stderr.write(data); +}) +child.on('close', (code) => { + if (code) { + if (args.flag('--driver-log') === 'info') { + console.log(`Command ${formatCommand(cmd.join(' '), process.cwd())} failed with return code ${code}`) + } + process.exit(code) + } +}) +child.on('exit', (code, signal) => { + if (signal) { + console.log(`Received signal: ${signal} from '${formatCommand(cmd.join(' '), process.cwd())}'`) + process.exit(1) + } +}) + diff --git a/koala_tools/incremental/tools/panda/arkts/common.js b/koala_tools/incremental/tools/panda/arkts/common.js new file mode 100644 index 0000000000000000000000000000000000000000..e152f658b7ffcf5c01b33110ad9de577e481aea7 --- /dev/null +++ b/koala_tools/incremental/tools/panda/arkts/common.js @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +const child_process = require('child_process') +const path = require('node:path') + +const TOOLS_PANDA_ROOT = path.join(__dirname, "..") +const PANDA_SDK = process.env.PANDA_SDK_PATH ?? path.join(TOOLS_PANDA_ROOT, "node_modules/@panda/sdk") +const ARCH_TOOLS = (() => { + const arch = process.arch + let sdkArch = ""; + switch (arch) { + case "x64": sdkArch = ""; + break; + case "arm64": sdkArch = "arm64"; + break; + default: throw new Error("Unexpected arch: ", arch); + + } + const p = process.platform + let sdkPlatform = "" + switch (p) { + case "linux": sdkPlatform = "linux" + break; + case "win32": sdkPlatform = "windows" + break; + case "darwin": sdkPlatform = "macos" + break; + default: throw new Error(`Unsupported platform ${p}`) + } + const suffix = "host_tools" + return [sdkPlatform, sdkArch, suffix].filter(it => it != "").join("_") +})() +const DEFAULT_DRIVER_FLAGS = [ + { + flag: '--driver-log', + help: 'Define verbosity for output', + domain: ['default', 'info'], + default: 'default' + }, +] + +function getUsage(usage, args) { + let strings = [ + usage, + "All arguments (except ones that are captured by the script) are passed to the underlying tool.", + "", + "Flags:", + ] + for (const arg of args) { + strings.push(`${arg.flag} [${arg.domain}] Default: '${arg.default}'`) + strings.push(` ${arg.help}`) + } + return strings.join('\n') +} +function checkForHelp(usage) { + if (process.argv.length === 3 && + (process.argv.includes('-h') || process.argv.includes('--help'))) { + console.log(usage) + process.exit(1) + } +} + +class Recognized { + constructor(recognized) { + this.recognized = recognized + } + + flag(name) { + const found = this.recognized.get(name) + if (!found) { + throw new Error(`Flag ${name} not specified`) + } + return found + } +} + +function extractArgs(argsSpec, args) { + let flags = args + const parsed = [] + function parseArg(flag) { + if (flags.length === 0) { + parsed.push({ type: 'flag', value: flag }) + } else { + const peek = flags[0] + if (!peek.startsWith('--')) { + const top = flags.shift() + parsed.push({ type: 'option', value: [flag, top] }) + } else { + parsed.push({ type: 'flag', value: flag }) + } + } + } + function parseVal(val) { + parsed.push({ type: 'value', value: val }); + } + function parseArgs() { + if (!flags || flags.length === 0) { + return + } + + const top = flags.shift() + if (top.startsWith('--')) { + parseArg(top) + } else { + parseVal(top) + } + parseArgs() + } + + function classify(flag) { + const { type, value } = flag + if (type === 'value') { + return { type: 'unknown', value: [value] } + } else { + if (type === 'flag') { + const found = argsSpec.find((el) => el.flag === value) + if (found) { + return { type: 'recognized', flag: value, value: true, spec: found } + } else { + return { type: 'unknown', value: [value] } + } + } else { + const [f, arg] = value + const found = argsSpec.find((el) => el.flag === f) + if (found) { + return { type: 'recognized', flag: f, value: arg, spec: found } + } else { + return { type: 'unknown', value: [f, arg] } + } + } + } + } + + function validate(c) { + const { flag, value, spec } = c + const domain = spec.domain + if (Array.isArray(domain)) { + if (!domain.includes(value)) { + return `Flag ${flag} with ${value} is invalid, possible values are: ${domain}` + } + } else if (typeof value !== domain) { + return `Flag ${flag} with ${value} is invalid, type must be ${domain}` + } + return null + } + + parseArgs() + const classified = parsed.map(classify) + classified.filter(c => c.type == 'recognized').forEach(c => { + const result = validate(c) + if (result !== null) { + throw new Error(result) + } + }) + + let unknown = [] + let recognized = new Map() + classified.forEach(r => { + switch (r.type) { + case 'unknown': + unknown.push(...r.value) + break + case 'recognized': + recognized.set(r.flag, r.value) + } + }) + + argsSpec.forEach(s => { + const { flag, default: default_ } = s + if (!recognized.has(flag)) { + recognized.set(flag, default_) + } + }) + + return { recognized: new Recognized(recognized), unknown } +} + +function formatCommand(cmd, cwd) { + const c = typeof cmd === "string" ? cmd : cmd.join(' ') + return `$ ${cwd}> ` + c +} + +module.exports = { + extractArgs, + formatCommand, + getUsage, + checkForHelp, + TOOLS_PANDA_ROOT, + PANDA_SDK, + ARCH_TOOLS, + DEFAULT_DRIVER_FLAGS +} diff --git a/koala_tools/incremental/tools/panda/arkts/ui2abc b/koala_tools/incremental/tools/panda/arkts/ui2abc new file mode 100755 index 0000000000000000000000000000000000000000..178dd72ad8e6d36efb79177315b1f142eb2ee5c5 --- /dev/null +++ b/koala_tools/incremental/tools/panda/arkts/ui2abc @@ -0,0 +1,18 @@ +#!/bin/bash + +# Copyright (c) 2022-2024 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. + +SCRIPT_DIR=`dirname "${BASH_SOURCE[0]}"` +KOALA_WORKSPACE=1 PANDA_SDK_PATH=${PANDA_SDK_PATH:=$SCRIPT_DIR/../node_modules/@panda/sdk} node $SCRIPT_DIR/../../../../ui2abc/libarkts/lib/es2panda.js "$@" + diff --git a/koala_tools/incremental/tools/panda/build_panda_sdk.mjs b/koala_tools/incremental/tools/panda/build_panda_sdk.mjs new file mode 100644 index 0000000000000000000000000000000000000000..d3138640442d0594e94cc5031940534fca506888 --- /dev/null +++ b/koala_tools/incremental/tools/panda/build_panda_sdk.mjs @@ -0,0 +1,126 @@ +/* + * 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 fs from "fs"; +import path from "path"; +import child_process from "child_process"; + +const originRuntime = "https://gitee.com/openharmony/arkcompiler_runtime_core" +const originFrontend = "https://gitee.com/openharmony/arkcompiler_ets_frontend" + +console.log("Required packages and utilities:\n" + + "Ubuntu: clang-14, lcov, libdwarf-dev, jinja2, cmake, ninja (apt install -y clang-14 lcov libdwarf-dev python3-pip cmake ninja-build && pip install jinja2-cli)") + +const argv = new Map(process.argv.slice(2).map(it => it.split("="))) +const pandaSdkDir = argv.get("--panda-sdk-dir") +const arkCompilerDir = argv.get("--arkcompiler-build-dir") +const buildType = argv.get("--build-type") ?? "Release" +const rtGitRev = argv.get("--runtime-git-rev") +const feGitRev = argv.get("--frontend-git-rev") +const feGitPatches = argv.get("--frontend-git-patches")?.split(":") ?? [] + +if (arkCompilerDir === undefined) { + console.log("--arkcompiler-build-dir argument is required") + process.exit(1) +} +if (pandaSdkDir === undefined) { + console.log("--panda-sdk-dir argument is required") + process.exit(1) +} + +const feDir = path.join(arkCompilerDir, "ets_frontend") +const rtDir = path.join(arkCompilerDir, "runtime_core") +const staticCoreDir = path.join(rtDir, "static_core") + +makeDir(arkCompilerDir) + +gitClone(originRuntime, rtDir) +if (rtGitRev !== undefined) { + gitCheckout(rtDir, rtGitRev) +} +gitClone(originFrontend, feDir) +if (feGitRev !== undefined) { + gitCheckout(feDir, feGitRev) +} +feGitPatches.forEach(it => { + child_process.spawnSync("git", ["apply", path.resolve(it)], + {stdio: "inherit", cwd: feDir}) +}) + +makeSymlink(path.join(feDir, "ets2panda"), path.join(staticCoreDir, "tools/es2panda")) + +const buildDir = path.join(staticCoreDir, "build") +makeDir(buildDir) + +child_process.spawnSync("cmake", [ + `-B${buildDir}`, + `-S${staticCoreDir}`, + "-GNinja", + `-DCMAKE_BUILD_TYPE=${buildType}`, + `-DCMAKE_TOOLCHAIN_FILE=${path.join(staticCoreDir, "cmake/toolchain/host_clang_14.cmake")}`, + "-DPANDA_ETS_INTEROP_JS=ON", + "-DPANDA_WITH_JAVA=false", + "-DPANDA_WITH_ECMASCRIPT=false", + "-DPANDA_WITH_ACCORD=false", + "-DPANDA_WITH_CANGJIE=false", + "-DPANDA_WITH_ETS=true" + ], + {stdio: "inherit"} +) + +child_process.spawnSync("ninja", [ + "-C", + buildDir, + "panda_bins"], + {stdio: "inherit"} +) + +makeDir(path.join(pandaSdkDir, "ets")) +makeSymlink(path.join(staticCoreDir, "plugins/ets/stdlib"), path.join(pandaSdkDir, "ets/stdlib")) +makeSymlink(path.join(buildDir, "plugins/ets/etsstdlib.abc"), path.join(pandaSdkDir, "ets/etsstdlib.abc")) +makeDir(path.join(pandaSdkDir, "linux_host_tools")) +makeSymlink(path.join(buildDir, "bin"), path.join(pandaSdkDir, "linux_host_tools/bin")) +makeSymlink(path.join(buildDir, "lib"), path.join(pandaSdkDir, "linux_host_tools/lib")) + +console.log("Build completed successfully") + +function makeDir(path) { + if (!fs.existsSync(path)) { + fs.mkdirSync(path, {recursive: true}) + } +} + +function makeSymlink(target, dest) { + if (fs.existsSync(dest)) { + if (fs.lstatSync(dest).isDirectory()) { + fs.rmdirSync(dest, { recursive: true, force: true }) + } else { + fs.unlinkSync(dest) + } + } + if (fs.lstatSync(target).isDirectory()) { + fs.cpSync(target, dest, { recursive: true }) + } else { + fs.symlinkSync(target, dest) + } +} + +function gitClone(repo, dir) { + child_process.spawnSync("git", ["clone", repo, dir], {stdio: "inherit"}) +} + +function gitCheckout(repo, rev) { + child_process.spawnSync("git", ["checkout", rev], {stdio: "inherit", cwd: repo}) +} diff --git a/koala_tools/incremental/tools/panda/fix_es2panda_1.patch b/koala_tools/incremental/tools/panda/fix_es2panda_1.patch new file mode 100644 index 0000000000000000000000000000000000000000..79b869657069089ec3f8d180cc5df4259dc70416 --- /dev/null +++ b/koala_tools/incremental/tools/panda/fix_es2panda_1.patch @@ -0,0 +1,150 @@ +diff --git a/ets2panda/aot/main.cpp b/ets2panda/aot/main.cpp +index 2c916e6ac..68526dd00 100644 +--- a/ets2panda/aot/main.cpp ++++ b/ets2panda/aot/main.cpp +@@ -33,11 +33,12 @@ using mem::MemConfig; + + class MemManager { + public: +- explicit MemManager() ++ explicit MemManager(const std::size_t compilerMemSize) + { +- constexpr auto COMPILER_SIZE = 256_MB; +- +- MemConfig::Initialize(0, 0, COMPILER_SIZE, 0, 0, 0); ++ constexpr auto DEFAULT_COMPILER_SIZE = 256_MB; ++ MemConfig::Initialize(0, 0, ++ compilerMemSize > DEFAULT_COMPILER_SIZE ? compilerMemSize : DEFAULT_COMPILER_SIZE, ++ 0, 0, 0); + PoolManager::Initialize(PoolType::MMAP); + } + +@@ -98,7 +99,11 @@ static int CompileFromConfig(es2panda::Compiler &compiler, util::Options *option + es2panda::SourceFile input(src, parserInput, options->ParseModule()); + options->SetCompilerOutput(dst); + +- options->ListFiles() && std::cout << "> es2panda: compiling from '" << src << "' to '" << dst << "'" ++ const auto index = std::distance(compilationList.begin(), ++ std::find_if(compilationList.begin(), compilationList.end(), ++ [filename = src](const auto &i) { return i.first == filename; })); ++ options->ListFiles() && std::cout ++ << "> es2panda:" << " [" << index + 1 << "/" << compilationList.size() << "] " << "compiling from '" << src << "' to '" << dst << "'" + << std::endl; + auto res = CompileFromSource(compiler, input, options); + if (res != 0) { +@@ -125,14 +130,8 @@ static std::optional> InitializePlugins(std::vector &options) + { +- auto options = std::make_unique(); +- if (!options->Parse(argc, argv)) { +- std::cerr << options->ErrorMsg() << std::endl; +- return 1; +- } +- + Logger::ComponentMask mask {}; + mask.set(Logger::Component::ES2PANDA); + Logger::InitializeStdLogging(Logger::LevelFromString(options->LogLevel()), mask); +@@ -162,6 +161,11 @@ static int Run(int argc, const char **argv) + + int main(int argc, const char **argv) + { +- ark::es2panda::aot::MemManager mm; +- return ark::es2panda::aot::Run(argc, argv); ++ const auto options = std::make_unique(); ++ if (!options->Parse(argc, argv)) { ++ std::cerr << options->ErrorMsg() << std::endl; ++ return 1; ++ } ++ ark::es2panda::aot::MemManager mm(options->CompilerMemorySize()); ++ return ark::es2panda::aot::Run(options); + } +diff --git a/ets2panda/ast_verifier/everyChildHasValidParent.cpp b/ets2panda/ast_verifier/everyChildHasValidParent.cpp +index 30443fbc6..6589bc6bc 100644 +--- a/ets2panda/ast_verifier/everyChildHasValidParent.cpp ++++ b/ets2panda/ast_verifier/everyChildHasValidParent.cpp +@@ -14,7 +14,10 @@ + */ + + #include "everyChildHasValidParent.h" ++ + #include "ir/base/methodDefinition.h" ++#include "ir/base/scriptFunction.h" ++#include "ir/typeNode.h" + + namespace ark::es2panda::compiler::ast_verifier { + +@@ -52,6 +55,17 @@ CheckResult EveryChildHasValidParent::operator()(CheckContext &ctx, const ir::As + return; + } + ++ // NOTE: Temporary suppress. ++ // Fix checking of tuples in interfaces ++ if (ast->IsScriptFunction()) { ++ if (const auto *sf = ast->AsScriptFunction(); ++ sf->ReturnTypeAnnotation()->Parent() == parent && node->IsETSTuple()) { ++ return; ++ } ++ } ++ ++ return; ++ + ctx.AddCheckMessage("INCORRECT_PARENT_REF", *node, node->Start()); + result = {CheckDecision::INCORRECT, CheckAction::CONTINUE}; + } +diff --git a/ets2panda/util/options.cpp b/ets2panda/util/options.cpp +index a148246ac..3f3e2b469 100644 +--- a/ets2panda/util/options.cpp ++++ b/ets2panda/util/options.cpp +@@ -161,6 +161,7 @@ struct AllArgs { + ark::PandArg opDumpCheckedAst {"dump-dynamic-ast", false, + "Dump AST with synthetic nodes for dynamic languages"}; + ark::PandArg opListFiles {"list-files", false, "Print names of files that are part of compilation"}; ++ ark::PandArg opCompilerMemSize {"compiler-memory-size", 0, "Compiler memory size(bytes)"}; + + // compiler + ark::PandArg opDumpAssembly {"dump-assembly", false, "Dump pandasm"}; +@@ -295,6 +296,7 @@ struct AllArgs { + argparser.Add(&opThreadCount); + argparser.Add(&opSizeStat); + argparser.Add(&opListFiles); ++ argparser.Add(&opCompilerMemSize); + + argparser.Add(&inputExtension); + argparser.Add(&outputFile); +@@ -529,7 +531,7 @@ bool Options::Parse(int argc, const char **argv) + optLevel_ = allArgs.opOptLevel.GetValue(); + threadCount_ = allArgs.opThreadCount.GetValue(); + listFiles_ = allArgs.opListFiles.GetValue(); +- ++ compilerMemorySize_ = allArgs.opCompilerMemSize.GetValue(); + return true; + } + } // namespace ark::es2panda::util +diff --git a/ets2panda/util/options.h b/ets2panda/util/options.h +index b7c100436..75e6a2c74 100644 +--- a/ets2panda/util/options.h ++++ b/ets2panda/util/options.h +@@ -281,6 +281,11 @@ public: + return listFiles_; + } + ++ std::size_t CompilerMemorySize() const ++ { ++ return compilerMemorySize_; ++ } ++ + private: + es2panda::ScriptExtension extension_ {es2panda::ScriptExtension::JS}; + OptionFlags options_ {OptionFlags::DEFAULT}; +@@ -294,6 +299,7 @@ private: + int optLevel_ {0}; + int threadCount_ {0}; + bool listFiles_ {false}; ++ std::size_t compilerMemorySize_ {0}; + util::LogLevel logLevel_ {util::LogLevel::ERROR}; + }; + } // namespace ark::es2panda::util diff --git a/koala_tools/incremental/tools/panda/fix_normalizing_source_paths.patch b/koala_tools/incremental/tools/panda/fix_normalizing_source_paths.patch new file mode 100644 index 0000000000000000000000000000000000000000..479c1e509f53f6bc5b5f9cd946585403e9185fbb --- /dev/null +++ b/koala_tools/incremental/tools/panda/fix_normalizing_source_paths.patch @@ -0,0 +1,25 @@ +diff --git a/ets2panda/util/arktsconfig.cpp b/ets2panda/util/arktsconfig.cpp +index 2c6f967f0..597a36310 100644 +--- a/ets2panda/util/arktsconfig.cpp ++++ b/ets2panda/util/arktsconfig.cpp +@@ -462,7 +462,7 @@ static std::vector GetSourceList(const std::shared_ptr &a + } + for (const auto &dirEntry : fs::recursive_directory_iterator(traverseRoot)) { + if (include.Match(dirEntry.path().string()) && !MatchExcludes(dirEntry, excludes)) { +- sourceList.emplace_back(dirEntry); ++ sourceList.emplace_back(fs::canonical(dirEntry)); + } + } + } +diff --git a/ets2panda/varbinder/ETSBinder.cpp b/ets2panda/varbinder/ETSBinder.cpp +index 988ffb856..bc1ace4d5 100644 +--- a/ets2panda/varbinder/ETSBinder.cpp ++++ b/ets2panda/varbinder/ETSBinder.cpp +@@ -611,6 +611,7 @@ ir::ETSImportDeclaration *ETSBinder::FindImportDeclInReExports(const ir::ETSImpo + { + ir::ETSImportDeclaration *implDecl = nullptr; + for (auto item : ReExportImports()) { ++ // source.Is(program) - returns false if the path in the program is not normalized + if (auto source = import->ResolvedSource()->Str(), program = item->GetProgramPath(); + !source.Is(program.Mutf8())) { + continue; diff --git a/koala_tools/incremental/tools/panda/package.json b/koala_tools/incremental/tools/panda/package.json new file mode 100644 index 0000000000000000000000000000000000000000..777df4e200a1365d1eac9cce5f67a4af5a7ac698 --- /dev/null +++ b/koala_tools/incremental/tools/panda/package.json @@ -0,0 +1,18 @@ +{ + "name": "panda-installer", + "private": true, + "dependencies": { + "@panda/sdk": "^1.5.0-dev.23465" + }, + "devDependencies": { + "rimraf": "^6.0.1" + }, + "scripts": { + "panda:patch": "git apply patch/es2panda_lib.idl.patch", + "panda:sdk:check-install": "npm ls @panda/sdk@${PANDA_SDK_VERSION:-next} || npm run panda:sdk:install", + "panda:sdk:install": "npm install --prefix . --no-save @panda/sdk@${PANDA_SDK_VERSION:-next}", + "panda:sdk:clean": "rimraf ./node_modules", + "panda:sdk:build": "node ./build_panda_sdk.mjs --panda-sdk-dir=./node_modules/@panda/sdk/ --arkcompiler-build-dir=$HOME/arkcompiler --runtime-git-rev=a6704b6a --frontend-git-rev=c2166bf1 --frontend-git-patches=./fix_es2panda_1.patch:./fix_normalizing_source_paths.patch", + "panda:sdk:sync": "node ./sync-panda-on-device.mjs" + } +} diff --git a/koala_tools/incremental/tools/panda/patch/es2panda_lib.idl.patch b/koala_tools/incremental/tools/panda/patch/es2panda_lib.idl.patch new file mode 100644 index 0000000000000000000000000000000000000000..aedb3d7989abc4c8f0df75902f4c924e77cdce89 --- /dev/null +++ b/koala_tools/incremental/tools/panda/patch/es2panda_lib.idl.patch @@ -0,0 +1,27 @@ +--- ./node_modules/@panda/sdk/ohos_arm64/include/tools/es2panda/generated/es2panda_lib/es2panda_lib.idl 2025-04-28 17:25:03.787222095 +0300 ++++ ./node_modules/@panda/sdk/ohos_arm64/include/tools/es2panda/generated/es2panda_lib/es2panda_lib.idl 2025-04-28 17:28:54.616765363 +0300 +@@ -1779,7 +1779,10 @@ + + namespace ir { + +-[Entity=Class, c_type=es2panda_AstNode] interface NumberLiteral: Literal { ++[Entity=Class, Es2pandaAstNodeType=52, c_type=es2panda_AstNode] interface NumberLiteral: Literal { ++ ++ /* [[nodiscard]] const util::StringView &Str() const noexcept */ ++ [get] String StrConst(es2panda_Context context); + ir.AstNode Create(es2panda_Context ctx, i32 value); + ir.AstNode Create1(es2panda_Context ctx, i64 value); + ir.AstNode Create2(es2panda_Context ctx, f64 value); +@@ -2487,12 +2490,6 @@ + void SetTypeParams(es2panda_Context context, ir.TSTypeParameterInstantiation typeParams); + }; + +-[Entity=Class, Es2pandaAstNodeType=52, c_type=es2panda_AstNode] interface NumberLiteral: Literal { +- +- /* [[nodiscard]] const util::StringView &Str() const noexcept */ +- [get] String StrConst(es2panda_Context context); +-}; +- + [Entity=Class, Es2pandaAstNodeType=124, c_type=es2panda_AstNode] interface TSFunctionType: TypeNode { + + /* explicit TSFunctionType(FunctionSignature &&signature, ArenaAllocator *const allocator) */ diff --git a/koala_tools/incremental/tools/panda/sync-panda-on-device.mjs b/koala_tools/incremental/tools/panda/sync-panda-on-device.mjs new file mode 100644 index 0000000000000000000000000000000000000000..7f07932fdb3e731d959c531d2c92a8a88154a49b --- /dev/null +++ b/koala_tools/incremental/tools/panda/sync-panda-on-device.mjs @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2022-2024 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 path from "path" +import fs from "fs" +import url from "url" + +import { execCmd } from "../../../tools/utils/system.mjs" +import { ohConf } from "../../../tools/ohos-tools/ohconf.mjs" + +const __dirname = path.dirname(url.fileURLToPath(import.meta.url)) + +const HDC = ohConf().hdcPath() + +async function execHDC(args, options = {}) { + return execCmd(HDC, [...args], { + ...options, + shell: false + }) +} + +console.log("> Connected device:") +let out = await execHDC(['list', 'targets'], { instantLogging: true }) + "" +if (out.indexOf("Empty") !== -1) { + console.log("> Error: no connection to a device") + process.exit(-1) +} + +console.log("> Mount device for write:") +await execHDC(['hdc', 'target', 'mount'], { instantLogging: true }) + +let arch = "arm64" +out = await execHDC(['shell', 'file', '/system/lib64']) + "" +if (out.indexOf("No such file") !== -1) { + out = await execHDC(['shell', 'file', '/system/lib']) + "" + if (out.indexOf("No such file") !== -1) { + console.log("> Error: cannot detect device arch") + process.exit(-1) + } + arch = "arm32" +} + +console.log("> Device arch: " + arch) + +const LIB_ARCH = arch === "arm32" ? "lib" : "lib64" + +const PANDA_LIB_ROOT = path.join(__dirname, `node_modules/@panda/sdk/ohos_${arch}/lib`) +const PANDA_ETS_ROOT = path.join(__dirname, `node_modules/@panda/sdk/ets`) + +const SEND_RULES = [ + { + root: PANDA_LIB_ROOT, + src: "libetsnative.so", + dst: `/system/${LIB_ARCH}/ndk/libetsnative.z.so` + }, + { + root: PANDA_LIB_ROOT, + src: "libets_interop_js_napi.so", + dst: `/system/${LIB_ARCH}/module/libets_interop_js_napi.z.so` + }, + { + root: PANDA_LIB_ROOT, + src: ".so", + dst: `/system/${LIB_ARCH}` + }, + { + root: PANDA_ETS_ROOT, + src: "etsstdlib.abc", + dst: "/system/etc/etsstdlib.abc" + } +] + +const RULE_APPLIED = (fileName, rule) => fileName.endsWith(rule.src) + +const SEND_FILE = async fileName => { + const rule = SEND_RULES.filter(rule => RULE_APPLIED(fileName, rule))[0] + console.log("> Send " + fileName + " to " + rule.dst) + await execHDC(['hdc', 'file', 'send', path.join(rule.root, fileName), rule.dst], { instantLogging: true }) +} + + +for (const file of fs.readdirSync(PANDA_LIB_ROOT)) { + if (file.endsWith(".so")) + await SEND_FILE(file) +} + +await SEND_FILE("etsstdlib.abc") + +console.log("> Reboot device...") +await execHDC(['hdc', 'shell', 'reboot'], { instantLogging: true }) diff --git a/koala_tools/interop/.gitignore b/koala_tools/interop/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..44a0964582ad20972cb3bc522a25f96c04a00484 --- /dev/null +++ b/koala_tools/interop/.gitignore @@ -0,0 +1 @@ +*.ini \ No newline at end of file diff --git a/koala_tools/interop/BUILD.gn b/koala_tools/interop/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..f6c9d97d8912b7424a01a32223aecf92e6a8e1d1 --- /dev/null +++ b/koala_tools/interop/BUILD.gn @@ -0,0 +1,55 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/config/components/ets_frontend/ets2abc_config.gni") +import("//build/ohos.gni") +import("//foundation/arkui/ace_engine/ace_config.gni") +import("//foundation/arkui/ace_engine/frameworks/bridge/arkts_frontend/koala_mirror/gn/npm_util.gni") + +koala_root = ".." +interop_root = "" + +node_version = "v16.20.2" +host_arch = "${host_os}-${host_cpu}" + +if (current_toolchain == host_toolchain) { + npm_install("interop_install") { + outputs = [ + "$target_out_dir/interop_install" + ] + project_path = rebase_path(".") + } +} + +npm_cmd("interop.abc") { + outputs = [ + "$target_out_dir/interop.abc" + ] + project_path = rebase_path(".") + run_tasks = [ "build" ] + + deps = [ + "$koala_root/ui2abc:ui2abc" + ] + + external_deps = [ + ets2abc_build_deps, + static_linker_build_deps + ] +} + +group("interop") { + deps = [ + "$interop_root:interop.abc" + ] +} \ No newline at end of file diff --git a/koala_tools/interop/meson_options.txt b/koala_tools/interop/meson_options.txt new file mode 100644 index 0000000000000000000000000000000000000000..0496ac5b57ad30cdc0f1aba0508d6ded4765b766 --- /dev/null +++ b/koala_tools/interop/meson_options.txt @@ -0,0 +1,21 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +option('vm_kind', type : 'string', value : '', + description : 'VM type') +option('jdk_dir', type : 'string', value : '', + description : 'A path to JDK root') +option('vmloader', type : 'boolean', value : false, + description : 'Whether to build libvmloader.so') +option('vmloader_apis', type : 'string', value : 'ets', + description : 'APIs to use in libvmloader.so') diff --git a/koala_tools/interop/package.json b/koala_tools/interop/package.json new file mode 100644 index 0000000000000000000000000000000000000000..a08032bdd2991b669c5ad1b05217a78320fa123d --- /dev/null +++ b/koala_tools/interop/package.json @@ -0,0 +1,113 @@ +{ + "name": "@koalaui/interop", + "version": "1.7.9+devel", + "description": "", + "workspaces": [ + "../incremental/build-common", + "../incremental/compat", + "../incremental/common" + ], + "files": [ + "build/lib/src/**/*.js", + "build/lib/src/**/*.d.ts", + "src/**/*", + "index.ts" + ], + "main": "./build/lib/src/interop/index.js", + "exports": { + ".": "./build/lib/src/interop/index.js", + "./*.js": "./build/lib/src/interop/*.js", + "./*": "./build/lib/src/interop/*.js" + }, + "imports": { + "#common/wrappers": { + "browser": "./build/lib/src/wasm/wrappers/index.js", + "node": "./build/lib/src/napi/wrappers/index.js" + }, + "#common/wrappers/*": { + "browser": "./build/lib/src/wasm/wrappers/*.js", + "node": "./build/lib/src/napi/wrappers/*.js", + "default": "./build/lib/src/napi/wrappers/*.js" + } + }, + "types": "index.d.ts", + "typesVersions": { + "*": { + "*": [ + "./build/lib/src/interop/*" + ] + } + }, + "scripts": { + "clean": "rimraf dist build types", + "compile": "ets-tsc -b .", + "compile:release": "ets-tsc -b .", + "build": "node ../ui2abc/fast-arktsc --config ./ui2abcconfig.json --compiler ../incremental/tools/panda/arkts/ui2abc --link-name ./build/interop.abc --simultaneous && ninja ${NINJA_OPTIONS} -f build/abc/build.ninja", + "lint": "eslint src test components", + "test:wasm:coverage": "NODE_OPTIONS='--conditions browser --no-experimental-fetch' nyc mocha", + "test:wasm": "NODE_OPTIONS='--conditions browser --no-experimental-fetch' mocha", + "test:node:coverage": "nyc mocha", + "test:node": "mocha", + "test:coverage": "npm run test:node:coverage", + "test": "npm run test:node", + "watch": "ets-tsc -b . --watch", + "prepare:compiler": "test $(node -e \"console.log(process.platform)\") != \"linux\" && npm run --prefix ../arkoala-arkts/ohos-sdk download || npm run install:toolchain --prefix ../arkoala-arkts/tools/compiler", + "prepare:arm64": "npm run prepare:compiler && npm run install:sysroot:arm64 --prefix ../arkoala-arkts/tools/compiler", + "prepare:arm32": "npm run prepare:compiler && npm run install:sysroot:arm32 --prefix ../arkoala-arkts/tools/compiler", + "configure:native-node-host": "meson setup -D vm_kind=node build-node-host", + "compile:native-node-host": "npm run configure:native-node-host && meson compile -C build-node-host && meson install -C build-node-host", + "configure:native-hzvm-host": "meson setup -D vm_kind=hzvm build-hzvm-host", + "compile:native-hzvm-host": "npm run configure:native-hzvm-host && meson compile -C build-hzvm-host && meson install -C build-hzvm-host", + "configure:native-panda-host": "meson setup -D vm_kind=panda build-panda-host", + "compile:native-panda-host": "npm run configure:native-panda-host && meson compile -C build-panda-host && meson install -C build-panda-host", + "configure:native-kotlin-host": "meson setup -D vm_kind=kotlin build-kotlin-host", + "compile:native-kotlin-host": "npm run configure:native-kotlin-host && meson compile -C build-kotlin-host && meson install -C build-kotlin-host", + "configure:native-panda-linux-x64": "node ./scripts/configure.mjs panda-linux-x64", + "compile:native-panda-linux-x64": "npm run configure:native-panda-linux-x64 && meson compile -C build-panda-linux-x64 && meson install -C build-panda-linux-x64", + "configure:native-panda-linux-arm64": "node ./scripts/configure.mjs panda-linux-arm64", + "compile:native-panda-linux-arm64": "npm run configure:native-panda-linux-arm64 && meson compile -C build-panda-linux-arm64 && meson install -C build-panda-linux-arm64", + "configure:native-panda-windows-x64": "node ./scripts/configure.mjs panda-windows-x64", + "compile:native-panda-windows-x64": "npm run configure:native-panda-windows-x64 && meson compile -C build-panda-windows-x64 && meson install -C build-panda-windows-x64", + "configure:native-panda-macos-x64": "node ./scripts/configure.mjs panda-macos-x64", + "compile:native-panda-macos-x64": "npm run configure:native-panda-macos-x64 && meson compile -C build-panda-macos-x64 && meson install -C build-panda-macos-x64", + "configure:native-panda-macos-arm64": "node ./scripts/configure.mjs panda-macos-arm64", + "compile:native-panda-macos-arm64": "npm run configure:native-panda-macos-arm64 && meson compile -C build-panda-macos-arm64 && meson install -C build-panda-macos-arm64", + "configure:native-jvm-host": "meson setup -D vm_kind=jvm build-jvm-host -D vmloader=true -D jdk_dir=$JAVA_HOME", + "compile:native-jvm-host": "npm run configure:native-jvm-host && meson compile -C build-jvm-host && meson install -C build-jvm-host", + "configure:native-hzvm-ohos-arm64": "npm run prepare:arm64 && node ./scripts/configure.mjs hzvm-ohos-arm64", + "compile:native-hzvm-ohos-arm64": "npm run configure:native-hzvm-ohos-arm64 && meson compile -C build-hzvm-ohos-arm64 && meson install -C build-hzvm-ohos-arm64", + "configure:native-hzvm-ohos-arm32": "npm run prepare:arm32 && node ./scripts/configure.mjs hzvm-ohos-arm32", + "compile:native-hzvm-ohos-arm32": "npm run configure:native-hzvm-ohos-arm32 && meson compile -C build-hzvm-ohos-arm32 && meson install -C build-hzvm-ohos-arm32", + "configure:native-hzvm-ohos": "npm run configure:native-hzvm-ohos-arm64", + "compile:native-hzvm-ohos": "npm run compile:native-hzvm-ohos-arm64", + "configure:native-panda-ohos-arm64": "npm run prepare:arm64 && node ./scripts/configure.mjs panda-ohos-arm64", + "compile:native-panda-ohos-arm64": "npm run configure:native-panda-ohos-arm64 && meson compile -C build-panda-ohos-arm64 && meson install -C build-panda-ohos-arm64", + "configure:native-panda-ohos-arm32": "npm run prepare:arm32 && node ./scripts/configure.mjs panda-ohos-arm32", + "compile:native-panda-ohos-arm32": "npm run configure:native-panda-ohos-arm32 && meson compile -C build-panda-ohos-arm32 && meson install -C build-panda-ohos-arm32", + "configure:native-panda-with-node-host": "npm run configure:native-panda-host && meson setup -D vm_kind=node -D vmloader=true build-node-host-vmloader", + "compile:native-panda-with-node-host": "npm run configure:native-panda-with-node-host && npm run compile:native-panda-host && npm run compile:native-panda-host && meson compile -C build-node-host-vmloader && meson install -C build-node-host-vmloader", + "configure:native-panda-with-hzvm-ohos-arm64": "npm run configure:native-panda-ohos-arm64 && node ./scripts/configure.mjs hzvm-ohos-arm64-vmloader", + "compile:native-panda-with-hzvm-ohos-arm64": "npm run configure:native-panda-with-hzvm-ohos-arm64 && npm run compile:native-panda-ohos-arm64 && meson compile -C build-hzvm-ohos-arm64-vmloader && meson install -C build-hzvm-ohos-arm64-vmloader", + "configure:native-panda-with-hzvm-ohos-arm32": "npm run configure:native-panda-ohos-arm32 && node ./scripts/configure.mjs hzvm-ohos-arm32-vmloader", + "compile:native-panda-with-hzvm-ohos-arm32": "npm run configure:native-panda-with-hzvm-ohos-arm32 && npm run compile:native-panda-ohos-arm32 && meson compile -C build-hzvm-ohos-arm32-vmloader && meson install -C build-hzvm-ohos-arm32-vmloader", + "compile:kotlin:cinterop": "cd src/cpp/kotlin && cinterop -def cinterop-interop_native_module.def -pkg cinterop.interop_native_module -compiler-option -I. -o ../../../build/kotlin-interop/cinterop.interop_native_module", + "compile:kotlin:kt": "konanc ./src/kotlin/*.kt -l ./build/kotlin-interop/cinterop.interop_native_module.klib -p library -o ./build/kotlin-interop/interop", + "compile:kotlin:interop": "rm -rf build/kotlin-interop && npm run compile:kotlin:cinterop && npm run compile:kotlin:kt" + }, + "keywords": [], + "dependencies": { + "@types/node": "^18.0.0", + "@koalaui/common": "1.7.9+devel" + }, + "devDependencies": { + "@ohos/hypium": "1.0.6", + "@types/node": "^18.0.0", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", + "eslint": "^8.13.0", + "eslint-plugin-unused-imports": "^2.0.0", + "source-map-support": "^0.5.21", + "@koalaui/ets-tsc": "4.9.5-r5", + "@koalaui/fast-arktsc": "1.5.15" + } +} \ No newline at end of file diff --git a/koala_tools/interop/src/arkts/DeserializerBase.ts b/koala_tools/interop/src/arkts/DeserializerBase.ts new file mode 100644 index 0000000000000000000000000000000000000000..5388affb8487f62b7aaa2df9110bd01b9ac77790 --- /dev/null +++ b/koala_tools/interop/src/arkts/DeserializerBase.ts @@ -0,0 +1,259 @@ +/* + * 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. + */ + +import { float32, int32, int64 } from "@koalaui/common" +import { pointer, KUint8ArrayPtr, KSerializerBuffer, nullptr } from "./InteropTypes" +import { NativeBuffer } from "./NativeBuffer" +import { InteropNativeModule } from "./InteropNativeModule" +import { Tags, CallbackResource } from "./SerializerBase"; +import { ResourceHolder, Disposable } from "./ResourceManager" + +export class DeserializerBase implements Disposable { + private _position : int64 = 0 + private _buffer: KSerializerBuffer + private readonly _isOwnBuffer: boolean; + private readonly _length: int32 + private readonly _end: int64 + private static customDeserializers: CustomDeserializer | undefined = new DateDeserializer() + + static registerCustomDeserializer(deserializer: CustomDeserializer) { + let current = DeserializerBase.customDeserializers + if (current == undefined) { + DeserializerBase.customDeserializers = deserializer + } else { + while (current!.next != undefined) { + current = current!.next + } + current!.next = deserializer + } + } + + constructor(buffer: KUint8ArrayPtr|KSerializerBuffer, length: int32) { + if (buffer instanceof KUint8ArrayPtr) { + const newBuffer = InteropNativeModule._Malloc(length) + this._isOwnBuffer = true + for (let i = 0; i < length; i++) { + unsafeMemory.writeInt8(newBuffer + i, buffer[i].toByte()) + } + this._buffer = newBuffer + } else { + this._buffer = buffer + } + + const newBuffer = this._buffer; + this._length = length + this._position = newBuffer + this._end = newBuffer + length; + } + + public final dispose() { + if (this._isOwnBuffer) { + InteropNativeModule._Free(this._buffer) + this._buffer = 0 + this._position = 0 + } + } + + final asBuffer(): KSerializerBuffer { + return this._buffer + } + + final currentPosition(): int64 { + return this._position + } + + final resetCurrentPosition(): void { + this._position = this._buffer + } + + final readInt8(): int32 { + const pos = this._position + const newPos = pos + 1 + + if (newPos > this._end) { + throw new Error(`value size(1) is less than remaining buffer length`) + } + + this._position = newPos + return unsafeMemory.readInt8(pos) + } + + final readInt32(): int32 { + const pos = this._position + const newPos = pos + 4 + + if (newPos > this._end) { + throw new Error(`value size(4) is less than remaining buffer length`) + } + + this._position = newPos + return unsafeMemory.readInt32(pos) + } + + final readPointer(): pointer { + const pos = this._position + const newPos = pos + 8 + + if (newPos > this._end) { + throw new Error(`value size(8) is less than remaining buffer length`) + } + + this._position = newPos + return unsafeMemory.readInt64(pos) + } + + final readInt64(): int64 { + const pos = this._position + const newPos = pos + 8 + + if (newPos > this._end) { + throw new Error(`value size(8) is less than remaining buffer length`) + } + + this._position = newPos + return unsafeMemory.readInt64(pos) + } + + final readFloat32(): float32 { + const pos = this._position + const newPos = pos + 4 + + if (newPos > this._end) { + throw new Error(`value size(4) is less than remaining buffer length`) + } + + + this._position = newPos + return unsafeMemory.readFloat32(pos) + } + + final readFloat64(): double { + const pos = this._position + const newPos = pos + 8 + + if (newPos > this._end) { + throw new Error(`value size(8) is less than remaining buffer length`) + } + + + this._position = newPos + return unsafeMemory.readFloat64(pos) + } + + final readBoolean(): boolean { + const pos = this._position + const newPos = pos + 1 + + if (newPos > this._end) { + throw new Error(`value size(1) is less than remaining buffer length`) + } + + + this._position = newPos + const value = unsafeMemory.readInt8(pos); + if (value == Tags.UNDEFINED) + return false; + + return value == 1 + } + + final readCallbackResource(): CallbackResource { + return { + resourceId: this.readInt32(), + hold: this.readPointer(), + release: this.readPointer(), + } + } + + final readString(): string { + const encodedLength = this.readInt32(); + const pos = this._position + const newPos = pos + encodedLength + + if (newPos > this._end) { + throw new Error(`value size(${encodedLength}) is less than remaining buffer length`) + } + + this._position = newPos + // NOTE: skip null-terminated byte + return unsafeMemory.readString(pos, encodedLength - 1) + } + + final readCustomObject(kind: string): object { + let current = DeserializerBase.customDeserializers + while (current) { + if (current!.supports(kind)) { + return current!.deserialize(this, kind) + } + current = current!.next + } + // consume tag + const tag = this.readInt8() + throw Error(`${kind} is not supported`) + } + + final readNumber(): number | undefined { + const pos = this._position + const tag = this.readInt8().toInt() + switch (tag) { + case Tags.UNDEFINED.valueOf(): + return undefined; + case Tags.INT32.valueOf(): + return this.readInt32() + case Tags.FLOAT32.valueOf(): + return this.readFloat32() + default: + throw new Error(`Unknown number tag: ${tag}`) + } + } + + final readObject():object { + const resource = this.readCallbackResource() + return ResourceHolder.instance().get(resource.resourceId) + } + + final readBuffer(): ArrayBuffer { + const resource = this.readCallbackResource() + const data = this.readPointer() + const length = this.readInt64() + InteropNativeModule._CallCallbackResourceHolder(resource.hold, resource.resourceId) + return InteropNativeModule._MaterializeBuffer(data, length, resource.resourceId, resource.hold, resource.release) + } +} + +export abstract class CustomDeserializer { + protected supported: string + protected constructor(supported_: string) { + this.supported = supported_ + } + + supports(kind: string): boolean { + return this.supported.includes(kind) + } + + abstract deserialize(serializer: DeserializerBase, kind: string): object + + next: CustomDeserializer | undefined = undefined +} + +class DateDeserializer extends CustomDeserializer { + constructor() { + super("Date") + } + + deserialize(serializer: DeserializerBase, kind: string): Date { + return new Date(serializer.readString()) + } +} \ No newline at end of file diff --git a/koala_tools/interop/src/arkts/Finalizable.ts b/koala_tools/interop/src/arkts/Finalizable.ts new file mode 100644 index 0000000000000000000000000000000000000000..b2421b1eee73475431812919670eb5dc8aa45265 --- /dev/null +++ b/koala_tools/interop/src/arkts/Finalizable.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { finalizerRegister, finalizerUnregister, Thunk } from "@koalaui/common" +import { InteropNativeModule } from "./InteropNativeModule" +import { pointer, nullptr } from "./InteropTypes" + +class NativeThunk implements Thunk { + finalizer: pointer + obj: pointer + name: string|undefined + + constructor(obj: pointer, finalizer: pointer, name?: string) { + this.finalizer = finalizer + this.obj = obj + this.name = name + } + + clean() { + if (this.obj != nullptr) { + this.destroyNative(this.obj, this.finalizer) + } + this.obj = nullptr + } + + destroyNative(ptr: pointer, finalizer: pointer): void { + InteropNativeModule._InvokeFinalizer(ptr, finalizer) + } +} + +/** + * Class with the custom finalizer, usually used to release a native peer. + * Do not use directly, only via subclasses. + */ +export class Finalizable { + ptr: pointer + finalizer: pointer + cleaner: NativeThunk|undefined = undefined + managed: boolean + + constructor(ptr: pointer, finalizer: pointer) { + this.init(ptr, finalizer, true) + } + + constructor(ptr: pointer, finalizer: pointer, managed: boolean) { + this.init(ptr, finalizer, managed) + } + + init(ptr: pointer, finalizer: pointer, managed: boolean) { + this.ptr = ptr + this.finalizer = finalizer + this.managed = managed + const handle = undefined + + if (managed) { + if (this.ptr == nullptr) throw new Error("Can't have nullptr ptr ${}") + if (this.finalizer == nullptr) throw new Error("Managed finalizer is 0") + + const thunk = new NativeThunk(ptr, finalizer, handle) + finalizerRegister(this, thunk) + this.cleaner = thunk + } + } + + close() { + if (this.ptr == nullptr) { + throw new Error(`Closing a closed object: ` + this.toString()) + } else if (this.cleaner == undefined) { + throw new Error(`No thunk assigned to ` + this.toString()) + } else { + finalizerUnregister(this) + this.cleaner!.clean() + this.cleaner = undefined + this.ptr = nullptr + } + } + + release(): pointer { + finalizerUnregister(this) + if (this.cleaner) + this.cleaner!.obj = nullptr + let result = this.ptr + this.ptr = nullptr + return result + } + + resetPeer(pointer: pointer) { + if (this.managed) throw new Error("Can only reset peer for an unmanaged object") + this.ptr = pointer + } + + use(body: (value: Finalizable) => R): R { + let result = body(this) + this.close() + return result + } +} diff --git a/koala_tools/interop/src/arkts/InteropNativeModule.ts b/koala_tools/interop/src/arkts/InteropNativeModule.ts new file mode 100644 index 0000000000000000000000000000000000000000..53a57ef9756141ecda2e651845c3fb89dcacb04d --- /dev/null +++ b/koala_tools/interop/src/arkts/InteropNativeModule.ts @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2024 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 { int32, int64 } from "@koalaui/common"; +import { KPointer, KUint8ArrayPtr, KInt, KSerializerBuffer } from "./InteropTypes"; +import { callCallback } from "./callback" +import { loadNativeModuleLibrary } from "./loadLibraries" + +export class InteropNativeModule { + static { + loadNativeModuleLibrary("InteropNativeModule") + } + static callCallbackFromNative(id: KInt, args: KSerializerBuffer, length: KInt): KInt { + return callCallback(id, args, length) + } + native static _GetGroupedLog(index: int32): KPointer + native static _StartGroupedLog(index: int32): void + native static _StopGroupedLog(index: int32): void + native static _AppendGroupedLog(index: int32, message: string): void + native static _PrintGroupedLog(index: int32): void + native static _GetStringFinalizer(): KPointer + native static _InvokeFinalizer(ptr1: KPointer, ptr2: KPointer): void + native static _IncrementNumber(value: number): number + native static _GetPtrVectorElement(ptr1: KPointer, arg: int32): KPointer + native static _StringLength(ptr1: KPointer): int32 + native static _StringData(ptr1: KPointer, array: KUint8ArrayPtr, arrayLength: int32): void + native static _StringMake(str1: string): KPointer + native static _GetPtrVectorSize(ptr1: KPointer): int32 + @ani.unsafe.Quick + native static _ManagedStringWrite(str1: string, array: KPointer, arrayLength: int32, arg: int32): int32 + native static _NativeLog(str1: string): void + @ani.unsafe.Quick + native static _Utf8ToString(data: KPointer, offset: int32, length: int32): string + native static _StdStringToString(cstring: KPointer): string + @ani.unsafe.Direct + native static _CheckCallbackEvent(buffer: KSerializerBuffer, bufferLength: int32): int32 + native static _HoldCallbackResource(resourceId: int32): void + native static _ReleaseCallbackResource(resourceId: int32): void + native static _CallCallback(apiKind: int32, callbackKind: int32, args: KSerializerBuffer, argsSize: int32): void + native static _CallCallbackSync(apiKind: int32, callbackKind: int32, args: KSerializerBuffer, argsSize: int32): void + native static _CallCallbackResourceHolder(holder: KPointer, resourceId: int32): void + native static _CallCallbackResourceReleaser(releaser: KPointer, resourceId: int32): void + native static _CallbackAwait(pipeline: KPointer): Object + native static _UnblockCallbackWait(pipeline: KPointer): void + + native static _LoadVirtualMachine(arg0: int32, arg1: string, arg2: string, arg3: string): int32 + native static _RunApplication(arg0: int32, arg1: int32): boolean + native static _StartApplication(appUrl: string, appParams: string): KPointer + native static _EmitEvent(eventType: int32, target: int32, arg0: int32, arg1: int32): string + native static _CallForeignVM(context:KPointer, callback: int32, data: KSerializerBuffer, dataLength: int32): int32 + native static _SetForeignVMContext(context: KPointer): void + native static _RestartWith(page: string): void + @ani.unsafe.Direct + native static _ReadByte(data: KPointer, index: int64, length: int64): int32 + @ani.unsafe.Direct + native static _WriteByte(data: KPointer, index: int64, length: int64, value: int32): void + @ani.unsafe.Direct + native static _Malloc(length: int64): KPointer + @ani.unsafe.Direct + native static _GetMallocFinalizer(): KPointer + @ani.unsafe.Direct + native static _Free(data: KPointer): void + @ani.unsafe.Quick + native static _CopyArray(data: KPointer, length: int64, args: KUint8ArrayPtr): void + native static _ReportMemLeaks(): void + native static _MaterializeBuffer(data: KPointer, length: int64, resourceId: int32, hold: KPointer, release: KPointer): ArrayBuffer + native static _GetNativeBufferPointer(data: ArrayBuffer): KPointer +} + diff --git a/koala_tools/interop/src/arkts/InteropTypes.ts b/koala_tools/interop/src/arkts/InteropTypes.ts new file mode 100644 index 0000000000000000000000000000000000000000..b01abe95557048eed4c000def9b9f0a649a4035b --- /dev/null +++ b/koala_tools/interop/src/arkts/InteropTypes.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +export type NodePointer = pointer // Improve: move to NativeModule + +export type KStringPtr = string +export type KStringPtrArray = FixedArray +export type KUint8ArrayPtr = FixedArray +export type KInt32ArrayPtr = FixedArray +export type KFloat32ArrayPtr = FixedArray +export type KInt = int +export type KLong = long +export type KUInt = KInt +export type KBoolean = int +export type KFloat = float +export type KDouble = double; +export type KPointer = long // look once again +export type pointer = KPointer +export type KNativePointer = KPointer +export type KInteropReturnBuffer = FixedArray +export type KSerializerBuffer = pointer + +export const nullptr: pointer = 0 + diff --git a/koala_tools/interop/src/arkts/MaterializedBase.ts b/koala_tools/interop/src/arkts/MaterializedBase.ts new file mode 100644 index 0000000000000000000000000000000000000000..335ee78047b7ee47ce63a94be96386ad8cc2c188 --- /dev/null +++ b/koala_tools/interop/src/arkts/MaterializedBase.ts @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2024 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 { Finalizable } from "./Finalizable" + +export class MaterializedBaseTag { + static NOP = new MaterializedBaseTag() + private constructor() { } +} + +export interface MaterializedBase { + getPeer(): Finalizable | undefined +} + diff --git a/koala_tools/interop/src/arkts/NativeBuffer.ts b/koala_tools/interop/src/arkts/NativeBuffer.ts new file mode 100644 index 0000000000000000000000000000000000000000..a6dceba23ff04f82cdbffaad4704570fe023580d --- /dev/null +++ b/koala_tools/interop/src/arkts/NativeBuffer.ts @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2024 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 { pointer, KSerializerBuffer, nullptr } from './InteropTypes' +import { int32, int64 } from '@koalaui/common' +import { InteropNativeModule } from "./InteropNativeModule" +import { Disposable } from "./ResourceManager" +import { Finalizable } from './Finalizable' + +export final class NativeBuffer { + public data: pointer + public length: int64 + protected finalizable: Finalizable + + constructor(length: int64) { + this(InteropNativeModule._Malloc(length), length, InteropNativeModule._GetMallocFinalizer()) + } + + constructor(data: pointer, length: int64, destroy: pointer) { + this.data = data + this.length = length + this.finalizable = new Finalizable(data, destroy) + } + + public readByte(index:int64): int32 { + return unsafeMemory.readInt8(this.data + index) + } + + public writeByte(index:int64, value: int32): void { + unsafeMemory.writeInt8(this.data + index, value.toByte()) + } +} + +export class KBuffer implements Disposable { + private _buffer: KSerializerBuffer + private readonly _length: int64 + private readonly _owned: boolean + constructor(length: int64) { + this._buffer = InteropNativeModule._Malloc(length) + this._length = length + this._owned = true + } + constructor(buffer: KSerializerBuffer, length: int64) { + this._buffer = buffer + this._length = length + this._owned = false + } + + dispose(): void { + if (this._owned && this._buffer != nullptr) { + InteropNativeModule._Free(this._buffer) + this._buffer = nullptr + } + } + + public get buffer(): KSerializerBuffer { + return this._buffer + } + + public get length(): int64 { + return this._length + } + + public get(index: int64): byte { + return unsafeMemory.readInt8(this._buffer + index) + } + public set(index: int64, value: byte): void { + unsafeMemory.writeInt8(this._buffer + index, value) + } +} \ No newline at end of file diff --git a/koala_tools/interop/src/arkts/ResourceManager.ts b/koala_tools/interop/src/arkts/ResourceManager.ts new file mode 100644 index 0000000000000000000000000000000000000000..2bbb72ecb75e2d9fcb3396d9d2608f215adb2e37 --- /dev/null +++ b/koala_tools/interop/src/arkts/ResourceManager.ts @@ -0,0 +1,106 @@ +/* + * 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 { int32, float64toInt32 } from "@koalaui/common" + +export type ResourceId = int32 + +interface ResourceInfo { + resource: object + holdersCount: int32 +} + +export interface Disposable { + dispose(): void; +} + +export class ResourceHolder { + private static nextResourceId: ResourceId = 100 + private resources: Map = new Map() + private static _instance: ResourceHolder|undefined = undefined + private static disposables = new Array(); + private static disposablesSize = 0 + + static instance(): ResourceHolder { + if (ResourceHolder._instance == undefined) { + ResourceHolder._instance = new ResourceHolder() + } + return ResourceHolder._instance! + } + + public hold(resourceId: ResourceId) { + if (!this.resources.has(resourceId)) + throw new Error(`Resource ${resourceId} does not exists, can not hold`) + this.resources.get(resourceId)!.holdersCount++ + } + + public release(resourceId: ResourceId) { + if (!this.resources.has(resourceId)) + throw new Error(`Resource ${resourceId} does not exists, can not release`) + const resource = this.resources.get(resourceId)! + resource.holdersCount-- + if (resource.holdersCount <= 0) + this.resources.delete(resourceId) + } + + public registerAndHold(resource: object): ResourceId { + const resourceId = ResourceHolder.nextResourceId++ + this.resources.set(resourceId, { + resource: resource, + holdersCount: 1, + }) + return resourceId + } + + public get(resourceId: ResourceId): object { + if (!this.resources.has(resourceId)) + throw new Error(`Resource ${resourceId} does not exists`) + return this.resources.get(resourceId)!.resource + } + + public has(resourceId: ResourceId): boolean { + return this.resources.has(resourceId) + } + + static register(resource: Disposable) { + if (ResourceHolder.disposablesSize < ResourceHolder.disposables.length) { + ResourceHolder.disposables[ResourceHolder.disposablesSize] = resource + } else { + ResourceHolder.disposables.push(resource) + } + ResourceHolder.disposablesSize++ + } + + static unregister(resource: Disposable) { + const index = float64toInt32(ResourceHolder.disposables.indexOf(resource)); + if (index !== -1 && index < ResourceHolder.disposablesSize) { + if (index !== ResourceHolder.disposablesSize - 1) { + ResourceHolder.disposables[index] = ResourceHolder.disposables[ResourceHolder.disposablesSize - 1]; + } + ResourceHolder.disposablesSize--; + } + } + + static disposeAll() { + for (let i = 0; i < ResourceHolder.disposablesSize; ++i) { + ResourceHolder.disposables[i].dispose() + } + ResourceHolder.disposablesSize = 0 + } + + static compactDisposables() { + ResourceHolder.disposables = ResourceHolder.disposables.slice(0, ResourceHolder.disposablesSize); + } +} diff --git a/koala_tools/interop/src/arkts/SerializerBase.ts b/koala_tools/interop/src/arkts/SerializerBase.ts new file mode 100644 index 0000000000000000000000000000000000000000..992546fcf976c6b530eb47543fb28a73cfbe5fdc --- /dev/null +++ b/koala_tools/interop/src/arkts/SerializerBase.ts @@ -0,0 +1,424 @@ +/* + * 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. + */ +import { float32, int32, int64 } from "@koalaui/common" +import { pointer, nullptr, KSerializerBuffer } from "./InteropTypes" +import { ResourceId, ResourceHolder, Disposable } from "./ResourceManager" +import { NativeBuffer } from "./NativeBuffer" +import { InteropNativeModule } from "./InteropNativeModule" +import { MaterializedBase } from "./MaterializedBase" + +/** + * Value representing possible JS runtime object type. + * Must be synced with "enum RuntimeType" in C++. + */ +export final class RuntimeType { + static readonly UNEXPECTED = -1 + static readonly NUMBER = 1 + static readonly STRING = 2 + static readonly OBJECT = 3 + static readonly BOOLEAN = 4 + static readonly UNDEFINED = 5 + static readonly BIGINT = 6 + static readonly FUNCTION = 7 + static readonly SYMBOL = 8 + static readonly MATERIALIZED = 9 +} + +export function registerCallback(value: object): int32 { + throw new Error("Should no longer be used") +} + +/** + * Value representing object type in serialized data. + * Must be synced with "enum Tags" in C++. + */ +export enum Tags { + UNDEFINED = 101, + INT32 = 102, + FLOAT32 = 103, + STRING = 104, + LENGTH = 105, + RESOURCE = 106, + OBJECT = 107, +} + +const VALUE_TRUE: number = 1 +const VALUE_FALSE: number = 0 + +export function runtimeType(value: T): int32 { + if (value === undefined) + return RuntimeType.UNDEFINED; + + if (value === null) + return RuntimeType.OBJECT; + + if (value instanceof String) + return RuntimeType.STRING + + if (value instanceof Numeric) + return RuntimeType.NUMBER + + if (value instanceof Boolean) + return RuntimeType.BOOLEAN + + if (value instanceof BigInt) + return RuntimeType.BIGINT + + if (value instanceof Function) + return RuntimeType.FUNCTION + + // slow workaround for enum + const typeName = typeof value + if (typeName == "number") + return RuntimeType.NUMBER + + if (typeName == "string") + return RuntimeType.STRING + + return RuntimeType.OBJECT +} + +export function toPeerPtr(value: object): pointer { + if (value instanceof MaterializedBase) { + const peer = (value as MaterializedBase).getPeer() + return peer ? peer.ptr : nullptr + } else { + throw new Error("Value is not a MaterializedBase instance") + } +} + +export interface CallbackResource { + resourceId: int32 + hold: pointer + release: pointer +} + +/* Serialization extension point */ +export abstract class CustomSerializer { + protected supported: Array + constructor(supported: Array) { + this.supported = supported + } + supports(kind: string): boolean { return this.supported.includes(kind) } + abstract serialize(serializer: SerializerBase, value: object, kind: string): void + next: CustomSerializer | undefined = undefined +} + +class DateSerializer extends CustomSerializer { + constructor() { + super(new Array("Date")) + } + + serialize(serializer: SerializerBase, value: object, kind: string): void { + serializer.writeString((value as Date).toISOString()) + } +} +SerializerBase.registerCustomSerializer(new DateSerializer()) + +export class SerializerBase implements Disposable { + private _position: int64 = 0 + private _buffer: KSerializerBuffer + private _length: int32 + private _last: int64 + + private static pool: SerializerBase[] = [ + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + ] + private static poolTop = 0 + + static hold(): SerializerBase { + if (SerializerBase.poolTop === SerializerBase.pool.length) { + throw new Error("Pool empty! Release one of taken serializers") + } + return SerializerBase.pool[SerializerBase.poolTop++] + } + + private static customSerializers: CustomSerializer | undefined = new DateSerializer() + static registerCustomSerializer(serializer: CustomSerializer) { + if (SerializerBase.customSerializers == undefined) { + SerializerBase.customSerializers = serializer + } else { + let current = SerializerBase.customSerializers + while (current!.next != undefined) { + current = current!.next + } + current!.next = serializer + } + } + + constructor() { + let length = 96 + this._buffer = InteropNativeModule._Malloc(length.toLong()) + this._length = length + this._position = this._buffer + this._last = this._buffer + length - 1; + } + + public release() { + this.releaseResources() + this._position = this._buffer + if (this !== SerializerBase.pool[SerializerBase.poolTop - 1]) { + throw new Error("Serializers should be release in LIFO order") + } + SerializerBase.poolTop-- + } + public final dispose() { + InteropNativeModule._Free(this._buffer) + this._buffer = nullptr + } + + final asBuffer(): KSerializerBuffer { + return this._buffer + } + final length(): int32 { + return (this._position - this._buffer).toInt() + } + + final toArray(): byte[] { + const len = this.length() + let result = new byte[len] + for (let i = 0; i < len; i++) { + result[i] = unsafeMemory.readInt8(this._buffer + i) + } + return result + } + + private final updateCapacity(value: int32) { + let buffSize = this._length + const minSize = buffSize + value + const resizedSize = Math.max(minSize, Math.round(3 * buffSize / 2)).toInt() + if (value <= 0 || resizedSize <= 0) { + throw new Error(`bug: value(${value}) resizedSize(${resizedSize}) is illegal`) + } + let resizedBuffer = InteropNativeModule._Malloc(resizedSize) + let oldBuffer = this._buffer + let offset = this._position - oldBuffer; + for (let i = 0; i < offset; i++) { + let val = unsafeMemory.readInt8(oldBuffer + i); + unsafeMemory.writeInt8(resizedBuffer + i, val) + } + this._buffer = resizedBuffer + this._position = this._position - oldBuffer + resizedBuffer + this._length = resizedSize + this._last = resizedBuffer + resizedSize - 1; + InteropNativeModule._Free(oldBuffer) + } + + private heldResources: Array = new Array() + private heldResourcesCount: int32 = 0 + private final addHeldResource(resourceId: ResourceId) { + if (this.heldResourcesCount == this.heldResources.length) + this.heldResources.push(resourceId) + else + this.heldResources[this.heldResourcesCount] = resourceId + this.heldResourcesCount++ + } + final holdAndWriteCallback(callback: object, hold: pointer = 0, release: pointer = 0, call: pointer = 0, callSync: pointer = 0): ResourceId { + const resourceId = ResourceHolder.instance().registerAndHold(callback) + this.addHeldResource(resourceId) + this.writeInt32(resourceId) + this.writePointer(hold) + this.writePointer(release) + this.writePointer(call) + this.writePointer(callSync) + return resourceId + } + final holdAndWriteCallbackForPromiseVoid(hold: pointer = 0, release: pointer = 0, call: pointer = 0): [Promise, ResourceId] { + let resourceId: ResourceId = 0 + const promise = new Promise((resolve: (value: PromiseLike) => void, reject: (err: Error) => void) => { + const callback = (err?: string[] | undefined) => { + if (err !== undefined) + reject(new Error(err!.join(';'))) + else + resolve(Promise.resolve()) + } + resourceId = this.holdAndWriteCallback(callback, hold, release, call) + }) + return [promise, resourceId] + } + final holdAndWriteCallbackForPromise(hold: pointer = 0, release: pointer = 0, call: pointer = 0): [Promise, ResourceId] { + let resourceId: ResourceId = 0 + const promise = new Promise((resolve: (value: T | PromiseLike) => void, reject: (err: Error) => void) => { + const callback = (value?: T | undefined, err?: string[] | undefined) => { + if (err !== undefined) + reject(new Error(err!.join(';'))) + else + resolve(value!) + } + resourceId = this.holdAndWriteCallback(callback, hold, release, call) + }) + return [promise, resourceId] + } + final holdAndWriteObject(obj: object, hold: pointer = 0, release: pointer = 0): ResourceId { + const resourceId = ResourceHolder.instance().registerAndHold(obj) + this.addHeldResource(resourceId) + this.writeInt32(resourceId) + this.writePointer(hold) + this.writePointer(release) + return resourceId + } + final writeCallbackResource(resource: CallbackResource) { + this.writeInt32(resource.resourceId) + this.writePointer(resource.hold) + this.writePointer(resource.release) + } + final writeResource(resource: object) { + const resourceId = ResourceHolder.instance().registerAndHold(resource) + this.addHeldResource(resourceId) + this.writeInt32(resourceId) + } + private final releaseResources() { + if (this.heldResourcesCount == 0) return + for (let i = 0; i < this.heldResourcesCount; i++) { + InteropNativeModule._ReleaseCallbackResource(this.heldResources[i]) + } + this.heldResourcesCount = 0 + } + final writeCustomObject(kind: string, value: object) { + let current = SerializerBase.customSerializers + while (current) { + if (current!.supports(kind)) { + current!.serialize(this, value, kind) + return + } + current = current!.next + } + this.writeInt8(Tags.UNDEFINED.valueOf()) + } + final writeTag(tag: int32): void { + this.writeInt8(tag) + } + final writeNumber(value: number | undefined) { + if (value == undefined) { + this.writeTag(Tags.UNDEFINED) + return + } + if (Number.isInteger(value)) { + this.writeTag(Tags.INT32) + this.writeInt32(value.toInt()) + } else { + this.writeInt8(Tags.FLOAT32) + this.writeFloat32(value.toFloat()) + } + } + + final writeInt8(value: int32) { + let pos = this._position + let newPos = pos + 1 + if (newPos > this._last) { + this.updateCapacity(1) + pos = this._position + newPos = pos + 1 + } + + unsafeMemory.writeInt8(pos, value.toByte()) + this._position = newPos + } + + final writeInt32(value: int32) { + let pos = this._position + let newPos = pos + 4 + if (newPos > this._last) { + this.updateCapacity(4) + pos = this._position + newPos = pos + 4 + } + unsafeMemory.writeInt32(pos, value) + this._position = newPos + } + final writeInt64(value: int64) { + let pos = this._position + let newPos = pos + 8 + if (newPos > this._last) { + this.updateCapacity(8) + pos = this._position + newPos = pos + 8 + } + unsafeMemory.writeInt64(pos, value) + this._position = newPos + } + final writeFloat32(value: float32) { + let pos = this._position + let newPos = pos + 4 + if (newPos > this._last) { + this.updateCapacity(4) + pos = this._position + newPos = pos + 4 + } + unsafeMemory.writeFloat32(pos, value) + this._position = newPos + } + final writeFloat64(value: double) { + let pos = this._position + let newPos = pos + 8 + if (newPos > this._last) { + this.updateCapacity(8) + pos = this._position + newPos = pos + 8 + } + unsafeMemory.writeFloat64(pos, value) + this._position = newPos + } + final writePointer(value: pointer) { + this.writeInt64(value) + } + final writeBoolean(value: boolean | undefined) { + let pos = this._position + let newPos = pos + 1 + if (newPos > this._last) { + this.updateCapacity(1) + pos = this._position + newPos = pos + 1 + } + this._position = newPos + + if (value == undefined) + unsafeMemory.writeInt8(pos, Tags.UNDEFINED); + else if (value == true) + unsafeMemory.writeInt8(pos, VALUE_TRUE.toByte()); + else if (value == false) + unsafeMemory.writeInt8(pos, VALUE_FALSE.toByte()); + } + final writeString(value: string) { + const encodedLength = unsafeMemory.getStringSizeInBytes(value) + + let pos = this._position + if (pos + encodedLength + 5 > this._last) { + this.updateCapacity(encodedLength + 5) + pos = this._position + } + + if (encodedLength > 0) + unsafeMemory.writeString(pos + 4, value) + // NOTE: add \0 for supporting C char* reading from buffer for utf8-strings, + // need check native part fot utf16 cases and probably change this solution. + unsafeMemory.writeInt8(pos + encodedLength + 4, 0) + unsafeMemory.writeInt32(pos, encodedLength + 1) + this._position = pos + encodedLength + 4 + 1 + } + final writeBuffer(value: ArrayBuffer) { + this.holdAndWriteObject(value) + const ptr = InteropNativeModule._GetNativeBufferPointer(value) + this.writePointer(ptr) + this.writeInt64(value.byteLength) + } +} diff --git a/koala_tools/interop/src/arkts/callback.ts b/koala_tools/interop/src/arkts/callback.ts new file mode 100644 index 0000000000000000000000000000000000000000..ea7eac29623f62bb59f08f4694c42c226e8d0aec --- /dev/null +++ b/koala_tools/interop/src/arkts/callback.ts @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2022-2024 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 { KUint8ArrayPtr, KSerializerBuffer } from "./InteropTypes" +import { int32 } from "@koalaui/common" + +export type CallbackType = (args: KSerializerBuffer, length: int32) => int32 + +class CallbackRecord { + public readonly callback: CallbackType + public readonly autoDisposable: boolean + + constructor( + callback: CallbackType, + autoDisposable: boolean + ) { + this.callback = callback + this.autoDisposable = autoDisposable + } +} + +class CallbackRegistry { + + static INSTANCE = new CallbackRegistry() + + private callbacks = new Map() + private id = 1024 + + constructor() { + this.callbacks.set(0, new CallbackRecord( + (args: KSerializerBuffer, length: int32): int32 => { + console.log(`Callback 0 called with args = ${args} and length = ${length}`) + throw new Error(`Null callback called`) + }, false) + ) + } + + wrap(callback: CallbackType, autoDisposable: boolean): int32 { + const id = this.id++ + this.callbacks.set(id, new CallbackRecord(callback, autoDisposable)) + return id + } + + wrapSystem(id: int32, callback: CallbackType, autoDisposable: boolean): int32 { + this.callbacks.set(id, new CallbackRecord(callback, autoDisposable)) + return id + } + + call(id: int32, args: KSerializerBuffer, length: int32): int32 { + const record = this.callbacks.get(id) + if (!record) { + console.log(`Callback ${id} is not known`) + throw new Error(`Disposed or unwrapped callback called (id = ${id})`) + } + if (record.autoDisposable) { + this.dispose(id) + } + return record.callback(args, length) + } + + dispose(id: int32) { + this.callbacks.delete(id) + } +} + +export function wrapCallback(callback: CallbackType, autoDisposable: boolean = true): int32 { + return CallbackRegistry.INSTANCE.wrap(callback, autoDisposable) +} + +export function wrapSystemCallback(id:int32, callback: CallbackType): int32 { + return CallbackRegistry.INSTANCE.wrapSystem(id, callback, false) +} + +export function disposeCallback(id: int32) { + CallbackRegistry.INSTANCE.dispose(id) +} + +export function callCallback(id: int32, args: KSerializerBuffer, length: int32): int32 { + return CallbackRegistry.INSTANCE.call(id, args, length) +} diff --git a/koala_tools/interop/src/arkts/events.ts b/koala_tools/interop/src/arkts/events.ts new file mode 100644 index 0000000000000000000000000000000000000000..7ce584900975092c448667a4599a79350c634e21 --- /dev/null +++ b/koala_tools/interop/src/arkts/events.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +import { int32 } from "@koalaui/common" +import { DeserializerBase } from "./DeserializerBase" +import { InteropNativeModule } from "./InteropNativeModule" +import { ResourceHolder } from "../arkts/ResourceManager" +import { KSerializerBuffer } from "./InteropTypes" +import { wrapSystemCallback } from "./callback" +import { KBuffer } from "./NativeBuffer" + +const API_KIND_MAX = 100 +const apiEventHandlers = new Array(API_KIND_MAX).fill(undefined) +export type EventHandler = (deserializer: DeserializerBase) => void +export function registerApiEventHandler(apiKind: int32, handler: EventHandler) { + if (apiKind < 0 || apiKind > API_KIND_MAX) { + throw new Error(`Maximum api kind is ${API_KIND_MAX}, received ${apiKind}`) + } + if (apiEventHandlers[apiKind] !== undefined) { + throw new Error(`Callback caller for api kind ${apiKind} already was set`) + } + apiEventHandlers[apiKind] = handler +} +export function handleApiEvent(apiKind: int32, deserializer: DeserializerBase) { + if (apiKind < 0 || apiKind > API_KIND_MAX) { + throw new Error(`Maximum api kind is ${API_KIND_MAX}, received ${apiKind}`) + } + if (apiEventHandlers[apiKind] === undefined) { + throw new Error(`Callback caller for api kind ${apiKind} was not set`) + } + apiEventHandlers[apiKind]!(deserializer) +} +export function wrapSystemApiHandlerCallback() { + wrapSystemCallback(1, (buffer: KSerializerBuffer, len:int32) => { + const deserializer = new DeserializerBase(buffer, len) + const apiKind = deserializer.readInt32() + handleApiEvent(apiKind, deserializer) + return 0 + }) +} +export function checkEvents(): void { + while (checkSingleEvent()) {} +} + + +enum CallbackEventKind { + Event_CallCallback = 0, + Event_HoldManagedResource = 1, + Event_ReleaseManagedResource = 2, +} + +const bufferSize = 8 * 1024 +const buffer = new KBuffer(bufferSize) +const deserializer = new DeserializerBase(buffer.buffer, bufferSize) +function checkSingleEvent(): boolean { + deserializer.resetCurrentPosition() + let result = InteropNativeModule._CheckCallbackEvent(buffer.buffer, bufferSize) + if (result == 0) + return false + + const eventKind = deserializer.readInt32() as CallbackEventKind + switch (eventKind) { + case CallbackEventKind.Event_CallCallback: { + const apiKind = deserializer.readInt32() + handleApiEvent(apiKind, deserializer) + return true; + } + case CallbackEventKind.Event_HoldManagedResource: { + const resourceId = deserializer.readInt32() + ResourceHolder.instance().hold(resourceId) + return true; + } + case CallbackEventKind.Event_ReleaseManagedResource: { + const resourceId = deserializer.readInt32() + ResourceHolder.instance().release(resourceId) + return true; + } + default: { + throw new Error(`Unknown callback event kind ${eventKind}`) + } + } +} \ No newline at end of file diff --git a/koala_tools/interop/src/arkts/index.ts b/koala_tools/interop/src/arkts/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..9a878ec5919866352501e4e6cd497bc039958e26 --- /dev/null +++ b/koala_tools/interop/src/arkts/index.ts @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2022-2024 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. + */ + +export * from "./InteropTypes" +export * from "./callback" +export * from "./ResourceManager" +export * from "./NativeBuffer" +export * from "./InteropNativeModule" +export * from "./SerializerBase" +export * from "./DeserializerBase" +export * from "./Finalizable" +export * from "./loadLibraries" +export * from "./MaterializedBase" +export * from "./events" diff --git a/koala_tools/interop/src/arkts/loadLibraries.ts b/koala_tools/interop/src/arkts/loadLibraries.ts new file mode 100644 index 0000000000000000000000000000000000000000..feda358f44b86f4d8afdb14f381916134582bd16 --- /dev/null +++ b/koala_tools/interop/src/arkts/loadLibraries.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2024 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. +*/ + +const nativeModuleLibraries: Map = new Map() + +export function loadNativeLibrary(library: string) { + console.log(`[loadLibraries] Loading ${library} [${library}]`) + loadLibrary(library) +} + +export function registerNativeModuleLibraryName(nativeModule: string, libraryName: string) { + console.log(`[loadLibraries] Registered ${libraryName} as ${nativeModule}`) + nativeModuleLibraries.set(nativeModule, libraryName) +} + +export function loadNativeModuleLibrary(nativeModule: string) { + console.log(`[loadLibraries] Loading ${nativeModule} [${nativeModuleLibraries.get(nativeModule) ?? nativeModule}]`) + loadLibrary(nativeModuleLibraries.get(nativeModule) ?? nativeModule) +} diff --git a/koala_tools/interop/src/cangjie/DeserializerBase.cj b/koala_tools/interop/src/cangjie/DeserializerBase.cj new file mode 100644 index 0000000000000000000000000000000000000000..22861ded266025139ccef43c0db2257083f0554c --- /dev/null +++ b/koala_tools/interop/src/cangjie/DeserializerBase.cj @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2024 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. + */ +package Interop + +import std.binary.* +import std.collection.* + +public class CallbackResource { + public var resourceId: Int32 + public var hold: pointer + public var release: pointer + init(resourceId: Int32, hold: pointer, release: pointer) { + this.resourceId = resourceId + this.hold = hold + this.release = release + } +} + +public open class DeserializerBase { + private var position: Int32 = 0 + public var length: Int32 = 96 // make private + public var buffer: pointer // make private + + public init(buffer: UInt64, length: Int32) { + this.buffer = buffer + this.length = length + } + public init(buffer: Array, length: Int32) { + this.buffer = InteropNativeModule._Malloc(length) + for (i in 0..length) { + DeserializerBase.writeu8(this.buffer, i, length, buffer[Int64(i)]) + } + this.length = length + } + + private static func writeu8(buffer: pointer, offset: Int32, length: Int32, value: UInt8): Unit { + InteropNativeModule._WriteByte(buffer, Int64(offset), Int64(length), Int32(value)) + } + private static func readu8(buffer: pointer, offset: Int32, length: Int32): Int32 { + return InteropNativeModule._ReadByte(buffer, Int64(offset), Int64(length)) + } + + public func asBuffer(): pointer { + return this.buffer + } + + public func currentPosition(): Int32 { + return this.position + } + + public func resetCurrentPosition(): Unit { + this.position = 0 + } + + private func checkCapacity(value: Int32) { + if (value > this.length) { + throw Exception("${value} is less than remaining buffer length") + } + } + + public func readInt8(): Int8 { + this.checkCapacity(1) + var res = DeserializerBase.readu8(this.buffer, this.position, this.length) + this.position += 1 + return Int8(res) + } + + public func readInt32(): Int32 { + this.checkCapacity(4) + let arr = Array(4, {i => UInt8(DeserializerBase.readu8(this.buffer, this.position + Int32(i), this.length))}) + this.position += 4 + return Int32.readLittleEndian(arr) + } + + public func readInt64(): Int64 { + this.checkCapacity(8) + let arr = Array(8, {i => UInt8(DeserializerBase.readu8(this.buffer, this.position + Int32(i), this.length))}) + this.position += 8 + return Int64.readLittleEndian(arr) + } + + public func readPointer(): KPointer { + this.checkCapacity(8) + let arr = Array(8, {i => UInt8(DeserializerBase.readu8(this.buffer, this.position + Int32(i), this.length))}) + this.position += 8 + return UInt64.readLittleEndian(arr) + } + + public func readFloat32(): Float32 { + this.checkCapacity(4) + let arr = Array(4, {i => UInt8(DeserializerBase.readu8(this.buffer, this.position + Int32(i), this.length))}) + this.position += 4 + return Float32.readLittleEndian(arr) + } + public func readFloat64(): Float64 { + this.checkCapacity(8) + let arr = Array(8, {i => UInt8(DeserializerBase.readu8(this.buffer, this.position + Int32(i), this.length))}) + this.position += 8 + return Float64.readLittleEndian(arr) + } + + public func readBoolean(): Bool { + var byteVal = DeserializerBase.readu8(this.buffer, this.position, this.length) + this.position += 1 + return byteVal == 1 + } + + public func readString(): String { + let length = this.readInt32() + this.checkCapacity(length) + // read without null-terminated byte + let value = InteropNativeModule._Utf8ToString(this.buffer, Int32(this.position), Int32(length)) + this.position += length + return value + } + + public func readCustomObject(kind: String): Object { + throw Exception("readCustomObject") + } + + public func readObject(): Any { + let resource = this.readCallbackResource() + return ResourceHolder.instance().get(resource.resourceId) + } + + public func readBuffer(): Array { + return Array() + } + + public func readFunction(): Any { + return { => } + } + + public func readNumber(): Float64 { + let tag = this.readInt8() + if (tag == Tag.UNDEFINED.value) { + throw Exception("Read number can't return undefined.") + } else if (tag == Tag.INT32.value) { + return Float64(this.readInt32()) + } else if (tag == Tag.FLOAT32.value) { + return Float64(this.readFloat32()) + } else { + throw Exception("Unknown number tag: ${tag}") + } + } + + public func readCallbackResource(): CallbackResource { + return CallbackResource(this.readInt32(), this.readPointer(), this.readPointer()) + } +} diff --git a/koala_tools/interop/src/cangjie/InteropNativeModule.cj b/koala_tools/interop/src/cangjie/InteropNativeModule.cj new file mode 100644 index 0000000000000000000000000000000000000000..779c0597aeefa7e89c7f9944adb3a4f2259b0944 --- /dev/null +++ b/koala_tools/interop/src/cangjie/InteropNativeModule.cj @@ -0,0 +1,260 @@ +/* + * 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. + */ + +package Interop + +import std.collection.* + +foreign { + func Malloc(length: Int32): UInt64 + func Free(data: KPointer): Unit + func ReadByte(data: KPointer, index: Int64, length: Int64): Int32 + func WriteByte(data: KPointer, index: Int64, length: Int64, value: Int32): Unit + func ReleaseCallbackResource(resourceId: Int32): Unit + + func GetGroupedLog(index: Int32): UInt64 + func StartGroupedLog(index: Int32): Unit + func StopGroupedLog(index: Int32): Unit + func AppendGroupedLog(index: Int32, message: CString): Unit + func PrintGroupedLog(index: Int32): Unit + func GetStringFinalizer(): UInt64 + func InvokeFinalizer(ptr1: UInt64, ptr2: UInt64): Unit + func GetPtrVectorElement(ptr1: UInt64, arg: Int32): UInt64 + func StringLength(ptr1: UInt64): Int32 + func StringData(ptr1: UInt64, array: CPointer, arrayLength: Int32): Unit + func StringMake(str1: CString): UInt64 + func GetPtrVectorSize(ptr1: UInt64): Int32 + func ManagedStringWrite(str1: CString, array: pointer, arrayLength: Int32, arg: Int32): Int32 + func NativeLog(str1: CString): Unit + func Utf8ToString(data: pointer, offset: Int32, length: Int32): CString + func CheckCallbackEvent(buffer: KSerializerBuffer, bufferLength: Int32): Int32 + func StdStringToString(cstring: UInt64): CString + func IncrementNumber(input: Float64): Float64 + func CallCallback(callbackKind: Int32, args: KSerializerBuffer, argsSize: Int32): Unit + func CallCallbackSync(callbackKind: Int32, args: KSerializerBuffer, argsSize: Int32): Unit + func CallCallbackResourceHolder(holder: UInt64, resourceId: Int32): Unit + func CallCallbackResourceReleaser(releaser: UInt64, resourceId: Int32): Unit + func CallForeignVM(foreignContext: UInt64, kind: Int32, data: CPointer, length: Int32): Int32 + func LoadVirtualMachine(arg0: Int32, arg1: CString, arg2: CString): Int32 + func RunApplication(arg0: Int32, arg1: Int32): Bool + func StartApplication(appUrl: CString, appParams: CString): UInt64 + func EmitEvent(eventType: Int32, target: Int32, arg0: Int32, arg1: Int32): CString + func RestartWith(page: CString): Unit +} + +public open class InteropNativeModule { + public static func _Malloc(length: Int32) { + unsafe { + return Malloc(length) + } + } + public static func _Free(data: KPointer): Unit { + unsafe { + Free(data) + } + } + public static func _ReadByte(data: KPointer, index: Int64, length: Int64): Int32 { + unsafe { + return ReadByte(data, index, length) + } + } + public static func _WriteByte(data: KPointer, index: Int64, length: Int64, value: Int32) { + unsafe { + WriteByte(data, index, length, value) + } + } + public static func _ReleaseCallbackResource(resourceId: Int32): Unit { + unsafe { + ReleaseCallbackResource(resourceId) + } + } + public static func _GetGroupedLog(index: Int32): UInt64 { + unsafe { + let result = GetGroupedLog(index) + return result + } + } + public static func _StartGroupedLog(index: Int32): Unit { + unsafe { + StartGroupedLog(index) + } + } + public static func _StopGroupedLog(index: Int32): Unit { + unsafe { + StopGroupedLog(index) + } + } + public static func _AppendGroupedLog(index: Int32, message: String): Unit { + unsafe { + let message = LibC.mallocCString(message) + AppendGroupedLog(index, message) + LibC.free(message) + } + } + public static func _PrintGroupedLog(index: Int32): Unit { + unsafe { + PrintGroupedLog(index) + } + } + public static func _GetStringFinalizer(): UInt64 { + unsafe { + let result = GetStringFinalizer() + return result + } + } + public static func _InvokeFinalizer(ptr1: UInt64, ptr2: UInt64): Unit { + unsafe { + InvokeFinalizer(ptr1, ptr2) + } + } + public static func _GetPtrVectorElement(ptr1: UInt64, arg: Int32): UInt64 { + unsafe { + let result = GetPtrVectorElement(ptr1, arg) + return result + } + } + public static func _StringLength(ptr1: UInt64): Int32 { + unsafe { + let result = StringLength(ptr1) + return result + } + } + public static func _StringData(ptr1: UInt64, array: Array, arrayLength: Int32): Unit { + unsafe { + let handle_1 = acquireArrayRawData(arr) + StringData(ptr1, handle_1.pointer, i) + releaseArrayRawData(handle_1) + } + } + public static func _StringMake(str1: String): UInt64 { + unsafe { + let str1 = LibC.mallocCString(str1) + let result = StringMake(str1) + LibC.free(str1) + return result + } + } + public static func _GetPtrVectorSize(ptr1: UInt64): Int32 { + unsafe { + let result = GetPtrVectorSize(ptr1) + return result + } + } + public static func _ManagedStringWrite(str1: String, array: pointer, arrayLength: Int32, arg: Int32): Int32 { + unsafe { + let str1 = LibC.mallocCString(str1) + let result = ManagedStringWrite(str1, arr, arrLength, arg) + LibC.free(str1) + return result + } + } + public static func _NativeLog(str1: String): Unit { + unsafe { + let str1 = LibC.mallocCString(str1) + NativeLog(str1) + LibC.free(str1) + } + } + public static func _Utf8ToString(data: pointer, offset: Int32, length: Int32): String { + unsafe { + let result = Utf8ToString(data, offset, length) + return result.toString() + } + } + public static func _CheckCallbackEvent(buffer: KSerializerBuffer, bufferLength: Int32): Int32 { + unsafe { + return CheckCallbackEvent(buffer, bufferLength) + } + } + public static func _StdStringToString(cstring: UInt64): String { + unsafe { + let result = StdStringToString(cstring) + return result.toString() + } + } + public static func _IncrementNumber(input: Float64): Float64 { + unsafe { + let result = IncrementNumber(input) + return result + } + } + public static func _CallCallback(callbackKind: Int32, args: KSerializerBuffer, argsSize: Int32): Unit { + unsafe { + CallCallback(callbackKind, args, argsSize) + } + } + public static func _CallCallbackSync(callbackKind: Int32, args: KSerializerBuffer, argsSize: Int32): Unit { + unsafe { + CallCallbackSync(callbackKind, args, argsSize) + } + } + public static func _CallCallbackResourceHolder(holder: UInt64, resourceId: Int32): Unit { + unsafe { + CallCallbackResourceHolder(holder, resourceId) + } + } + public static func _CallCallbackResourceReleaser(releaser: UInt64, resourceId: Int32): Unit { + unsafe { + CallCallbackResourceReleaser(releaser, resourceId) + } + } + public static func _CallForeignVM(foreignContext: UInt64, kind: Int32, data: ArrayList, length: Int32): Int32 { + unsafe { + let handle_2 = acquireArrayRawData(data.toArray()) + let result = CallForeignVM(foreignContext, kind, handle_2.pointer, length) + releaseArrayRawData(handle_2) + return result + } + } + public static func _LoadVirtualMachine(arg0: Int32, arg1: String, arg2: String): Int32 { + unsafe { + let arg1 = LibC.mallocCString(arg1) + let arg2 = LibC.mallocCString(arg2) + let result = LoadVirtualMachine(arg0, arg1, arg2) + LibC.free(arg1) + LibC.free(arg2) + return result + } + } + public static func _RunApplication(arg0: Int32, arg1: Int32): Bool { + unsafe { + let result = RunApplication(arg0, arg1) + return result + } + } + public static func _StartApplication(appUrl: String, appParams: String): UInt64 { + unsafe { + let appUrl = LibC.mallocCString(appUrl) + let appParams = LibC.mallocCString(appParams) + let result = StartApplication(appUrl, appParams) + LibC.free(appUrl) + LibC.free(appParams) + return result + } + } + public static func _EmitEvent(eventType: Int32, target: Int32, arg0: Int32, arg1: Int32): String { + unsafe { + let result = EmitEvent(eventType, target, arg0, arg1) + return result.toString() + } + } + public static func _RestartWith(page: String): Unit { + unsafe { + let page = LibC.mallocCString(page) + RestartWith(page) + LibC.free(page) + } + } +} \ No newline at end of file diff --git a/koala_tools/interop/src/cangjie/InteropTypes.cj b/koala_tools/interop/src/cangjie/InteropTypes.cj new file mode 100644 index 0000000000000000000000000000000000000000..3240744bc4c342867cd195ae1edc5b62d92e225f --- /dev/null +++ b/koala_tools/interop/src/cangjie/InteropTypes.cj @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2024 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. + */ +package Interop + +import std.collection.* + +public type KPointer = UInt64 +public type KFloat = Float32 +public type KDouble = Float64 +public type pointer = KPointer +public type KInt = Int32 +public type KLong = Int64 +public type KStringPtr = String +public type ArrayBuffer = ArrayList +public type KSerializerBuffer = pointer +public const nullptr: UInt64 = 0 +@C +public struct KInteropReturnBuffer { + public var length: Int32 + public var data: CPointer + public var dispose: CPointer, Int32) -> Unit>> + init (length: Int32, data: CPointer, dispose: CPointer, Int32) -> Unit>>) { + this.length = length + this.data = data + this.dispose = dispose + } +} \ No newline at end of file diff --git a/koala_tools/interop/src/cangjie/MaterializedBase.cj b/koala_tools/interop/src/cangjie/MaterializedBase.cj new file mode 100644 index 0000000000000000000000000000000000000000..2f39fb7b64ab2dbf6c3a1e0d663b2a9310136e34 --- /dev/null +++ b/koala_tools/interop/src/cangjie/MaterializedBase.cj @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2024 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. + */ +package Interop + +public open class Finalizable { + public var ptr: KPointer + public var finalizer: KPointer + + public Finalizable(ptr: KPointer, finalizer: KPointer) { + this.ptr = ptr + this.finalizer = finalizer + } +} + +public open class MaterializedBaseTag { + static var NOP = MaterializedBaseTag() + private init() { } +} + +public interface MaterializedBase { + public func getPeer(): ?Finalizable + + public static func toPeerPtr(value: Any): KPointer + { + let base: MaterializedBase = match (value as MaterializedBase) { + case Some(x) => x + case None => throw Exception("Value is not a MaterializedBase instance!") + } + return match (base.getPeer()) { + case Some(peer) => peer.ptr + case None => nullptr + } + } +} diff --git a/koala_tools/interop/src/cangjie/ResourceManager.cj b/koala_tools/interop/src/cangjie/ResourceManager.cj new file mode 100644 index 0000000000000000000000000000000000000000..d2e589d5f6058a8dd469da300134321754f4aba0 --- /dev/null +++ b/koala_tools/interop/src/cangjie/ResourceManager.cj @@ -0,0 +1,78 @@ +/* + * 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. + */ +package Interop + +import std.binary.* +import std.math.* +import std.collection.* + +public type ResourceId = Int32 + +class ResourceInfo { + public var resource: Any + public var holdersCount: Int32 + init(resource: Any, holdersCount: Int32 ) { + this.resource = resource + this.holdersCount = holdersCount + } +} + +public class ResourceHolder { + private static var nextResourceId: ResourceId = 100 + private var resources: HashMap = HashMap() + private static var _instance: ?ResourceHolder = Option.None + public static func instance(): ResourceHolder { + ResourceHolder._instance = match (ResourceHolder._instance) { + case Some(resourceHolder) => resourceHolder + case _ => ResourceHolder() + } + if (let Some(rh) <- ResourceHolder._instance) { + return rh + } else { + throw Exception() + } + } + public func hold(resourceId: ResourceId) { + match(this.resources.get(resourceId)) { + case Some(resource) => resource.holdersCount++ + case _ => throw Exception("Resource ${resourceId} does not exists, can not hold") + } + } + + public func release(resourceId: ResourceId) { + let resource = match (this.resources.get(resourceId)) { + case Some(resource) => resource + case _ => throw Exception("Resource ${resourceId} does not exists, can not hold") + } + resource.holdersCount-- + if (resource.holdersCount <= 0) { + this.resources.remove(resourceId) + } + } + + public func registerAndHold(resource: Any): ResourceId { + ResourceHolder.nextResourceId += 1 + let resourceId = ResourceHolder.nextResourceId + this.resources.add(resourceId, ResourceInfo(resource, resourceId)) + return resourceId + } + + public func get(resourceId: ResourceId): Any { + match(this.resources.get(resourceId)) { + case Some(resource) => return resource.resource + case _ => throw Exception("Resource ${resourceId} does not exists") + } + } +} diff --git a/koala_tools/interop/src/cangjie/SerializerBase.cj b/koala_tools/interop/src/cangjie/SerializerBase.cj new file mode 100644 index 0000000000000000000000000000000000000000..931bc704a95f7faed20afc7812634cb7e8229870 --- /dev/null +++ b/koala_tools/interop/src/cangjie/SerializerBase.cj @@ -0,0 +1,355 @@ +/* + * Copyright (c) 2024 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. + */ + +package Interop + +import std.binary.* +import std.math.* +import std.collection.* + +public enum RuntimeType { + |UNEXPECTED + |NUMBER + |STRING + |OBJECT + |BOOLEAN + |UNDEFINED + |BIGINT + |FUNCTION + |SYMBOL + |MATERIALIZED + public prop ordinal: Int32 { + get() { + match (this) { + case UNEXPECTED => -1 + case NUMBER => 1 + case STRING => 2 + case OBJECT => 3 + case BOOLEAN => 4 + case UNDEFINED => 5 + case BIGINT => 6 + case FUNCTION => 7 + case SYMBOL => 8 + case MATERIALIZED => 9 + } + } + } +} + +public class PromiseAndResourceId { + public var promise: Any + public var resourceId: ResourceId + init (promise: Any, resourceId: ResourceId) { + this.promise = promise + this.resourceId = resourceId + } +} + + +/* Serialization extension point */ +public abstract class CustomSerializer { + public var supported: Array + init(supported: Array) { + this.supported = supported + } + public func supports(kind: String): Bool { return this.supported.contains(kind) } + public func serialize(serializer: SerializerBase, value: Object, kind: String): Unit {} + var next: ?CustomSerializer = Option.None +} + +public open class SerializerBase { + private var position: Int32 = 0 + private var _buffer: pointer + private var _length: Int32 + + private static var customSerializers: ?CustomSerializer = Option.None + static func registerCustomSerializer(serializer: CustomSerializer) { + // Improve: + } + + public init() { + let length: Int32 = 96 + this._buffer = InteropNativeModule._Malloc(length) + this._length = length + } + + private static func writeu8(_buffer: pointer, offset: Int32, length: Int32, value: Int32): Unit { + InteropNativeModule._WriteByte(_buffer, Int64(offset), Int64(length), value) + } + private static func readu8(_buffer: pointer, offset: Int32, length: Int32): Int32 { + return InteropNativeModule._ReadByte(_buffer, Int64(offset), Int64(length)) + } + + public open func release() { + this.releaseResources() + this.position = 0 + } + private func releaseResources() { + if (this.heldResourcesCount == 0) { + return + } + for (i in 0..this.heldResourcesCount) { + InteropNativeModule._ReleaseCallbackResource(this.heldResources[i]) + } + this.heldResourcesCount = 0 + } + public func asBuffer(): KSerializerBuffer { + this._buffer + } + public func length(): Int32 { + return Int32(this.position) + } + public func currentPosition(): Int32 { return this.position } + private func checkCapacity(value: Int32) { + if (value < 1) { + throw Exception("${value} is less than 1") + } + var buffSize = this._length + if (this.position > buffSize - value) { + let minSize: Int32 = this.position + value + let resizedSize: Int32 = max(minSize, Int32(round(1.5 * Float64(buffSize)))) + let resizedBuffer = InteropNativeModule._Malloc(resizedSize) + let oldBuffer = this._buffer + for (i in 0..this.position) { + SerializerBase.writeu8(resizedBuffer, Int32(i), resizedSize, SerializerBase.readu8(oldBuffer, i, this.position)) + } + this._buffer = resizedBuffer + this._length = resizedSize + InteropNativeModule._Free(oldBuffer) + } + } + public func writeCustomObject(kind: String, value: Any): Unit { + var current = SerializerBase.customSerializers + // Improve: + println("Unsupported custom serialization for ${kind}, write undefined") + this.writeInt8(Tag.UNDEFINED.value) + } + + private var heldResources: ArrayList = ArrayList() + private var heldResourcesCount: Int64 = 0 + private func addHeldResource(resourceId: ResourceId) { + if (this.heldResourcesCount == this.heldResources.size) { + this.heldResources.add(resourceId) + } + else { + this.heldResources[this.heldResourcesCount] = resourceId + } + this.heldResourcesCount += 1 + } + + public func holdAndWriteCallback(callback: Any): ResourceId { + let resourceId = ResourceHolder.instance().registerAndHold(callback) + this.heldResources.add(resourceId) + this.writeInt32(resourceId) + this.writePointer(0) + this.writePointer(0) + this.writePointer(0) + this.writePointer(0) + return resourceId + } + public func holdAndWriteCallback(callback: Any, hold: KPointer, release: KPointer, call: KPointer, callSync: KPointer): ResourceId { + let resourceId = ResourceHolder.instance().registerAndHold(callback) + this.heldResources.add(resourceId) + this.writeInt32(resourceId) + this.writePointer(hold) + this.writePointer(release) + this.writePointer(call) + this.writePointer(callSync) + return resourceId + } + public func holdAndWriteCallbackForPromiseVoid(): PromiseAndResourceId { + return holdAndWriteCallbackForPromiseVoid(0, 0, 0, 0) + } + public func holdAndWriteCallbackForPromiseVoid(hold: KPointer, release: KPointer, call: KPointer, callSync: KPointer): PromiseAndResourceId { + var resourceId: ResourceId = 0 + let promise = { => } + return PromiseAndResourceId(promise, resourceId) + } + public func holdAndWriteCallbackForPromise(): PromiseAndResourceId { + return holdAndWriteCallbackForPromise(0, 0, 0) + } + public func holdAndWriteCallbackForPromise(hold: KPointer, release: KPointer, call: KPointer): PromiseAndResourceId { + var resourceId: ResourceId = 0 + let promise = { => } + return PromiseAndResourceId(promise, resourceId) + } + public func writeFunction(value: Any): Unit { + // Improve: + } + public func writeTag(tag: Int32): Unit { + this.checkCapacity(1) + SerializerBase.writeu8(this._buffer, this.position, this._length, tag) + this.position++ + } + public func writeTag(tag: Int8): Unit { + this.checkCapacity(1) + SerializerBase.writeu8(this._buffer, this.position, this._length, Int32(tag)) + this.position++ + } + public func writeNumber(value: ?Float32): Unit { + if (let Some(value) <- value) { + if(value == Float32(Int32(value))) { + this.writeNumber(Int32(value)) + } else { + this.writeTag(Tag.FLOAT32.value) + this.writeInt32(Int64(value.toBits())) + } + } + else { + this.writeTag(Tag.UNDEFINED.value) + } + } + public func writeNumber(value: ?Float64): Unit { + if (let Some(value) <- value) { + if(value == Float64(Int32(value))) { + this.writeNumber(Int32(value)) + } else { + this.writeTag(Tag.FLOAT32.value) + this.writeInt32(Int64(Float32(value).toBits())) + } + } + else { + this.writeTag(Tag.UNDEFINED.value) + } + } + public func writeNumber(value: ?Int32): Unit { + if (let Some(value) <- value) { + this.writeTag(Tag.INT32.value) + this.writeInt32(Int32(value)) + } + else { + this.writeTag(Tag.UNDEFINED.value) + } + } + public func writeNumber(value: ?Int64): Unit { + this.checkCapacity(5) + if (let Some(value) <- value) { + this.writeTag(Tag.INT32.value) + this.writeInt32(Int32(value)) + } + else { + this.writeTag(Tag.UNDEFINED.value) + } + } + public func writeInt8(value: Int8): Unit { + this.checkCapacity(1) + SerializerBase.writeu8(this._buffer, this.position, this._length, Int32(value)) + this.position += 1 + } + public func writeInt8(value: Int32): Unit { + this.checkCapacity(1) + SerializerBase.writeu8(this._buffer, this.position, this._length, Int32(value)) + this.position += 1 + } + public func writeInt32(value: Int32): Unit { + this.checkCapacity(4) + let arr = Array(4, repeat: 0) + value.writeLittleEndian(arr) + for (idx in 0..4) { + SerializerBase.writeu8(this._buffer, this.position + Int32(idx), this._length, Int32(arr[idx])) + } + this.position += 4 + } + public func writeInt32(value: Int64): Unit { + this.checkCapacity(4) + let arr = Array(4, repeat: 0) + Int32(value).writeLittleEndian(arr) + for (idx in 0..4) { + SerializerBase.writeu8(this._buffer, this.position + Int32(idx), this._length, Int32(arr[idx])) + } + this.position += 4 + } + public func writeInt64(value: Int64): Unit { + this.checkCapacity(8) + let arr = Array(8, repeat: 0) + value.writeLittleEndian(arr) + for (idx in 0..8) { + SerializerBase.writeu8(this._buffer, this.position + Int32(idx), this._length, Int32(arr[idx])) + } + this.position += 8 + } + public func writeFloat32(value: Float32): Unit { + this.checkCapacity(4) + this.position += 4 + } + public func writePointer(ptr: UInt64): Unit { + this.checkCapacity(8) + let arr = Array(8, repeat: 0) + ptr.writeLittleEndian(arr) + for (idx in 0..8) { + SerializerBase.writeu8(this._buffer, this.position + Int32(idx), this._length, Int32(arr[idx])) + } + this.position += 8 + } + public func writeBoolean(value: ?Bool): Unit { + this.checkCapacity(1) + if(let Some(value) <- value) { + SerializerBase.writeu8(this._buffer, this.position, this._length, if (value) {1} else {0}) + } + else { + SerializerBase.writeu8(this._buffer, this.position, this._length, RuntimeType.UNDEFINED.ordinal) + } + this.position++ + } + public func writeMaterialized(value: Object): Unit { + // Improve: + } + public func writeCallbackResource(resource: CallbackResource) { + this.writeInt32(resource.resourceId) + this.writePointer(resource.hold) + this.writePointer(resource.release) + } + public func writeString(value: String): Unit { + this.checkCapacity(Int32(4 + value.size * 4 + 1)) // length, data + let encodedLength = InteropNativeModule._ManagedStringWrite(value, this.asBuffer(), this._length, this.position + 4) + this.writeInt32(encodedLength) + this.position += encodedLength + } + public func writeBuffer(_buffer: Array) { + // let resourceId = ResourceHolder.instance().registerAndHold(_buffer) + // this.writeCallbackResource(CallbackResource(resourceId, 0, 0)) + // unsafe { + // let ptr = acquireArrayRawData(_buffer).pointer + // this.writePointer(UInt64(ptr.toUIntNative())) + // this.writeInt64(_buffer.size) + // } + } + public func holdAndWriteObject(obj: Any): ResourceId { + return this.holdAndWriteObject(obj, 0, 0) + } + public func holdAndWriteObject(obj: Any, hold: pointer, release: pointer): ResourceId { + let resourceId = ResourceHolder.instance().registerAndHold(obj) + this.addHeldResource(resourceId) + this.writeInt32(resourceId) + this.writePointer(hold) + this.writePointer(release) + return resourceId + } +} + +public open class DateCustomSerializer <: CustomSerializer { + public DateCustomSerializer() { + super(["Date"]) + } + public func serialize(serializer: SerializerBase, value: Ark_CustomObject, kind: String): Unit { + serializer.writeString("{}") + } +} + +public open class Ark_CustomObject { + init() { + SerializerBase.registerCustomSerializer(DateCustomSerializer()) + } +} diff --git a/koala_tools/interop/src/cangjie/Tag.cj b/koala_tools/interop/src/cangjie/Tag.cj new file mode 100644 index 0000000000000000000000000000000000000000..8c5cc317f9721d5cad36b5cae262e759eb1eac4c --- /dev/null +++ b/koala_tools/interop/src/cangjie/Tag.cj @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2024 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. + */ +package Interop + +public open class Tag { + public static var UNDEFINED: Tag = Tag(101) + public static var INT32: Tag = Tag(102) + public static var FLOAT32: Tag = Tag(103) + public static var STRING: Tag = Tag(104) + public static var LENGTH: Tag = Tag(105) + public static var RESOURCE: Tag = Tag(106) + public static var OBJECT: Tag = Tag(107) + public var value: Int8 + Tag (arg0: Int8) { + value = arg0 + } +} diff --git a/koala_tools/interop/src/cangjie/cjpm.toml b/koala_tools/interop/src/cangjie/cjpm.toml new file mode 100644 index 0000000000000000000000000000000000000000..54130b37780ecff31ac2a85fef444d20ecc77c30 --- /dev/null +++ b/koala_tools/interop/src/cangjie/cjpm.toml @@ -0,0 +1,25 @@ +# Copyright (c) 2024 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. + +[dependencies] +[package] + cjc-version = "0.56.4" + compile-option = "" + description = "config file for cj build" + link-option = "" + name = "Interop" + output-type = "static" + src-dir = "." + target-dir = "./build/cj" + version = "1.0.0" + package-configuration = {} diff --git a/koala_tools/interop/src/cpp/DeserializerBase.h b/koala_tools/interop/src/cpp/DeserializerBase.h new file mode 100644 index 0000000000000000000000000000000000000000..105036dfdb4bd1e634294a4d5f80ad0f0f97cbcb --- /dev/null +++ b/koala_tools/interop/src/cpp/DeserializerBase.h @@ -0,0 +1,640 @@ +/* + * Copyright (c) 2024 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. + */ +#ifndef _DESERIALIZER_BASE_H_ +#define _DESERIALIZER_BASE_H_ + +#include +#include +#include +#include +#include + +#include "interop-types.h" +#include "interop-logging.h" +#include "interop-utils.h" +#include "koala-types.h" + +void holdManagedCallbackResource(InteropInt32); +void releaseManagedCallbackResource(InteropInt32); + +#ifdef __arm__ +#define KOALA_NO_UNALIGNED_ACCESS 1 +#endif + +inline const char *tagName(InteropTag tag) +{ + switch (tag) + { + case InteropTag::INTEROP_TAG_UNDEFINED: + return "UNDEFINED"; + case InteropTag::INTEROP_TAG_INT32: + return "INT32"; + case InteropTag::INTEROP_TAG_FLOAT32: + return "FLOAT32"; + case InteropTag::INTEROP_TAG_LENGTH: + return "LENGTH"; + case InteropTag::INTEROP_TAG_RESOURCE: + return "RESOURCE"; + case InteropTag::INTEROP_TAG_STRING: + return "STRING"; + case InteropTag::INTEROP_TAG_OBJECT: + return "OBJECT"; + } + INTEROP_FATAL("Fatal error"); +} + +inline const char *tagNameExact(InteropTag tag) +{ + switch (tag) + { + case InteropTag::INTEROP_TAG_UNDEFINED: + return "INTEROP_TAG_UNDEFINED"; + case InteropTag::INTEROP_TAG_INT32: + return "INTEROP_TAG_INT32"; + case InteropTag::INTEROP_TAG_FLOAT32: + return "INTEROP_TAG_FLOAT32"; + case InteropTag::INTEROP_TAG_LENGTH: + return "INTEROP_TAG_LENGTH"; + case InteropTag::INTEROP_TAG_RESOURCE: + return "INTEROP_TAG_RESOURCE"; + case InteropTag::INTEROP_TAG_STRING: + return "INTEROP_TAG_STRING"; + case InteropTag::INTEROP_TAG_OBJECT: + return "INTEROP_TAG_OBJECT"; + } + INTEROP_FATAL("Fatal error"); +} + +inline InteropFunction makeArkFunctionFromId(InteropInt32 id) { + InteropFunction result; + result.id = id; + return result; +} + +inline const char *getUnitName(int value) +{ + switch (value) + { + case 0: + return "px"; + case 1: + return "vp"; + case 2: + return "fp"; + case 3: + return "%"; + case 4: + return "lpx"; + default: + return ""; + } +} + +template +inline void convertor(T value) = delete; + +// Improve: restore full printing! +template +inline void WriteToString(std::string *result, T value) = delete; + +template <> +inline void WriteToString(std::string *result, const InteropEmpty &value) +{ + result->append("{"); + result->append(".dummy=" + std::to_string(value.dummy)); + result->append("}"); +} + +struct Error +{ + std::string message; + Error(const std::string &message) : message(message) {} +}; + +template <> +inline void WriteToString(std::string *result, InteropTag value) +{ + result->append(".tag="); + result->append(tagName(value)); +} + +template <> +inline void WriteToString(std::string *result, InteropNativePointer value) +{ + result->append("0x" + std::to_string((uint64_t)value)); +} + +template <> +inline void WriteToString(std::string *result, const InteropNativePointer* value) +{ + result->append("0x" + std::to_string((uint64_t)(*value))); +} + +template <> +inline void WriteToString(std::string *result, InteropNodeHandle value) +{ + result->append("0x" + std::to_string((uint64_t)value)); +} + +template <> +inline void WriteToString(std::string *result, InteropFunction value) +{ + result->append("{"); + result->append(".id=" + std::to_string(value.id)); + result->append("}"); +} + +template <> +inline void WriteToString(std::string *result, const InteropFunction* value) +{ + result->append("{"); + result->append(".id=" + std::to_string(value->id)); + result->append("}"); +} + +template <> +inline void WriteToString(std::string *result, const InteropMaterialized *value) +{ + char hex[20]; + interop_snprintf(hex, sizeof(hex), "0x%llx", (long long)value->ptr); + result->append("\""); + result->append("Materialized "); + result->append(hex); + result->append("\""); +} + +// Improve: generate! +template<> +inline void WriteToString(std::string *result, const InteropCallbackResource *value) +{ + result->append("{"); + result->append(".resourceId=" + std::to_string(value->resourceId)); + result->append(", .hold=0"); + result->append(", .release=0"); + result->append("}"); +} + +class DeserializerBase; + +template <> +inline void WriteToString(std::string *result, InteropUndefined value) +{ + result->append("{}"); +} +template <> +inline void WriteToString(std::string *result, const InteropUndefined *value) +{ + result->append("{}"); +} +template <> +inline void WriteToString(std::string *result, InteropVoid value) +{ + result->append("{}"); +} +template <> +inline void WriteToString(std::string *result, const InteropVoid *value) +{ + result->append("{}"); +} +template <> +inline void WriteToString(std::string *result, const InteropCustomObject *value) +{ + if (strcmp(value->kind, "NativeErrorFunction") == 0) + { + result->append("() => {} /* Improve: Function*/"); + return; + } + result->append("{"); + result->append(".kind=\""); + result->append(value->kind); + result->append("\"}"); +} +template <> +inline void WriteToString(std::string *result, const InteropObject *value) +{ + result->append("{"); + result->append(".resource="); + WriteToString(result, &(value->resource)); + result->append("}"); +} +template <> +inline void WriteToString(std::string *result, const InteropObject value) +{ + WriteToString(result, &value); +} + +struct CustomDeserializer +{ + virtual ~CustomDeserializer() {} + virtual bool supports(const std::string &kind) { return false; } + virtual InteropCustomObject deserialize(DeserializerBase *deserializer, const std::string &kind) + { + InteropCustomObject result; + interop_strcpy(result.kind, sizeof(result.kind), "error"); + return result; + } + CustomDeserializer *next = nullptr; +}; + +class DeserializerBase +{ +protected: + uint8_t *data; + int32_t length; + int32_t position; + std::vector toClean; + + static CustomDeserializer *customDeserializers; + +public: + DeserializerBase(KSerializerBuffer data, int32_t length) + : data(reinterpret_cast(data)), length(length), position(0) {} + + DeserializerBase(uint8_t* data, int32_t length) + : data(data), length(length), position(0) {} + + ~DeserializerBase() + { + for (auto data : toClean) + { + free(data); + } + } + + static void registerCustomDeserializer(CustomDeserializer *deserializer) + { + if (DeserializerBase::customDeserializers == nullptr) + { + DeserializerBase::customDeserializers = deserializer; + } + else + { + auto *current = DeserializerBase::customDeserializers; + while (current->next != nullptr) + current = current->next; + current->next = deserializer; + } + } + + template + void resizeArray(T *array, int32_t length) + { + void *value = nullptr; + if (length > 0) + { + value = malloc(length * sizeof(E)); + if (!value) { + INTEROP_FATAL("Cannot allocate memory"); + } + interop_memset(value, length * sizeof(E), 0, length * sizeof(E)); + toClean.push_back(value); + } + array->length = length; + array->array = reinterpret_cast(value); + } + + template + void resizeMap(T *map, int32_t length) + { + void *keys = nullptr; + void *values = nullptr; + if (length > 0) + { + keys = malloc(length * sizeof(K)); + if (!keys) { + INTEROP_FATAL("Cannot allocate memory"); + } + interop_memset(keys, length * sizeof(K), 0, length * sizeof(K)); + toClean.push_back(keys); + + values = malloc(length * sizeof(V)); + if (!values) { + INTEROP_FATAL("Cannot allocate memory"); + } + interop_memset(values, length * sizeof(V), 0, length * sizeof(V)); + toClean.push_back(values); + } + map->size = length; + map->keys = reinterpret_cast(keys); + map->values = reinterpret_cast(values); + } + + int32_t currentPosition() const { return this->position; } + + void check(int32_t count) + { + if (position + count > length) { + fprintf(stderr, "Incorrect serialized data, check for %d, buffer %d position %d\n", count, length, position); + ASSERT(false); + abort(); + } + } + + InteropCustomObject readCustomObject(std::string kind) + { + auto *current = DeserializerBase::customDeserializers; + while (current) + { + if (current->supports(kind)) + return current->deserialize(this, kind); + current = current->next; + } + LOGE("Unsupported custom deserialization for %s\n", kind.c_str()); + auto tag = readTag(); + if (tag == INTEROP_TAG_UNDEFINED) LOGE("Undefined interop tag"); + // Skip undefined tag!. + InteropCustomObject result; + interop_strcpy(result.kind, sizeof(result.kind), "Error"); + interop_strcat(result.kind, sizeof(result.kind), kind.c_str()); + return result; + } + + InteropCallbackResource readCallbackResource() { + InteropCallbackResource result = {}; + result.resourceId = readInt32(); + result.hold = reinterpret_cast(readPointerOrDefault(reinterpret_cast(holdManagedCallbackResource))); + result.release = reinterpret_cast(readPointerOrDefault(reinterpret_cast(releaseManagedCallbackResource))); + return result; + } + + InteropObject readObject() { + InteropObject obj; + obj.resource = readCallbackResource(); + return obj; + } + + int8_t readInt8() + { + check(1); + int8_t value = *(data + position); + position += 1; + return value; + } + InteropTag readTag() + { + return (InteropTag)readInt8(); + } + InteropBoolean readBoolean() + { + check(1); + int8_t value = *(data + position); + position += 1; + return value; + } + InteropInt32 readInt32() + { + check(sizeof(InteropInt32)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + InteropInt32 value; + interop_memcpy(&value, sizeof(InteropInt32), data + position, sizeof(InteropInt32)); +#else + auto value = *(InteropInt32 *)(data + position); +#endif + position += sizeof(InteropInt32); + return value; + } + InteropInt64 readInt64() + { + check(sizeof(InteropInt64)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + InteropInt64 value; + interop_memcpy(&value, sizeof(InteropInt64), data + position, sizeof(InteropInt64)); +#else + auto value = *(InteropInt64 *)(data + position); +#endif + position += sizeof(InteropInt64); + return value; + } + InteropUInt64 readUInt64() + { + check(sizeof(InteropUInt64)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + InteropInt64 value; + interop_memcpy(&value, sizeof(InteropUInt64), data + position, sizeof(InteropUInt64)); +#else + auto value = *(InteropUInt64 *)(data + position); +#endif + position += sizeof(InteropUInt64); + return value; + } + InteropFloat32 readFloat32() + { + check(sizeof(InteropFloat32)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + InteropFloat32 value; + interop_memcpy(&value, sizeof(InteropFloat32), data + position, sizeof(InteropFloat32)); +#else + auto value = *(InteropFloat32 *)(data + position); +#endif + position += sizeof(InteropFloat32); + return value; + } + InteropFloat64 readFloat64() + { + check(sizeof(InteropFloat64)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + InteropFloat64 value; + interop_memcpy(&value, sizeof(InteropFloat64), data + position, sizeof(InteropFloat64)); +#else + auto value = *(InteropFloat64 *)(data + position); +#endif + position += sizeof(InteropFloat64); + return value; + } + InteropNativePointer readPointer() + { + check(sizeof(InteropInt64)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + InteropInt64 value = 0; + interop_memcpy(&value, sizeof(InteropInt64), data + position, sizeof(InteropInt64)); +#else + InteropInt64 value = *(int64_t *)(data + position); +#endif + position += sizeof(InteropInt64); + return reinterpret_cast(static_cast(value)); + } + InteropNativePointer readPointerOrDefault(InteropNativePointer defaultValue) + { + const InteropNativePointer value = this->readPointer(); + return value ? value : defaultValue; + } + InteropNumber readNumber() + { + check(5); + InteropNumber result; + result.tag = readTag(); + if (result.tag == InteropTag::INTEROP_TAG_INT32) + { + result.i32 = readInt32(); + } + else if (result.tag == InteropTag::INTEROP_TAG_FLOAT32) + { + result.f32 = readFloat32(); + } + else + { + INTEROP_FATAL("Fatal error"); + } + return result; + } + InteropBuffer readBuffer() + { + InteropCallbackResource resource = readCallbackResource(); + InteropNativePointer data = readPointer(); + InteropInt64 length = readInt64(); + return InteropBuffer { resource, (void*)data, length }; + } + + InteropString readString() + { + InteropString result; + InteropInt32 length = readInt32(); + check(length); + // We refer to string data in-place. + result.chars = (const char *)(data + position); + result.length = length - 1; + this->position += length; + return result; + } + + InteropFunction readFunction() + { + InteropFunction result; + result.id = readInt32(); + return result; + } + + InteropMaterialized readMaterialized() + { + InteropMaterialized result; + result.ptr = readPointer(); + return result; + } + + InteropUndefined readUndefined() + { + return InteropUndefined(); + } +}; +template <> +inline void WriteToString(std::string *result, InteropBoolean value) +{ + result->append(value ? "true" : "false"); +} +template <> +inline void WriteToString(std::string *result, InteropInt32 value) +{ + result->append(std::to_string(value)); +} +template <> +inline void WriteToString(std::string *result, const InteropInt32* value) +{ + result->append(std::to_string(*value)); +} +template <> +inline void WriteToString(std::string *result, InteropUInt64 value) +{ + result->append(std::to_string(value)); +} +template <> +inline void WriteToString(std::string *result, InteropInt64 value) +{ + result->append(std::to_string(value)); +} +template <> +inline void WriteToString(std::string *result, InteropUInt32 value) +{ + result->append(std::to_string(value)); +} +template <> +inline void WriteToString(std::string *result, InteropFloat32 value) +{ +#if (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED < 130300L)) + // to_chars() is not available on older macOS. + char buf[20]; + interop_snprintf(buf, sizeof buf, "%f", value); + result->append(buf); +#else + std::string storage; + storage.resize(20); + // We use to_chars() to avoid locale issues. + auto rc = std::to_chars(storage.data(), storage.data() + storage.size(), value); + storage.resize(rc.ptr - storage.data()); + result->append(storage); +#endif +} +template <> +inline void WriteToString(std::string *result, InteropFloat64 value) +{ +#if (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED < 130300L)) + // to_chars() is not available on older macOS. + char buf[20]; + interop_snprintf(buf, sizeof buf, "%f", value); + result->append(buf); +#else + std::string storage; + storage.resize(20); + // We use to_chars() to avoid locale issues. + auto rc = std::to_chars(storage.data(), storage.data() + storage.size(), value); + storage.resize(rc.ptr - storage.data()); + result->append(storage); +#endif +} +template <> +inline void WriteToString(std::string* result, const InteropBuffer* value) { + result->append("{.data=nullptr, .length="); + result->append(std::to_string(value->length)); + result->append("}"); +} +template <> +inline void WriteToString(std::string* result, InteropBuffer value) { + result->append("{.data=nullptr, .length="); + result->append(std::to_string(value.length)); + result->append("}"); +} +template <> +inline void WriteToString(std::string *result, const InteropString *value) +{ + result->append("{"); + if (value->chars) { + result->append(".chars=\""); + result->append(value->chars); + result->append("\""); + } else { + result->append(".chars=\"\""); + } + result->append(", .length="); + WriteToString(result, value->length); + result->append("}"); +} + +template <> +inline void WriteToString(std::string *result, const InteropNumber *value) +{ + result->append("{.tag=" + std::to_string(value->tag) + ", "); + + if (value->tag == INTEROP_TAG_FLOAT32) + { + std::string valueString; + result->append(".f32="); + WriteToString(result, value->f32); + } else { + result->append(".i32=" + std::to_string(value->i32)); + } + + result->append("}"); +} + +#endif // _DESERIALIZER_BASE_H_ diff --git a/koala_tools/interop/src/cpp/SerializerBase.h b/koala_tools/interop/src/cpp/SerializerBase.h new file mode 100644 index 0000000000000000000000000000000000000000..c501eb05e7cd353d9b3cb48cdc8a6418563ed4a0 --- /dev/null +++ b/koala_tools/interop/src/cpp/SerializerBase.h @@ -0,0 +1,255 @@ +/* + * Copyright (c) 2024 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. + */ + +#ifndef _SERIALIZER_BASE_H +#define _SERIALIZER_BASE_H + +#include +#include +#include +#include +#include +#include +#include + +#include "callback-resource.h" +#include "interop-types.h" +#include "koala-types.h" +#include "interop-logging.h" +#include "interop-utils.h" + +#ifdef __arm__ +#define KOALA_NO_UNALIGNED_ACCESS 1 +#endif + +template +inline InteropRuntimeType runtimeType(const T& value) = delete; + +template <> +inline InteropRuntimeType runtimeType(const InteropCustomObject& value) { + return INTEROP_RUNTIME_OBJECT; +} + +template <> +inline InteropRuntimeType runtimeType(const InteropMaterialized& value) { + return INTEROP_RUNTIME_OBJECT; +} + +static const std::size_t buffer_size = 1024 * 1024; // 1 MB +static std::size_t offset = 0; +alignas(std::max_align_t) static char buffer[buffer_size]; + +template +T* allocArray(const std::array& ref) { + std::size_t space = sizeof(buffer) - offset; + void* ptr = buffer + offset; + void* aligned_ptr = std::align(alignof(T), sizeof(T) * size, ptr, space); + ASSERT(aligned_ptr != nullptr && "Insufficient space or alignment failed!"); + offset = (char*)aligned_ptr + sizeof(T) * size - buffer; + T* array = reinterpret_cast(aligned_ptr); + for (size_t i = 0; i < size; ++i) { + new (&array[i]) T(ref[i]); + } + return array; +} + +class SerializerBase { +private: + uint8_t* data; + uint32_t dataLength; + uint32_t position; + bool ownData; + CallbackResourceHolder* resourceHolder; + void resize(uint32_t newLength) { + ASSERT(ownData); + ASSERT(newLength > dataLength); + auto* newData = reinterpret_cast(malloc(newLength)); + if (!newData) { + INTEROP_FATAL("Cannot allocate memory"); + } + interop_memcpy(newData, newLength, data, position); + free(data); + data = newData; + dataLength = newLength; + } +public: + SerializerBase(CallbackResourceHolder* resourceHolder = nullptr): + position(0), ownData(true), resourceHolder(resourceHolder) { + this->dataLength = 256; + this->data = reinterpret_cast(malloc(this->dataLength)); + if (!this->data) { + INTEROP_FATAL("Cannot allocate memory"); + } + } + + SerializerBase(uint8_t* data, uint32_t dataLength, CallbackResourceHolder* resourceHolder = nullptr): + data(data), dataLength(dataLength), position(0), ownData(false), resourceHolder(resourceHolder) { + } + + SerializerBase(KSerializerBuffer data, uint32_t dataLength, CallbackResourceHolder* resourceHolder = nullptr): + data(reinterpret_cast(data)), dataLength(dataLength), position(0), ownData(false), resourceHolder(resourceHolder) { + } + + virtual ~SerializerBase() { + if (ownData) { + free(data); + } + } + + SerializerBase(const SerializerBase&) = delete; + SerializerBase& operator=(const SerializerBase&) = delete; + + void* release() { + ownData = false; + return data; + } + int length() { + return position; + } + + inline void check(int more) { + if (position + more > dataLength) { + if (ownData) { + resize((position + more) * 3 / 2 + 2); + } else { + INTEROP_FATAL("Buffer overrun: %d > %d\n", position + more, dataLength); + } + } + } + + void writeInt8(InteropInt8 value) { + check(1); + *((InteropInt8*)(data + position)) = value; + position += 1; + } + + void writeInt32(InteropInt32 value) { + check(sizeof(value)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + interop_memcpy(data + position, dataLength, &value, sizeof(value)); +#else + *((InteropInt32*)(data + position)) = value; +#endif + position += sizeof(value); + } + + void writeInt64(InteropInt64 value) { + check(sizeof(value)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + interop_memcpy(data + position, dataLength, &value, sizeof(value)); +#else + *((InteropInt64*)(data + position)) = value; +#endif + position += sizeof(value); + } + + void writeUInt64(InteropUInt64 value) { + check(sizeof(value)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + interop_memcpy(data + position, dataLength, &value, sizeof(value)); +#else + *((InteropUInt64*)(data + position)) = value; +#endif + position += sizeof(value); + } + + void writeFloat32(InteropFloat32 value) { + check(sizeof(value)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + interop_memcpy(data + position, dataLength, &value, sizeof(value)); +#else + *((InteropFloat32*)(data + position)) = value; +#endif + position += sizeof(value); + } + + void writeFloat64(InteropFloat64 value) { + check(sizeof(value)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + interop_memcpy(data + position, dataLength, &value, sizeof(value)); +#else + *((InteropFloat64*)(data + position)) = value; +#endif + position += 8; + } + + void writePointer(InteropNativePointer value) { + int64_t value64 = static_cast(reinterpret_cast(value)); + check(sizeof(value64)); +#ifdef KOALA_NO_UNALIGNED_ACCESS + interop_memcpy(data + position, dataLength, &value64, sizeof(value64)); +#else + *((int64_t*)(data + position)) = value64; +#endif + position += sizeof(value64); + } + + void writeNumber(InteropNumber value) { + writeInt8(value.tag); + if (value.tag == InteropTag::INTEROP_TAG_INT32) { + writeInt32(value.i32); + } else if (value.tag == InteropTag::INTEROP_TAG_FLOAT32) { + writeFloat32(value.f32); + } else { + INTEROP_FATAL("Unknown tag number"); + } + } + + void writeString(InteropString value) { + writeInt32(value.length + 1); + check(value.length + 1); + interop_strcpy((char*)(data + position), dataLength, value.chars); + position += value.length + 1; + } + + void writeBoolean(InteropBoolean value) { + writeInt8(value); + } + + void writeCallbackResource(const InteropCallbackResource resource) { + writeInt32(resource.resourceId); + writePointer(reinterpret_cast(resource.hold)); + writePointer(reinterpret_cast(resource.release)); + if (this->resourceHolder != nullptr) { + this->resourceHolder->holdCallbackResource(&resource); + } + } + + void writeObject(InteropObject any) { + writeCallbackResource(any.resource); + } + + void writeCustomObject(std::string type, InteropCustomObject value) { + // Improve: implement + } + + void writeBuffer(InteropBuffer buffer) { + writeCallbackResource(buffer.resource); + writePointer((void*)buffer.data); + writeInt64(buffer.length); + } + + KInteropReturnBuffer toReturnBuffer() { + if (this->ownData) { + KInteropReturnBuffer buffer {this->length(), this->release(), [](KNativePointer data, KInt length) { free(data); }}; + // Improve: fix memory issues + return buffer; + } else { + return {this->length(), this->data, nullptr}; + } + } +}; + +#endif // _SERIALIZER_BASE_H \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/ani/convertors-ani.cc b/koala_tools/interop/src/cpp/ani/convertors-ani.cc new file mode 100644 index 0000000000000000000000000000000000000000..42c1c0a8135c237c48bd706e5e781ca90c873979 --- /dev/null +++ b/koala_tools/interop/src/cpp/ani/convertors-ani.cc @@ -0,0 +1,203 @@ +/* + * 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. + */ +#include + +#include +#include "convertors-ani.h" +#include "signatures.h" +#include "interop-types.h" + +static const char* callCallbackFromNative = "callCallbackFromNative"; +static const char* callCallbackFromNativeSig = "ili:i"; + +const bool registerByOne = true; + +static bool registerNatives(ani_env *env, const ani_class clazz, const std::vector> impls) { + std::vector methods; + methods.reserve(impls.size()); + bool result = true; + for (const auto &[name, type, func, flag] : impls) { + ani_native_function method; + method.name = name.c_str(); + method.pointer = func; + method.signature = nullptr; + if (registerByOne) { + result &= env->Class_BindStaticNativeMethods(clazz, &method, 1) == ANI_OK; + ani_boolean isError = false; + CHECK_ANI_FATAL(env->ExistUnhandledError(&isError)); + if (isError) { + CHECK_ANI_FATAL(env->DescribeError()); + CHECK_ANI_FATAL(env->ResetError()); + } + } + else { + methods.push_back(method); + } + } + if (!registerByOne) { + result = env->Class_BindStaticNativeMethods(clazz, methods.data(), static_cast(methods.size())) == ANI_OK; + } + return registerByOne ? true : result; +} + +bool registerAllModules(ani_env *aniEnv) { + auto moduleNames = AniExports::getInstance()->getModules(); + for (auto it = moduleNames.begin(); it != moduleNames.end(); ++it) { + std::string classpath = AniExports::getInstance()->getClasspath(*it); + ani_class nativeModule = nullptr; + CHECK_ANI_FATAL(aniEnv->FindClass(classpath.c_str(), &nativeModule)); + if (nativeModule == nullptr) { + LOGE("Cannot find managed class %s", classpath.c_str()); + continue; + } + if (!registerNatives(aniEnv, nativeModule, AniExports::getInstance()->getMethods(*it))) { + return false; + } + } + return true; +} + +ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result) { + LOGE("Use ANI") + ani_env* aniEnv = nullptr; + *result = 1; + CHECK_ANI_FATAL(vm->GetEnv(/* version */ 1, (ani_env**)&aniEnv)); + if (!registerAllModules(aniEnv)) { + LOGE("Failed to register ANI modules"); + return ANI_ERROR; + } + ani_boolean hasError = false; + CHECK_ANI_FATAL(aniEnv->ExistUnhandledError(&hasError)); + if (hasError) { + CHECK_ANI_FATAL(aniEnv->DescribeError()); + CHECK_ANI_FATAL(aniEnv->ResetError()); + } + auto interopClassName = AniExports::getInstance()->getClasspath("InteropNativeModule"); + ani_class interopClass = nullptr; + CHECK_ANI_FATAL(aniEnv->FindClass(interopClassName.c_str(), &interopClass)); + if (interopClass == nullptr) { + LOGE("Can not find InteropNativeModule class to set callback dispatcher"); + CHECK_ANI_FATAL(aniEnv->ExistUnhandledError(&hasError)); + if (hasError) { + CHECK_ANI_FATAL(aniEnv->DescribeError()); + CHECK_ANI_FATAL(aniEnv->ResetError()); + } + return ANI_OK; + } + if (!setKoalaANICallbackDispatcher(aniEnv, interopClass, callCallbackFromNative, callCallbackFromNativeSig)) { + LOGE("Failed to set ANI callback dispatcher"); + return ANI_ERROR; + } + return ANI_OK; +} + +AniExports* AniExports::getInstance() { + static AniExports *instance = nullptr; + if (instance == nullptr) { + instance = new AniExports(); + } + return instance; +} + +std::vector AniExports::getModules() { + std::vector result; + for (auto it = implementations.begin(); it != implementations.end(); ++it) { + result.push_back(it->first); + } + return result; +} + +const std::vector>& AniExports::getMethods(const std::string& module) { + auto it = implementations.find(module); + if (it == implementations.end()) { + LOGE("Module %s is not registered", module.c_str()); + } + return it->second; +} + +void AniExports::addMethod(const char* module, const char *name, const char *type, void *impl, int flags) { + auto it = implementations.find(module); + if (it == implementations.end()) { + it = implementations.insert(std::make_pair(module, std::vector>())).first; + } + it->second.push_back(std::make_tuple(name, convertType(name, type), impl, flags)); +} + +void AniExports::setClasspath(const char* module, const char *classpath) { + auto it = classpaths.find(module); + if (it == classpaths.end()) { + classpaths.insert(std::make_pair(module, classpath)); + } else { + LOGE("Classpath for module %s was redefined", module); + } +} + +static std::map g_defaultClasspaths = { + {"InteropNativeModule", "@koalaui.interop.InteropNativeModule.InteropNativeModule"}, + // Improve: leave just InteropNativeModule, define others via KOALA_ETS_INTEROP_MODULE_CLASSPATH + {"TestNativeModule", "arkui.framework.arkts.TestNativeModule.TestNativeModule"}, + {"ArkUINativeModule", "arkui.framework.arkts.ArkUINativeModule.ArkUINativeModule"}, + {"ArkUIGeneratedNativeModule", "arkui.framework.arkts.ArkUIGeneratedNativeModule.ArkUIGeneratedNativeModule"}, +}; + +const std::string& AniExports::getClasspath(const std::string& module) { + auto it = classpaths.find(module); + if (it != classpaths.end()) { + return it->second; + } + auto defaultClasspath = g_defaultClasspaths.find(module); + if (defaultClasspath != g_defaultClasspaths.end()) { + return defaultClasspath->second; + } + INTEROP_FATAL("Classpath for module %s was not registered", module.c_str()); +} + +static struct { + ani_class clazz = nullptr; + ani_static_method method = nullptr; +} g_koalaANICallbackDispatcher; + +static thread_local ani_env* currentContext = nullptr; + +bool setKoalaANICallbackDispatcher( + ani_env* aniEnv, + ani_class clazz, + const char* dispatcherMethodName, + const char* dispatcherMethodSig +) { + currentContext = aniEnv; + g_koalaANICallbackDispatcher.clazz = clazz; + CHECK_ANI_FATAL(aniEnv->Class_FindStaticMethod( + clazz, dispatcherMethodName, dispatcherMethodSig, + &g_koalaANICallbackDispatcher.method + )); + if (g_koalaANICallbackDispatcher.method == nullptr) { + return false; + } + return true; +} + +void getKoalaANICallbackDispatcher(ani_class* clazz, ani_static_method* method) { + *clazz = g_koalaANICallbackDispatcher.clazz; + *method = g_koalaANICallbackDispatcher.method; +} + +ani_env* getKoalaANIContext(void* hint) { + if (currentContext) { + return currentContext; + } else { + return reinterpret_cast(hint); + } +} \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/ani/convertors-ani.h b/koala_tools/interop/src/cpp/ani/convertors-ani.h new file mode 100644 index 0000000000000000000000000000000000000000..27ca269e058830446746d9e552ac161bc948d260 --- /dev/null +++ b/koala_tools/interop/src/cpp/ani/convertors-ani.h @@ -0,0 +1,1878 @@ +/* + * 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. + */ + +#ifdef KOALA_ANI + +#include +#include +#include +#include +#include +#include + +#include "ani.h" +#include "koala-types.h" +#include "interop-logging.h" +#include "interop-utils.h" + +#define CHECK_ANI_FATAL(result) \ +do { \ + ani_status ___res___ = (result); \ + if (___res___ != ANI_OK) { \ + INTEROP_FATAL("ANI function failed (status: %d) at " __FILE__ ": %d", ___res___, __LINE__); \ + } \ +} \ +while (0) + +template +struct InteropTypeConverter { + using InteropType = T; + static T convertFrom(ani_env* env, InteropType value) = delete; + static InteropType convertTo(ani_env* env, T value) = delete; + static void release(ani_env* env, InteropType value, T converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_byte; + static inline KByte convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KByte value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KByte converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_boolean; + static inline KBoolean convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KBoolean value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KBoolean converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_int; + static inline KInt convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KInt value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KInt converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_int; + static inline KUInt convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KUInt value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KUInt converted) {} +}; + + +template<> +struct InteropTypeConverter { + using InteropType = ani_float; + static inline KFloat convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KFloat value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KFloat converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_double; + static inline KDouble convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KDouble value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KDouble converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_long; + static inline KLong convertFrom(ani_env* env, InteropType value) { + return value; + } + static inline InteropType convertTo(ani_env* env, KLong value) { + return value; + } + static inline void release(ani_env* env, InteropType value, KLong converted) {} +}; + + +template<> +struct InteropTypeConverter { + using InteropType = ani_object; + static inline KVMObjectHandle convertFrom(ani_env* env, InteropType value) { + return reinterpret_cast(value); + } + static inline InteropType convertTo(ani_env* env, KVMObjectHandle value) { + return reinterpret_cast(value); + } + static inline void release(ani_env* env, InteropType value, KVMObjectHandle converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_arraybuffer; + static inline KInteropBuffer convertFrom(ani_env* env, InteropType value) { + void* data {}; + size_t len {}; + CHECK_ANI_FATAL(env->ArrayBuffer_GetInfo(value, &data, &len)); + return {static_cast(len), data, 0, nullptr}; + } + + static inline InteropType convertTo(ani_env* env, KInteropBuffer value) { + void* data {}; + ani_arraybuffer result; + CHECK_ANI_FATAL(env->CreateArrayBuffer(value.length, &data, &result)); + interop_memcpy(data, value.length, value.data, value.length); + value.dispose(value.resourceId); + return result; + } + static inline void release(ani_env* env, InteropType value, KInteropBuffer converted) { + if (converted.dispose) { + converted.dispose(converted.resourceId); + } + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_long; + static KSerializerBuffer convertFrom(ani_env* env, InteropType value) { + return reinterpret_cast(static_cast(value)); + } + static InteropType convertTo(ani_env* env, KSerializerBuffer value) = delete; + static inline void release(ani_env* env, InteropType value, KSerializerBuffer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_fixedarray_byte; + static inline KInteropReturnBuffer convertFrom(ani_env* env, InteropType value) = delete; + static inline InteropType convertTo(ani_env* env, KInteropReturnBuffer value) { + ani_fixedarray_byte result; + CHECK_ANI_FATAL(env->FixedArray_New_Byte(value.length, &result)); + CHECK_ANI_FATAL(env->FixedArray_SetRegion_Byte(result, 0, value.length, reinterpret_cast(value.data))); + value.dispose(value.data, value.length); + return result; + }; + static inline void release(ani_env* env, InteropType value, KInteropReturnBuffer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_string; + static KStringPtr convertFrom(ani_env* env, InteropType value) { + if (value == nullptr) return KStringPtr(); + KStringPtr result; + // Notice that we use UTF length for buffer size, but counter is expressed in number of Unicode chars. + ani_size lengthUtf8 = 0; + CHECK_ANI_FATAL(env->String_GetUTF8Size(value, &lengthUtf8)); + result.resize(lengthUtf8); + ani_size count = 0; + CHECK_ANI_FATAL(env->String_GetUTF8SubString(value, 0, lengthUtf8, result.data(), lengthUtf8 + 1, &count)); + result.data()[lengthUtf8] = 0; + return result; + } + static InteropType convertTo(ani_env* env, const KStringPtr& value) { + ani_string result = nullptr; + int length = value.length(); + CHECK_ANI_FATAL(env->String_NewUTF8(value.c_str(), length > 0 ? length - 1 /* drop zero terminator */ : 0, &result)); + return result; + } + static void release(ani_env* env, InteropType value, const KStringPtr& converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_long; + static KNativePointer convertFrom(ani_env* env, InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(ani_env* env, KNativePointer value) { + return reinterpret_cast(value); + } + static void release(ani_env* env, InteropType value, KNativePointer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_array_int; + static KInt* convertFrom(ani_env* env, InteropType value) { + if (!value) return nullptr; + ani_size length = 0; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + KInt* data = new KInt[length]; + CHECK_ANI_FATAL(env->Array_GetRegion_Int(value, 0, length, (ani_int*)data)); + return data; + } + static InteropType convertTo(ani_env* env, KInt* value) = delete; + static void release(ani_env* env, InteropType value, KInt* converted) { + if (converted) { + ani_size length = 0; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + CHECK_ANI_FATAL(env->Array_SetRegion_Int(value, 0, length, (ani_int*)converted)); + } + delete [] converted; + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_array_float; + static KFloat* convertFrom(ani_env* env, InteropType value) { + if (!value) return nullptr; + ani_size length = 0; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + KFloat* data = new KFloat[length]; + CHECK_ANI_FATAL(env->Array_GetRegion_Float(value, 0, length, (ani_float*)data)); + return data; + } + static InteropType convertTo(ani_env* env, KFloat* value) = delete; + static void release(ani_env* env, InteropType value, KFloat* converted) { + if (converted) { + ani_size length = 0; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + CHECK_ANI_FATAL(env->Array_SetRegion_Float(value, 0, length, (ani_float*)converted)); + } + delete [] converted; + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = ani_array_byte; + static KByte* convertFrom(ani_env* env, InteropType value) { + if (!value) return nullptr; + ani_size length = 0; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + KByte* data = new KByte[length]; + if (length > 0) { + CHECK_ANI_FATAL(env->Array_GetRegion_Byte(value, 0, length, (ani_byte*)data)); + } + return data; + } + static InteropType convertTo(ani_env* env, KByte* value) = delete; + static void release(ani_env* env, InteropType value, KByte* converted) { + if (converted) { + ani_size length = 0; + CHECK_ANI_FATAL(env->Array_GetLength(value, &length)); + if (length > 0) { + CHECK_ANI_FATAL(env->Array_SetRegion_Byte(value, 0, length, (ani_byte*)converted)); + } + } + delete[] converted; + } +}; + +template <> struct InteropTypeConverter { + using InteropType = ani_double; + static KInteropNumber convertFrom(ani_env *env, InteropType value) { + return KInteropNumber::fromDouble(value); + } + static InteropType convertTo(ani_env *env, KInteropNumber value) { + return value.asDouble(); + } + static void release(ani_env *env, InteropType value, + KInteropNumber converted) {} +}; + +template +inline typename InteropTypeConverter::InteropType makeResult(ani_env* env, Type value) { + return InteropTypeConverter::convertTo(env, value); +} + +template +inline Type getArgument(ani_env* env, typename InteropTypeConverter::InteropType arg) { + return InteropTypeConverter::convertFrom(env, arg); +} + +template +inline void releaseArgument(ani_env* env, typename InteropTypeConverter::InteropType arg, Type& data) { + InteropTypeConverter::release(env, arg, data); +} + +template +struct DirectInteropTypeConverter { + using InteropType = T; + static T convertFrom(InteropType value) { return value; } + static InteropType convertTo(T value) { return value; } +}; + +template<> +struct DirectInteropTypeConverter { + using InteropType = ani_long; + static KNativePointer convertFrom(InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(KNativePointer value) { + return reinterpret_cast(value); + } +}; + +template<> +struct DirectInteropTypeConverter { + using InteropType = ani_long; + static KSerializerBuffer convertFrom(InteropType value) { + return reinterpret_cast(static_cast(value)); + } + static InteropType convertTo(KSerializerBuffer value) = delete; +}; + +template <> +struct DirectInteropTypeConverter { + using InteropType = ani_double; + static KInteropNumber convertFrom(InteropType value) { + return KInteropNumber::fromDouble(value); + } + static InteropType convertTo(KInteropNumber value) { + return value.asDouble(); + } +}; + +#define ANI_SLOW_NATIVE_FLAG 1 + +class AniExports { + std::unordered_map>> implementations; + std::unordered_map classpaths; + +public: + static AniExports* getInstance(); + + std::vector getModules(); + void addMethod(const char* module, const char* name, const char* type, void* impl, int flags); + const std::vector>& getMethods(const std::string& module); + + void setClasspath(const char* module, const char* classpath); + const std::string& getClasspath(const std::string& module); +}; + +#define KOALA_QUOTE0(x) #x +#define KOALA_QUOTE(x) KOALA_QUOTE0(x) + +#ifdef _MSC_VER +#define MAKE_ANI_EXPORT(module, name, type, flag) \ + static void __init_##name() { \ + AniExports::getInstance()->addMethod(KOALA_QUOTE(module), "_"#name, type, reinterpret_cast(Ani_##name), flag); \ + } \ + namespace { \ + struct __Init_##name { \ + __Init_##name() { __init_##name(); } \ + } __Init_##name##_v; \ + } +#define KOALA_ANI_INTEROP_MODULE_CLASSPATH(module, classpath) \ + static void __init_classpath_##module() { \ + AniExports::getInstance()->setClasspath(KOALA_QUOTE(module), "L" classpath ";"); \ + } \ + namespace { \ + struct __Init_classpath_##module { \ + __Init_classpath_##module() { __init_classpath_##module(); } \ + } __Init_classpath_##module##_v; \ + } +#else +#define MAKE_ANI_EXPORT(module, name, type, flag) \ + __attribute__((constructor)) \ + static void __init_ani_##name() { \ + AniExports::getInstance()->addMethod(KOALA_QUOTE(module), "_"#name, type, reinterpret_cast(Ani_##name), flag); \ + } +#define KOALA_ANI_INTEROP_MODULE_CLASSPATH(module, classpath) \ + __attribute__((constructor)) \ + static void __init_ani_classpath_##module() { \ + AniExports::getInstance()->setClasspath(KOALA_QUOTE(module), "L" classpath ";"); \ + } +#endif + +#define KOALA_INTEROP_0(name, Ret) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz) { \ + KOALA_MAYBE_LOG(name) \ + return makeResult(env, impl_##name()); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret, 0) + +#define KOALA_INTEROP_1(name, Ret, P0) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + auto rv = makeResult(env, impl_##name(p0)); \ + releaseArgument(env, _p0, p0); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0, 0) + +#define KOALA_INTEROP_2(name, Ret, P0, P1) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + auto rv = makeResult(env, impl_##name(p0, p1)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1, 0) + +#define KOALA_INTEROP_3(name, Ret, P0, P1, P2) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2, 0) + +#define KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) + +#define KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) + +#define KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) \ +InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) + +#define KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) + +#define KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) + +#define KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + return rv; \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) + +#define KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) + +#define KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) + +#define KOALA_INTEROP_12(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11, 0) + +#define KOALA_INTEROP_13(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + return rv; \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12, 0) + +#define KOALA_INTEROP_14(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + P13 p13 = getArgument(env, _p13); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + releaseArgument(env, _p13, p13); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12 "|" #P13, 0) + +#define KOALA_INTEROP_V0(name) \ + void Ani_##name(ani_env *env, ani_class clazz) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void", 0) + +#define KOALA_INTEROP_V1(name, P0) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + impl_##name(p0); \ + releaseArgument(env, _p0, p0); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0, 0) + +#define KOALA_INTEROP_V2(name, P0, P1) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + impl_##name(p0, p1); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1, 0) + +#define KOALA_INTEROP_V3(name, P0, P1, P2) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + impl_##name(p0, p1, p2); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2, 0) + +#define KOALA_INTEROP_V4(name, P0, P1, P2, P3) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + impl_##name(p0, p1, p2, p3); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ +} \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) + +#define KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + impl_##name(p0, p1, p2, p3, p4); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ +} \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) + +#define KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + impl_##name(p0, p1, p2, p3, p4, p5); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) + +#define KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) + +#define KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) + +#define KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) + +#define KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ +} \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) + +#define KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) + +#define KOALA_INTEROP_V12(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ +} \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11, 0) + +#define KOALA_INTEROP_V13(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ +} \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12, 0) + +#define KOALA_INTEROP_V14(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + P13 p13 = getArgument(env, _p13); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + releaseArgument(env, _p13, p13); \ +} \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12 "|" #P13, 0) + +#define KOALA_INTEROP_V15(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13, \ + InteropTypeConverter::InteropType _p14) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + P13 p13 = getArgument(env, _p13); \ + P14 p14 = getArgument(env, _p14); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + releaseArgument(env, _p13, p13); \ + releaseArgument(env, _p14, p14); \ +} \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12 "|" #P13 "|" #P14, 0) + +#define KOALA_INTEROP_CTX_0(name, Ret) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz) { \ + KOALA_MAYBE_LOG(name) \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx)); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret, ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_1(name, Ret, P0) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx, p0)); \ + releaseArgument(env, _p0, p0); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0, ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_2(name, Ret, P0, P1) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx, p0, p1)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1, ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_3(name, Ret, P0, P1, P2) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx, p0, p1, p2)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2, ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_4(name, Ret, P0, P1, P2, P3) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx, p0, p1, p2, p3)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3, ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_5(name, Ret, P0, P1, P2, P3, P4) \ + InteropTypeConverter::InteropType Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx, p0, p1, p2, p3, p4)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + return rv; \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V0(name) \ + void Ani_##name(ani_env *env, ani_class clazz) { \ + KOALA_MAYBE_LOG(name) \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void", ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V1(name, P0) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0); \ + releaseArgument(env, _p0, p0); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0, ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V2(name, P0, P1) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1, ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V3(name, P0, P1, P2) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1, p2); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2, ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V4(name, P0, P1, P2, P3) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1, p2, p3); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3, ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V5(name, P0, P1, P2, P3, P4) \ + void Ani_##name(ani_env *env, ani_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1, p2, p3, p4); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + } \ +MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, ANI_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_DIRECT_0(name, Ret) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name()); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret, 0) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0, 0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1, 0) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2, 0) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + inline InteropTypeConverter::InteropType Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9, \ + InteropTypeConverter::InteropType p10 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9), DirectInteropTypeConverter::convertFrom(p10))); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) +#define KOALA_INTEROP_DIRECT_V0(name) \ + inline void Ani_##name( \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void", 0) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0, 0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1, 0) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2, 0) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + inline void Ani_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9, \ + InteropTypeConverter::InteropType p10 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9), DirectInteropTypeConverter::convertFrom(p10)); \ + } \ + MAKE_ANI_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) + +bool setKoalaANICallbackDispatcher( + ani_env* ani_env, + ani_class clazz, + const char* dispatcherMethodName, + const char* dispactherMethodSig +); +void getKoalaANICallbackDispatcher(ani_class* clazz, ani_static_method* method); +ani_env* getKoalaANIContext(void* hint); + +// Improve: maybe use CreateArrayBufferExternal here instead, no need for allocations. +#define KOALA_INTEROP_CALL_VOID(venv, id, length, args) \ +{ \ + ani_class clazz = nullptr; \ + ani_static_method method = nullptr; \ + getKoalaANICallbackDispatcher(&clazz, &method); \ + ani_env* env = getKoalaANIContext(venv); \ + ani_int result = 0; \ + long long args_casted = reinterpret_cast(args); \ + CHECK_ANI_FATAL(env->Class_CallStaticMethod_Int(clazz, method, &result, id, args_casted, length)); \ +} + +#define KOALA_INTEROP_CALL_INT(venv, id, length, args) \ +{ \ + ani_class clazz = nullptr; \ + ani_static_method method = nullptr; \ + getKoalaANICallbackDispatcher(&clazz, &method); \ + ani_env* env = getKoalaANIContext(venv); \ + ani_int result = 0; \ + long long args_casted = reinterpret_cast(args); \ + CHECK_ANI_FATAL(env->Class_CallStaticMethod_Int(clazz, method, &result, id, args_casted, length)); \ + return result; \ +} + +#define KOALA_INTEROP_CALL_VOID_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_VOID(venv, id, (argc) * sizeof(int32_t), args) +#define KOALA_INTEROP_CALL_INT_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_INT(venv, id, (argc) * sizeof(int32_t), args) + +#define KOALA_INTEROP_THROW(vmContext, object, ...) \ + do { \ + ani_env* env = reinterpret_cast(vmContext); \ + CHECK_ANI_FATAL(env->ThrowError(object)); \ + return __VA_ARGS__; \ + } while (0) + +#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ + do { \ + ani_env* env = reinterpret_cast(vmContext); \ + ani_class errorClass {}; \ + CHECK_ANI_FATAL(env->FindClass("escompat.Error", &errorClass)); \ + ani_method errorCtor {}; \ + CHECK_ANI_FATAL(env->Class_FindMethod(errorClass, "", \ + "C{std.core.String}C{escompat.ErrorOptions}:", &errorCtor)); \ + ani_string messageObject{}; \ + CHECK_ANI_FATAL(env->String_NewUTF8(message, interop_strlen(message), &messageObject)); \ + ani_ref undefined{}; \ + CHECK_ANI_FATAL(env->GetUndefined(&undefined)); \ + ani_object throwObject{}; \ + CHECK_ANI_FATAL(env->Object_New(errorClass, errorCtor, &throwObject, messageObject, undefined)); \ + CHECK_ANI_FATAL(env->ThrowError(static_cast(throwObject))); \ + return __VA_ARGS__; \ + } while (0) + +#endif // KOALA_ANI diff --git a/koala_tools/interop/src/cpp/ani/panda/ani.h b/koala_tools/interop/src/cpp/ani/panda/ani.h new file mode 100644 index 0000000000000000000000000000000000000000..2b88b1a115990814ebb1790ae176bde63ef79535 --- /dev/null +++ b/koala_tools/interop/src/cpp/ani/panda/ani.h @@ -0,0 +1,8302 @@ +/** + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __ANI_H__ +#define __ANI_H__ +// NOLINTBEGIN + +#ifdef __cplusplus +#include +#include +#include +#else +#include +#include +#include +#endif + +#define ANI_VERSION_1 1 + +#define ANI_FALSE 0 +#define ANI_TRUE 1 + +// Logger interface: +// typedef void (*ani_logger)(FILE *stream, int log_level, const char *component, const char *message); +// ani_option: +// 'option': "--logger" +// 'extra': ani_logger +// where 'log_level' can have the following values: +#define ANI_LOGLEVEL_FATAL 0 +#define ANI_LOGLEVEL_ERROR 1 +#define ANI_LOGLEVEL_WARNING 2 +#define ANI_LOGLEVEL_INFO 3 +#define ANI_LOGLEVEL_DEBUG 4 + +typedef size_t ani_size; + +// Primitive types: +typedef uint8_t ani_boolean; +typedef uint16_t ani_char; +typedef int8_t ani_byte; +typedef int16_t ani_short; +typedef int32_t ani_int; +typedef int64_t ani_long; +typedef float ani_float; +typedef double ani_double; + +// Reference types: +#ifdef __cplusplus +class __ani_ref {}; +class __ani_module : public __ani_ref {}; +class __ani_namespace : public __ani_ref {}; +class __ani_object : public __ani_ref {}; +class __ani_fn_object : public __ani_object {}; +class __ani_enum_item : public __ani_object {}; +class __ani_error : public __ani_object {}; +class __ani_tuple_value : public __ani_object {}; +class __ani_type : public __ani_object {}; +class __ani_arraybuffer : public __ani_object {}; +class __ani_string : public __ani_object {}; +class __ani_class : public __ani_type {}; +class __ani_enum : public __ani_type {}; +class __ani_array : public __ani_object {}; +class __ani_array_boolean : public __ani_array {}; +class __ani_array_char : public __ani_array {}; +class __ani_array_byte : public __ani_array {}; +class __ani_array_short : public __ani_array {}; +class __ani_array_int : public __ani_array {}; +class __ani_array_long : public __ani_array {}; +class __ani_array_float : public __ani_array {}; +class __ani_array_double : public __ani_array {}; +class __ani_array_ref : public __ani_array {}; +class __ani_fixedarray : public __ani_object {}; +class __ani_fixedarray_boolean : public __ani_fixedarray {}; +class __ani_fixedarray_char : public __ani_fixedarray {}; +class __ani_fixedarray_byte : public __ani_fixedarray {}; +class __ani_fixedarray_short : public __ani_fixedarray {}; +class __ani_fixedarray_int : public __ani_fixedarray {}; +class __ani_fixedarray_long : public __ani_fixedarray {}; +class __ani_fixedarray_float : public __ani_fixedarray {}; +class __ani_fixedarray_double : public __ani_fixedarray {}; +class __ani_fixedarray_ref : public __ani_fixedarray {}; +typedef __ani_ref *ani_ref; +typedef __ani_module *ani_module; +typedef __ani_namespace *ani_namespace; +typedef __ani_object *ani_object; +typedef __ani_fn_object *ani_fn_object; +typedef __ani_enum_item *ani_enum_item; +typedef __ani_error *ani_error; +typedef __ani_tuple_value *ani_tuple_value; +typedef __ani_type *ani_type; +typedef __ani_arraybuffer *ani_arraybuffer; +typedef __ani_string *ani_string; +typedef __ani_class *ani_class; +typedef __ani_enum *ani_enum; +typedef __ani_array *ani_array; +typedef __ani_array_boolean *ani_array_boolean; +typedef __ani_array_char *ani_array_char; +typedef __ani_array_byte *ani_array_byte; +typedef __ani_array_short *ani_array_short; +typedef __ani_array_int *ani_array_int; +typedef __ani_array_long *ani_array_long; +typedef __ani_array_float *ani_array_float; +typedef __ani_array_double *ani_array_double; +typedef __ani_array_ref *ani_array_ref; +typedef __ani_fixedarray *ani_fixedarray; +typedef __ani_fixedarray_boolean *ani_fixedarray_boolean; +typedef __ani_fixedarray_char *ani_fixedarray_char; +typedef __ani_fixedarray_byte *ani_fixedarray_byte; +typedef __ani_fixedarray_short *ani_fixedarray_short; +typedef __ani_fixedarray_int *ani_fixedarray_int; +typedef __ani_fixedarray_long *ani_fixedarray_long; +typedef __ani_fixedarray_float *ani_fixedarray_float; +typedef __ani_fixedarray_double *ani_fixedarray_double; +typedef __ani_fixedarray_ref *ani_fixedarray_ref; +#else // __cplusplus +struct __ani_ref; +typedef struct __ani_ref *ani_ref; +typedef ani_ref ani_module; +typedef ani_ref ani_namespace; +typedef ani_ref ani_object; +typedef ani_object ani_fn_object; +typedef ani_object ani_enum_item; +typedef ani_object ani_error; +typedef ani_object ani_tuple_value; +typedef ani_object ani_type; +typedef ani_object ani_arraybuffer; +typedef ani_object ani_string; +typedef ani_type ani_class; +typedef ani_type ani_enum; +typedef ani_object ani_array; +typedef ani_array ani_array_boolean; +typedef ani_array ani_array_char; +typedef ani_array ani_array_byte; +typedef ani_array ani_array_short; +typedef ani_array ani_array_int; +typedef ani_array ani_array_long; +typedef ani_array ani_array_float; +typedef ani_array ani_array_double; +typedef ani_array ani_array_ref; +typedef ani_object ani_fixedarray; +typedef ani_fixedarray ani_fixedarray_boolean; +typedef ani_fixedarray ani_fixedarray_char; +typedef ani_fixedarray ani_fixedarray_byte; +typedef ani_fixedarray ani_fixedarray_short; +typedef ani_fixedarray ani_fixedarray_int; +typedef ani_fixedarray ani_fixedarray_long; +typedef ani_fixedarray ani_fixedarray_float; +typedef ani_fixedarray ani_fixedarray_double; +typedef ani_fixedarray ani_fixedarray_ref; +#endif // __cplusplus + +struct __ani_wref; +typedef struct __ani_wref *ani_wref; + +struct __ani_variable; +typedef struct __ani_variable *ani_variable; + +struct __ani_function; +typedef struct __ani_function *ani_function; + +struct __ani_field; +typedef struct __ani_field *ani_field; + +struct __ani_static_field; +typedef struct __ani_satic_field *ani_static_field; + +struct __ani_method; +typedef struct __ani_method *ani_method; + +struct __ani_static_method; +typedef struct __ani_static_method *ani_static_method; + +struct __ani_resolver; +typedef struct __ani_resolver *ani_resolver; + +typedef union { + ani_boolean z; + ani_char c; + ani_byte b; + ani_short s; + ani_int i; + ani_long l; + ani_float f; + ani_double d; + ani_ref r; +} ani_value; + +typedef struct { + const char *name; + const char *signature; + const void *pointer; +} ani_native_function; + +#ifdef __cplusplus +typedef struct __ani_vm ani_vm; +typedef struct __ani_env ani_env; +#else +typedef const struct __ani_vm_api *ani_vm; +typedef const struct __ani_interaction_api *ani_env; +#endif + +typedef enum { + ANI_OK, + ANI_ERROR, + ANI_INVALID_ARGS, + ANI_INVALID_TYPE, + ANI_INVALID_DESCRIPTOR, + ANI_INCORRECT_REF, + ANI_PENDING_ERROR, + ANI_NOT_FOUND, + ANI_ALREADY_BINDED, + ANI_OUT_OF_REF, + ANI_OUT_OF_MEMORY, + ANI_OUT_OF_RANGE, + ANI_BUFFER_TO_SMALL, + ANI_INVALID_VERSION, + ANI_AMBIGUOUS, + // NOTE: Add necessary status codes +} ani_status; + +typedef struct { + const char *option; + void *extra; +} ani_option; + +typedef struct { + size_t nr_options; + const ani_option *options; +} ani_options; + +struct __ani_vm_api { + void *reserved0; + void *reserved1; + void *reserved2; + void *reserved3; + + ani_status (*DestroyVM)(ani_vm *vm); + ani_status (*GetEnv)(ani_vm *vm, uint32_t version, ani_env **result); + ani_status (*AttachCurrentThread)(ani_vm *vm, const ani_options *options, uint32_t version, ani_env **result); + ani_status (*DetachCurrentThread)(ani_vm *vm); +}; + +#define ANI_EXPORT __attribute__((visibility("default"))) + +#ifdef __cplusplus +extern "C" { +#endif + +ANI_EXPORT ani_status ANI_CreateVM(const ani_options *options, uint32_t version, ani_vm **result); +ANI_EXPORT ani_status ANI_GetCreatedVMs(ani_vm **vms_buffer, ani_size vms_buffer_length, ani_size *result); + +// Prototypes of exported functions for a shared library. +ANI_EXPORT ani_status ANI_Constructor(ani_vm *vm, uint32_t *result); +ANI_EXPORT ani_status ANI_Destructor(ani_vm *vm); + +#ifdef __cplusplus +} +#endif + +struct __ani_interaction_api { + void *reserved0; + void *reserved1; + void *reserved2; + void *reserved3; + + /** + * @brief Retrieves the version information. + * + * This function retrieves the version information and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[out] result A pointer to a variable where the version information will be stored. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*GetVersion)(ani_env *env, uint32_t *result); + + /** + * @brief Retrieves the Virtual Machine (VM) instance. + * + * This function retrieves the VM instance and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[out] result A pointer to the VM instance to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*GetVM)(ani_env *env, ani_vm **result); + + /** + * @brief Creates a new object of a specified class using a constructor method. + * + * This function creates a new object of the given class and calls the specified constructor method with variadic + * arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class of the object to create. + * @param[in] method The constructor method to invoke. + * @param[in] ... Variadic arguments to pass to the constructor method. + * @param[out] result A pointer to store the object return value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_New)(ani_env *env, ani_class cls, ani_method method, ani_object *result, ...); + + /** + * @brief Creates a new object of a specified class using a constructor method (array-based). + * + * This function creates a new object of the given class and calls the specified constructor method with arguments + * provided in an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class of the object to create. + * @param[in] method The constructor method to invoke. + * @param[in] args An array of arguments to pass to the constructor method. + * @param[out] result A pointer to store the object return value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_New_A)(ani_env *env, ani_class cls, ani_method method, ani_object *result, + const ani_value *args); + + /** + * @brief Creates a new object of a specified class using a constructor method (variadic arguments). + * + * This function creates a new object of the given class and calls the specified constructor method with a `va_list` + * of arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class of the object to create. + * @param[in] method The constructor method to invoke. + * @param[in] args A `va_list` of arguments to pass to the constructor method. + * @param[out] result A pointer to store the object return value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_New_V)(ani_env *env, ani_class cls, ani_method method, ani_object *result, va_list args); + + /** + * @brief Retrieves the type of a given object. + * + * This function retrieves the type of the specified object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object whose type is to be retrieved. + * @param[out] result A pointer to store the retrieved type. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetType)(ani_env *env, ani_object object, ani_type *result); + + /** + * @brief Checks if an object is an instance of a specified type. + * + * This function checks whether the given object is an instance of the specified type. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object to check. + * @param[in] type The type to compare against. + * @param[out] result A pointer to store the boolean result (true if the object is an instance of the type, false + * otherwise). + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_InstanceOf)(ani_env *env, ani_object object, ani_type type, ani_boolean *result); + + /** + * @brief Retrieves the superclass of a specified type. + * + * This function retrieves the superclass of a given type and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] type The type for which to retrieve the superclass. + * @param[out] result A pointer to the superclass to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Type_GetSuperClass)(ani_env *env, ani_type type, ani_class *result); + + /** + * @brief Determines if one type is assignable from another. + * + * This function checks if a type is assignable from another and stores the result in the output parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] from_type The source type. + * @param[in] to_type The target type. + * @param[out] result A pointer to a boolean indicating assignability. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Type_IsAssignableFrom)(ani_env *env, ani_type from_type, ani_type to_type, ani_boolean *result); + + /** + * @brief Finds a module by its descriptor. + * + * This function locates a module based on its descriptor and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] module_descriptor The descriptor of the module to find. + * @param[out] result A pointer to the module to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FindModule)(ani_env *env, const char *module_descriptor, ani_module *result); + + /** + * @brief Finds a namespace by its descriptor. + * + * This function locates a namespace based on its descriptor and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] namespace_descriptor The descriptor of the namespace to find. + * @param[out] result A pointer to the namespace to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FindNamespace)(ani_env *env, const char *namespace_descriptor, ani_namespace *result); + + /** + * @brief Finds a class by its descriptor. + * + * This function locates a class based on its descriptor and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] class_descriptor The descriptor of the class to find. + * @param[out] result A pointer to the class to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FindClass)(ani_env *env, const char *class_descriptor, ani_class *result); + + /** + * @brief Finds an enum by its descriptor. + * + * This function locates an enum based on its descriptor and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] enum_descriptor The descriptor of the enum to find. + * @param[out] result A pointer to the enum to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FindEnum)(ani_env *env, const char *enum_descriptor, ani_enum *result); + + /** + * @brief Finds a namespace within a module by its descriptor. + * + * This function locates a namespace within the specified module based on its descriptor. + * + * @param[in] env A pointer to the environment structure. + * @param[in] module The module to search within. + * @param[in] namespace_descriptor The descriptor of the namespace to find. + * @param[out] result A pointer to the namespace object. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Module_FindNamespace)(ani_env *env, ani_module module, const char *namespace_descriptor, + ani_namespace *result); + + /** + * @brief Finds a class within a module by its descriptor. + * + * This function locates a class within the specified module based on its descriptor. + * + * @param[in] env A pointer to the environment structure. + * @param[in] module The module to search within. + * @param[in] class_descriptor The descriptor of the class to find. + * @param[out] result A pointer to the class object. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Module_FindClass)(ani_env *env, ani_module module, const char *class_descriptor, ani_class *result); + + /** + * @brief Finds an enum within a module by its descriptor. + * + * This function locates an enum within the specified module based on its descriptor. + * + * @param[in] env A pointer to the environment structure. + * @param[in] module The module to search within. + * @param[in] enum_descriptor The descriptor of the enum to find. + * @param[out] result A pointer to the enum object. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Module_FindEnum)(ani_env *env, ani_module module, const char *enum_descriptor, ani_enum *result); + + /** + * @brief Finds a function within a module by its name and signature. + * + * This function locates a function within the specified module based on its name and signature. + * + * @param[in] env A pointer to the environment structure. + * @param[in] module The module to search within. + * @param[in] name The name of the function to find. + * @param[in] signature The signature of the function to find. + * @param[out] result A pointer to the function object. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Module_FindFunction)(ani_env *env, ani_module module, const char *name, const char *signature, + ani_function *result); + + /** + * @brief Finds a variable within a module by its name. + * + * This function locates a variable within the specified module based on its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] module The module to search within. + * @param[in] name The name of the variable to find. + * @param[out] result A pointer to the variable object. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Module_FindVariable)(ani_env *env, ani_module module, const char *name, ani_variable *result); + + /** + * @brief Finds a namespace within another namespace by its descriptor. + * + * This function locates a namespace within the specified parent namespace based on its descriptor. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ns The parent namespace to search within. + * @param[in] namespace_descriptor The descriptor of the namespace to find. + * @param[out] result A pointer to the namespace object. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Namespace_FindNamespace)(ani_env *env, ani_namespace ns, const char *namespace_descriptor, + ani_namespace *result); + + /** + * @brief Finds a class within a namespace by its descriptor. + * + * This function locates a class within the specified namespace based on its descriptor. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ns The namespace to search within. + * @param[in] class_descriptor The descriptor of the class to find. + * @param[out] result A pointer to the class object. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Namespace_FindClass)(ani_env *env, ani_namespace ns, const char *class_descriptor, ani_class *result); + + /** + * @brief Finds an enum within a namespace by its descriptor. + * + * This function locates an enum within the specified namespace based on its descriptor. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ns The namespace to search within. + * @param[in] enum_descriptor The descriptor of the enum to find. + * @param[out] result A pointer to the enum object. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Namespace_FindEnum)(ani_env *env, ani_namespace ns, const char *enum_descriptor, ani_enum *result); + + /** + * @brief Finds a function within a namespace by its name and signature. + * + * This function locates a function within the specified namespace based on its name and signature. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ns The namespace to search within. + * @param[in] name The name of the function to find. + * @param[in] signature The signature of the function to find. + * @param[out] result A pointer to the function object. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Namespace_FindFunction)(ani_env *env, ani_namespace ns, const char *name, const char *signature, + ani_function *result); + + /** + * @brief Finds a variable within a namespace by its name. + * + * This function locates a variable within the specified namespace based on its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ns The namespace to search within. + * @param[in] name The name of the variable to find. + * @param[out] result A pointer to the variable object. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Namespace_FindVariable)(ani_env *env, ani_namespace ns, const char *name, ani_variable *result); + + /** + * @brief Binds native functions to a module. + * + * This function binds an array of native functions to the specified module. + * + * @param[in] env A pointer to the environment structure. + * @param[in] module The module to which the native functions will be bound. + * @param[in] functions A pointer to an array of native functions to bind. + * @param[in] nr_functions The number of native functions in the array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Module_BindNativeFunctions)(ani_env *env, ani_module module, const ani_native_function *functions, + ani_size nr_functions); + + /** + * @brief Binds native functions to a namespace. + * + * This function binds an array of native functions to the specified namespace. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ns The namespace to which the native functions will be bound. + * @param[in] functions A pointer to an array of native functions to bind. + * @param[in] nr_functions The number of native functions in the array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Namespace_BindNativeFunctions)(ani_env *env, ani_namespace ns, const ani_native_function *functions, + ani_size nr_functions); + + /** + * @brief Binds native methods to a class. + * + * This function binds an array of native methods to the specified class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to which the native methods will be bound. + * @param[in] methods A pointer to an array of native methods to bind. + * @param[in] nr_methods The number of native methods in the array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_BindNativeMethods)(ani_env *env, ani_class cls, const ani_native_function *methods, + ani_size nr_methods); + + /** + * @brief Deletes a local reference. + * + * This function deletes a specified local reference to free up resources. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference to be deleted. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Reference_Delete)(ani_env *env, ani_ref ref); + + /** + * @brief Ensures enough local references are available. + * + * This function checks and ensures that the specified number of local references can be created. + * + * @param[in] env A pointer to the environment structure. + * @param[in] nr_refs The number of local references to ensure availability for. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*EnsureEnoughReferences)(ani_env *env, ani_size nr_refs); + + /** + * @brief Creates a new local scope for references. + * + * This function creates a local scope for references with a specified capacity. + * + * @param[in] env A pointer to the environment structure. + * @param[in] nr_refs The maximum number of references that can be created in this scope. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*CreateLocalScope)(ani_env *env, ani_size nr_refs); + + /** + * @brief Destroys the current local scope. + * + * This function destroys the current local scope and frees all references within it. + * + * @param[in] env A pointer to the environment structure. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*DestroyLocalScope)(ani_env *env); + + /** + * @brief Creates a new escape local scope. + * + * This function creates a local scope for references with escape functionality, allowing objects to escape this + * scope. + * + * @param[in] env A pointer to the environment structure. + * @param[in] nr_refs The maximum number of references that can be created in this scope. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*CreateEscapeLocalScope)(ani_env *env, ani_size nr_refs); + + /** + * @brief Destroys the current escape local scope. + * + * This function destroys the current escape local scope and allows escaping references to be retrieved. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference to be escaped from the current scope. + * @param[out] result A pointer to the resulting reference that has escaped the scope. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*DestroyEscapeLocalScope)(ani_env *env, ani_ref ref, ani_ref *result); + + /** + * @brief Throws an error. + * + * This function throws the specified error in the current environment. + * + * @param[in] env A pointer to the environment structure. + * @param[in] err The error to throw. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*ThrowError)(ani_env *env, ani_error err); + + /** + * @brief Checks if there are unhandled errors. + * + * This function determines if there are unhandled errors in the current environment. + * + * @param[in] env A pointer to the environment structure. + * @param[out] result A pointer to a boolean indicating if unhandled errors exist. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*ExistUnhandledError)(ani_env *env, ani_boolean *result); + + /** + * @brief Retrieves the current unhandled error. + * + * This function fetches the unhandled error in the environment. + * + * @param[in] env A pointer to the environment structure. + * @param[out] result A pointer to store the unhandled error. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*GetUnhandledError)(ani_env *env, ani_error *result); + + /** + * @brief Resets the current error state. + * + * This function clears the error state in the current environment. + * + * @param[in] env A pointer to the environment structure. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*ResetError)(ani_env *env); + + /** + * @brief Provides a description of the current error. + * + * This function prints the stack trace or other debug information for the current error. + * + * @param[in] env A pointer to the environment structure. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*DescribeError)(ani_env *env); // NOTE: Print stacktrace for debugging? + + /** + * @brief Aborts execution with a message. + * + * This function terminates execution with the specified error message. + * + * @param[in] env A pointer to the environment structure. + * @param[in] message The error message to display on termination. + * @return Does not return; the process terminates. + */ + ani_status (*Abort)(ani_env *env, const char *message); + + /** + * @brief Retrieves a null reference. + * + * This function provides a null reference in the specified result. + * + * @param[in] env A pointer to the environment structure. + * @param[out] result A pointer to store the null reference. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*GetNull)(ani_env *env, ani_ref *result); + + /** + * @brief Retrieves an undefined reference. + * + * This function provides an undefined reference in the specified result. + * + * @param[in] env A pointer to the environment structure. + * @param[out] result A pointer to store the undefined reference. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*GetUndefined)(ani_env *env, ani_ref *result); + + /** + * @brief Checks if a reference is null. + * + * This function determines if the specified reference is null. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference to check. + * @param[out] result A pointer to a boolean indicating if the reference is null. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Reference_IsNull)(ani_env *env, ani_ref ref, ani_boolean *result); + + /** + * @brief Checks if a reference is undefined. + * + * This function determines if the specified reference is undefined. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference to check. + * @param[out] result A pointer to a boolean indicating if the reference is undefined. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Reference_IsUndefined)(ani_env *env, ani_ref ref, ani_boolean *result); + + /** + * @brief Checks if a reference is nullish value (null or undefined). + * + * This function determines if the specified reference is either null or undefined. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference to check. + * @param[out] result A pointer to a boolean indicating if the reference is nullish value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Reference_IsNullishValue)(ani_env *env, ani_ref ref, ani_boolean *result); + + /** + * @brief Compares two references for equality. + * + * This function checks if two references are equal. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref0 The first reference to compare. + * @param[in] ref1 The second reference to compare. + * @param[out] result A pointer to a boolean indicating if the references are equal. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Reference_Equals)(ani_env *env, ani_ref ref0, ani_ref ref1, ani_boolean *result); + + /** + * @brief Compares two references for strict equality. + * + * This function checks if two references are strictly equal. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref0 The first reference to compare. + * @param[in] ref1 The second reference to compare. + * @param[out] result A pointer to a boolean indicating if the references are strictly equal. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Reference_StrictEquals)(ani_env *env, ani_ref ref0, ani_ref ref1, ani_boolean *result); + + /** + * @brief Creates a new UTF-16 string. + * + * This function creates a new string from the provided UTF-16 encoded data. + * + * @param[in] env A pointer to the environment structure. + * @param[in] utf16_string A pointer to the UTF-16 encoded string data. + * @param[in] utf16_size The size of the UTF-16 string in code units. + * @param[out] result A pointer to store the created string. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*String_NewUTF16)(ani_env *env, const uint16_t *utf16_string, ani_size utf16_size, ani_string *result); + + /** + * @brief Retrieves the size of a UTF-16 string. + * + * This function retrieves the size (in code units) of the specified UTF-16 string. + * + * @param[in] env A pointer to the environment structure. + * @param[in] string The UTF-16 string to measure. + * @param[out] result A pointer to store the size of the string. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*String_GetUTF16Size)(ani_env *env, ani_string string, ani_size *result); + + /** + * @brief Retrieves the UTF-16 encoded data of a string. + * + * This function copies the UTF-16 encoded data of the string into the provided buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] string The string to retrieve data from. + * @param[out] utf16_buffer A buffer to store the UTF-16 encoded data. + * @param[in] utf16_buffer_size The size of the buffer in code units. + * @param[out] result A pointer to store the number of code units written. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*String_GetUTF16)(ani_env *env, ani_string string, uint16_t *utf16_buffer, ani_size utf16_buffer_size, + ani_size *result); + + /** + * @brief Retrieves a substring of a UTF-16 string. + * + * This function copies a portion of the UTF-16 string into the provided buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] string The string to retrieve data from. + * @param[in] substr_offset The starting offset of the substring. + * @param[in] substr_size The size of the substring in code units. + * @param[out] utf16_buffer A buffer to store the substring. + * @param[in] utf16_buffer_size The size of the buffer in code units. + * @param[out] result A pointer to store the number of code units written. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*String_GetUTF16SubString)(ani_env *env, ani_string string, ani_size substr_offset, + ani_size substr_size, uint16_t *utf16_buffer, ani_size utf16_buffer_size, + ani_size *result); + + /** + * @brief Creates a new UTF-8 string. + * + * This function creates a new string from the provided UTF-8 encoded data. + * + * @param[in] env A pointer to the environment structure. + * @param[in] utf8_string A pointer to the UTF-8 encoded string data. + * @param[in] utf8_size The size of the UTF-8 string in bytes. + * @param[out] result A pointer to store the created string. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*String_NewUTF8)(ani_env *env, const char *utf8_string, ani_size utf8_size, ani_string *result); + + /** + * @brief Retrieves the size of a UTF-8 string. + * + * This function retrieves the size (in bytes) of the specified UTF-8 string. + * + * @param[in] env A pointer to the environment structure. + * @param[in] string The UTF-8 string to measure. + * @param[out] result A pointer to store the size of the string. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*String_GetUTF8Size)(ani_env *env, ani_string string, ani_size *result); + + /** + * @brief Retrieves the UTF-8 encoded data of a string. + * + * This function copies the UTF-8 encoded data of the string into the provided buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] string The string to retrieve data from. + * @param[out] utf8_buffer A buffer to store the UTF-8 encoded data. + * @param[in] utf8_buffer_size The size of the buffer in bytes. + * @param[out] result A pointer to store the number of bytes written. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*String_GetUTF8)(ani_env *env, ani_string string, char *utf8_buffer, ani_size utf8_buffer_size, + ani_size *result); + + /** + * @brief Retrieves a substring of a UTF-8 string. + * + * This function copies a portion of the UTF-8 string into the provided buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] string The string to retrieve data from. + * @param[in] substr_offset The starting offset of the substring. + * @param[in] substr_size The size of the substring in bytes. + * @param[out] utf8_buffer A buffer to store the substring. + * @param[in] utf8_buffer_size The size of the buffer in bytes. + * @param[out] result A pointer to store the number of bytes written. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*String_GetUTF8SubString)(ani_env *env, ani_string string, ani_size substr_offset, ani_size substr_size, + char *utf8_buffer, ani_size utf8_buffer_size, ani_size *result); + + /** + * @brief Retrieves the length of an array. + * + * This function retrieves the length of the specified array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array whose length is to be retrieved. + * @param[out] result A pointer to store the length of the array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_GetLength)(ani_env *env, ani_array array, ani_size *result); + + /** + * @brief Creates a new array of booleans. + * + * This function creates a new array of the specified length for boolean values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the array to be created. + * @param[out] result A pointer to store the created array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_New_Boolean)(ani_env *env, ani_size length, ani_array_boolean *result); + + /** + * @brief Creates a new array of characters. + * + * This function creates a new array of the specified length for character values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the array to be created. + * @param[out] result A pointer to store the created array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_New_Char)(ani_env *env, ani_size length, ani_array_char *result); + + /** + * @brief Creates a new array of bytes. + * + * This function creates a new array of the specified length for byte values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the array to be created. + * @param[out] result A pointer to store the created array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_New_Byte)(ani_env *env, ani_size length, ani_array_byte *result); + + /** + * @brief Creates a new array of shorts. + * + * This function creates a new array of the specified length for short integer values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the array to be created. + * @param[out] result A pointer to store the created array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_New_Short)(ani_env *env, ani_size length, ani_array_short *result); + + /** + * @brief Creates a new array of integers. + * + * This function creates a new array of the specified length for integer values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the array to be created. + * @param[out] result A pointer to store the created array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_New_Int)(ani_env *env, ani_size length, ani_array_int *result); + + /** + * @brief Creates a new array of long integers. + * + * This function creates a new array of the specified length for long integer values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the array to be created. + * @param[out] result A pointer to store the created array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_New_Long)(ani_env *env, ani_size length, ani_array_long *result); + + /** + * @brief Creates a new array of floats. + * + * This function creates a new array of the specified length for float values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the array to be created. + * @param[out] result A pointer to store the created array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_New_Float)(ani_env *env, ani_size length, ani_array_float *result); + + /** + * @brief Creates a new array of doubles. + * + * This function creates a new array of the specified length for double values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the array to be created. + * @param[out] result A pointer to store the created array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_New_Double)(ani_env *env, ani_size length, ani_array_double *result); + + /** + * @brief Retrieves a region of boolean values from an array. + * + * This function retrieves a portion of the specified boolean array into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved boolean values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_GetRegion_Boolean)(ani_env *env, ani_array_boolean array, ani_size offset, ani_size length, + ani_boolean *native_buffer); + + /** + * @brief Retrieves a region of character values from an array. + * + * This function retrieves a portion of the specified character array into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved character values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_GetRegion_Char)(ani_env *env, ani_array_char array, ani_size offset, ani_size length, + ani_char *native_buffer); + + /** + * @brief Retrieves a region of byte values from an array. + * + * This function retrieves a portion of the specified byte array into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved byte values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_GetRegion_Byte)(ani_env *env, ani_array_byte array, ani_size offset, ani_size length, + ani_byte *native_buffer); + + /** + * @brief Retrieves a region of short values from an array. + * + * This function retrieves a portion of the specified short array into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved short values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_GetRegion_Short)(ani_env *env, ani_array_short array, ani_size offset, ani_size length, + ani_short *native_buffer); + + /** + * @brief Retrieves a region of integer values from an array. + * + * This function retrieves a portion of the specified integer array into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved integer values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_GetRegion_Int)(ani_env *env, ani_array_int array, ani_size offset, ani_size length, + ani_int *native_buffer); + + /** + * @brief Retrieves a region of long integer values from an array. + * + * This function retrieves a portion of the specified long integer array into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved long integer values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_GetRegion_Long)(ani_env *env, ani_array_long array, ani_size offset, ani_size length, + ani_long *native_buffer); + + /** + * @brief Retrieves a region of float values from an array. + * + * This function retrieves a portion of the specified float array into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved float values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_GetRegion_Float)(ani_env *env, ani_array_float array, ani_size offset, ani_size length, + ani_float *native_buffer); + + /** + * @brief Retrieves a region of double values from an array. + * + * This function retrieves a portion of the specified double array into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved double values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_GetRegion_Double)(ani_env *env, ani_array_double array, ani_size offset, ani_size length, + ani_double *native_buffer); + + /** + * @brief Sets a region of boolean values in an array. + * + * This function sets a portion of the specified boolean array using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the boolean values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_SetRegion_Boolean)(ani_env *env, ani_array_boolean array, ani_size offset, ani_size length, + const ani_boolean *native_buffer); + + /** + * @brief Sets a region of character values in an array. + * + * This function sets a portion of the specified character array using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the character values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_SetRegion_Char)(ani_env *env, ani_array_char array, ani_size offset, ani_size length, + const ani_char *native_buffer); + + /** + * @brief Sets a region of byte values in an array. + * + * This function sets a portion of the specified byte array using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the byte values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_SetRegion_Byte)(ani_env *env, ani_array_byte array, ani_size offset, ani_size length, + const ani_byte *native_buffer); + + /** + * @brief Sets a region of short values in an array. + * + * This function sets a portion of the specified short array using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the short values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_SetRegion_Short)(ani_env *env, ani_array_short array, ani_size offset, ani_size length, + const ani_short *native_buffer); + + /** + * @brief Sets a region of integer values in an array. + * + * This function sets a portion of the specified integer array using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the integer values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_SetRegion_Int)(ani_env *env, ani_array_int array, ani_size offset, ani_size length, + const ani_int *native_buffer); + + /** + * @brief Sets a region of long integer values in an array. + * + * This function sets a portion of the specified long integer array using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the long integer values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_SetRegion_Long)(ani_env *env, ani_array_long array, ani_size offset, ani_size length, + const ani_long *native_buffer); + + /** + * @brief Sets a region of float values in an array. + * + * This function sets a portion of the specified float array using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the float values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_SetRegion_Float)(ani_env *env, ani_array_float array, ani_size offset, ani_size length, + const ani_float *native_buffer); + + /** + * @brief Sets a region of double values in an array. + * + * This function sets a portion of the specified double array using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the double values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_SetRegion_Double)(ani_env *env, ani_array_double array, ani_size offset, ani_size length, + const ani_double *native_buffer); + + /** + * @brief Creates a new array of references. + * + * This function creates a new array of references, optionally initializing it with an array of references. + * + * @param[in] env A pointer to the environment structure. + * @param[in] type The type of the elements of the array. + * @param[in] length The length of the array to be created. + * @param[in] initial_element An optional reference to initialize the array. Can be null. + * @param[out] result A pointer to store the created array of references. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_New_Ref)(ani_env *env, ani_type type, ani_size length, ani_ref initial_element, + ani_array_ref *result); + + /** + * @brief Sets a reference at a specific index in an array. + * + * This function sets the value of a reference at the specified index in the array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array of references to modify. + * @param[in] index The index at which to set the reference. + * @param[in] ref The reference to set at the specified index. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_Set_Ref)(ani_env *env, ani_array_ref array, ani_size index, ani_ref ref); + + /** + * @brief Retrieves a reference from a specific index in an array. + * + * This function retrieves the value of a reference at the specified index in the array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array of references to query. + * @param[in] index The index from which to retrieve the reference. + * @param[out] result A pointer to store the retrieved reference. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_Get_Ref)(ani_env *env, ani_array_ref array, ani_size index, ani_ref *result); + + /** + * @brief Creates a new array + * + * This function creates a new array of the specified length. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the array to be created. + * @param[in] initial_element Element the array will be initialized with + * @param[out] result A pointer to store the created array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_New)(ani_env *env, ani_size length, ani_ref initial_element, ani_array *result); + + /** + * @brief Sets a value to an array. + * + * This function sets a value to array from an ani_ref value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to retrieve values from. + * @param[in] index The index of element to retrieve. + * @param[in] ref Value to set + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_Set)(ani_env *env, ani_array array, ani_size index, ani_ref ref); + + /** + * @brief Retrieves a value from an array. + * + * This function retrieves a value from array into an ani_ref pointer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to retrieve values from. + * @param[in] index The index of element to retrieve. + * @param[out] result A pointer to store the retrieved value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_Get)(ani_env *env, ani_array array, ani_size index, ani_ref *result); + + /** + * @brief Push a value to the end of array. + * + * This function pushes value from an ani_ref to the end of array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array to retrieve values from. + * @param[in] ref Value to set + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_Push)(ani_env *env, ani_array array, ani_ref ref); + + /** + * @brief Retrieves the last element and erases it from array. + * + * This function retrieves the last element and erases it from array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array whose last element is to be retrieved. + * @param[out] result A pointer to store the last element of the array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Array_Pop)(ani_env *env, ani_array array, ani_ref *result); + + /** + * @brief Retrieves the length of an fixedarray. + * + * This function retrieves the length of the specified array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray whose length is to be retrieved. + * @param[out] result A pointer to store the length of the fixedarray. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_GetLength)(ani_env *env, ani_fixedarray array, ani_size *result); + + /** + * @brief Creates a new fixedarray of booleans. + * + * This function creates a new fixedarray of the specified length for boolean values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the fixedarray to be created. + * @param[out] result A pointer to store the created fixedarray. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_New_Boolean)(ani_env *env, ani_size length, ani_fixedarray_boolean *result); + + /** + * @brief Creates a new fixedarray of characters. + * + * This function creates a new fixedarray of the specified length for character values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the fixedarray to be created. + * @param[out] result A pointer to store the created fixedarray. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_New_Char)(ani_env *env, ani_size length, ani_fixedarray_char *result); + + /** + * @brief Creates a new fixedarray of bytes. + * + * This function creates a new fixedarray of the specified length for byte values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the fixedarray to be created. + * @param[out] result A pointer to store the created fixedarray. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_New_Byte)(ani_env *env, ani_size length, ani_fixedarray_byte *result); + + /** + * @brief Creates a new fixedarray of shorts. + * + * This function creates a new fixedarray of the specified length for short integer values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the fixedarray to be created. + * @param[out] result A pointer to store the created fixedarray. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_New_Short)(ani_env *env, ani_size length, ani_fixedarray_short *result); + + /** + * @brief Creates a new fixedarray of integers. + * + * This function creates a new fixedarray of the specified length for integer values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the fixedarray to be created. + * @param[out] result A pointer to store the created fixedarray. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_New_Int)(ani_env *env, ani_size length, ani_fixedarray_int *result); + + /** + * @brief Creates a new fixedarray of long integers. + * + * This function creates a new fixedarray of the specified length for long integer values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the fixedarray to be created. + * @param[out] result A pointer to store the created fixedarray. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_New_Long)(ani_env *env, ani_size length, ani_fixedarray_long *result); + + /** + * @brief Creates a new fixedarray of floats. + * + * This function creates a new fixedarray of the specified length for float values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the fixedarray to be created. + * @param[out] result A pointer to store the created fixedarray. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_New_Float)(ani_env *env, ani_size length, ani_fixedarray_float *result); + + /** + * @brief Creates a new fixedarray of doubles. + * + * This function creates a new fixedarray of the specified length for double values. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the fixedarray to be created. + * @param[out] result A pointer to store the created fixedarray. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_New_Double)(ani_env *env, ani_size length, ani_fixedarray_double *result); + + /** + * @brief Retrieves a region of boolean values from an fixedarray. + * + * This function retrieves a portion of the specified boolean fixedarray into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved boolean values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_GetRegion_Boolean)(ani_env *env, ani_fixedarray_boolean array, ani_size offset, + ani_size length, ani_boolean *native_buffer); + + /** + * @brief Retrieves a region of character values from an fixedarray. + * + * This function retrieves a portion of the specified character fixedarray into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved character values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_GetRegion_Char)(ani_env *env, ani_fixedarray_char array, ani_size offset, ani_size length, + ani_char *native_buffer); + + /** + * @brief Retrieves a region of byte values from an fixedarray. + * + * This function retrieves a portion of the specified byte fixedarray into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved byte values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_GetRegion_Byte)(ani_env *env, ani_fixedarray_byte array, ani_size offset, ani_size length, + ani_byte *native_buffer); + + /** + * @brief Retrieves a region of short values from an fixedarray. + * + * This function retrieves a portion of the specified short fixedarray into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved short values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_GetRegion_Short)(ani_env *env, ani_fixedarray_short array, ani_size offset, ani_size length, + ani_short *native_buffer); + + /** + * @brief Retrieves a region of integer values from an fixedarray. + * + * This function retrieves a portion of the specified integer fixedarray into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved integer values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_GetRegion_Int)(ani_env *env, ani_fixedarray_int array, ani_size offset, ani_size length, + ani_int *native_buffer); + + /** + * @brief Retrieves a region of long integer values from an fixedarray. + * + * This function retrieves a portion of the specified long integer fixedarray into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved long integer values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_GetRegion_Long)(ani_env *env, ani_fixedarray_long array, ani_size offset, ani_size length, + ani_long *native_buffer); + + /** + * @brief Retrieves a region of float values from an fixedarray. + * + * This function retrieves a portion of the specified float fixedarray into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved float values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_GetRegion_Float)(ani_env *env, ani_fixedarray_float array, ani_size offset, ani_size length, + ani_float *native_buffer); + + /** + * @brief Retrieves a region of double values from an fixedarray. + * + * This function retrieves a portion of the specified double fixedarray into a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to retrieve values from. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to retrieve. + * @param[out] native_buffer A buffer to store the retrieved double values. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_GetRegion_Double)(ani_env *env, ani_fixedarray_double array, ani_size offset, + ani_size length, ani_double *native_buffer); + + /** + * @brief Sets a region of boolean values in an fixedarray. + * + * This function sets a portion of the specified boolean fixedarray using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the boolean values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_SetRegion_Boolean)(ani_env *env, ani_fixedarray_boolean array, ani_size offset, + ani_size length, const ani_boolean *native_buffer); + + /** + * @brief Sets a region of character values in an fixedarray. + * + * This function sets a portion of the specified character fixedarray using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the character values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_SetRegion_Char)(ani_env *env, ani_fixedarray_char array, ani_size offset, ani_size length, + const ani_char *native_buffer); + + /** + * @brief Sets a region of byte values in an fixedarray. + * + * This function sets a portion of the specified byte fixedarray using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the byte values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_SetRegion_Byte)(ani_env *env, ani_fixedarray_byte array, ani_size offset, ani_size length, + const ani_byte *native_buffer); + + /** + * @brief Sets a region of short values in an fixedarray. + * + * This function sets a portion of the specified short fixedarray using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the short values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_SetRegion_Short)(ani_env *env, ani_fixedarray_short array, ani_size offset, ani_size length, + const ani_short *native_buffer); + + /** + * @brief Sets a region of integer values in an fixedarray. + * + * This function sets a portion of the specified integer fixedarray using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the integer values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_SetRegion_Int)(ani_env *env, ani_fixedarray_int array, ani_size offset, ani_size length, + const ani_int *native_buffer); + + /** + * @brief Sets a region of long integer values in an fixedarray. + * + * This function sets a portion of the specified long integer fixedarray using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the long integer values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_SetRegion_Long)(ani_env *env, ani_fixedarray_long array, ani_size offset, ani_size length, + const ani_long *native_buffer); + + /** + * @brief Sets a region of float values in an fixedarray. + * + * This function sets a portion of the specified float fixedarray using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the float values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_SetRegion_Float)(ani_env *env, ani_fixedarray_float array, ani_size offset, ani_size length, + const ani_float *native_buffer); + + /** + * @brief Sets a region of double values in an fixedarray. + * + * This function sets a portion of the specified double fixedarray using a native buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray to set values in. + * @param[in] offset The starting offset of the region. + * @param[in] length The number of elements to set. + * @param[in] native_buffer A buffer containing the double values to set. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_SetRegion_Double)(ani_env *env, ani_fixedarray_double array, ani_size offset, + ani_size length, const ani_double *native_buffer); + + /** + * @brief Creates a new fixedarray of references. + * + * This function creates a new fixedarray of references, optionally initializing it with an initial_element ref. + * + * @param[in] env A pointer to the environment structure. + * @param[in] type The type of the elements of the fixedarray. + * @param[in] length The length of the fixedarray to be created. + * @param[in] initial_element An optional reference to initialize the fixedarray. Can be null. + * @param[out] result A pointer to store the created fixedarray of references. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_New_Ref)(ani_env *env, ani_type type, ani_size length, ani_ref initial_element, + ani_fixedarray_ref *result); + + /** + * @brief Sets a reference at a specific index in an fixedarray. + * + * This function sets the value of a reference at the specified index in the fixedarray. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The array of references to modify. + * @param[in] index The index at which to set the reference. + * @param[in] ref The reference to set at the specified index. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_Set_Ref)(ani_env *env, ani_fixedarray_ref array, ani_size index, ani_ref ref); + + /** + * @brief Retrieves a reference from a specific index in an fixedarray. + * + * This function retrieves the value of a reference at the specified index in the fixedarray. + * + * @param[in] env A pointer to the environment structure. + * @param[in] array The fixedarray of references to query. + * @param[in] index The index from which to retrieve the reference. + * @param[out] result A pointer to store the retrieved reference. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FixedArray_Get_Ref)(ani_env *env, ani_fixedarray_ref array, ani_size index, ani_ref *result); + + /** + * @brief Retrieves an enum item by its name. + * + * This function retrieves an enum item associated with the specified name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] enm The enum to search within. + * @param[in] name The name of the enum item to retrieve. + * @param[out] result A pointer to store the retrieved enum item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Enum_GetEnumItemByName)(ani_env *env, ani_enum enm, const char *name, ani_enum_item *result); + + /** + * @brief Retrieves an enum item by its index. + * + * This function retrieves an enum item located at the specified index. + * + * @param[in] env A pointer to the environment structure. + * @param[in] enm The enum to search within. + * @param[in] index The index of the enum item to retrieve. + * @param[out] result A pointer to store the retrieved enum item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Enum_GetEnumItemByIndex)(ani_env *env, ani_enum enm, ani_size index, ani_enum_item *result); + + /** + * @brief Retrieves the enum associated with an enum item. + * + * This function retrieves the enum to which the specified enum item belongs. + * + * @param[in] env A pointer to the environment structure. + * @param[in] enum_item The enum item whose associated enum is to be retrieved. + * @param[out] result A pointer to store the retrieved enum. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*EnumItem_GetEnum)(ani_env *env, ani_enum_item enum_item, ani_enum *result); + + /** + * @brief Retrieves the integer value of an enum item. + * + * This function retrieves the integer representing the value of the specified enum item. + * + * @param[in] env A pointer to the environment structure. + * @param[in] enum_item The enum item whose underlying value is to be retrieved. + * @param[out] result A pointer to store the retrieved integer. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*EnumItem_GetValue_Int)(ani_env *env, ani_enum_item enum_item, ani_int *result); + + /** + * @brief Retrieves the string value of an enum item. + * + * This function retrieves the string representing the value of the specified enum item. + * + * @param[in] env A pointer to the environment structure. + * @param[in] enum_item The enum item whose underlying value is to be retrieved. + * @param[out] result A pointer to store the retrieved string. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*EnumItem_GetValue_String)(ani_env *env, ani_enum_item enum_item, ani_string *result); + + /** + * @brief Retrieves the name of an enum item. + * + * This function retrieves the name associated with the specified enum item. + * + * @param[in] env A pointer to the environment structure. + * @param[in] enum_item The enum item whose name is to be retrieved. + * @param[out] result A pointer to store the retrieved name. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*EnumItem_GetName)(ani_env *env, ani_enum_item enum_item, ani_string *result); + + /** + * @brief Retrieves the index of an enum item. + * + * This function retrieves the index of the specified enum item within its enum. + * + * @param[in] env A pointer to the environment structure. + * @param[in] enum_item The enum item whose index is to be retrieved. + * @param[out] result A pointer to store the retrieved index. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*EnumItem_GetIndex)(ani_env *env, ani_enum_item enum_item, ani_size *result); + + /** + * @brief Invokes a functional object. + * + * This function invokes a functional object (e.g., a function or callable object) with the specified arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The functional object to invoke. + * @param[in] argc The number of arguments being passed to the functional object. + * @param[in] argv A pointer to an array of references representing the arguments. Can be null if `argc` is 0. + * @param[out] result A pointer to store the result of the invocation. Must be non null. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*FunctionalObject_Call)(ani_env *env, ani_fn_object fn, ani_size argc, ani_ref *argv, ani_ref *result); + + /** + * @brief Sets a boolean value to a variable. + * + * This function assigns a boolean value to the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to modify. + * @param[in] value The boolean value to assign to the variable. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_SetValue_Boolean)(ani_env *env, ani_variable variable, ani_boolean value); + + /** + * @brief Sets a character value to a variable. + * + * This function assigns a character value to the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to modify. + * @param[in] value The character value to assign to the variable. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_SetValue_Char)(ani_env *env, ani_variable variable, ani_char value); + + /** + * @brief Sets a byte value to a variable. + * + * This function assigns a byte value to the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to modify. + * @param[in] value The byte value to assign to the variable. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_SetValue_Byte)(ani_env *env, ani_variable variable, ani_byte value); + + /** + * @brief Sets a short value to a variable. + * + * This function assigns a short integer value to the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to modify. + * @param[in] value The short integer value to assign to the variable. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_SetValue_Short)(ani_env *env, ani_variable variable, ani_short value); + + /** + * @brief Sets an integer value to a variable. + * + * This function assigns an integer value to the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to modify. + * @param[in] value The integer value to assign to the variable. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_SetValue_Int)(ani_env *env, ani_variable variable, ani_int value); + + /** + * @brief Sets a long value to a variable. + * + * This function assigns a long integer value to the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to modify. + * @param[in] value The long integer value to assign to the variable. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_SetValue_Long)(ani_env *env, ani_variable variable, ani_long value); + + /** + * @brief Sets a float value to a variable. + * + * This function assigns a float value to the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to modify. + * @param[in] value The float value to assign to the variable. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_SetValue_Float)(ani_env *env, ani_variable variable, ani_float value); + + /** + * @brief Sets a double value to a variable. + * + * This function assigns a double value to the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to modify. + * @param[in] value The double value to assign to the variable. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_SetValue_Double)(ani_env *env, ani_variable variable, ani_double value); + + /** + * @brief Sets a reference value to a variable. + * + * This function assigns a reference value to the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to modify. + * @param[in] value The reference value to assign to the variable. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_SetValue_Ref)(ani_env *env, ani_variable variable, ani_ref value); + + /** + * @brief Retrieves a boolean value from a variable. + * + * This function fetches a boolean value from the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to query. + * @param[out] result A pointer to store the retrieved boolean value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_GetValue_Boolean)(ani_env *env, ani_variable variable, ani_boolean *result); + + /** + * @brief Retrieves a character value from a variable. + * + * This function fetches a character value from the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to query. + * @param[out] result A pointer to store the retrieved character value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_GetValue_Char)(ani_env *env, ani_variable variable, ani_char *result); + + /** + * @brief Retrieves a byte value from a variable. + * + * This function fetches a byte value from the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to query. + * @param[out] result A pointer to store the retrieved byte value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_GetValue_Byte)(ani_env *env, ani_variable variable, ani_byte *result); + + /** + * @brief Retrieves a short value from a variable. + * + * This function fetches a short integer value from the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to query. + * @param[out] result A pointer to store the retrieved short integer value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_GetValue_Short)(ani_env *env, ani_variable variable, ani_short *result); + + /** + * @brief Retrieves an integer value from a variable. + * + * This function fetches an integer value from the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to query. + * @param[out] result A pointer to store the retrieved integer value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_GetValue_Int)(ani_env *env, ani_variable variable, ani_int *result); + + /** + * @brief Retrieves a long value from a variable. + * + * This function fetches a long integer value from the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to query. + * @param[out] result A pointer to store the retrieved long integer value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_GetValue_Long)(ani_env *env, ani_variable variable, ani_long *result); + + /** + * @brief Retrieves a float value from a variable. + * + * This function fetches a float value from the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to query. + * @param[out] result A pointer to store the retrieved float value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_GetValue_Float)(ani_env *env, ani_variable variable, ani_float *result); + + /** + * @brief Retrieves a double value from a variable. + * + * This function fetches a double value from the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to query. + * @param[out] result A pointer to store the retrieved double value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_GetValue_Double)(ani_env *env, ani_variable variable, ani_double *result); + + /** + * @brief Retrieves a reference value from a variable. + * + * This function fetches a reference value from the specified variable. + * + * @param[in] env A pointer to the environment structure. + * @param[in] variable The variable to query. + * @param[out] result A pointer to store the retrieved reference value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Variable_GetValue_Ref)(ani_env *env, ani_variable variable, ani_ref *result); + + /** + * @brief Calls a function and retrieves a boolean result. + * + * This function calls the specified function with variadic arguments and retrieves a boolean result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the boolean result. + * @param[in] ... Variadic arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Boolean)(ani_env *env, ani_function fn, ani_boolean *result, ...); + + /** + * @brief Calls a function and retrieves a boolean result (array-based). + * + * This function calls the specified function with arguments provided in an array and retrieves a boolean result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the boolean result. + * @param[in] args A pointer to an array of arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Boolean_A)(ani_env *env, ani_function fn, ani_boolean *result, const ani_value *args); + + /** + * @brief Calls a function and retrieves a boolean result (variadic arguments). + * + * This function calls the specified function with arguments provided in a `va_list` and retrieves a boolean result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the boolean result. + * @param[in] args A `va_list` containing the arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Boolean_V)(ani_env *env, ani_function fn, ani_boolean *result, va_list args); + + /** + * @brief Calls a function and retrieves a character result. + * + * This function calls the specified function with variadic arguments and retrieves a character result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the character result. + * @param[in] ... Variadic arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Char)(ani_env *env, ani_function fn, ani_char *result, ...); + + /** + * @brief Calls a function and retrieves a character result (array-based). + * + * This function calls the specified function with arguments provided in an array and retrieves a character result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the character result. + * @param[in] args A pointer to an array of arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Char_A)(ani_env *env, ani_function fn, ani_char *result, const ani_value *args); + + /** + * @brief Calls a function and retrieves a character result (variadic arguments). + * + * This function calls the specified function with arguments provided in a `va_list` and retrieves a character + * result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the character result. + * @param[in] args A `va_list` containing the arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Char_V)(ani_env *env, ani_function fn, ani_char *result, va_list args); + + /** + * @brief Calls a function and retrieves a byte result. + * + * This function calls the specified function with variadic arguments and retrieves a byte result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the byte result. + * @param[in] ... Variadic arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Byte)(ani_env *env, ani_function fn, ani_byte *result, ...); + + /** + * @brief Calls a function and retrieves a byte result (array-based). + * + * This function calls the specified function with arguments provided in an array and retrieves a byte result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the byte result. + * @param[in] args A pointer to an array of arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Byte_A)(ani_env *env, ani_function fn, ani_byte *result, const ani_value *args); + + /** + * @brief Calls a function and retrieves a byte result (variadic arguments). + * + * This function calls the specified function with arguments provided in a `va_list` and retrieves a byte result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the byte result. + * @param[in] args A `va_list` containing the arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Byte_V)(ani_env *env, ani_function fn, ani_byte *result, va_list args); + + /** + * @brief Calls a function and retrieves a short result. + * + * This function calls the specified function with variadic arguments and retrieves a short result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the short result. + * @param[in] ... Variadic arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Short)(ani_env *env, ani_function fn, ani_short *result, ...); + + /** + * @brief Calls a function and retrieves a short result (array-based). + * + * This function calls the specified function with arguments provided in an array and retrieves a short result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the short result. + * @param[in] args A pointer to an array of arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Short_A)(ani_env *env, ani_function fn, ani_short *result, const ani_value *args); + + /** + * @brief Calls a function and retrieves a short result (variadic arguments). + * + * This function calls the specified function with arguments provided in a `va_list` and retrieves a short result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the short result. + * @param[in] args A `va_list` containing the arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Short_V)(ani_env *env, ani_function fn, ani_short *result, va_list args); + + /** + * @brief Calls a function and retrieves an integer result. + * + * This function calls the specified function with variadic arguments and retrieves an integer result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the integer result. + * @param[in] ... Variadic arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Int)(ani_env *env, ani_function fn, ani_int *result, ...); + + /** + * @brief Calls a function and retrieves an integer result (array-based). + * + * This function calls the specified function with arguments provided in an array and retrieves an integer result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the integer result. + * @param[in] args A pointer to an array of arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Int_A)(ani_env *env, ani_function fn, ani_int *result, const ani_value *args); + + /** + * @brief Calls a function and retrieves an integer result (variadic arguments). + * + * This function calls the specified function with arguments provided in a `va_list` and retrieves an integer + * result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the integer result. + * @param[in] args A `va_list` containing the arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Int_V)(ani_env *env, ani_function fn, ani_int *result, va_list args); + + /** + * @brief Calls a function and retrieves a long result. + * + * This function calls the specified function with variadic arguments and retrieves a long result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the long result. + * @param[in] ... Variadic arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Long)(ani_env *env, ani_function fn, ani_long *result, ...); + + /** + * @brief Calls a function and retrieves a long result (array-based). + * + * This function calls the specified function with arguments provided in an array and retrieves a long result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the long result. + * @param[in] args A pointer to an array of arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Long_A)(ani_env *env, ani_function fn, ani_long *result, const ani_value *args); + + /** + * @brief Calls a function and retrieves a long result (variadic arguments). + * + * This function calls the specified function with arguments provided in a `va_list` and retrieves a long result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the long result. + * @param[in] args A `va_list` containing the arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Long_V)(ani_env *env, ani_function fn, ani_long *result, va_list args); + + /** + * @brief Calls a function and retrieves a float result. + * + * This function calls the specified function with variadic arguments and retrieves a float result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the float result. + * @param[in] ... Variadic arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Float)(ani_env *env, ani_function fn, ani_float *result, ...); + + /** + * @brief Calls a function and retrieves a float result (array-based). + * + * This function calls the specified function with arguments provided in an array and retrieves a float result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the float result. + * @param[in] args A pointer to an array of arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Float_A)(ani_env *env, ani_function fn, ani_float *result, const ani_value *args); + + /** + * @brief Calls a function and retrieves a float result (variadic arguments). + * + * This function calls the specified function with arguments provided in a `va_list` and retrieves a float result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the float result. + * @param[in] args A `va_list` containing the arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Float_V)(ani_env *env, ani_function fn, ani_float *result, va_list args); + + /** + * @brief Calls a function and retrieves a double result. + * + * This function calls the specified function with variadic arguments and retrieves a double result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the double result. + * @param[in] ... Variadic arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Double)(ani_env *env, ani_function fn, ani_double *result, ...); + + /** + * @brief Calls a function and retrieves a double result (array-based). + * + * This function calls the specified function with arguments provided in an array and retrieves a double result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the double result. + * @param[in] args A pointer to an array of arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Double_A)(ani_env *env, ani_function fn, ani_double *result, const ani_value *args); + + /** + * @brief Calls a function and retrieves a double result (variadic arguments). + * + * This function calls the specified function with arguments provided in a `va_list` and retrieves a double result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the double result. + * @param[in] args A `va_list` containing the arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Double_V)(ani_env *env, ani_function fn, ani_double *result, va_list args); + + /** + * @brief Calls a function and retrieves a reference result. + * + * This function calls the specified function with variadic arguments and retrieves a reference result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the reference result. + * @param[in] ... Variadic arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Ref)(ani_env *env, ani_function fn, ani_ref *result, ...); + + /** + * @brief Calls a function and retrieves a reference result (array-based). + * + * This function calls the specified function with arguments provided in an array and retrieves a reference result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the reference result. + * @param[in] args A pointer to an array of arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Ref_A)(ani_env *env, ani_function fn, ani_ref *result, const ani_value *args); + + /** + * @brief Calls a function and retrieves a reference result (variadic arguments). + * + * This function calls the specified function with arguments provided in a `va_list` and retrieves a reference + * result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[out] result A pointer to store the reference result. + * @param[in] args A `va_list` containing the arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Ref_V)(ani_env *env, ani_function fn, ani_ref *result, va_list args); + + /** + * @brief Calls a function without returning a result. + * + * This function calls the specified function with variadic arguments and does not return a result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[in] ... Variadic arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Void)(ani_env *env, ani_function fn, ...); + + /** + * @brief Calls a function without returning a result (array-based). + * + * This function calls the specified function with arguments provided in an array and does not return a result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[in] args A pointer to an array of arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Void_A)(ani_env *env, ani_function fn, const ani_value *args); + + /** + * @brief Calls a function without returning a result (variadic arguments). + * + * This function calls the specified function with arguments provided in a `va_list` and does not return a result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] fn The function to call. + * @param[in] args A `va_list` containing the arguments to pass to the function. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Function_Call_Void_V)(ani_env *env, ani_function fn, va_list args); + + /** + * @brief Finds a field from by its name. + * + * This function locates a field based on its name and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to query. + * @param[in] name The name of the field to find. + * @param[out] result A pointer to the field to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_FindField)(ani_env *env, ani_class cls, const char *name, ani_field *result); + + /** + * @brief Finds a static field by its name. + * + * This function locates a static field based on its name and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to query. + * @param[in] name The name of the static field to find. + * @param[out] result A pointer to the static field to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_FindStaticField)(ani_env *env, ani_class cls, const char *name, ani_static_field *result); + + /** + * @brief Finds a method from by its name and signature. + * + * This function locates a method based on its name and signature and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to query. + * @param[in] name The name of the method to find. + * @param[in] signature The signature of the method to find. + * @param[out] result A pointer to the method to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_FindMethod)(ani_env *env, ani_class cls, const char *name, const char *signature, + ani_method *result); + + /** + * @brief Finds a static method from by its name and signature. + * + * This function locates a static method based on its name and signature and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to query. + * @param[in] name The name of the static method to find. + * @param[in] signature The signature of the static method to find. + * @param[out] result A pointer to the static method to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_FindStaticMethod)(ani_env *env, ani_class cls, const char *name, const char *signature, + ani_static_method *result); + + /** + * @brief Finds a setter method from by its name. + * + * This function locates a setter method based on its name and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to query. + * @param[in] name The name of the property whose setter is to be found. + * @param[out] result A pointer to the method to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_FindSetter)(ani_env *env, ani_class cls, const char *name, ani_method *result); + + /** + * @brief Finds a getter method from by its name. + * + * This function locates a getter method based on its name and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to query. + * @param[in] name The name of the property whose getter is to be found. + * @param[out] result A pointer to the method to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_FindGetter)(ani_env *env, ani_class cls, const char *name, ani_method *result); + + /** + * @brief Finds an indexable getter method from by its signature. + * + * This function locates an indexable getter method based on its signature and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to query. + * @param[in] signature The signature of the indexable getter to find. + * @param[out] result A pointer to the method to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_FindIndexableGetter)(ani_env *env, ani_class cls, const char *signature, ani_method *result); + + /** + * @brief Finds an indexable setter method from by its signature. + * + * This function locates an indexable setter method based on its signature and stores it in the result parameter. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to query. + * @param[in] signature The signature of the indexable setter to find. + * @param[out] result A pointer to the method to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_FindIndexableSetter)(ani_env *env, ani_class cls, const char *signature, ani_method *result); + + /** + * @brief Finds an iterator method. + * + * This function locates an iterator method + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to query. + * @param[out] result A pointer to the method to be populated. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_FindIterator)(ani_env *env, ani_class cls, ani_method *result); + + /** + * @brief Retrieves a boolean value from a static field of a class. + * + * This function retrieves the boolean value of the specified static field from the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to retrieve. + * @param[out] result A pointer to store the retrieved boolean value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticField_Boolean)(ani_env *env, ani_class cls, ani_static_field field, + ani_boolean *result); + + /** + * @brief Retrieves a character value from a static field of a class. + * + * This function retrieves the character value of the specified static field from the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to retrieve. + * @param[out] result A pointer to store the retrieved character value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticField_Char)(ani_env *env, ani_class cls, ani_static_field field, ani_char *result); + + /** + * @brief Retrieves a byte value from a static field of a class. + * + * This function retrieves the byte value of the specified static field from the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to retrieve. + * @param[out] result A pointer to store the retrieved byte value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticField_Byte)(ani_env *env, ani_class cls, ani_static_field field, ani_byte *result); + + /** + * @brief Retrieves a short value from a static field of a class. + * + * This function retrieves the short value of the specified static field from the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to retrieve. + * @param[out] result A pointer to store the retrieved short value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticField_Short)(ani_env *env, ani_class cls, ani_static_field field, ani_short *result); + + /** + * @brief Retrieves an integer value from a static field of a class. + * + * This function retrieves the integer value of the specified static field from the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to retrieve. + * @param[out] result A pointer to store the retrieved integer value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticField_Int)(ani_env *env, ani_class cls, ani_static_field field, ani_int *result); + + /** + * @brief Retrieves a long value from a static field of a class. + * + * This function retrieves the long value of the specified static field from the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to retrieve. + * @param[out] result A pointer to store the retrieved long value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticField_Long)(ani_env *env, ani_class cls, ani_static_field field, ani_long *result); + + /** + * @brief Retrieves a float value from a static field of a class. + * + * This function retrieves the float value of the specified static field from the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to retrieve. + * @param[out] result A pointer to store the retrieved float value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticField_Float)(ani_env *env, ani_class cls, ani_static_field field, ani_float *result); + + /** + * @brief Retrieves a double value from a static field of a class. + * + * This function retrieves the double value of the specified static field from the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to retrieve. + * @param[out] result A pointer to store the retrieved double value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticField_Double)(ani_env *env, ani_class cls, ani_static_field field, ani_double *result); + + /** + * @brief Retrieves a reference value from a static field of a class. + * + * This function retrieves the reference value of the specified static field from the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to retrieve. + * @param[out] result A pointer to store the retrieved reference value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticField_Ref)(ani_env *env, ani_class cls, ani_static_field field, ani_ref *result); + + /** + * @brief Sets a boolean value to a static field of a class. + * + * This function assigns a boolean value to the specified static field of the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to modify. + * @param[in] value The boolean value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticField_Boolean)(ani_env *env, ani_class cls, ani_static_field field, ani_boolean value); + + /** + * @brief Sets a character value to a static field of a class. + * + * This function assigns a character value to the specified static field of the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to modify. + * @param[in] value The character value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticField_Char)(ani_env *env, ani_class cls, ani_static_field field, ani_char value); + + /** + * @brief Sets a byte value to a static field of a class. + * + * This function assigns a byte value to the specified static field of the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to modify. + * @param[in] value The byte value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticField_Byte)(ani_env *env, ani_class cls, ani_static_field field, ani_byte value); + + /** + * @brief Sets a short value to a static field of a class. + * + * This function assigns a short value to the specified static field of the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to modify. + * @param[in] value The short value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticField_Short)(ani_env *env, ani_class cls, ani_static_field field, ani_short value); + + /** + * @brief Sets an integer value to a static field of a class. + * + * This function assigns an integer value to the specified static field of the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to modify. + * @param[in] value The integer value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticField_Int)(ani_env *env, ani_class cls, ani_static_field field, ani_int value); + + /** + * @brief Sets a long value to a static field of a class. + * + * This function assigns a long value to the specified static field of the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to modify. + * @param[in] value The long value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticField_Long)(ani_env *env, ani_class cls, ani_static_field field, ani_long value); + + /** + * @brief Sets a float value to a static field of a class. + * + * This function assigns a float value to the specified static field of the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to modify. + * @param[in] value The float value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticField_Float)(ani_env *env, ani_class cls, ani_static_field field, ani_float value); + + /** + * @brief Sets a double value to a static field of a class. + * + * This function assigns a double value to the specified static field of the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to modify. + * @param[in] value The double value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticField_Double)(ani_env *env, ani_class cls, ani_static_field field, ani_double value); + + /** + * @brief Sets a reference value to a static field of a class. + * + * This function assigns a reference value to the specified static field of the given class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] field The static field to modify. + * @param[in] value The reference value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticField_Ref)(ani_env *env, ani_class cls, ani_static_field field, ani_ref value); + + /** + * @brief Retrieves a boolean value from a static field of a class by its name. + * + * This function retrieves the boolean value of the specified static field from the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to retrieve. + * @param[out] result A pointer to store the retrieved boolean value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticFieldByName_Boolean)(ani_env *env, ani_class cls, const char *name, + ani_boolean *result); + + /** + * @brief Retrieves a character value from a static field of a class by its name. + * + * This function retrieves the character value of the specified static field from the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to retrieve. + * @param[out] result A pointer to store the retrieved character value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticFieldByName_Char)(ani_env *env, ani_class cls, const char *name, ani_char *result); + + /** + * @brief Retrieves a byte value from a static field of a class by its name. + * + * This function retrieves the byte value of the specified static field from the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to retrieve. + * @param[out] result A pointer to store the retrieved byte value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticFieldByName_Byte)(ani_env *env, ani_class cls, const char *name, ani_byte *result); + + /** + * @brief Retrieves a short value from a static field of a class by its name. + * + * This function retrieves the short value of the specified static field from the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to retrieve. + * @param[out] result A pointer to store the retrieved short value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticFieldByName_Short)(ani_env *env, ani_class cls, const char *name, ani_short *result); + + /** + * @brief Retrieves an integer value from a static field of a class by its name. + * + * This function retrieves the integer value of the specified static field from the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to retrieve. + * @param[out] result A pointer to store the retrieved integer value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticFieldByName_Int)(ani_env *env, ani_class cls, const char *name, ani_int *result); + + /** + * @brief Retrieves a long value from a static field of a class by its name. + * + * This function retrieves the long value of the specified static field from the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to retrieve. + * @param[out] result A pointer to store the retrieved long value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticFieldByName_Long)(ani_env *env, ani_class cls, const char *name, ani_long *result); + + /** + * @brief Retrieves a float value from a static field of a class by its name. + * + * This function retrieves the float value of the specified static field from the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to retrieve. + * @param[out] result A pointer to store the retrieved float value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticFieldByName_Float)(ani_env *env, ani_class cls, const char *name, ani_float *result); + + /** + * @brief Retrieves a double value from a static field of a class by its name. + * + * This function retrieves the double value of the specified static field from the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to retrieve. + * @param[out] result A pointer to store the retrieved double value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticFieldByName_Double)(ani_env *env, ani_class cls, const char *name, ani_double *result); + + /** + * @brief Retrieves a reference value from a static field of a class by its name. + * + * This function retrieves the reference value of the specified static field from the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to retrieve. + * @param[out] result A pointer to store the retrieved reference value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_GetStaticFieldByName_Ref)(ani_env *env, ani_class cls, const char *name, ani_ref *result); + + /** + * @brief Sets a boolean value to a static field of a class by its name. + * + * This function assigns a boolean value to the specified static field of the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to modify. + * @param[in] value The boolean value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticFieldByName_Boolean)(ani_env *env, ani_class cls, const char *name, ani_boolean value); + + /** + * @brief Sets a character value to a static field of a class by its name. + * + * This function assigns a character value to the specified static field of the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to modify. + * @param[in] value The character value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticFieldByName_Char)(ani_env *env, ani_class cls, const char *name, ani_char value); + + /** + * @brief Sets a byte value to a static field of a class by its name. + * + * This function assigns a byte value to the specified static field of the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to modify. + * @param[in] value The byte value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticFieldByName_Byte)(ani_env *env, ani_class cls, const char *name, ani_byte value); + + /** + * @brief Sets a short value to a static field of a class by its name. + * + * This function assigns a short value to the specified static field of the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to modify. + * @param[in] value The short value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticFieldByName_Short)(ani_env *env, ani_class cls, const char *name, ani_short value); + + /** + * @brief Sets an integer value to a static field of a class by its name. + * + * This function assigns an integer value to the specified static field of the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to modify. + * @param[in] value The integer value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticFieldByName_Int)(ani_env *env, ani_class cls, const char *name, ani_int value); + + /** + * @brief Sets a long value to a static field of a class by its name. + * + * This function assigns a long value to the specified static field of the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to modify. + * @param[in] value The long value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticFieldByName_Long)(ani_env *env, ani_class cls, const char *name, ani_long value); + + /** + * @brief Sets a float value to a static field of a class by its name. + * + * This function assigns a float value to the specified static field of the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to modify. + * @param[in] value The float value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticFieldByName_Float)(ani_env *env, ani_class cls, const char *name, ani_float value); + + /** + * @brief Sets a double value to a static field of a class by its name. + * + * This function assigns a double value to the specified static field of the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to modify. + * @param[in] value The double value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticFieldByName_Double)(ani_env *env, ani_class cls, const char *name, ani_double value); + + /** + * @brief Sets a reference value to a static field of a class by its name. + * + * This function assigns a reference value to the specified static field of the given class by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static field. + * @param[in] name The name of the static field to modify. + * @param[in] value The reference value to assign. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_SetStaticFieldByName_Ref)(ani_env *env, ani_class cls, const char *name, ani_ref value); + + /** + * @brief Calls a static method with a boolean return type. + * + * This function calls the specified static method of a class and retrieves a boolean result using variadic + * arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the boolean result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Boolean)(ani_env *env, ani_class cls, ani_static_method method, + ani_boolean *result, ...); + + /** + * @brief Calls a static method with a boolean return type (array-based). + * + * This function calls the specified static method of a class and retrieves a boolean result using arguments from an + * array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the boolean result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Boolean_A)(ani_env *env, ani_class cls, ani_static_method method, + ani_boolean *result, const ani_value *args); + + /** + * @brief Calls a static method with a boolean return type (variadic arguments). + * + * This function calls the specified static method of a class and retrieves a boolean result using a `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the boolean result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Boolean_V)(ani_env *env, ani_class cls, ani_static_method method, + ani_boolean *result, va_list args); + + /** + * @brief Calls a static method with a character return type. + * + * This function calls the specified static method of a class and retrieves a character result using variadic + * arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the character result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Char)(ani_env *env, ani_class cls, ani_static_method method, ani_char *result, + ...); + + /** + * @brief Calls a static method with a character return type (array-based). + * + * This function calls the specified static method of a class and retrieves a character result using arguments from + * an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the character result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Char_A)(ani_env *env, ani_class cls, ani_static_method method, ani_char *result, + const ani_value *args); + + /** + * @brief Calls a static method with a character return type (variadic arguments). + * + * This function calls the specified static method of a class and retrieves a character result using a `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the character result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Char_V)(ani_env *env, ani_class cls, ani_static_method method, ani_char *result, + va_list args); + + /** + * @brief Calls a static method with a byte return type. + * + * This function calls the specified static method of a class and retrieves a byte result using variadic arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the byte result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Byte)(ani_env *env, ani_class cls, ani_static_method method, ani_byte *result, + ...); + + /** + * @brief Calls a static method with a byte return type (array-based). + * + * This function calls the specified static method of a class and retrieves a byte result using arguments from an + * array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the byte result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Byte_A)(ani_env *env, ani_class cls, ani_static_method method, ani_byte *result, + const ani_value *args); + + /** + * @brief Calls a static method with a byte return type (variadic arguments). + * + * This function calls the specified static method of a class and retrieves a byte result using a `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the byte result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Byte_V)(ani_env *env, ani_class cls, ani_static_method method, ani_byte *result, + va_list args); + + /** + * @brief Calls a static method with a short return type. + * + * This function calls the specified static method of a class and retrieves a short result using variadic arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the short result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Short)(ani_env *env, ani_class cls, ani_static_method method, ani_short *result, + ...); + + /** + * @brief Calls a static method with a short return type (array-based). + * + * This function calls the specified static method of a class and retrieves a short result using arguments from an + * array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the short result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Short_A)(ani_env *env, ani_class cls, ani_static_method method, + ani_short *result, const ani_value *args); + + /** + * @brief Calls a static method with a short return type (variadic arguments). + * + * This function calls the specified static method of a class and retrieves a short result using a `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the short result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Short_V)(ani_env *env, ani_class cls, ani_static_method method, + ani_short *result, va_list args); + + /** + * @brief Calls a static method with an integer return type. + * + * This function calls the specified static method of a class and retrieves an integer result using variadic + * arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the integer result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Int)(ani_env *env, ani_class cls, ani_static_method method, ani_int *result, + ...); + + /** + * @brief Calls a static method with an integer return type (array-based). + * + * This function calls the specified static method of a class and retrieves an integer result using arguments from + * an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the integer result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Int_A)(ani_env *env, ani_class cls, ani_static_method method, ani_int *result, + const ani_value *args); + + /** + * @brief Calls a static method with an integer return type (variadic arguments). + * + * This function calls the specified static method of a class and retrieves an integer result using a `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the integer result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Int_V)(ani_env *env, ani_class cls, ani_static_method method, ani_int *result, + va_list args); + + /** + * @brief Calls a static method with a long return type. + * + * This function calls the specified static method of a class and retrieves a long result using variadic arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the long result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Long)(ani_env *env, ani_class cls, ani_static_method method, ani_long *result, + ...); + + /** + * @brief Calls a static method with a long return type (array-based). + * + * This function calls the specified static method of a class and retrieves a long result using arguments from an + * array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the long result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Long_A)(ani_env *env, ani_class cls, ani_static_method method, ani_long *result, + const ani_value *args); + + /** + * @brief Calls a static method with a long return type (variadic arguments). + * + * This function calls the specified static method of a class and retrieves a long result using a `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the long result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Long_V)(ani_env *env, ani_class cls, ani_static_method method, ani_long *result, + va_list args); + + /** + * @brief Calls a static method with a float return type. + * + * This function calls the specified static method of a class and retrieves a float result using variadic arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the float result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Float)(ani_env *env, ani_class cls, ani_static_method method, ani_float *result, + ...); + + /** + * @brief Calls a static method with a float return type (array-based). + * + * This function calls the specified static method of a class and retrieves a float result using arguments from an + * array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the float result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Float_A)(ani_env *env, ani_class cls, ani_static_method method, + ani_float *result, const ani_value *args); + + /** + * @brief Calls a static method with a float return type (variadic arguments). + * + * This function calls the specified static method of a class and retrieves a float result using a `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the float result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Float_V)(ani_env *env, ani_class cls, ani_static_method method, + ani_float *result, va_list args); + + /** + * @brief Calls a static method with a double return type. + * + * This function calls the specified static method of a class and retrieves a double result using variadic + * arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the double result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Double)(ani_env *env, ani_class cls, ani_static_method method, + ani_double *result, ...); + + /** + * @brief Calls a static method with a double return type (array-based). + * + * This function calls the specified static method of a class and retrieves a double result using arguments from an + * array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the double result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Double_A)(ani_env *env, ani_class cls, ani_static_method method, + ani_double *result, const ani_value *args); + + /** + * @brief Calls a static method with a double return type (variadic arguments). + * + * This function calls the specified static method of a class and retrieves a double result using a `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the double result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Double_V)(ani_env *env, ani_class cls, ani_static_method method, + ani_double *result, va_list args); + + /** + * @brief Calls a static method with a reference return type. + * + * This function calls the specified static method of a class and retrieves a reference result using variadic + * arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the reference result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Ref)(ani_env *env, ani_class cls, ani_static_method method, ani_ref *result, + ...); + + /** + * @brief Calls a static method with a reference return type (array-based). + * + * This function calls the specified static method of a class and retrieves a reference result using arguments from + * an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the reference result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Ref_A)(ani_env *env, ani_class cls, ani_static_method method, ani_ref *result, + const ani_value *args); + + /** + * @brief Calls a static method with a reference return type (variadic arguments). + * + * This function calls the specified static method of a class and retrieves a reference result using a `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[out] result A pointer to store the reference result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Ref_V)(ani_env *env, ani_class cls, ani_static_method method, ani_ref *result, + va_list args); + + /** + * @brief Calls a static method with no return value. + * + * This function calls the specified static method of a class using variadic arguments. The method does not return a + * value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Void)(ani_env *env, ani_class cls, ani_static_method method, ...); + + /** + * @brief Calls a static method with no return value (array-based). + * + * This function calls the specified static method of a class using arguments from an array. The method does not + * return a value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Void_A)(ani_env *env, ani_class cls, ani_static_method method, + const ani_value *args); + + /** + * @brief Calls a static method with no return value (variadic arguments). + * + * This function calls the specified static method of a class using a `va_list`. The method does not return a value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] method The static method to call. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethod_Void_V)(ani_env *env, ani_class cls, ani_static_method method, va_list args); + + /** + * @brief Calls a static method by name with a boolean return type. + * + * This function calls the specified static method of a class by its name and retrieves a boolean result using + * variadic arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the boolean result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Boolean)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_boolean *result, ...); + + /** + * @brief Calls a static method by name with a boolean return type (array-based). + * + * This function calls the specified static method of a class by its name and retrieves a boolean result using + * arguments from an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the boolean result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Boolean_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_boolean *result, + const ani_value *args); + + /** + * @brief Calls a static method by name with a boolean return type (variadic arguments). + * + * This function calls the specified static method of a class by its name and retrieves a boolean result using a + * `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the boolean result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Boolean_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_boolean *result, va_list args); + + /** + * @brief Calls a static method by name with a char return type. + * + * This function calls the specified static method of a class by its name and retrieves a char result using variadic + * arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the char result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Char)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_char *result, ...); + + /** + * @brief Calls a static method by name with a char return type (array-based). + * + * This function calls the specified static method of a class by its name and retrieves a char result using + * arguments from an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the char result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Char_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_char *result, const ani_value *args); + + /** + * @brief Calls a static method by name with a char return type (variadic arguments). + * + * This function calls the specified static method of a class by its name and retrieves a char result using a + * `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the char result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Char_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_char *result, va_list args); + + /** + * @brief Calls a static method by name with a byte return type. + * + * This function calls the specified static method of a class by its name and retrieves a byte result using variadic + * arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the byte result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Byte)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_byte *result, ...); + + /** + * @brief Calls a static method by name with a byte return type (array-based). + * + * This function calls the specified static method of a class by its name and retrieves a byte result using + * arguments from an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the byte result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Byte_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_byte *result, const ani_value *args); + + /** + * @brief Calls a static method by name with a byte return type (variadic arguments). + * + * This function calls the specified static method of a class by its name and retrieves a byte result using a + * `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the byte result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Byte_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_byte *result, va_list args); + + /** + * @brief Calls a static method by name with a short return type. + * + * This function calls the specified static method of a class by its name and retrieves a short result using + * variadic arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the short result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Short)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_short *result, ...); + + /** + * @brief Calls a static method by name with a short return type (array-based). + * + * This function calls the specified static method of a class by its name and retrieves a short result using + * arguments from an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the short result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Short_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_short *result, const ani_value *args); + + /** + * @brief Calls a static method by name with a short return type (variadic arguments). + * + * This function calls the specified static method of a class by its name and retrieves a short result using a + * `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the short result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Short_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_short *result, va_list args); + + /** + * @brief Calls a static method by name with a integer return type. + * + * This function calls the specified static method of a class by its name and retrieves a integer result using + * variadic arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the integer result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Int)(ani_env *env, ani_class cls, const char *name, const char *signature, + ani_int *result, ...); + + /** + * @brief Calls a static method by name with a integer return type (array-based). + * + * This function calls the specified static method of a class by its name and retrieves a integer result using + * arguments from an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the integer result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Int_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_int *result, const ani_value *args); + + /** + * @brief Calls a static method by name with a integer return type (variadic arguments). + * + * This function calls the specified static method of a class by its name and retrieves a integer result using a + * `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the integer result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Int_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_int *result, va_list args); + + /** + * @brief Calls a static method by name with a long return type. + * + * This function calls the specified static method of a class by its name and retrieves a long result using variadic + * arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the long result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Long)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_long *result, ...); + + /** + * @brief Calls a static method by name with a long return type (array-based). + * + * This function calls the specified static method of a class by its name and retrieves a long result using + * arguments from an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the long result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Long_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_long *result, const ani_value *args); + + /** + * @brief Calls a static method by name with a long return type (variadic arguments). + * + * This function calls the specified static method of a class by its name and retrieves a long result using a + * `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the long result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Long_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_long *result, va_list args); + + /** + * @brief Calls a static method by name with a float return type. + * + * This function calls the specified static method of a class by its name and retrieves a float result using + * variadic arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the float result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Float)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_float *result, ...); + + /** + * @brief Calls a static method by name with a float return type (array-based). + * + * This function calls the specified static method of a class by its name and retrieves a float result using + * arguments from an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the float result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Float_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_float *result, const ani_value *args); + + /** + * @brief Calls a static method by name with a float return type (variadic arguments). + * + * This function calls the specified static method of a class by its name and retrieves a float result using a + * `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the float result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Float_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_float *result, va_list args); + + /** + * @brief Calls a static method by name with a double return type. + * + * This function calls the specified static method of a class by its name and retrieves a double result using + * variadic arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the double result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Double)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_double *result, ...); + + /** + * @brief Calls a static method by name with a double return type (array-based). + * + * This function calls the specified static method of a class by its name and retrieves a double result using + * arguments from an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the double result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Double_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_double *result, + const ani_value *args); + + /** + * @brief Calls a static method by name with a double return type (variadic arguments). + * + * This function calls the specified static method of a class by its name and retrieves a double result using a + * `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the double result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Double_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_double *result, va_list args); + + /** + * @brief Calls a static method by name with a reference return type. + * + * This function calls the specified static method of a class by its name and retrieves a reference result using + * variadic arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the reference result. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Ref)(ani_env *env, ani_class cls, const char *name, const char *signature, + ani_ref *result, ...); + + /** + * @brief Calls a static method by name with a reference return type (array-based). + * + * This function calls the specified static method of a class by its name and retrieves a reference result using + * arguments from an array. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the reference result. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Ref_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_ref *result, const ani_value *args); + + /** + * @brief Calls a static method by name with a reference return type (variadic arguments). + * + * This function calls the specified static method of a class by its name and retrieves a reference result using a + * `va_list`. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[out] result A pointer to store the reference result. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Ref_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, ani_ref *result, va_list args); + + /** + * @brief Calls a static method by name with no return value. + * + * This function calls the specified static method of a class by its name using variadic arguments. The method does + * not return a value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Void)(ani_env *env, ani_class cls, const char *name, + const char *signature, ...); + + /** + * @brief Calls a static method by name with no return value (array-based). + * + * This function calls the specified static method of a class by its name using arguments from an array. The method + * does not return a value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Void_A)(ani_env *env, ani_class cls, const char *name, + const char *signature, const ani_value *args); + + /** + * @brief Calls a static method by name with no return value (variadic arguments). + * + * This function calls the specified static method of a class by its name using a `va_list`. The method does not + * return a value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class containing the static method. + * @param[in] name The name of the static method to call. + * @param[in] signature The signature of the static method to call. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_CallStaticMethodByName_Void_V)(ani_env *env, ani_class cls, const char *name, + const char *signature, va_list args); + + /** + * @brief Retrieves a boolean value from a field of an object. + * + * This function retrieves the boolean value of the specified field from the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to retrieve the boolean value from. + * @param[out] result A pointer to store the retrieved boolean value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetField_Boolean)(ani_env *env, ani_object object, ani_field field, ani_boolean *result); + + /** + * @brief Retrieves a char value from a field of an object. + * + * This function retrieves the char value of the specified field from the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to retrieve the char value from. + * @param[out] result A pointer to store the retrieved char value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetField_Char)(ani_env *env, ani_object object, ani_field field, ani_char *result); + + /** + * @brief Retrieves a byte value from a field of an object. + * + * This function retrieves the byte value of the specified field from the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to retrieve the byte value from. + * @param[out] result A pointer to store the retrieved byte value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetField_Byte)(ani_env *env, ani_object object, ani_field field, ani_byte *result); + + /** + * @brief Retrieves a short value from a field of an object. + * + * This function retrieves the short value of the specified field from the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to retrieve the short value from. + * @param[out] result A pointer to store the retrieved short value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetField_Short)(ani_env *env, ani_object object, ani_field field, ani_short *result); + + /** + * @brief Retrieves a integer value from a field of an object. + * + * This function retrieves the integer value of the specified field from the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to retrieve the integer value from. + * @param[out] result A pointer to store the retrieved integer value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetField_Int)(ani_env *env, ani_object object, ani_field field, ani_int *result); + + /** + * @brief Retrieves a long value from a field of an object. + * + * This function retrieves the long value of the specified field from the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to retrieve the long value from. + * @param[out] result A pointer to store the retrieved long value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetField_Long)(ani_env *env, ani_object object, ani_field field, ani_long *result); + + /** + * @brief Retrieves a float value from a field of an object. + * + * This function retrieves the float value of the specified field from the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to retrieve the float value from. + * @param[out] result A pointer to store the retrieved float value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetField_Float)(ani_env *env, ani_object object, ani_field field, ani_float *result); + + /** + * @brief Retrieves a double value from a field of an object. + * + * This function retrieves the double value of the specified field from the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to retrieve the double value from. + * @param[out] result A pointer to store the retrieved double value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetField_Double)(ani_env *env, ani_object object, ani_field field, ani_double *result); + + /** + * @brief Retrieves a reference value from a field of an object. + * + * This function retrieves the reference value of the specified field from the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to retrieve the reference value from. + * @param[out] result A pointer to store the retrieved reference value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetField_Ref)(ani_env *env, ani_object object, ani_field field, ani_ref *result); + + /** + * @brief Sets a boolean value to a field of an object. + * + * This function assigns a boolean value to the specified field of the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to set the boolean value to. + * @param[in] value The boolean value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetField_Boolean)(ani_env *env, ani_object object, ani_field field, ani_boolean value); + + /** + * @brief Sets a char value to a field of an object. + * + * This function assigns a char value to the specified field of the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to set the char value to. + * @param[in] value The char value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetField_Char)(ani_env *env, ani_object object, ani_field field, ani_char value); + + /** + * @brief Sets a byte value to a field of an object. + * + * This function assigns a byte value to the specified field of the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to set the byte value to. + * @param[in] value The byte value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetField_Byte)(ani_env *env, ani_object object, ani_field field, ani_byte value); + + /** + * @brief Sets a short value to a field of an object. + * + * This function assigns a short value to the specified field of the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to set the short value to. + * @param[in] value The short value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetField_Short)(ani_env *env, ani_object object, ani_field field, ani_short value); + + /** + * @brief Sets a integer value to a field of an object. + * + * This function assigns a integer value to the specified field of the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to set the integer value to. + * @param[in] value The integer value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetField_Int)(ani_env *env, ani_object object, ani_field field, ani_int value); + + /** + * @brief Sets a long value to a field of an object. + * + * This function assigns a long value to the specified field of the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to set the long value to. + * @param[in] value The long value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetField_Long)(ani_env *env, ani_object object, ani_field field, ani_long value); + + /** + * @brief Sets a float value to a field of an object. + * + * This function assigns a float value to the specified field of the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to set the float value to. + * @param[in] value The float value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetField_Float)(ani_env *env, ani_object object, ani_field field, ani_float value); + + /** + * @brief Sets a double value to a field of an object. + * + * This function assigns a double value to the specified field of the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to set the double value to. + * @param[in] value The double value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetField_Double)(ani_env *env, ani_object object, ani_field field, ani_double value); + + /** + * @brief Sets a reference value to a field of an object. + * + * This function assigns a reference value to the specified field of the given object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] field The field to set the reference value to. + * @param[in] value The reference value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetField_Ref)(ani_env *env, ani_object object, ani_field field, ani_ref value); + + /** + * @brief Retrieves a boolean value from a field of an object by its name. + * + * This function retrieves the boolean value of the specified field from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to retrieve the boolean value from. + * @param[out] result A pointer to store the retrieved boolean value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetFieldByName_Boolean)(ani_env *env, ani_object object, const char *name, ani_boolean *result); + + /** + * @brief Retrieves a char value from a field of an object by its name. + * + * This function retrieves the char value of the specified field from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to retrieve the char value from. + * @param[out] result A pointer to store the retrieved char value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetFieldByName_Char)(ani_env *env, ani_object object, const char *name, ani_char *result); + + /** + * @brief Retrieves a byte value from a field of an object by its name. + * + * This function retrieves the byte value of the specified field from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to retrieve the byte value from. + * @param[out] result A pointer to store the retrieved byte value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetFieldByName_Byte)(ani_env *env, ani_object object, const char *name, ani_byte *result); + + /** + * @brief Retrieves a short value from a field of an object by its name. + * + * This function retrieves the short value of the specified field from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to retrieve the short value from. + * @param[out] result A pointer to store the retrieved short value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetFieldByName_Short)(ani_env *env, ani_object object, const char *name, ani_short *result); + + /** + * @brief Retrieves a integer value from a field of an object by its name. + * + * This function retrieves the integer value of the specified field from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to retrieve the integer value from. + * @param[out] result A pointer to store the retrieved integer value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetFieldByName_Int)(ani_env *env, ani_object object, const char *name, ani_int *result); + + /** + * @brief Retrieves a long value from a field of an object by its name. + * + * This function retrieves the long value of the specified field from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to retrieve the long value from. + * @param[out] result A pointer to store the retrieved long value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetFieldByName_Long)(ani_env *env, ani_object object, const char *name, ani_long *result); + + /** + * @brief Retrieves a float value from a field of an object by its name. + * + * This function retrieves the float value of the specified field from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to retrieve the float value from. + * @param[out] result A pointer to store the retrieved float value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetFieldByName_Float)(ani_env *env, ani_object object, const char *name, ani_float *result); + + /** + * @brief Retrieves a double value from a field of an object by its name. + * + * This function retrieves the double value of the specified field from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to retrieve the double value from. + * @param[out] result A pointer to store the retrieved double value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetFieldByName_Double)(ani_env *env, ani_object object, const char *name, ani_double *result); + + /** + * @brief Retrieves a reference value from a field of an object by its name. + * + * This function retrieves the reference value of the specified field from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to retrieve the reference value from. + * @param[out] result A pointer to store the retrieved reference value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetFieldByName_Ref)(ani_env *env, ani_object object, const char *name, ani_ref *result); + + /** + * @brief Sets a boolean value to a field of an object by its name. + * + * This function assigns a boolean value to the specified field of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to set the boolean value to. + * @param[in] value The boolean value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetFieldByName_Boolean)(ani_env *env, ani_object object, const char *name, ani_boolean value); + + /** + * @brief Sets a char value to a field of an object by its name. + * + * This function assigns a char value to the specified field of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to set the char value to. + * @param[in] value The char value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetFieldByName_Char)(ani_env *env, ani_object object, const char *name, ani_char value); + + /** + * @brief Sets a byte value to a field of an object by its name. + * + * This function assigns a byte value to the specified field of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to set the byte value to. + * @param[in] value The byte value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetFieldByName_Byte)(ani_env *env, ani_object object, const char *name, ani_byte value); + + /** + * @brief Sets a short value to a field of an object by its name. + * + * This function assigns a short value to the specified field of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to set the short value to. + * @param[in] value The short value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetFieldByName_Short)(ani_env *env, ani_object object, const char *name, ani_short value); + + /** + * @brief Sets a integer value to a field of an object by its name. + * + * This function assigns a integer value to the specified field of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to set the integer value to. + * @param[in] value The integer value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetFieldByName_Int)(ani_env *env, ani_object object, const char *name, ani_int value); + + /** + * @brief Sets a long value to a field of an object by its name. + * + * This function assigns a long value to the specified field of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to set the long value to. + * @param[in] value The long value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetFieldByName_Long)(ani_env *env, ani_object object, const char *name, ani_long value); + + /** + * @brief Sets a float value to a field of an object by its name. + * + * This function assigns a float value to the specified field of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to set the float value to. + * @param[in] value The float value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetFieldByName_Float)(ani_env *env, ani_object object, const char *name, ani_float value); + + /** + * @brief Sets a double value to a field of an object by its name. + * + * This function assigns a double value to the specified field of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to set the double value to. + * @param[in] value The double value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetFieldByName_Double)(ani_env *env, ani_object object, const char *name, ani_double value); + + /** + * @brief Sets a reference value to a field of an object by its name. + * + * This function assigns a reference value to the specified field of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the field. + * @param[in] name The name of the field to set the reference value to. + * @param[in] value The reference value to assign to the field. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetFieldByName_Ref)(ani_env *env, ani_object object, const char *name, ani_ref value); + + /** + * @brief Retrieves a boolean value from a property of an object by its name. + * + * This function retrieves the boolean value of the specified property from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to retrieve the boolean value from. + * @param[out] result A pointer to store the retrieved boolean value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetPropertyByName_Boolean)(ani_env *env, ani_object object, const char *name, + ani_boolean *result); + + /** + * @brief Retrieves a char value from a property of an object by its name. + * + * This function retrieves the char value of the specified property from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to retrieve the char value from. + * @param[out] result A pointer to store the retrieved char value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetPropertyByName_Char)(ani_env *env, ani_object object, const char *name, ani_char *result); + + /** + * @brief Retrieves a byte value from a property of an object by its name. + * + * This function retrieves the byte value of the specified property from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to retrieve the byte value from. + * @param[out] result A pointer to store the retrieved byte value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetPropertyByName_Byte)(ani_env *env, ani_object object, const char *name, ani_byte *result); + + /** + * @brief Retrieves a short value from a property of an object by its name. + * + * This function retrieves the short value of the specified property from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to retrieve the short value from. + * @param[out] result A pointer to store the retrieved short value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetPropertyByName_Short)(ani_env *env, ani_object object, const char *name, ani_short *result); + + /** + * @brief Retrieves a integer value from a property of an object by its name. + * + * This function retrieves the integer value of the specified property from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to retrieve the integer value from. + * @param[out] result A pointer to store the retrieved integer value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetPropertyByName_Int)(ani_env *env, ani_object object, const char *name, ani_int *result); + + /** + * @brief Retrieves a long value from a property of an object by its name. + * + * This function retrieves the long value of the specified property from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to retrieve the long value from. + * @param[out] result A pointer to store the retrieved long value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetPropertyByName_Long)(ani_env *env, ani_object object, const char *name, ani_long *result); + + /** + * @brief Retrieves a float value from a property of an object by its name. + * + * This function retrieves the float value of the specified property from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to retrieve the float value from. + * @param[out] result A pointer to store the retrieved float value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetPropertyByName_Float)(ani_env *env, ani_object object, const char *name, ani_float *result); + + /** + * @brief Retrieves a double value from a property of an object by its name. + * + * This function retrieves the double value of the specified property from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to retrieve the double value from. + * @param[out] result A pointer to store the retrieved double value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetPropertyByName_Double)(ani_env *env, ani_object object, const char *name, + ani_double *result); + + /** + * @brief Retrieves a reference value from a property of an object by its name. + * + * This function retrieves the reference value of the specified property from the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to retrieve the reference value from. + * @param[out] result A pointer to store the retrieved reference value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_GetPropertyByName_Ref)(ani_env *env, ani_object object, const char *name, ani_ref *result); + + /** + * @brief Sets a boolean value to a property of an object by its name. + * + * This function assigns a boolean value to the specified property of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to set the boolean value to. + * @param[in] value The boolean value to assign to the property. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetPropertyByName_Boolean)(ani_env *env, ani_object object, const char *name, + ani_boolean value); + + /** + * @brief Sets a char value to a property of an object by its name. + * + * This function assigns a char value to the specified property of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to set the char value to. + * @param[in] value The char value to assign to the property. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetPropertyByName_Char)(ani_env *env, ani_object object, const char *name, ani_char value); + + /** + * @brief Sets a byte value to a property of an object by its name. + * + * This function assigns a byte value to the specified property of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to set the byte value to. + * @param[in] value The byte value to assign to the property. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetPropertyByName_Byte)(ani_env *env, ani_object object, const char *name, ani_byte value); + + /** + * @brief Sets a short value to a property of an object by its name. + * + * This function assigns a short value to the specified property of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to set the short value to. + * @param[in] value The short value to assign to the property. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetPropertyByName_Short)(ani_env *env, ani_object object, const char *name, ani_short value); + + /** + * @brief Sets a integer value to a property of an object by its name. + * + * This function assigns a integer value to the specified property of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to set the integer value to. + * @param[in] value The integer value to assign to the property. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetPropertyByName_Int)(ani_env *env, ani_object object, const char *name, ani_int value); + + /** + * @brief Sets a long value to a property of an object by its name. + * + * This function assigns a long value to the specified property of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to set the long value to. + * @param[in] value The long value to assign to the property. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetPropertyByName_Long)(ani_env *env, ani_object object, const char *name, ani_long value); + + /** + * @brief Sets a float value to a property of an object by its name. + * + * This function assigns a float value to the specified property of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to set the float value to. + * @param[in] value The float value to assign to the property. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetPropertyByName_Float)(ani_env *env, ani_object object, const char *name, ani_float value); + + /** + * @brief Sets a double value to a property of an object by its name. + * + * This function assigns a double value to the specified property of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to set the double value to. + * @param[in] value The double value to assign to the property. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetPropertyByName_Double)(ani_env *env, ani_object object, const char *name, ani_double value); + + /** + * @brief Sets a reference value to a property of an object by its name. + * + * This function assigns a reference value to the specified property of the given object by its name. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object containing the property. + * @param[in] name The name of the property to set the reference value to. + * @param[in] value The reference value to assign to the property. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_SetPropertyByName_Ref)(ani_env *env, ani_object object, const char *name, ani_ref value); + + /** + * @brief Calls a method on an object and retrieves a boolean return value. + * + * This function calls the specified method of an object using variadic arguments and retrieves a boolean result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the boolean return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Boolean)(ani_env *env, ani_object object, ani_method method, ani_boolean *result, + ...); + + /** + * @brief Calls a method on an object and retrieves a boolean return value (array-based). + * + * This function calls the specified method of an object using arguments provided in an array and retrieves a + * boolean result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the boolean return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Boolean_A)(ani_env *env, ani_object object, ani_method method, ani_boolean *result, + const ani_value *args); + + /** + * @brief Calls a method on an object and retrieves a boolean return value (variadic arguments). + * + * This function calls the specified method of an object using a `va_list` and retrieves a boolean result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the boolean return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Boolean_V)(ani_env *env, ani_object object, ani_method method, ani_boolean *result, + va_list args); + + /** + * @brief Calls a method on an object and retrieves a char return value. + * + * This function calls the specified method of an object using variadic arguments and retrieves a char result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the char return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Char)(ani_env *env, ani_object object, ani_method method, ani_char *result, ...); + + /** + * @brief Calls a method on an object and retrieves a char return value (array-based). + * + * This function calls the specified method of an object using arguments provided in an array and retrieves a char + * result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the char return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Char_A)(ani_env *env, ani_object object, ani_method method, ani_char *result, + const ani_value *args); + + /** + * @brief Calls a method on an object and retrieves a char return value (variadic arguments). + * + * This function calls the specified method of an object using a `va_list` and retrieves a char result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the char return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Char_V)(ani_env *env, ani_object object, ani_method method, ani_char *result, + va_list args); + + /** + * @brief Calls a method on an object and retrieves a byte return value. + * + * This function calls the specified method of an object using variadic arguments and retrieves a byte result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the byte return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Byte)(ani_env *env, ani_object object, ani_method method, ani_byte *result, ...); + + /** + * @brief Calls a method on an object and retrieves a byte return value (array-based). + * + * This function calls the specified method of an object using arguments provided in an array and retrieves a byte + * result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the byte return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Byte_A)(ani_env *env, ani_object object, ani_method method, ani_byte *result, + const ani_value *args); + + /** + * @brief Calls a method on an object and retrieves a byte return value (variadic arguments). + * + * This function calls the specified method of an object using a `va_list` and retrieves a byte result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the byte return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Byte_V)(ani_env *env, ani_object object, ani_method method, ani_byte *result, + va_list args); + + /** + * @brief Calls a method on an object and retrieves a short return value. + * + * This function calls the specified method of an object using variadic arguments and retrieves a short result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the short return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Short)(ani_env *env, ani_object object, ani_method method, ani_short *result, ...); + + /** + * @brief Calls a method on an object and retrieves a short return value (array-based). + * + * This function calls the specified method of an object using arguments provided in an array and retrieves a short + * result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the short return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Short_A)(ani_env *env, ani_object object, ani_method method, ani_short *result, + const ani_value *args); + + /** + * @brief Calls a method on an object and retrieves a short return value (variadic arguments). + * + * This function calls the specified method of an object using a `va_list` and retrieves a short result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the short return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Short_V)(ani_env *env, ani_object object, ani_method method, ani_short *result, + va_list args); + + /** + * @brief Calls a method on an object and retrieves a integer return value. + * + * This function calls the specified method of an object using variadic arguments and retrieves a integer result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the integer return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Int)(ani_env *env, ani_object object, ani_method method, ani_int *result, ...); + + /** + * @brief Calls a method on an object and retrieves a integer return value (array-based). + * + * This function calls the specified method of an object using arguments provided in an array and retrieves a + * integer result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the integer return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Int_A)(ani_env *env, ani_object object, ani_method method, ani_int *result, + const ani_value *args); + + /** + * @brief Calls a method on an object and retrieves a integer return value (variadic arguments). + * + * This function calls the specified method of an object using a `va_list` and retrieves a integer result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the integer return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Int_V)(ani_env *env, ani_object object, ani_method method, ani_int *result, + va_list args); + + /** + * @brief Calls a method on an object and retrieves a long return value. + * + * This function calls the specified method of an object using variadic arguments and retrieves a long result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the long return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Long)(ani_env *env, ani_object object, ani_method method, ani_long *result, ...); + + /** + * @brief Calls a method on an object and retrieves a long return value (array-based). + * + * This function calls the specified method of an object using arguments provided in an array and retrieves a long + * result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the long return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Long_A)(ani_env *env, ani_object object, ani_method method, ani_long *result, + const ani_value *args); + + /** + * @brief Calls a method on an object and retrieves a long return value (variadic arguments). + * + * This function calls the specified method of an object using a `va_list` and retrieves a long result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the long return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Long_V)(ani_env *env, ani_object object, ani_method method, ani_long *result, + va_list args); + + /** + * @brief Calls a method on an object and retrieves a float return value. + * + * This function calls the specified method of an object using variadic arguments and retrieves a float result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the float return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Float)(ani_env *env, ani_object object, ani_method method, ani_float *result, ...); + + /** + * @brief Calls a method on an object and retrieves a float return value (array-based). + * + * This function calls the specified method of an object using arguments provided in an array and retrieves a float + * result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the float return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Float_A)(ani_env *env, ani_object object, ani_method method, ani_float *result, + const ani_value *args); + + /** + * @brief Calls a method on an object and retrieves a float return value (variadic arguments). + * + * This function calls the specified method of an object using a `va_list` and retrieves a float result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the float return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Float_V)(ani_env *env, ani_object object, ani_method method, ani_float *result, + va_list args); + + /** + * @brief Calls a method on an object and retrieves a double return value. + * + * This function calls the specified method of an object using variadic arguments and retrieves a double result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the double return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Double)(ani_env *env, ani_object object, ani_method method, ani_double *result, ...); + + /** + * @brief Calls a method on an object and retrieves a double return value (array-based). + * + * This function calls the specified method of an object using arguments provided in an array and retrieves a double + * result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the double return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Double_A)(ani_env *env, ani_object object, ani_method method, ani_double *result, + const ani_value *args); + + /** + * @brief Calls a method on an object and retrieves a double return value (variadic arguments). + * + * This function calls the specified method of an object using a `va_list` and retrieves a double result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the double return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Double_V)(ani_env *env, ani_object object, ani_method method, ani_double *result, + va_list args); + + /** + * @brief Calls a method on an object and retrieves a reference return value. + * + * This function calls the specified method of an object using variadic arguments and retrieves a reference result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the reference return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Ref)(ani_env *env, ani_object object, ani_method method, ani_ref *result, ...); + + /** + * @brief Calls a method on an object and retrieves a reference return value (array-based). + * + * This function calls the specified method of an object using arguments provided in an array and retrieves a + * reference result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the reference return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Ref_A)(ani_env *env, ani_object object, ani_method method, ani_ref *result, + const ani_value *args); + + /** + * @brief Calls a method on an object and retrieves a reference return value (variadic arguments). + * + * This function calls the specified method of an object using a `va_list` and retrieves a reference result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[out] result A pointer to store the reference return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Ref_V)(ani_env *env, ani_object object, ani_method method, ani_ref *result, + va_list args); + + /** + * @brief Calls a method on an object with no return value. + * + * This function calls the specified method of an object using variadic arguments. The method does not return a + * value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Void)(ani_env *env, ani_object object, ani_method method, ...); + + /** + * @brief Calls a method on an object with no return value (array-based). + * + * This function calls the specified method of an object using arguments provided in an array. The method does not + * return a value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Void_A)(ani_env *env, ani_object object, ani_method method, const ani_value *args); + + /** + * @brief Calls a method on an object with no return value (variadic arguments). + * + * This function calls the specified method of an object using a `va_list`. The method does not return a value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] method The method to call. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethod_Void_V)(ani_env *env, ani_object object, ani_method method, va_list args); + + /** + * @brief Calls a method by name on an object and retrieves a boolean return value. + * + * This function calls the specified method by its name and signature on an object using variadic arguments and + * retrieves a boolean result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the boolean return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Boolean)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_boolean *result, ...); + + /** + * @brief Calls a method by name on an object and retrieves a boolean return value (array-based). + * + * This function calls the specified method by its name and signature on an object using arguments provided in an + * array and retrieves a boolean result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the boolean return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Boolean_A)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_boolean *result, const ani_value *args); + + /** + * @brief Calls a method by name on an object and retrieves a boolean return value (variadic arguments). + * + * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a + * boolean result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the boolean return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Boolean_V)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_boolean *result, va_list args); + + /** + * @brief Calls a method by name on an object and retrieves a char return value. + * + * This function calls the specified method by its name and signature on an object using variadic arguments and + * retrieves a char result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the char return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Char)(ani_env *env, ani_object object, const char *name, const char *signature, + ani_char *result, ...); + + /** + * @brief Calls a method by name on an object and retrieves a char return value (array-based). + * + * This function calls the specified method by its name and signature on an object using arguments provided in an + * array and retrieves a char result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the char return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Char_A)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_char *result, const ani_value *args); + + /** + * @brief Calls a method by name on an object and retrieves a char return value (variadic arguments). + * + * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a + * char result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the char return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Char_V)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_char *result, va_list args); + + /** + * @brief Calls a method by name on an object and retrieves a byte return value. + * + * This function calls the specified method by its name and signature on an object using variadic arguments and + * retrieves a byte result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the byte return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Byte)(ani_env *env, ani_object object, const char *name, const char *signature, + ani_byte *result, ...); + + /** + * @brief Calls a method by name on an object and retrieves a byte return value (array-based). + * + * This function calls the specified method by its name and signature on an object using arguments provided in an + * array and retrieves a byte result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the byte return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Byte_A)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_byte *result, const ani_value *args); + + /** + * @brief Calls a method by name on an object and retrieves a byte return value (variadic arguments). + * + * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a + * byte result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the byte return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Byte_V)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_byte *result, va_list args); + + /** + * @brief Calls a method by name on an object and retrieves a short return value. + * + * This function calls the specified method by its name and signature on an object using variadic arguments and + * retrieves a short result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the short return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Short)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_short *result, ...); + + /** + * @brief Calls a method by name on an object and retrieves a short return value (array-based). + * + * This function calls the specified method by its name and signature on an object using arguments provided in an + * array and retrieves a short result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the short return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Short_A)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_short *result, const ani_value *args); + + /** + * @brief Calls a method by name on an object and retrieves a short return value (variadic arguments). + * + * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a + * short result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the short return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Short_V)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_short *result, va_list args); + + /** + * @brief Calls a method by name on an object and retrieves a integer return value. + * + * This function calls the specified method by its name and signature on an object using variadic arguments and + * retrieves a integer result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the integer return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Int)(ani_env *env, ani_object object, const char *name, const char *signature, + ani_int *result, ...); + + /** + * @brief Calls a method by name on an object and retrieves a integer return value (array-based). + * + * This function calls the specified method by its name and signature on an object using arguments provided in an + * array and retrieves a integer result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the integer return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Int_A)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_int *result, const ani_value *args); + + /** + * @brief Calls a method by name on an object and retrieves a integer return value (variadic arguments). + * + * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a + * integer result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the integer return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Int_V)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_int *result, va_list args); + + /** + * @brief Calls a method by name on an object and retrieves a long return value. + * + * This function calls the specified method by its name and signature on an object using variadic arguments and + * retrieves a long result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the long return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Long)(ani_env *env, ani_object object, const char *name, const char *signature, + ani_long *result, ...); + + /** + * @brief Calls a method by name on an object and retrieves a long return value (array-based). + * + * This function calls the specified method by its name and signature on an object using arguments provided in an + * array and retrieves a long result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the long return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Long_A)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_long *result, const ani_value *args); + + /** + * @brief Calls a method by name on an object and retrieves a long return value (variadic arguments). + * + * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a + * long result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the long return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Long_V)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_long *result, va_list args); + + /** + * @brief Calls a method by name on an object and retrieves a float return value. + * + * This function calls the specified method by its name and signature on an object using variadic arguments and + * retrieves a float result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the float return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Float)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_float *result, ...); + + /** + * @brief Calls a method by name on an object and retrieves a float return value (array-based). + * + * This function calls the specified method by its name and signature on an object using arguments provided in an + * array and retrieves a float result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the float return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Float_A)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_float *result, const ani_value *args); + + /** + * @brief Calls a method by name on an object and retrieves a float return value (variadic arguments). + * + * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a + * float result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the float return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Float_V)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_float *result, va_list args); + + /** + * @brief Calls a method by name on an object and retrieves a double return value. + * + * This function calls the specified method by its name and signature on an object using variadic arguments and + * retrieves a double result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the double return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Double)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_double *result, ...); + + /** + * @brief Calls a method by name on an object and retrieves a double return value (array-based). + * + * This function calls the specified method by its name and signature on an object using arguments provided in an + * array and retrieves a double result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the double return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Double_A)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_double *result, const ani_value *args); + + /** + * @brief Calls a method by name on an object and retrieves a double return value (variadic arguments). + * + * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a + * double result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the double return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Double_V)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_double *result, va_list args); + + /** + * @brief Calls a method by name on an object and retrieves a reference return value. + * + * This function calls the specified method by its name and signature on an object using variadic arguments and + * retrieves a reference result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the reference return value. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Ref)(ani_env *env, ani_object object, const char *name, const char *signature, + ani_ref *result, ...); + + /** + * @brief Calls a method by name on an object and retrieves a reference return value (array-based). + * + * This function calls the specified method by its name and signature on an object using arguments provided in an + * array and retrieves a reference result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the reference return value. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Ref_A)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_ref *result, const ani_value *args); + + /** + * @brief Calls a method by name on an object and retrieves a reference return value (variadic arguments). + * + * This function calls the specified method by its name and signature on an object using a `va_list` and retrieves a + * reference result. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[out] result A pointer to store the reference return value. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Ref_V)(ani_env *env, ani_object object, const char *name, + const char *signature, ani_ref *result, va_list args); + + /** + * @brief Calls a method by name on an object with no return value. + * + * This function calls the specified method by its name and signature on an object using variadic arguments. The + * method does not return a value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[in] ... Variadic arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Void)(ani_env *env, ani_object object, const char *name, const char *signature, + ...); + + /** + * @brief Calls a method by name on an object with no return value (array-based). + * + * This function calls the specified method by its name and signature on an object using arguments provided in an + * array. The method does not return a value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[in] args An array of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Void_A)(ani_env *env, ani_object object, const char *name, + const char *signature, const ani_value *args); + + /** + * @brief Calls a method by name on an object with no return value (variadic arguments). + * + * This function calls the specified method by its name and signature on an object using a `va_list`. The method + * does not return a value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] object The object on which the method is to be called. + * @param[in] name The name of the method to call. + * @param[in] signature The signature of the method to call. + * @param[in] args A `va_list` of arguments to pass to the method. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Object_CallMethodByName_Void_V)(ani_env *env, ani_object object, const char *name, + const char *signature, va_list args); + + /** + * @brief Retrieves the number of items in a tuple value. + * + * This function retrieves the total number of items in the specified tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value whose number of items is to be retrieved. + * @param[out] result A pointer to store the number of items. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_GetNumberOfItems)(ani_env *env, ani_tuple_value tuple_value, ani_size *result); + + /** + * @brief Retrieves a boolean item from a tuple value. + * + * This function retrieves the boolean value of the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[out] result A pointer to store the boolean value of the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_GetItem_Boolean)(ani_env *env, ani_tuple_value tuple_value, ani_size index, + ani_boolean *result); + + /** + * @brief Retrieves a char item from a tuple value. + * + * This function retrieves the char value of the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[out] result A pointer to store the char value of the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_GetItem_Char)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_char *result); + + /** + * @brief Retrieves a byte item from a tuple value. + * + * This function retrieves the byte value of the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[out] result A pointer to store the byte value of the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_GetItem_Byte)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_byte *result); + + /** + * @brief Retrieves a short item from a tuple value. + * + * This function retrieves the short value of the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[out] result A pointer to store the short value of the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_GetItem_Short)(ani_env *env, ani_tuple_value tuple_value, ani_size index, + ani_short *result); + + /** + * @brief Retrieves a integer item from a tuple value. + * + * This function retrieves the integer value of the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[out] result A pointer to store the integer value of the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_GetItem_Int)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_int *result); + + /** + * @brief Retrieves a long item from a tuple value. + * + * This function retrieves the long value of the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[out] result A pointer to store the long value of the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_GetItem_Long)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_long *result); + + /** + * @brief Retrieves a float item from a tuple value. + * + * This function retrieves the float value of the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[out] result A pointer to store the float value of the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_GetItem_Float)(ani_env *env, ani_tuple_value tuple_value, ani_size index, + ani_float *result); + + /** + * @brief Retrieves a double item from a tuple value. + * + * This function retrieves the double value of the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[out] result A pointer to store the double value of the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_GetItem_Double)(ani_env *env, ani_tuple_value tuple_value, ani_size index, + ani_double *result); + + /** + * @brief Retrieves a reference item from a tuple value. + * + * This function retrieves the reference value of the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[out] result A pointer to store the reference value of the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_GetItem_Ref)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_ref *result); + + /** + * @brief Sets a boolean value to an item in a tuple value. + * + * This function assigns a boolean value to the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[in] value The boolean value to assign to the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_SetItem_Boolean)(ani_env *env, ani_tuple_value tuple_value, ani_size index, + ani_boolean value); + + /** + * @brief Sets a char value to an item in a tuple value. + * + * This function assigns a char value to the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[in] value The char value to assign to the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_SetItem_Char)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_char value); + + /** + * @brief Sets a byte value to an item in a tuple value. + * + * This function assigns a byte value to the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[in] value The byte value to assign to the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_SetItem_Byte)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_byte value); + + /** + * @brief Sets a short value to an item in a tuple value. + * + * This function assigns a short value to the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[in] value The short value to assign to the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_SetItem_Short)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_short value); + + /** + * @brief Sets a integer value to an item in a tuple value. + * + * This function assigns a integer value to the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[in] value The integer value to assign to the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_SetItem_Int)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_int value); + + /** + * @brief Sets a long value to an item in a tuple value. + * + * This function assigns a long value to the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[in] value The long value to assign to the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_SetItem_Long)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_long value); + + /** + * @brief Sets a float value to an item in a tuple value. + * + * This function assigns a float value to the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[in] value The float value to assign to the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_SetItem_Float)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_float value); + + /** + * @brief Sets a double value to an item in a tuple value. + * + * This function assigns a double value to the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[in] value The double value to assign to the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_SetItem_Double)(ani_env *env, ani_tuple_value tuple_value, ani_size index, + ani_double value); + + /** + * @brief Sets a reference value to an item in a tuple value. + * + * This function assigns a reference value to the item at the specified index in the tuple value. + * + * @param[in] env A pointer to the environment structure. + * @param[in] tuple_value The tuple value containing the item. + * @param[in] index The index of the item. + * @param[in] value The reference value to assign to the item. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*TupleValue_SetItem_Ref)(ani_env *env, ani_tuple_value tuple_value, ani_size index, ani_ref value); + + /** + * @brief Creates a global reference. + * + * This function creates a global reference from a local reference. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The local reference to convert to a global reference. + * @param[out] result A pointer to store the created global reference. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*GlobalReference_Create)(ani_env *env, ani_ref ref, ani_ref *result); + + /** + * @brief Deletes a global reference. + * + * This function deletes the specified global reference, releasing all associated resources. + * + * @param[in] env A pointer to the environment structure. + * @param[in] gref The global reference to delete. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*GlobalReference_Delete)(ani_env *env, ani_ref gref); + + /** + * @brief Creates a weak reference. + * + * This function creates a weak reference from a local reference. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The local reference to convert to a weak reference. + * @param[out] result A pointer to store the created weak reference. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*WeakReference_Create)(ani_env *env, ani_ref ref, ani_wref *result); + + /** + * @brief Deletes a weak reference. + * + * This function deletes the specified weak reference, releasing all associated resources. + * + * @param[in] env A pointer to the environment structure. + * @param[in] wref The weak reference to delete. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*WeakReference_Delete)(ani_env *env, ani_wref wref); + + /** + * @brief Retrieves the local reference associated with a weak reference. + * + * This function retrieves the local reference that corresponds to the specified weak reference. + * + * @param[in] env A pointer to the environment structure. + * @param[in] wref The weak reference to query. + * @param[out] was_released_result A pointer to boolean flag which indicates that wref is GC collected. + * @param[out] ref_result A pointer to store the retrieved local reference. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*WeakReference_GetReference)(ani_env *env, ani_wref wref, ani_boolean *was_released_result, + ani_ref *ref_result); + + /** + * @brief Creates a new array buffer. + * + * This function creates a new array buffer with the specified length and returns a pointer to the allocated data. + * + * @param[in] env A pointer to the environment structure. + * @param[in] length The length of the array buffer in bytes. + * @param[out] data_result A pointer to store the allocated data of the array buffer. + * @param[out] arraybuffer_result A pointer to store the created array buffer object. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*CreateArrayBuffer)(ani_env *env, size_t length, void **data_result, + ani_arraybuffer *arraybuffer_result); + + /** + * @brief Retrieves information about an array buffer. + * + * This function retrieves the data pointer and length of the specified array buffer. + * + * @param[in] env A pointer to the environment structure. + * @param[in] arraybuffer The array buffer to query. + * @param[out] data_result A pointer to store the data of the array buffer. + * @param[out] length_result A pointer to store the length of the array buffer in bytes. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*ArrayBuffer_GetInfo)(ani_env *env, ani_arraybuffer arraybuffer, void **data_result, + size_t *length_result); + + /** + * @brief Creates a new Promise. + * + * This function creates a new promise and a resolver to manage it. + * + * @param[in] env A pointer to the environment structure. + * @param[out] result_resolver A pointer to store the created resolver. + * @param[out] result_promise A pointer to store the created promise. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Promise_New)(ani_env *env, ani_resolver *result_resolver, ani_object *result_promise); + + /** + * @brief Resolves a promise. + * + * This function resolves a promise by way of the resolver with which it is associated + * and queues promise `then` callbacks. + * + * @param[in] env A pointer to the environment structure. + * @param[in] resolver A resolver whose associated promise to resolve. + * @param[in] resolution A reference with which to resolve the promise. + * @return Returns a status code of type `ani_status` indicating success or failure. + * The `resolver` is freed upon successful completion. + */ + ani_status (*PromiseResolver_Resolve)(ani_env *env, ani_resolver resolver, ani_ref resolution); + + /** + * @brief Rejects a promise. + * + * This function rejects a promise by way of the resolver with which it is associated + * and queues promise `catch` callbacks. + * + * @param[in] env A pointer to the environment structure. + * @param[in] resolver A resolver whose associated promise to resolve. + * @param[in] rejection An error with which to reject the promise. + * @return Returns a status code of type `ani_status` indicating success or failure. + * The `resolver` is freed upon successful completion. + */ + ani_status (*PromiseResolver_Reject)(ani_env *env, ani_resolver resolver, ani_error rejection); + + /** + * @brief Checks if Any reference is an instance of a specified Any type. + * + * This function checks whether the given Any reference is an instance of the specified Any type. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference to check. + * @param[in] type The type to compare against. + * @param[out] result A pointer to store the boolean result (true if the reference is an instance of the type, + * false otherwise). + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Any_InstanceOf)(ani_env *env, ani_ref ref, ani_ref type, ani_boolean *result); + + /** + * @brief Gets a property of an Any reference by name. + * + * This function retrieves the value of a named property from the given Any reference. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference from which to retrieve the property. + * @param[in] name The name of the property to retrieve. + * @param[out] result A pointer to store the retrieved property value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Any_GetProperty)(ani_env *env, ani_ref ref, const char *name, ani_ref *result); + + /** + * @brief Sets a property of an Any reference by name. + * + * This function sets the value of a named property on the given Any reference. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference on which to set the property. + * @param[in] name The name of the property to set. + * @param[in] value The value to assign to the property. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Any_SetProperty)(ani_env *env, ani_ref ref, const char *name, ani_ref value); + + /** + * @brief Gets an element of an Any reference by index. + * + * This function retrieves the value at a specific index from the given Any reference. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference from which to retrieve the element. + * @param[in] index The index of the element to retrieve. + * @param[out] result A pointer to store the retrieved value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Any_GetByIndex)(ani_env *env, ani_ref ref, ani_size index, ani_ref *result); + + /** + * @brief Sets an element of an Any reference by index. + * + * This function sets the value at a specific index on the given Any reference. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference on which to set the element. + * @param[in] index The index of the element to set. + * @param[in] value The value to assign to the specified index. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Any_SetByIndex)(ani_env *env, ani_ref ref, ani_size index, ani_ref value); + + /** + * @brief Gets a property of an Any reference by key reference. + * + * This function retrieves the value of a property using another Any reference as the key. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference from which to retrieve the property. + * @param[in] key The key reference used to access the property. + * @param[out] result A pointer to store the retrieved property value. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Any_GetByValue)(ani_env *env, ani_ref ref, ani_ref key, ani_ref *result); + + /** + * @brief Sets a property of an Any reference by key reference. + * + * This function sets the value of a property using another Any reference as the key. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ref The reference on which to set the property. + * @param[in] key The key reference used to access the property. + * @param[in] value The value to assign to the specified key. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Any_SetByValue)(ani_env *env, ani_ref ref, ani_ref key, ani_ref value); + + /** + * @brief Calls an Any reference as a function. + * + * This function invokes the given Any reference if it represents a callable object. + * + * @param[in] env A pointer to the environment structure. + * @param[in] func The function reference to invoke. + * @param[in] argc The number of arguments. + * @param[in] argv An array of argument references. + * @param[out] result A pointer to store the function call result. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Any_Call)(ani_env *env, ani_ref func, ani_size argc, ani_ref *argv, ani_ref *result); + + /** + * @brief Calls a method of an Any reference by name. + * + * This function invokes a named method on the given Any reference. + * + * @param[in] env A pointer to the environment structure. + * @param[in] self The object reference on which to invoke the method. + * @param[in] name The name of the method to invoke. + * @param[in] argc The number of arguments. + * @param[in] argv An array of argument references. + * @param[out] result A pointer to store the method call result. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Any_CallMethod)(ani_env *env, ani_ref self, const char *name, ani_size argc, ani_ref *argv, + ani_ref *result); + + /** + * @brief Constructs a new object using an Any reference as a constructor. + * + * This function creates a new object using the given constructor reference and arguments. + * + * @param[in] env A pointer to the environment structure. + * @param[in] ctor The constructor function reference. + * @param[in] argc The number of arguments. + * @param[in] argv An array of argument references. + * @param[out] result A pointer to store the created object reference. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Any_New)(ani_env *env, ani_ref ctor, ani_size argc, ani_ref *argv, ani_ref *result); + + /** + * @brief Binds static native methods to a class. + * + * This function binds an array of static native methods to the specified class. + * + * @param[in] env A pointer to the environment structure. + * @param[in] cls The class to which the native methods will be bound. + * @param[in] methods A pointer to an array of static native methods to bind. + * @param[in] nr_methods The number of static native methods in the array. + * @return Returns a status code of type `ani_status` indicating success or failure. + */ + ani_status (*Class_BindStaticNativeMethods)(ani_env *env, ani_class cls, const ani_native_function *methods, + ani_size nr_methods); +}; + +// C++ API +struct __ani_vm { + const struct __ani_vm_api *c_api; + +#ifdef __cplusplus + ani_status DestroyVM() + { + return c_api->DestroyVM(this); + } + ani_status GetEnv(uint32_t version, ani_env **result) + { + return c_api->GetEnv(this, version, result); + } + ani_status AttachCurrentThread(const ani_options *options, uint32_t version, ani_env **result) + { + return c_api->AttachCurrentThread(this, options, version, result); + } + ani_status DetachCurrentThread() + { + return c_api->DetachCurrentThread(this); + } +#endif // __cplusplus +}; + +struct __ani_env { + const struct __ani_interaction_api *c_api; + +#ifdef __cplusplus + ani_status GetVersion(uint32_t *result) + { + return c_api->GetVersion(this, result); + } + ani_status GetVM(ani_vm **result) + { + return c_api->GetVM(this, result); + } + ani_status Object_New(ani_class cls, ani_method method, ani_object *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_New_V(this, cls, method, result, args); + va_end(args); + return status; + } + ani_status Object_New_A(ani_class cls, ani_method method, ani_object *result, const ani_value *args) + { + return c_api->Object_New_A(this, cls, method, result, args); + } + ani_status Object_New_V(ani_class cls, ani_method method, ani_object *result, va_list args) + { + return c_api->Object_New_V(this, cls, method, result, args); + } + ani_status Object_GetType(ani_object object, ani_type *result) + { + return c_api->Object_GetType(this, object, result); + } + ani_status Object_InstanceOf(ani_object object, ani_type type, ani_boolean *result) + { + return c_api->Object_InstanceOf(this, object, type, result); + } + ani_status Type_GetSuperClass(ani_type type, ani_class *result) + { + return c_api->Type_GetSuperClass(this, type, result); + } + ani_status Type_IsAssignableFrom(ani_type from_type, ani_type to_type, ani_boolean *result) + { + return c_api->Type_IsAssignableFrom(this, from_type, to_type, result); + } + ani_status FindModule(const char *module_descriptor, ani_module *result) + { + return c_api->FindModule(this, module_descriptor, result); + } + ani_status FindNamespace(const char *namespace_descriptor, ani_namespace *result) + { + return c_api->FindNamespace(this, namespace_descriptor, result); + } + ani_status FindClass(const char *class_descriptor, ani_class *result) + { + return c_api->FindClass(this, class_descriptor, result); + } + ani_status FindEnum(const char *enum_descriptor, ani_enum *result) + { + return c_api->FindEnum(this, enum_descriptor, result); + } + ani_status Module_FindNamespace(ani_module module, const char *namespace_descriptor, ani_namespace *result) + { + return c_api->Module_FindNamespace(this, module, namespace_descriptor, result); + } + ani_status Module_FindClass(ani_module module, const char *class_descriptor, ani_class *result) + { + return c_api->Module_FindClass(this, module, class_descriptor, result); + } + ani_status Module_FindEnum(ani_module module, const char *enum_descriptor, ani_enum *result) + { + return c_api->Module_FindEnum(this, module, enum_descriptor, result); + } + ani_status Module_FindFunction(ani_module module, const char *name, const char *signature, ani_function *result) + { + return c_api->Module_FindFunction(this, module, name, signature, result); + } + ani_status Module_FindVariable(ani_module module, const char *name, ani_variable *result) + { + return c_api->Module_FindVariable(this, module, name, result); + } + ani_status Namespace_FindNamespace(ani_namespace ns, const char *namespace_descriptor, ani_namespace *result) + { + return c_api->Namespace_FindNamespace(this, ns, namespace_descriptor, result); + } + ani_status Namespace_FindClass(ani_namespace ns, const char *class_descriptor, ani_class *result) + { + return c_api->Namespace_FindClass(this, ns, class_descriptor, result); + } + ani_status Namespace_FindEnum(ani_namespace ns, const char *enum_descriptor, ani_enum *result) + { + return c_api->Namespace_FindEnum(this, ns, enum_descriptor, result); + } + ani_status Namespace_FindFunction(ani_namespace ns, const char *name, const char *signature, ani_function *result) + { + return c_api->Namespace_FindFunction(this, ns, name, signature, result); + } + ani_status Namespace_FindVariable(ani_namespace ns, const char *name, ani_variable *result) + { + return c_api->Namespace_FindVariable(this, ns, name, result); + } + ani_status Module_BindNativeFunctions(ani_module module, const ani_native_function *functions, + ani_size nr_functions) + { + return c_api->Module_BindNativeFunctions(this, module, functions, nr_functions); + } + ani_status Namespace_BindNativeFunctions(ani_namespace ns, const ani_native_function *functions, + ani_size nr_functions) + { + return c_api->Namespace_BindNativeFunctions(this, ns, functions, nr_functions); + } + ani_status Class_BindNativeMethods(ani_class cls, const ani_native_function *methods, ani_size nr_methods) + { + return c_api->Class_BindNativeMethods(this, cls, methods, nr_methods); + } + ani_status Reference_Delete(ani_ref ref) + { + return c_api->Reference_Delete(this, ref); + } + ani_status EnsureEnoughReferences(ani_size nr_refs) + { + return c_api->EnsureEnoughReferences(this, nr_refs); + } + ani_status CreateLocalScope(ani_size nr_refs) + { + return c_api->CreateLocalScope(this, nr_refs); + } + ani_status DestroyLocalScope() + { + return c_api->DestroyLocalScope(this); + } + ani_status CreateEscapeLocalScope(ani_size nr_refs) + { + return c_api->CreateEscapeLocalScope(this, nr_refs); + } + ani_status DestroyEscapeLocalScope(ani_ref ref, ani_ref *result) + { + return c_api->DestroyEscapeLocalScope(this, ref, result); + } + ani_status ThrowError(ani_error err) + { + return c_api->ThrowError(this, err); + } + ani_status ExistUnhandledError(ani_boolean *result) + { + return c_api->ExistUnhandledError(this, result); + } + ani_status GetUnhandledError(ani_error *result) + { + return c_api->GetUnhandledError(this, result); + } + ani_status ResetError() + { + return c_api->ResetError(this); + } + ani_status DescribeError() + { + return c_api->DescribeError(this); + } + ani_status Abort(const char *message) + { + return c_api->Abort(this, message); + } + ani_status GetNull(ani_ref *result) + { + return c_api->GetNull(this, result); + } + ani_status GetUndefined(ani_ref *result) + { + return c_api->GetUndefined(this, result); + } + ani_status Reference_IsNull(ani_ref ref, ani_boolean *result) + { + return c_api->Reference_IsNull(this, ref, result); + } + ani_status Reference_IsUndefined(ani_ref ref, ani_boolean *result) + { + return c_api->Reference_IsUndefined(this, ref, result); + } + ani_status Reference_IsNullishValue(ani_ref ref, ani_boolean *result) + { + return c_api->Reference_IsNullishValue(this, ref, result); + } + ani_status Reference_Equals(ani_ref ref0, ani_ref ref1, ani_boolean *result) + { + return c_api->Reference_Equals(this, ref0, ref1, result); + } + ani_status Reference_StrictEquals(ani_ref ref0, ani_ref ref1, ani_boolean *result) + { + return c_api->Reference_StrictEquals(this, ref0, ref1, result); + } + ani_status String_NewUTF16(const uint16_t *utf16_string, ani_size utf16_size, ani_string *result) + { + return c_api->String_NewUTF16(this, utf16_string, utf16_size, result); + } + ani_status String_GetUTF16Size(ani_string string, ani_size *result) + { + return c_api->String_GetUTF16Size(this, string, result); + } + ani_status String_GetUTF16(ani_string string, uint16_t *utf16_buffer, ani_size utf16_buffer_size, ani_size *result) + { + return c_api->String_GetUTF16(this, string, utf16_buffer, utf16_buffer_size, result); + } + ani_status String_GetUTF16SubString(ani_string string, ani_size substr_offset, ani_size substr_size, + uint16_t *utf16_buffer, ani_size utf16_buffer_size, ani_size *result) + { + return c_api->String_GetUTF16SubString(this, string, substr_offset, substr_size, utf16_buffer, + utf16_buffer_size, result); + } + ani_status String_NewUTF8(const char *utf8_string, ani_size utf8_size, ani_string *result) + { + return c_api->String_NewUTF8(this, utf8_string, utf8_size, result); + } + ani_status String_GetUTF8Size(ani_string string, ani_size *result) + { + return c_api->String_GetUTF8Size(this, string, result); + } + ani_status String_GetUTF8(ani_string string, char *utf8_buffer, ani_size utf8_buffer_size, ani_size *result) + { + return c_api->String_GetUTF8(this, string, utf8_buffer, utf8_buffer_size, result); + } + ani_status String_GetUTF8SubString(ani_string string, ani_size substr_offset, ani_size substr_size, + char *utf8_buffer, ani_size utf8_buffer_size, ani_size *result) + { + return c_api->String_GetUTF8SubString(this, string, substr_offset, substr_size, utf8_buffer, utf8_buffer_size, + result); + } + ani_status Array_GetLength(ani_array array, ani_size *result) + { + return c_api->Array_GetLength(this, array, result); + } + ani_status Array_New_Boolean(ani_size length, ani_array_boolean *result) + { + return c_api->Array_New_Boolean(this, length, result); + } + ani_status Array_New_Char(ani_size length, ani_array_char *result) + { + return c_api->Array_New_Char(this, length, result); + } + ani_status Array_New_Byte(ani_size length, ani_array_byte *result) + { + return c_api->Array_New_Byte(this, length, result); + } + ani_status Array_New_Short(ani_size length, ani_array_short *result) + { + return c_api->Array_New_Short(this, length, result); + } + ani_status Array_New_Int(ani_size length, ani_array_int *result) + { + return c_api->Array_New_Int(this, length, result); + } + ani_status Array_New_Long(ani_size length, ani_array_long *result) + { + return c_api->Array_New_Long(this, length, result); + } + ani_status Array_New_Float(ani_size length, ani_array_float *result) + { + return c_api->Array_New_Float(this, length, result); + } + ani_status Array_New_Double(ani_size length, ani_array_double *result) + { + return c_api->Array_New_Double(this, length, result); + } + ani_status Array_GetRegion_Boolean(ani_array_boolean array, ani_size offset, ani_size length, + ani_boolean *native_buffer) + { + return c_api->Array_GetRegion_Boolean(this, array, offset, length, native_buffer); + } + ani_status Array_GetRegion_Char(ani_array_char array, ani_size offset, ani_size length, ani_char *native_buffer) + { + return c_api->Array_GetRegion_Char(this, array, offset, length, native_buffer); + } + ani_status Array_GetRegion_Byte(ani_array_byte array, ani_size offset, ani_size length, ani_byte *native_buffer) + { + return c_api->Array_GetRegion_Byte(this, array, offset, length, native_buffer); + } + ani_status Array_GetRegion_Short(ani_array_short array, ani_size offset, ani_size length, ani_short *native_buffer) + { + return c_api->Array_GetRegion_Short(this, array, offset, length, native_buffer); + } + ani_status Array_GetRegion_Int(ani_array_int array, ani_size offset, ani_size length, ani_int *native_buffer) + { + return c_api->Array_GetRegion_Int(this, array, offset, length, native_buffer); + } + ani_status Array_GetRegion_Long(ani_array_long array, ani_size offset, ani_size length, ani_long *native_buffer) + { + return c_api->Array_GetRegion_Long(this, array, offset, length, native_buffer); + } + ani_status Array_GetRegion_Float(ani_array_float array, ani_size offset, ani_size length, ani_float *native_buffer) + { + return c_api->Array_GetRegion_Float(this, array, offset, length, native_buffer); + } + ani_status Array_GetRegion_Double(ani_array_double array, ani_size offset, ani_size length, + ani_double *native_buffer) + { + return c_api->Array_GetRegion_Double(this, array, offset, length, native_buffer); + } + ani_status Array_SetRegion_Boolean(ani_array_boolean array, ani_size offset, ani_size length, + const ani_boolean *native_buffer) + { + return c_api->Array_SetRegion_Boolean(this, array, offset, length, native_buffer); + } + ani_status Array_SetRegion_Char(ani_array_char array, ani_size offset, ani_size length, + const ani_char *native_buffer) + { + return c_api->Array_SetRegion_Char(this, array, offset, length, native_buffer); + } + ani_status Array_SetRegion_Byte(ani_array_byte array, ani_size offset, ani_size length, + const ani_byte *native_buffer) + { + return c_api->Array_SetRegion_Byte(this, array, offset, length, native_buffer); + } + ani_status Array_SetRegion_Short(ani_array_short array, ani_size offset, ani_size length, + const ani_short *native_buffer) + { + return c_api->Array_SetRegion_Short(this, array, offset, length, native_buffer); + } + ani_status Array_SetRegion_Int(ani_array_int array, ani_size offset, ani_size length, const ani_int *native_buffer) + { + return c_api->Array_SetRegion_Int(this, array, offset, length, native_buffer); + } + ani_status Array_SetRegion_Long(ani_array_long array, ani_size offset, ani_size length, + const ani_long *native_buffer) + { + return c_api->Array_SetRegion_Long(this, array, offset, length, native_buffer); + } + ani_status Array_SetRegion_Float(ani_array_float array, ani_size offset, ani_size length, + const ani_float *native_buffer) + { + return c_api->Array_SetRegion_Float(this, array, offset, length, native_buffer); + } + ani_status Array_SetRegion_Double(ani_array_double array, ani_size offset, ani_size length, + const ani_double *native_buffer) + { + return c_api->Array_SetRegion_Double(this, array, offset, length, native_buffer); + } + ani_status Array_New_Ref(ani_type type, ani_size length, ani_ref initial_element, ani_array_ref *result) + { + return c_api->Array_New_Ref(this, type, length, initial_element, result); + } + ani_status Array_Set_Ref(ani_array_ref array, ani_size index, ani_ref ref) + { + return c_api->Array_Set_Ref(this, array, index, ref); + } + ani_status Array_Get_Ref(ani_array_ref array, ani_size index, ani_ref *result) + { + return c_api->Array_Get_Ref(this, array, index, result); + } + ani_status Array_New(ani_size length, ani_ref initial_element, ani_array *result) + { + return c_api->Array_New(this, length, initial_element, result); + } + ani_status Array_Set(ani_array array, ani_size index, ani_ref ref) + { + return c_api->Array_Set(this, array, index, ref); + } + ani_status Array_Get(ani_array array, ani_size index, ani_ref *result) + { + return c_api->Array_Get(this, array, index, result); + } + ani_status Array_Push(ani_array array, ani_ref ref) + { + return c_api->Array_Push(this, array, ref); + } + ani_status Array_Pop(ani_array array, ani_ref *result) + { + return c_api->Array_Pop(this, array, result); + } + ani_status FixedArray_GetLength(ani_fixedarray array, ani_size *result) + { + return c_api->FixedArray_GetLength(this, array, result); + } + ani_status FixedArray_New_Boolean(ani_size length, ani_fixedarray_boolean *result) + { + return c_api->FixedArray_New_Boolean(this, length, result); + } + ani_status FixedArray_New_Char(ani_size length, ani_fixedarray_char *result) + { + return c_api->FixedArray_New_Char(this, length, result); + } + ani_status FixedArray_New_Byte(ani_size length, ani_fixedarray_byte *result) + { + return c_api->FixedArray_New_Byte(this, length, result); + } + ani_status FixedArray_New_Short(ani_size length, ani_fixedarray_short *result) + { + return c_api->FixedArray_New_Short(this, length, result); + } + ani_status FixedArray_New_Int(ani_size length, ani_fixedarray_int *result) + { + return c_api->FixedArray_New_Int(this, length, result); + } + ani_status FixedArray_New_Long(ani_size length, ani_fixedarray_long *result) + { + return c_api->FixedArray_New_Long(this, length, result); + } + ani_status FixedArray_New_Float(ani_size length, ani_fixedarray_float *result) + { + return c_api->FixedArray_New_Float(this, length, result); + } + ani_status FixedArray_New_Double(ani_size length, ani_fixedarray_double *result) + { + return c_api->FixedArray_New_Double(this, length, result); + } + ani_status FixedArray_GetRegion_Boolean(ani_fixedarray_boolean array, ani_size offset, ani_size length, + ani_boolean *native_buffer) + { + return c_api->FixedArray_GetRegion_Boolean(this, array, offset, length, native_buffer); + } + ani_status FixedArray_GetRegion_Char(ani_fixedarray_char array, ani_size offset, ani_size length, + ani_char *native_buffer) + { + return c_api->FixedArray_GetRegion_Char(this, array, offset, length, native_buffer); + } + ani_status FixedArray_GetRegion_Byte(ani_fixedarray_byte array, ani_size offset, ani_size length, + ani_byte *native_buffer) + { + return c_api->FixedArray_GetRegion_Byte(this, array, offset, length, native_buffer); + } + ani_status FixedArray_GetRegion_Short(ani_fixedarray_short array, ani_size offset, ani_size length, + ani_short *native_buffer) + { + return c_api->FixedArray_GetRegion_Short(this, array, offset, length, native_buffer); + } + ani_status FixedArray_GetRegion_Int(ani_fixedarray_int array, ani_size offset, ani_size length, + ani_int *native_buffer) + { + return c_api->FixedArray_GetRegion_Int(this, array, offset, length, native_buffer); + } + ani_status FixedArray_GetRegion_Long(ani_fixedarray_long array, ani_size offset, ani_size length, + ani_long *native_buffer) + { + return c_api->FixedArray_GetRegion_Long(this, array, offset, length, native_buffer); + } + ani_status FixedArray_GetRegion_Float(ani_fixedarray_float array, ani_size offset, ani_size length, + ani_float *native_buffer) + { + return c_api->FixedArray_GetRegion_Float(this, array, offset, length, native_buffer); + } + ani_status FixedArray_GetRegion_Double(ani_fixedarray_double array, ani_size offset, ani_size length, + ani_double *native_buffer) + { + return c_api->FixedArray_GetRegion_Double(this, array, offset, length, native_buffer); + } + ani_status FixedArray_SetRegion_Boolean(ani_fixedarray_boolean array, ani_size offset, ani_size length, + const ani_boolean *native_buffer) + { + return c_api->FixedArray_SetRegion_Boolean(this, array, offset, length, native_buffer); + } + ani_status FixedArray_SetRegion_Char(ani_fixedarray_char array, ani_size offset, ani_size length, + const ani_char *native_buffer) + { + return c_api->FixedArray_SetRegion_Char(this, array, offset, length, native_buffer); + } + ani_status FixedArray_SetRegion_Byte(ani_fixedarray_byte array, ani_size offset, ani_size length, + const ani_byte *native_buffer) + { + return c_api->FixedArray_SetRegion_Byte(this, array, offset, length, native_buffer); + } + ani_status FixedArray_SetRegion_Short(ani_fixedarray_short array, ani_size offset, ani_size length, + const ani_short *native_buffer) + { + return c_api->FixedArray_SetRegion_Short(this, array, offset, length, native_buffer); + } + ani_status FixedArray_SetRegion_Int(ani_fixedarray_int array, ani_size offset, ani_size length, + const ani_int *native_buffer) + { + return c_api->FixedArray_SetRegion_Int(this, array, offset, length, native_buffer); + } + ani_status FixedArray_SetRegion_Long(ani_fixedarray_long array, ani_size offset, ani_size length, + const ani_long *native_buffer) + { + return c_api->FixedArray_SetRegion_Long(this, array, offset, length, native_buffer); + } + ani_status FixedArray_SetRegion_Float(ani_fixedarray_float array, ani_size offset, ani_size length, + const ani_float *native_buffer) + { + return c_api->FixedArray_SetRegion_Float(this, array, offset, length, native_buffer); + } + ani_status FixedArray_SetRegion_Double(ani_fixedarray_double array, ani_size offset, ani_size length, + const ani_double *native_buffer) + { + return c_api->FixedArray_SetRegion_Double(this, array, offset, length, native_buffer); + } + ani_status FixedArray_New_Ref(ani_type type, ani_size length, ani_ref initial_element, ani_fixedarray_ref *result) + { + return c_api->FixedArray_New_Ref(this, type, length, initial_element, result); + } + ani_status FixedArray_Set_Ref(ani_fixedarray_ref array, ani_size index, ani_ref ref) + { + return c_api->FixedArray_Set_Ref(this, array, index, ref); + } + ani_status FixedArray_Get_Ref(ani_fixedarray_ref array, ani_size index, ani_ref *result) + { + return c_api->FixedArray_Get_Ref(this, array, index, result); + } + ani_status Enum_GetEnumItemByName(ani_enum enm, const char *name, ani_enum_item *result) + { + return c_api->Enum_GetEnumItemByName(this, enm, name, result); + } + ani_status Enum_GetEnumItemByIndex(ani_enum enm, ani_size index, ani_enum_item *result) + { + return c_api->Enum_GetEnumItemByIndex(this, enm, index, result); + } + ani_status EnumItem_GetEnum(ani_enum_item enum_item, ani_enum *result) + { + return c_api->EnumItem_GetEnum(this, enum_item, result); + } + ani_status EnumItem_GetValue_Int(ani_enum_item enum_item, ani_int *result) + { + return c_api->EnumItem_GetValue_Int(this, enum_item, result); + } + ani_status EnumItem_GetValue_String(ani_enum_item enum_item, ani_string *result) + { + return c_api->EnumItem_GetValue_String(this, enum_item, result); + } + ani_status EnumItem_GetName(ani_enum_item enum_item, ani_string *result) + { + return c_api->EnumItem_GetName(this, enum_item, result); + } + ani_status EnumItem_GetIndex(ani_enum_item enum_item, ani_size *result) + { + return c_api->EnumItem_GetIndex(this, enum_item, result); + } + ani_status FunctionalObject_Call(ani_fn_object fn, ani_size argc, ani_ref *argv, ani_ref *result) + { + return c_api->FunctionalObject_Call(this, fn, argc, argv, result); + } + ani_status Variable_SetValue_Boolean(ani_variable variable, ani_boolean value) + { + return c_api->Variable_SetValue_Boolean(this, variable, value); + } + ani_status Variable_SetValue_Char(ani_variable variable, ani_char value) + { + return c_api->Variable_SetValue_Char(this, variable, value); + } + ani_status Variable_SetValue_Byte(ani_variable variable, ani_byte value) + { + return c_api->Variable_SetValue_Byte(this, variable, value); + } + ani_status Variable_SetValue_Short(ani_variable variable, ani_short value) + { + return c_api->Variable_SetValue_Short(this, variable, value); + } + ani_status Variable_SetValue_Int(ani_variable variable, ani_int value) + { + return c_api->Variable_SetValue_Int(this, variable, value); + } + ani_status Variable_SetValue_Long(ani_variable variable, ani_long value) + { + return c_api->Variable_SetValue_Long(this, variable, value); + } + ani_status Variable_SetValue_Float(ani_variable variable, ani_float value) + { + return c_api->Variable_SetValue_Float(this, variable, value); + } + ani_status Variable_SetValue_Double(ani_variable variable, ani_double value) + { + return c_api->Variable_SetValue_Double(this, variable, value); + } + ani_status Variable_SetValue_Ref(ani_variable variable, ani_ref value) + { + return c_api->Variable_SetValue_Ref(this, variable, value); + } + ani_status Variable_GetValue_Boolean(ani_variable variable, ani_boolean *result) + { + return c_api->Variable_GetValue_Boolean(this, variable, result); + } + ani_status Variable_GetValue_Char(ani_variable variable, ani_char *result) + { + return c_api->Variable_GetValue_Char(this, variable, result); + } + ani_status Variable_GetValue_Byte(ani_variable variable, ani_byte *result) + { + return c_api->Variable_GetValue_Byte(this, variable, result); + } + ani_status Variable_GetValue_Short(ani_variable variable, ani_short *result) + { + return c_api->Variable_GetValue_Short(this, variable, result); + } + ani_status Variable_GetValue_Int(ani_variable variable, ani_int *result) + { + return c_api->Variable_GetValue_Int(this, variable, result); + } + ani_status Variable_GetValue_Long(ani_variable variable, ani_long *result) + { + return c_api->Variable_GetValue_Long(this, variable, result); + } + ani_status Variable_GetValue_Float(ani_variable variable, ani_float *result) + { + return c_api->Variable_GetValue_Float(this, variable, result); + } + ani_status Variable_GetValue_Double(ani_variable variable, ani_double *result) + { + return c_api->Variable_GetValue_Double(this, variable, result); + } + ani_status Variable_GetValue_Ref(ani_variable variable, ani_ref *result) + { + return c_api->Variable_GetValue_Ref(this, variable, result); + } + ani_status Function_Call_Boolean(ani_function fn, ani_boolean *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Function_Call_Boolean_V(this, fn, result, args); + va_end(args); + return status; + } + ani_status Function_Call_Boolean_A(ani_function fn, ani_boolean *result, const ani_value *args) + { + return c_api->Function_Call_Boolean_A(this, fn, result, args); + } + ani_status Function_Call_Boolean_V(ani_function fn, ani_boolean *result, va_list args) + { + return c_api->Function_Call_Boolean_V(this, fn, result, args); + } + ani_status Function_Call_Char(ani_function fn, ani_char *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Function_Call_Char_V(this, fn, result, args); + va_end(args); + return status; + } + ani_status Function_Call_Char_A(ani_function fn, ani_char *result, const ani_value *args) + { + return c_api->Function_Call_Char_A(this, fn, result, args); + } + ani_status Function_Call_Char_V(ani_function fn, ani_char *result, va_list args) + { + return c_api->Function_Call_Char_V(this, fn, result, args); + } + ani_status Function_Call_Byte(ani_function fn, ani_byte *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Function_Call_Byte_V(this, fn, result, args); + va_end(args); + return status; + } + ani_status Function_Call_Byte_A(ani_function fn, ani_byte *result, const ani_value *args) + { + return c_api->Function_Call_Byte_A(this, fn, result, args); + } + ani_status Function_Call_Byte_V(ani_function fn, ani_byte *result, va_list args) + { + return c_api->Function_Call_Byte_V(this, fn, result, args); + } + ani_status Function_Call_Short(ani_function fn, ani_short *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Function_Call_Short_V(this, fn, result, args); + va_end(args); + return status; + } + ani_status Function_Call_Short_A(ani_function fn, ani_short *result, const ani_value *args) + { + return c_api->Function_Call_Short_A(this, fn, result, args); + } + ani_status Function_Call_Short_V(ani_function fn, ani_short *result, va_list args) + { + return c_api->Function_Call_Short_V(this, fn, result, args); + } + ani_status Function_Call_Int(ani_function fn, ani_int *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Function_Call_Int_V(this, fn, result, args); + va_end(args); + return status; + } + ani_status Function_Call_Int_A(ani_function fn, ani_int *result, const ani_value *args) + { + return c_api->Function_Call_Int_A(this, fn, result, args); + } + ani_status Function_Call_Int_V(ani_function fn, ani_int *result, va_list args) + { + return c_api->Function_Call_Int_V(this, fn, result, args); + } + ani_status Function_Call_Long(ani_function fn, ani_long *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Function_Call_Long_V(this, fn, result, args); + va_end(args); + return status; + } + ani_status Function_Call_Long_A(ani_function fn, ani_long *result, const ani_value *args) + { + return c_api->Function_Call_Long_A(this, fn, result, args); + } + ani_status Function_Call_Long_V(ani_function fn, ani_long *result, va_list args) + { + return c_api->Function_Call_Long_V(this, fn, result, args); + } + ani_status Function_Call_Float(ani_function fn, ani_float *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Function_Call_Float_V(this, fn, result, args); + va_end(args); + return status; + } + ani_status Function_Call_Float_A(ani_function fn, ani_float *result, const ani_value *args) + { + return c_api->Function_Call_Float_A(this, fn, result, args); + } + ani_status Function_Call_Float_V(ani_function fn, ani_float *result, va_list args) + { + return c_api->Function_Call_Float_V(this, fn, result, args); + } + ani_status Function_Call_Double(ani_function fn, ani_double *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Function_Call_Double_V(this, fn, result, args); + va_end(args); + return status; + } + ani_status Function_Call_Double_A(ani_function fn, ani_double *result, const ani_value *args) + { + return c_api->Function_Call_Double_A(this, fn, result, args); + } + ani_status Function_Call_Double_V(ani_function fn, ani_double *result, va_list args) + { + return c_api->Function_Call_Double_V(this, fn, result, args); + } + ani_status Function_Call_Ref(ani_function fn, ani_ref *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Function_Call_Ref_V(this, fn, result, args); + va_end(args); + return status; + } + ani_status Function_Call_Ref_A(ani_function fn, ani_ref *result, const ani_value *args) + { + return c_api->Function_Call_Ref_A(this, fn, result, args); + } + ani_status Function_Call_Ref_V(ani_function fn, ani_ref *result, va_list args) + { + return c_api->Function_Call_Ref_V(this, fn, result, args); + } + ani_status Function_Call_Void(ani_function fn, ...) + { + va_list args; + va_start(args, fn); + ani_status status = c_api->Function_Call_Void_V(this, fn, args); + va_end(args); + return status; + } + ani_status Function_Call_Void_A(ani_function fn, const ani_value *args) + { + return c_api->Function_Call_Void_A(this, fn, args); + } + ani_status Function_Call_Void_V(ani_function fn, va_list args) + { + return c_api->Function_Call_Void_V(this, fn, args); + } + ani_status Class_FindField(ani_class cls, const char *name, ani_field *result) + { + return c_api->Class_FindField(this, cls, name, result); + } + ani_status Class_FindStaticField(ani_class cls, const char *name, ani_static_field *result) + { + return c_api->Class_FindStaticField(this, cls, name, result); + } + ani_status Class_FindMethod(ani_class cls, const char *name, const char *signature, ani_method *result) + { + return c_api->Class_FindMethod(this, cls, name, signature, result); + } + ani_status Class_FindStaticMethod(ani_class cls, const char *name, const char *signature, ani_static_method *result) + { + return c_api->Class_FindStaticMethod(this, cls, name, signature, result); + } + ani_status Class_FindSetter(ani_class cls, const char *name, ani_method *result) + { + return c_api->Class_FindSetter(this, cls, name, result); + } + ani_status Class_FindGetter(ani_class cls, const char *name, ani_method *result) + { + return c_api->Class_FindGetter(this, cls, name, result); + } + ani_status Class_FindIndexableGetter(ani_class cls, const char *signature, ani_method *result) + { + return c_api->Class_FindIndexableGetter(this, cls, signature, result); + } + ani_status Class_FindIndexableSetter(ani_class cls, const char *signature, ani_method *result) + { + return c_api->Class_FindIndexableSetter(this, cls, signature, result); + } + ani_status Class_FindIterator(ani_class cls, ani_method *result) + { + return c_api->Class_FindIterator(this, cls, result); + } + ani_status Class_GetStaticField_Boolean(ani_class cls, ani_static_field field, ani_boolean *result) + { + return c_api->Class_GetStaticField_Boolean(this, cls, field, result); + } + ani_status Class_GetStaticField_Char(ani_class cls, ani_static_field field, ani_char *result) + { + return c_api->Class_GetStaticField_Char(this, cls, field, result); + } + ani_status Class_GetStaticField_Byte(ani_class cls, ani_static_field field, ani_byte *result) + { + return c_api->Class_GetStaticField_Byte(this, cls, field, result); + } + ani_status Class_GetStaticField_Short(ani_class cls, ani_static_field field, ani_short *result) + { + return c_api->Class_GetStaticField_Short(this, cls, field, result); + } + ani_status Class_GetStaticField_Int(ani_class cls, ani_static_field field, ani_int *result) + { + return c_api->Class_GetStaticField_Int(this, cls, field, result); + } + ani_status Class_GetStaticField_Long(ani_class cls, ani_static_field field, ani_long *result) + { + return c_api->Class_GetStaticField_Long(this, cls, field, result); + } + ani_status Class_GetStaticField_Float(ani_class cls, ani_static_field field, ani_float *result) + { + return c_api->Class_GetStaticField_Float(this, cls, field, result); + } + ani_status Class_GetStaticField_Double(ani_class cls, ani_static_field field, ani_double *result) + { + return c_api->Class_GetStaticField_Double(this, cls, field, result); + } + ani_status Class_GetStaticField_Ref(ani_class cls, ani_static_field field, ani_ref *result) + { + return c_api->Class_GetStaticField_Ref(this, cls, field, result); + } + ani_status Class_SetStaticField_Boolean(ani_class cls, ani_static_field field, ani_boolean value) + { + return c_api->Class_SetStaticField_Boolean(this, cls, field, value); + } + ani_status Class_SetStaticField_Char(ani_class cls, ani_static_field field, ani_char value) + { + return c_api->Class_SetStaticField_Char(this, cls, field, value); + } + ani_status Class_SetStaticField_Byte(ani_class cls, ani_static_field field, ani_byte value) + { + return c_api->Class_SetStaticField_Byte(this, cls, field, value); + } + ani_status Class_SetStaticField_Short(ani_class cls, ani_static_field field, ani_short value) + { + return c_api->Class_SetStaticField_Short(this, cls, field, value); + } + ani_status Class_SetStaticField_Int(ani_class cls, ani_static_field field, ani_int value) + { + return c_api->Class_SetStaticField_Int(this, cls, field, value); + } + ani_status Class_SetStaticField_Long(ani_class cls, ani_static_field field, ani_long value) + { + return c_api->Class_SetStaticField_Long(this, cls, field, value); + } + ani_status Class_SetStaticField_Float(ani_class cls, ani_static_field field, ani_float value) + { + return c_api->Class_SetStaticField_Float(this, cls, field, value); + } + ani_status Class_SetStaticField_Double(ani_class cls, ani_static_field field, ani_double value) + { + return c_api->Class_SetStaticField_Double(this, cls, field, value); + } + ani_status Class_SetStaticField_Ref(ani_class cls, ani_static_field field, ani_ref value) + { + return c_api->Class_SetStaticField_Ref(this, cls, field, value); + } + ani_status Class_GetStaticFieldByName_Boolean(ani_class cls, const char *name, ani_boolean *result) + { + return c_api->Class_GetStaticFieldByName_Boolean(this, cls, name, result); + } + ani_status Class_GetStaticFieldByName_Char(ani_class cls, const char *name, ani_char *result) + { + return c_api->Class_GetStaticFieldByName_Char(this, cls, name, result); + } + ani_status Class_GetStaticFieldByName_Byte(ani_class cls, const char *name, ani_byte *result) + { + return c_api->Class_GetStaticFieldByName_Byte(this, cls, name, result); + } + ani_status Class_GetStaticFieldByName_Short(ani_class cls, const char *name, ani_short *result) + { + return c_api->Class_GetStaticFieldByName_Short(this, cls, name, result); + } + ani_status Class_GetStaticFieldByName_Int(ani_class cls, const char *name, ani_int *result) + { + return c_api->Class_GetStaticFieldByName_Int(this, cls, name, result); + } + ani_status Class_GetStaticFieldByName_Long(ani_class cls, const char *name, ani_long *result) + { + return c_api->Class_GetStaticFieldByName_Long(this, cls, name, result); + } + ani_status Class_GetStaticFieldByName_Float(ani_class cls, const char *name, ani_float *result) + { + return c_api->Class_GetStaticFieldByName_Float(this, cls, name, result); + } + ani_status Class_GetStaticFieldByName_Double(ani_class cls, const char *name, ani_double *result) + { + return c_api->Class_GetStaticFieldByName_Double(this, cls, name, result); + } + ani_status Class_GetStaticFieldByName_Ref(ani_class cls, const char *name, ani_ref *result) + { + return c_api->Class_GetStaticFieldByName_Ref(this, cls, name, result); + } + ani_status Class_SetStaticFieldByName_Boolean(ani_class cls, const char *name, ani_boolean value) + { + return c_api->Class_SetStaticFieldByName_Boolean(this, cls, name, value); + } + ani_status Class_SetStaticFieldByName_Char(ani_class cls, const char *name, ani_char value) + { + return c_api->Class_SetStaticFieldByName_Char(this, cls, name, value); + } + ani_status Class_SetStaticFieldByName_Byte(ani_class cls, const char *name, ani_byte value) + { + return c_api->Class_SetStaticFieldByName_Byte(this, cls, name, value); + } + ani_status Class_SetStaticFieldByName_Short(ani_class cls, const char *name, ani_short value) + { + return c_api->Class_SetStaticFieldByName_Short(this, cls, name, value); + } + ani_status Class_SetStaticFieldByName_Int(ani_class cls, const char *name, ani_int value) + { + return c_api->Class_SetStaticFieldByName_Int(this, cls, name, value); + } + ani_status Class_SetStaticFieldByName_Long(ani_class cls, const char *name, ani_long value) + { + return c_api->Class_SetStaticFieldByName_Long(this, cls, name, value); + } + ani_status Class_SetStaticFieldByName_Float(ani_class cls, const char *name, ani_float value) + { + return c_api->Class_SetStaticFieldByName_Float(this, cls, name, value); + } + ani_status Class_SetStaticFieldByName_Double(ani_class cls, const char *name, ani_double value) + { + return c_api->Class_SetStaticFieldByName_Double(this, cls, name, value); + } + ani_status Class_SetStaticFieldByName_Ref(ani_class cls, const char *name, ani_ref value) + { + return c_api->Class_SetStaticFieldByName_Ref(this, cls, name, value); + } + ani_status Class_CallStaticMethod_Boolean(ani_class cls, ani_static_method method, ani_boolean *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethod_Boolean_V(this, cls, method, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethod_Boolean_A(ani_class cls, ani_static_method method, ani_boolean *result, + const ani_value *args) + { + return c_api->Class_CallStaticMethod_Boolean_A(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Boolean_V(ani_class cls, ani_static_method method, ani_boolean *result, + va_list args) + { + return c_api->Class_CallStaticMethod_Boolean_V(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Char(ani_class cls, ani_static_method method, ani_char *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethod_Char_V(this, cls, method, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethod_Char_A(ani_class cls, ani_static_method method, ani_char *result, + const ani_value *args) + { + return c_api->Class_CallStaticMethod_Char_A(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Char_V(ani_class cls, ani_static_method method, ani_char *result, va_list args) + { + return c_api->Class_CallStaticMethod_Char_V(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Byte(ani_class cls, ani_static_method method, ani_byte *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethod_Byte_V(this, cls, method, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethod_Byte_A(ani_class cls, ani_static_method method, ani_byte *result, + const ani_value *args) + { + return c_api->Class_CallStaticMethod_Byte_A(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Byte_V(ani_class cls, ani_static_method method, ani_byte *result, va_list args) + { + return c_api->Class_CallStaticMethod_Byte_V(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Short(ani_class cls, ani_static_method method, ani_short *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethod_Short_V(this, cls, method, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethod_Short_A(ani_class cls, ani_static_method method, ani_short *result, + const ani_value *args) + { + return c_api->Class_CallStaticMethod_Short_A(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Short_V(ani_class cls, ani_static_method method, ani_short *result, va_list args) + { + return c_api->Class_CallStaticMethod_Short_V(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Int(ani_class cls, ani_static_method method, ani_int *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethod_Int_V(this, cls, method, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethod_Int_A(ani_class cls, ani_static_method method, ani_int *result, + const ani_value *args) + { + return c_api->Class_CallStaticMethod_Int_A(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Int_V(ani_class cls, ani_static_method method, ani_int *result, va_list args) + { + return c_api->Class_CallStaticMethod_Int_V(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Long(ani_class cls, ani_static_method method, ani_long *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethod_Long_V(this, cls, method, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethod_Long_A(ani_class cls, ani_static_method method, ani_long *result, + const ani_value *args) + { + return c_api->Class_CallStaticMethod_Long_A(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Long_V(ani_class cls, ani_static_method method, ani_long *result, va_list args) + { + return c_api->Class_CallStaticMethod_Long_V(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Float(ani_class cls, ani_static_method method, ani_float *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethod_Float_V(this, cls, method, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethod_Float_A(ani_class cls, ani_static_method method, ani_float *result, + const ani_value *args) + { + return c_api->Class_CallStaticMethod_Float_A(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Float_V(ani_class cls, ani_static_method method, ani_float *result, va_list args) + { + return c_api->Class_CallStaticMethod_Float_V(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Double(ani_class cls, ani_static_method method, ani_double *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethod_Double_V(this, cls, method, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethod_Double_A(ani_class cls, ani_static_method method, ani_double *result, + const ani_value *args) + { + return c_api->Class_CallStaticMethod_Double_A(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Double_V(ani_class cls, ani_static_method method, ani_double *result, + va_list args) + { + return c_api->Class_CallStaticMethod_Double_V(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Ref(ani_class cls, ani_static_method method, ani_ref *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethod_Ref_V(this, cls, method, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethod_Ref_A(ani_class cls, ani_static_method method, ani_ref *result, + const ani_value *args) + { + return c_api->Class_CallStaticMethod_Ref_A(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Ref_V(ani_class cls, ani_static_method method, ani_ref *result, va_list args) + { + return c_api->Class_CallStaticMethod_Ref_V(this, cls, method, result, args); + } + ani_status Class_CallStaticMethod_Void(ani_class cls, ani_static_method method, ...) + { + va_list args; + va_start(args, method); + ani_status status = c_api->Class_CallStaticMethod_Void_V(this, cls, method, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethod_Void_A(ani_class cls, ani_static_method method, const ani_value *args) + { + return c_api->Class_CallStaticMethod_Void_A(this, cls, method, args); + } + ani_status Class_CallStaticMethod_Void_V(ani_class cls, ani_static_method method, va_list args) + { + return c_api->Class_CallStaticMethod_Void_V(this, cls, method, args); + } + ani_status Class_CallStaticMethodByName_Boolean(ani_class cls, const char *name, const char *signature, + ani_boolean *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethodByName_Boolean_V(this, cls, name, signature, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethodByName_Boolean_A(ani_class cls, const char *name, const char *signature, + ani_boolean *result, const ani_value *args) + { + return c_api->Class_CallStaticMethodByName_Boolean_A(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Boolean_V(ani_class cls, const char *name, const char *signature, + ani_boolean *result, va_list args) + { + return c_api->Class_CallStaticMethodByName_Boolean_V(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Char(ani_class cls, const char *name, const char *signature, + ani_char *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethodByName_Char_V(this, cls, name, signature, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethodByName_Char_A(ani_class cls, const char *name, const char *signature, + ani_char *result, const ani_value *args) + { + return c_api->Class_CallStaticMethodByName_Char_A(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Char_V(ani_class cls, const char *name, const char *signature, + ani_char *result, va_list args) + { + return c_api->Class_CallStaticMethodByName_Char_V(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Byte(ani_class cls, const char *name, const char *signature, + ani_byte *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethodByName_Byte_V(this, cls, name, signature, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethodByName_Byte_A(ani_class cls, const char *name, const char *signature, + ani_byte *result, const ani_value *args) + { + return c_api->Class_CallStaticMethodByName_Byte_A(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Byte_V(ani_class cls, const char *name, const char *signature, + ani_byte *result, va_list args) + { + return c_api->Class_CallStaticMethodByName_Byte_V(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Short(ani_class cls, const char *name, const char *signature, + ani_short *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethodByName_Short_V(this, cls, name, signature, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethodByName_Short_A(ani_class cls, const char *name, const char *signature, + ani_short *result, const ani_value *args) + { + return c_api->Class_CallStaticMethodByName_Short_A(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Short_V(ani_class cls, const char *name, const char *signature, + ani_short *result, va_list args) + { + return c_api->Class_CallStaticMethodByName_Short_V(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Int(ani_class cls, const char *name, const char *signature, ani_int *result, + ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethodByName_Int_V(this, cls, name, signature, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethodByName_Int_A(ani_class cls, const char *name, const char *signature, + ani_int *result, const ani_value *args) + { + return c_api->Class_CallStaticMethodByName_Int_A(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Int_V(ani_class cls, const char *name, const char *signature, + ani_int *result, va_list args) + { + return c_api->Class_CallStaticMethodByName_Int_V(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Long(ani_class cls, const char *name, const char *signature, + ani_long *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethodByName_Long_V(this, cls, name, signature, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethodByName_Long_A(ani_class cls, const char *name, const char *signature, + ani_long *result, const ani_value *args) + { + return c_api->Class_CallStaticMethodByName_Long_A(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Long_V(ani_class cls, const char *name, const char *signature, + ani_long *result, va_list args) + { + return c_api->Class_CallStaticMethodByName_Long_V(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Float(ani_class cls, const char *name, const char *signature, + ani_float *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethodByName_Float_V(this, cls, name, signature, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethodByName_Float_A(ani_class cls, const char *name, const char *signature, + ani_float *result, const ani_value *args) + { + return c_api->Class_CallStaticMethodByName_Float_A(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Float_V(ani_class cls, const char *name, const char *signature, + ani_float *result, va_list args) + { + return c_api->Class_CallStaticMethodByName_Float_V(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Double(ani_class cls, const char *name, const char *signature, + ani_double *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethodByName_Double_V(this, cls, name, signature, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethodByName_Double_A(ani_class cls, const char *name, const char *signature, + ani_double *result, const ani_value *args) + { + return c_api->Class_CallStaticMethodByName_Double_A(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Double_V(ani_class cls, const char *name, const char *signature, + ani_double *result, va_list args) + { + return c_api->Class_CallStaticMethodByName_Double_V(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Ref(ani_class cls, const char *name, const char *signature, ani_ref *result, + ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Class_CallStaticMethodByName_Ref_V(this, cls, name, signature, result, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethodByName_Ref_A(ani_class cls, const char *name, const char *signature, + ani_ref *result, const ani_value *args) + { + return c_api->Class_CallStaticMethodByName_Ref_A(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Ref_V(ani_class cls, const char *name, const char *signature, + ani_ref *result, va_list args) + { + return c_api->Class_CallStaticMethodByName_Ref_V(this, cls, name, signature, result, args); + } + ani_status Class_CallStaticMethodByName_Void(ani_class cls, const char *name, const char *signature, ...) + { + va_list args; + va_start(args, signature); + ani_status status = c_api->Class_CallStaticMethodByName_Void_V(this, cls, name, signature, args); + va_end(args); + return status; + } + ani_status Class_CallStaticMethodByName_Void_A(ani_class cls, const char *name, const char *signature, + const ani_value *args) + { + return c_api->Class_CallStaticMethodByName_Void_A(this, cls, name, signature, args); + } + ani_status Class_CallStaticMethodByName_Void_V(ani_class cls, const char *name, const char *signature, va_list args) + { + return c_api->Class_CallStaticMethodByName_Void_V(this, cls, name, signature, args); + } + ani_status Object_GetField_Boolean(ani_object object, ani_field field, ani_boolean *result) + { + return c_api->Object_GetField_Boolean(this, object, field, result); + } + ani_status Object_GetField_Char(ani_object object, ani_field field, ani_char *result) + { + return c_api->Object_GetField_Char(this, object, field, result); + } + ani_status Object_GetField_Byte(ani_object object, ani_field field, ani_byte *result) + { + return c_api->Object_GetField_Byte(this, object, field, result); + } + ani_status Object_GetField_Short(ani_object object, ani_field field, ani_short *result) + { + return c_api->Object_GetField_Short(this, object, field, result); + } + ani_status Object_GetField_Int(ani_object object, ani_field field, ani_int *result) + { + return c_api->Object_GetField_Int(this, object, field, result); + } + ani_status Object_GetField_Long(ani_object object, ani_field field, ani_long *result) + { + return c_api->Object_GetField_Long(this, object, field, result); + } + ani_status Object_GetField_Float(ani_object object, ani_field field, ani_float *result) + { + return c_api->Object_GetField_Float(this, object, field, result); + } + ani_status Object_GetField_Double(ani_object object, ani_field field, ani_double *result) + { + return c_api->Object_GetField_Double(this, object, field, result); + } + ani_status Object_GetField_Ref(ani_object object, ani_field field, ani_ref *result) + { + return c_api->Object_GetField_Ref(this, object, field, result); + } + ani_status Object_SetField_Boolean(ani_object object, ani_field field, ani_boolean value) + { + return c_api->Object_SetField_Boolean(this, object, field, value); + } + ani_status Object_SetField_Char(ani_object object, ani_field field, ani_char value) + { + return c_api->Object_SetField_Char(this, object, field, value); + } + ani_status Object_SetField_Byte(ani_object object, ani_field field, ani_byte value) + { + return c_api->Object_SetField_Byte(this, object, field, value); + } + ani_status Object_SetField_Short(ani_object object, ani_field field, ani_short value) + { + return c_api->Object_SetField_Short(this, object, field, value); + } + ani_status Object_SetField_Int(ani_object object, ani_field field, ani_int value) + { + return c_api->Object_SetField_Int(this, object, field, value); + } + ani_status Object_SetField_Long(ani_object object, ani_field field, ani_long value) + { + return c_api->Object_SetField_Long(this, object, field, value); + } + ani_status Object_SetField_Float(ani_object object, ani_field field, ani_float value) + { + return c_api->Object_SetField_Float(this, object, field, value); + } + ani_status Object_SetField_Double(ani_object object, ani_field field, ani_double value) + { + return c_api->Object_SetField_Double(this, object, field, value); + } + ani_status Object_SetField_Ref(ani_object object, ani_field field, ani_ref value) + { + return c_api->Object_SetField_Ref(this, object, field, value); + } + ani_status Object_GetFieldByName_Boolean(ani_object object, const char *name, ani_boolean *result) + { + return c_api->Object_GetFieldByName_Boolean(this, object, name, result); + } + ani_status Object_GetFieldByName_Char(ani_object object, const char *name, ani_char *result) + { + return c_api->Object_GetFieldByName_Char(this, object, name, result); + } + ani_status Object_GetFieldByName_Byte(ani_object object, const char *name, ani_byte *result) + { + return c_api->Object_GetFieldByName_Byte(this, object, name, result); + } + ani_status Object_GetFieldByName_Short(ani_object object, const char *name, ani_short *result) + { + return c_api->Object_GetFieldByName_Short(this, object, name, result); + } + ani_status Object_GetFieldByName_Int(ani_object object, const char *name, ani_int *result) + { + return c_api->Object_GetFieldByName_Int(this, object, name, result); + } + ani_status Object_GetFieldByName_Long(ani_object object, const char *name, ani_long *result) + { + return c_api->Object_GetFieldByName_Long(this, object, name, result); + } + ani_status Object_GetFieldByName_Float(ani_object object, const char *name, ani_float *result) + { + return c_api->Object_GetFieldByName_Float(this, object, name, result); + } + ani_status Object_GetFieldByName_Double(ani_object object, const char *name, ani_double *result) + { + return c_api->Object_GetFieldByName_Double(this, object, name, result); + } + ani_status Object_GetFieldByName_Ref(ani_object object, const char *name, ani_ref *result) + { + return c_api->Object_GetFieldByName_Ref(this, object, name, result); + } + ani_status Object_SetFieldByName_Boolean(ani_object object, const char *name, ani_boolean value) + { + return c_api->Object_SetFieldByName_Boolean(this, object, name, value); + } + ani_status Object_SetFieldByName_Char(ani_object object, const char *name, ani_char value) + { + return c_api->Object_SetFieldByName_Char(this, object, name, value); + } + ani_status Object_SetFieldByName_Byte(ani_object object, const char *name, ani_byte value) + { + return c_api->Object_SetFieldByName_Byte(this, object, name, value); + } + ani_status Object_SetFieldByName_Short(ani_object object, const char *name, ani_short value) + { + return c_api->Object_SetFieldByName_Short(this, object, name, value); + } + ani_status Object_SetFieldByName_Int(ani_object object, const char *name, ani_int value) + { + return c_api->Object_SetFieldByName_Int(this, object, name, value); + } + ani_status Object_SetFieldByName_Long(ani_object object, const char *name, ani_long value) + { + return c_api->Object_SetFieldByName_Long(this, object, name, value); + } + ani_status Object_SetFieldByName_Float(ani_object object, const char *name, ani_float value) + { + return c_api->Object_SetFieldByName_Float(this, object, name, value); + } + ani_status Object_SetFieldByName_Double(ani_object object, const char *name, ani_double value) + { + return c_api->Object_SetFieldByName_Double(this, object, name, value); + } + ani_status Object_SetFieldByName_Ref(ani_object object, const char *name, ani_ref value) + { + return c_api->Object_SetFieldByName_Ref(this, object, name, value); + } + ani_status Object_GetPropertyByName_Boolean(ani_object object, const char *name, ani_boolean *result) + { + return c_api->Object_GetPropertyByName_Boolean(this, object, name, result); + } + ani_status Object_GetPropertyByName_Char(ani_object object, const char *name, ani_char *result) + { + return c_api->Object_GetPropertyByName_Char(this, object, name, result); + } + ani_status Object_GetPropertyByName_Byte(ani_object object, const char *name, ani_byte *result) + { + return c_api->Object_GetPropertyByName_Byte(this, object, name, result); + } + ani_status Object_GetPropertyByName_Short(ani_object object, const char *name, ani_short *result) + { + return c_api->Object_GetPropertyByName_Short(this, object, name, result); + } + ani_status Object_GetPropertyByName_Int(ani_object object, const char *name, ani_int *result) + { + return c_api->Object_GetPropertyByName_Int(this, object, name, result); + } + ani_status Object_GetPropertyByName_Long(ani_object object, const char *name, ani_long *result) + { + return c_api->Object_GetPropertyByName_Long(this, object, name, result); + } + ani_status Object_GetPropertyByName_Float(ani_object object, const char *name, ani_float *result) + { + return c_api->Object_GetPropertyByName_Float(this, object, name, result); + } + ani_status Object_GetPropertyByName_Double(ani_object object, const char *name, ani_double *result) + { + return c_api->Object_GetPropertyByName_Double(this, object, name, result); + } + ani_status Object_GetPropertyByName_Ref(ani_object object, const char *name, ani_ref *result) + { + return c_api->Object_GetPropertyByName_Ref(this, object, name, result); + } + ani_status Object_SetPropertyByName_Boolean(ani_object object, const char *name, ani_boolean value) + { + return c_api->Object_SetPropertyByName_Boolean(this, object, name, value); + } + ani_status Object_SetPropertyByName_Char(ani_object object, const char *name, ani_char value) + { + return c_api->Object_SetPropertyByName_Char(this, object, name, value); + } + ani_status Object_SetPropertyByName_Byte(ani_object object, const char *name, ani_byte value) + { + return c_api->Object_SetPropertyByName_Byte(this, object, name, value); + } + ani_status Object_SetPropertyByName_Short(ani_object object, const char *name, ani_short value) + { + return c_api->Object_SetPropertyByName_Short(this, object, name, value); + } + ani_status Object_SetPropertyByName_Int(ani_object object, const char *name, ani_int value) + { + return c_api->Object_SetPropertyByName_Int(this, object, name, value); + } + ani_status Object_SetPropertyByName_Long(ani_object object, const char *name, ani_long value) + { + return c_api->Object_SetPropertyByName_Long(this, object, name, value); + } + ani_status Object_SetPropertyByName_Float(ani_object object, const char *name, ani_float value) + { + return c_api->Object_SetPropertyByName_Float(this, object, name, value); + } + ani_status Object_SetPropertyByName_Double(ani_object object, const char *name, ani_double value) + { + return c_api->Object_SetPropertyByName_Double(this, object, name, value); + } + ani_status Object_SetPropertyByName_Ref(ani_object object, const char *name, ani_ref value) + { + return c_api->Object_SetPropertyByName_Ref(this, object, name, value); + } + ani_status Object_CallMethod_Boolean(ani_object object, ani_method method, ani_boolean *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethod_Boolean_V(this, object, method, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethod_Boolean_A(ani_object object, ani_method method, ani_boolean *result, + const ani_value *args) + { + return c_api->Object_CallMethod_Boolean_A(this, object, method, result, args); + } + ani_status Object_CallMethod_Boolean_V(ani_object object, ani_method method, ani_boolean *result, va_list args) + { + return c_api->Object_CallMethod_Boolean_V(this, object, method, result, args); + } + ani_status Object_CallMethod_Char(ani_object object, ani_method method, ani_char *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethod_Char_V(this, object, method, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethod_Char_A(ani_object object, ani_method method, ani_char *result, const ani_value *args) + { + return c_api->Object_CallMethod_Char_A(this, object, method, result, args); + } + ani_status Object_CallMethod_Char_V(ani_object object, ani_method method, ani_char *result, va_list args) + { + return c_api->Object_CallMethod_Char_V(this, object, method, result, args); + } + ani_status Object_CallMethod_Byte(ani_object object, ani_method method, ani_byte *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethod_Byte_V(this, object, method, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethod_Byte_A(ani_object object, ani_method method, ani_byte *result, const ani_value *args) + { + return c_api->Object_CallMethod_Byte_A(this, object, method, result, args); + } + ani_status Object_CallMethod_Byte_V(ani_object object, ani_method method, ani_byte *result, va_list args) + { + return c_api->Object_CallMethod_Byte_V(this, object, method, result, args); + } + ani_status Object_CallMethod_Short(ani_object object, ani_method method, ani_short *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethod_Short_V(this, object, method, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethod_Short_A(ani_object object, ani_method method, ani_short *result, const ani_value *args) + { + return c_api->Object_CallMethod_Short_A(this, object, method, result, args); + } + ani_status Object_CallMethod_Short_V(ani_object object, ani_method method, ani_short *result, va_list args) + { + return c_api->Object_CallMethod_Short_V(this, object, method, result, args); + } + ani_status Object_CallMethod_Int(ani_object object, ani_method method, ani_int *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethod_Int_V(this, object, method, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethod_Int_A(ani_object object, ani_method method, ani_int *result, const ani_value *args) + { + return c_api->Object_CallMethod_Int_A(this, object, method, result, args); + } + ani_status Object_CallMethod_Int_V(ani_object object, ani_method method, ani_int *result, va_list args) + { + return c_api->Object_CallMethod_Int_V(this, object, method, result, args); + } + ani_status Object_CallMethod_Long(ani_object object, ani_method method, ani_long *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethod_Long_V(this, object, method, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethod_Long_A(ani_object object, ani_method method, ani_long *result, const ani_value *args) + { + return c_api->Object_CallMethod_Long_A(this, object, method, result, args); + } + ani_status Object_CallMethod_Long_V(ani_object object, ani_method method, ani_long *result, va_list args) + { + return c_api->Object_CallMethod_Long_V(this, object, method, result, args); + } + ani_status Object_CallMethod_Float(ani_object object, ani_method method, ani_float *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethod_Float_V(this, object, method, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethod_Float_A(ani_object object, ani_method method, ani_float *result, const ani_value *args) + { + return c_api->Object_CallMethod_Float_A(this, object, method, result, args); + } + ani_status Object_CallMethod_Float_V(ani_object object, ani_method method, ani_float *result, va_list args) + { + return c_api->Object_CallMethod_Float_V(this, object, method, result, args); + } + ani_status Object_CallMethod_Double(ani_object object, ani_method method, ani_double *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethod_Double_V(this, object, method, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethod_Double_A(ani_object object, ani_method method, ani_double *result, + const ani_value *args) + { + return c_api->Object_CallMethod_Double_A(this, object, method, result, args); + } + ani_status Object_CallMethod_Double_V(ani_object object, ani_method method, ani_double *result, va_list args) + { + return c_api->Object_CallMethod_Double_V(this, object, method, result, args); + } + ani_status Object_CallMethod_Ref(ani_object object, ani_method method, ani_ref *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethod_Ref_V(this, object, method, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethod_Ref_A(ani_object object, ani_method method, ani_ref *result, const ani_value *args) + { + return c_api->Object_CallMethod_Ref_A(this, object, method, result, args); + } + ani_status Object_CallMethod_Ref_V(ani_object object, ani_method method, ani_ref *result, va_list args) + { + return c_api->Object_CallMethod_Ref_V(this, object, method, result, args); + } + ani_status Object_CallMethod_Void(ani_object object, ani_method method, ...) + { + va_list args; + va_start(args, method); + ani_status status = c_api->Object_CallMethod_Void_V(this, object, method, args); + va_end(args); + return status; + } + ani_status Object_CallMethod_Void_A(ani_object object, ani_method method, const ani_value *args) + { + return c_api->Object_CallMethod_Void_A(this, object, method, args); + } + ani_status Object_CallMethod_Void_V(ani_object object, ani_method method, va_list args) + { + return c_api->Object_CallMethod_Void_V(this, object, method, args); + } + ani_status Object_CallMethodByName_Boolean(ani_object object, const char *name, const char *signature, + ani_boolean *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethodByName_Boolean_V(this, object, name, signature, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethodByName_Boolean_A(ani_object object, const char *name, const char *signature, + ani_boolean *result, const ani_value *args) + { + return c_api->Object_CallMethodByName_Boolean_A(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Boolean_V(ani_object object, const char *name, const char *signature, + ani_boolean *result, va_list args) + { + return c_api->Object_CallMethodByName_Boolean_V(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Char(ani_object object, const char *name, const char *signature, + ani_char *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethodByName_Char_V(this, object, name, signature, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethodByName_Char_A(ani_object object, const char *name, const char *signature, + ani_char *result, const ani_value *args) + { + return c_api->Object_CallMethodByName_Char_A(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Char_V(ani_object object, const char *name, const char *signature, + ani_char *result, va_list args) + { + return c_api->Object_CallMethodByName_Char_V(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Byte(ani_object object, const char *name, const char *signature, + ani_byte *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethodByName_Byte_V(this, object, name, signature, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethodByName_Byte_A(ani_object object, const char *name, const char *signature, + ani_byte *result, const ani_value *args) + { + return c_api->Object_CallMethodByName_Byte_A(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Byte_V(ani_object object, const char *name, const char *signature, + ani_byte *result, va_list args) + { + return c_api->Object_CallMethodByName_Byte_V(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Short(ani_object object, const char *name, const char *signature, + ani_short *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethodByName_Short_V(this, object, name, signature, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethodByName_Short_A(ani_object object, const char *name, const char *signature, + ani_short *result, const ani_value *args) + { + return c_api->Object_CallMethodByName_Short_A(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Short_V(ani_object object, const char *name, const char *signature, + ani_short *result, va_list args) + { + return c_api->Object_CallMethodByName_Short_V(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Int(ani_object object, const char *name, const char *signature, ani_int *result, + ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethodByName_Int_V(this, object, name, signature, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethodByName_Int_A(ani_object object, const char *name, const char *signature, + ani_int *result, const ani_value *args) + { + return c_api->Object_CallMethodByName_Int_A(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Int_V(ani_object object, const char *name, const char *signature, + ani_int *result, va_list args) + { + return c_api->Object_CallMethodByName_Int_V(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Long(ani_object object, const char *name, const char *signature, + ani_long *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethodByName_Long_V(this, object, name, signature, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethodByName_Long_A(ani_object object, const char *name, const char *signature, + ani_long *result, const ani_value *args) + { + return c_api->Object_CallMethodByName_Long_A(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Long_V(ani_object object, const char *name, const char *signature, + ani_long *result, va_list args) + { + return c_api->Object_CallMethodByName_Long_V(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Float(ani_object object, const char *name, const char *signature, + ani_float *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethodByName_Float_V(this, object, name, signature, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethodByName_Float_A(ani_object object, const char *name, const char *signature, + ani_float *result, const ani_value *args) + { + return c_api->Object_CallMethodByName_Float_A(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Float_V(ani_object object, const char *name, const char *signature, + ani_float *result, va_list args) + { + return c_api->Object_CallMethodByName_Float_V(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Double(ani_object object, const char *name, const char *signature, + ani_double *result, ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethodByName_Double_V(this, object, name, signature, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethodByName_Double_A(ani_object object, const char *name, const char *signature, + ani_double *result, const ani_value *args) + { + return c_api->Object_CallMethodByName_Double_A(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Double_V(ani_object object, const char *name, const char *signature, + ani_double *result, va_list args) + { + return c_api->Object_CallMethodByName_Double_V(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Ref(ani_object object, const char *name, const char *signature, ani_ref *result, + ...) + { + va_list args; + va_start(args, result); + ani_status status = c_api->Object_CallMethodByName_Ref_V(this, object, name, signature, result, args); + va_end(args); + return status; + } + ani_status Object_CallMethodByName_Ref_A(ani_object object, const char *name, const char *signature, + ani_ref *result, const ani_value *args) + { + return c_api->Object_CallMethodByName_Ref_A(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Ref_V(ani_object object, const char *name, const char *signature, + ani_ref *result, va_list args) + { + return c_api->Object_CallMethodByName_Ref_V(this, object, name, signature, result, args); + } + ani_status Object_CallMethodByName_Void(ani_object object, const char *name, const char *signature, ...) + { + va_list args; + va_start(args, signature); + ani_status status = c_api->Object_CallMethodByName_Void_V(this, object, name, signature, args); + va_end(args); + return status; + } + ani_status Object_CallMethodByName_Void_A(ani_object object, const char *name, const char *signature, + const ani_value *args) + { + return c_api->Object_CallMethodByName_Void_A(this, object, name, signature, args); + } + ani_status Object_CallMethodByName_Void_V(ani_object object, const char *name, const char *signature, va_list args) + { + return c_api->Object_CallMethodByName_Void_V(this, object, name, signature, args); + } + ani_status TupleValue_GetNumberOfItems(ani_tuple_value tuple_value, ani_size *result) + { + return c_api->TupleValue_GetNumberOfItems(this, tuple_value, result); + } + ani_status TupleValue_GetItem_Boolean(ani_tuple_value tuple_value, ani_size index, ani_boolean *result) + { + return c_api->TupleValue_GetItem_Boolean(this, tuple_value, index, result); + } + ani_status TupleValue_GetItem_Char(ani_tuple_value tuple_value, ani_size index, ani_char *result) + { + return c_api->TupleValue_GetItem_Char(this, tuple_value, index, result); + } + ani_status TupleValue_GetItem_Byte(ani_tuple_value tuple_value, ani_size index, ani_byte *result) + { + return c_api->TupleValue_GetItem_Byte(this, tuple_value, index, result); + } + ani_status TupleValue_GetItem_Short(ani_tuple_value tuple_value, ani_size index, ani_short *result) + { + return c_api->TupleValue_GetItem_Short(this, tuple_value, index, result); + } + ani_status TupleValue_GetItem_Int(ani_tuple_value tuple_value, ani_size index, ani_int *result) + { + return c_api->TupleValue_GetItem_Int(this, tuple_value, index, result); + } + ani_status TupleValue_GetItem_Long(ani_tuple_value tuple_value, ani_size index, ani_long *result) + { + return c_api->TupleValue_GetItem_Long(this, tuple_value, index, result); + } + ani_status TupleValue_GetItem_Float(ani_tuple_value tuple_value, ani_size index, ani_float *result) + { + return c_api->TupleValue_GetItem_Float(this, tuple_value, index, result); + } + ani_status TupleValue_GetItem_Double(ani_tuple_value tuple_value, ani_size index, ani_double *result) + { + return c_api->TupleValue_GetItem_Double(this, tuple_value, index, result); + } + ani_status TupleValue_GetItem_Ref(ani_tuple_value tuple_value, ani_size index, ani_ref *result) + { + return c_api->TupleValue_GetItem_Ref(this, tuple_value, index, result); + } + ani_status TupleValue_SetItem_Boolean(ani_tuple_value tuple_value, ani_size index, ani_boolean value) + { + return c_api->TupleValue_SetItem_Boolean(this, tuple_value, index, value); + } + ani_status TupleValue_SetItem_Char(ani_tuple_value tuple_value, ani_size index, ani_char value) + { + return c_api->TupleValue_SetItem_Char(this, tuple_value, index, value); + } + ani_status TupleValue_SetItem_Byte(ani_tuple_value tuple_value, ani_size index, ani_byte value) + { + return c_api->TupleValue_SetItem_Byte(this, tuple_value, index, value); + } + ani_status TupleValue_SetItem_Short(ani_tuple_value tuple_value, ani_size index, ani_short value) + { + return c_api->TupleValue_SetItem_Short(this, tuple_value, index, value); + } + ani_status TupleValue_SetItem_Int(ani_tuple_value tuple_value, ani_size index, ani_int value) + { + return c_api->TupleValue_SetItem_Int(this, tuple_value, index, value); + } + ani_status TupleValue_SetItem_Long(ani_tuple_value tuple_value, ani_size index, ani_long value) + { + return c_api->TupleValue_SetItem_Long(this, tuple_value, index, value); + } + ani_status TupleValue_SetItem_Float(ani_tuple_value tuple_value, ani_size index, ani_float value) + { + return c_api->TupleValue_SetItem_Float(this, tuple_value, index, value); + } + ani_status TupleValue_SetItem_Double(ani_tuple_value tuple_value, ani_size index, ani_double value) + { + return c_api->TupleValue_SetItem_Double(this, tuple_value, index, value); + } + ani_status TupleValue_SetItem_Ref(ani_tuple_value tuple_value, ani_size index, ani_ref value) + { + return c_api->TupleValue_SetItem_Ref(this, tuple_value, index, value); + } + ani_status GlobalReference_Create(ani_ref ref, ani_ref *result) + { + return c_api->GlobalReference_Create(this, ref, result); + } + ani_status GlobalReference_Delete(ani_ref ref) + { + return c_api->GlobalReference_Delete(this, ref); + } + ani_status WeakReference_Create(ani_ref ref, ani_wref *result) + { + return c_api->WeakReference_Create(this, ref, result); + } + ani_status WeakReference_Delete(ani_wref wref) + { + return c_api->WeakReference_Delete(this, wref); + } + ani_status WeakReference_GetReference(ani_wref wref, ani_boolean *was_released_result, ani_ref *ref_result) + { + return c_api->WeakReference_GetReference(this, wref, was_released_result, ref_result); + } + ani_status CreateArrayBuffer(size_t length, void **data_result, ani_arraybuffer *arraybuffer_result) + { + return c_api->CreateArrayBuffer(this, length, data_result, arraybuffer_result); + } + ani_status ArrayBuffer_GetInfo(ani_arraybuffer arraybuffer, void **data_result, size_t *length_result) + { + return c_api->ArrayBuffer_GetInfo(this, arraybuffer, data_result, length_result); + } + ani_status Promise_New(ani_resolver *result_resolver, ani_object *result_promise) + { + return c_api->Promise_New(this, result_resolver, result_promise); + } + ani_status PromiseResolver_Resolve(ani_resolver resolver, ani_ref resolution) + { + return c_api->PromiseResolver_Resolve(this, resolver, resolution); + } + ani_status PromiseResolver_Reject(ani_resolver resolver, ani_error rejection) + { + return c_api->PromiseResolver_Reject(this, resolver, rejection); + } + ani_status Any_InstanceOf(ani_ref ref, ani_ref type, ani_boolean *result) + { + return c_api->Any_InstanceOf(this, ref, type, result); + } + ani_status Any_GetProperty(ani_ref ref, const char *name, ani_ref *result) + { + return c_api->Any_GetProperty(this, ref, name, result); + } + ani_status Any_SetProperty(ani_ref ref, const char *name, ani_ref value) + { + return c_api->Any_SetProperty(this, ref, name, value); + } + ani_status Any_GetByIndex(ani_ref ref, ani_size index, ani_ref *result) + { + return c_api->Any_GetByIndex(this, ref, index, result); + } + ani_status Any_SetByIndex(ani_ref ref, ani_size index, ani_ref value) + { + return c_api->Any_SetByIndex(this, ref, index, value); + } + ani_status Any_GetByValue(ani_ref ref, ani_ref key, ani_ref *result) + { + return c_api->Any_GetByValue(this, ref, key, result); + } + ani_status Any_SetByValue(ani_ref ref, ani_ref key, ani_ref value) + { + return c_api->Any_SetByValue(this, ref, key, value); + } + ani_status Any_Call(ani_ref func, ani_size argc, ani_ref *argv, ani_ref *result) + { + return c_api->Any_Call(this, func, argc, argv, result); + } + ani_status Any_CallMethod(ani_ref self, const char *name, ani_size argc, ani_ref *argv, ani_ref *result) + { + return c_api->Any_CallMethod(this, self, name, argc, argv, result); + } + ani_status Any_New(ani_ref ctor, ani_size argc, ani_ref *argv, ani_ref *result) + { + return c_api->Any_New(this, ctor, argc, argv, result); + } + ani_status Class_BindStaticNativeMethods(ani_class cls, const ani_native_function *methods, ani_size nr_methods) + { + return c_api->Class_BindStaticNativeMethods(this, cls, methods, nr_methods); + } +#endif // __cplusplus +}; + +// NOLINTEND +#endif // __ANI_H__ diff --git a/koala_tools/interop/src/cpp/callback-resource.cc b/koala_tools/interop/src/cpp/callback-resource.cc new file mode 100644 index 0000000000000000000000000000000000000000..3c00d5925d453cb8207f035b2baa0b9dce4205c8 --- /dev/null +++ b/koala_tools/interop/src/cpp/callback-resource.cc @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2024 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. +*/ + +#undef KOALA_INTEROP_MODULE +#define KOALA_INTEROP_MODULE InteropNativeModule +#include "common-interop.h" +#include "interop-types.h" +#include "callback-resource.h" +#include "SerializerBase.h" +#include "interop-utils.h" +#include +#include +#include +#include + +static bool needReleaseFront = false; +static std::deque callbackEventsQueue; +static std::deque> callbackCallSubqueue; +static std::deque callbackResourceSubqueue; + +static std::atomic currentDeferred(nullptr); + +static KVMDeferred* takeCurrent(KNativePointer waitContext) { + KVMDeferred* current; + do { + current = currentDeferred.load(); + } while (!currentDeferred.compare_exchange_strong(current, nullptr)); + return current; +} + +void notifyWaiter() { + auto current = takeCurrent(nullptr); + if (current) + current->resolve(current, nullptr, 0); +} + +KVMObjectHandle impl_CallbackAwait(KVMContext vmContext, KNativePointer waitContext) { + KVMObjectHandle result = nullptr; + auto* current = takeCurrent(waitContext); + if (current) { + current->reject(current, "Wrong"); + } + auto next = CreateDeferred(vmContext, &result); + KVMDeferred* null = nullptr; + while (!currentDeferred.compare_exchange_strong(null, next)) {} + return result; +} +KOALA_INTEROP_CTX_1(CallbackAwait, KVMObjectHandle, KNativePointer) + +void impl_UnblockCallbackWait(KNativePointer waitContext) { + auto current = takeCurrent(waitContext); + if (current) current->resolve(current, nullptr, 0); +} +KOALA_INTEROP_V1(UnblockCallbackWait, KNativePointer) + +void enqueueCallback(int apiKind, const CallbackBuffer* event) { + callbackEventsQueue.push_back(Event_CallCallback); + callbackCallSubqueue.push_back({ apiKind, *event }); + notifyWaiter(); +} + +void holdManagedCallbackResource(InteropInt32 resourceId) { + callbackEventsQueue.push_back(Event_HoldManagedResource); + callbackResourceSubqueue.push_back(resourceId); + notifyWaiter(); +} + +void releaseManagedCallbackResource(InteropInt32 resourceId) { + callbackEventsQueue.push_back(Event_ReleaseManagedResource); + callbackResourceSubqueue.push_back(resourceId); + notifyWaiter(); +} + +KInt impl_CheckCallbackEvent(KSerializerBuffer buffer, KInt size) { + KByte* result = (KByte*)buffer; + if (needReleaseFront) + { + switch (callbackEventsQueue.front()) + { + case Event_CallCallback: + callbackCallSubqueue.front().second.resourceHolder.release(); + callbackCallSubqueue.pop_front(); + break; + case Event_HoldManagedResource: + case Event_ReleaseManagedResource: + callbackResourceSubqueue.pop_front(); + break; + default: + INTEROP_FATAL("Unknown event kind"); + } + callbackEventsQueue.pop_front(); + needReleaseFront = false; + } + if (callbackEventsQueue.empty()) { + return 0; + } + + SerializerBase serializer(result, size); + const CallbackEventKind frontEventKind = callbackEventsQueue.front(); + serializer.writeInt32(frontEventKind); + + switch (frontEventKind) + { + case Event_CallCallback: { + std::pair &callback = callbackCallSubqueue.front(); + serializer.writeInt32(callback.first); + interop_memcpy(result + serializer.length(), size - serializer.length(), callback.second.buffer, sizeof(CallbackBuffer::buffer)); + break; + } + case Event_HoldManagedResource: + case Event_ReleaseManagedResource: { + const InteropInt32 resourceId = callbackResourceSubqueue.front(); + interop_memcpy(result + serializer.length(), size - serializer.length(), &resourceId, sizeof(InteropInt32)); + break; + } + default: + INTEROP_FATAL("Unknown event kind"); + } + needReleaseFront = true; + return 1; +} +KOALA_INTEROP_DIRECT_2(CheckCallbackEvent, KInt, KSerializerBuffer, KInt) + +void impl_ReleaseCallbackResource(InteropInt32 resourceId) { + releaseManagedCallbackResource(resourceId); +} +KOALA_INTEROP_V1(ReleaseCallbackResource, KInt) + +void impl_HoldCallbackResource(InteropInt32 resourceId) { + holdManagedCallbackResource(resourceId); +} +KOALA_INTEROP_V1(HoldCallbackResource, KInt) diff --git a/koala_tools/interop/src/cpp/callback-resource.h b/koala_tools/interop/src/cpp/callback-resource.h new file mode 100644 index 0000000000000000000000000000000000000000..9e0b841962d9f1f9cf57dc7cdc2aca252990cf45 --- /dev/null +++ b/koala_tools/interop/src/cpp/callback-resource.h @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +#ifndef _INTEROP_CALLBACK_RESOURCE_H +#define _INTEROP_CALLBACK_RESOURCE_H + +#include +#include "interop-types.h" + +#ifdef KOALA_WINDOWS +#define DLL_EXPORT __declspec(dllexport) +#else +#define DLL_EXPORT __attribute__ ((visibility ("default"))) +#endif + +class CallbackResourceHolder { +private: + std::vector heldResources; +public: + void holdCallbackResource(const InteropCallbackResource* resource) { + resource->hold(resource->resourceId); + this->heldResources.push_back(*resource); + } + void release() { + for (auto resource : this->heldResources) { + resource.release(resource.resourceId); + } + this->heldResources.clear(); + } +}; + +struct CallbackBuffer { + uint8_t buffer[4096]; + CallbackResourceHolder resourceHolder; +}; + +enum CallbackEventKind { + Event_CallCallback = 0, + Event_HoldManagedResource = 1, + Event_ReleaseManagedResource = 2, +}; + +extern "C" DLL_EXPORT void enqueueCallback(int apiKind, const CallbackBuffer* event); +extern "C" DLL_EXPORT void holdManagedCallbackResource(InteropInt32 resourceId); +extern "C" DLL_EXPORT void releaseManagedCallbackResource(InteropInt32 resourceId); + +#endif diff --git a/koala_tools/interop/src/cpp/cangjie/convertors-cj.cc b/koala_tools/interop/src/cpp/cangjie/convertors-cj.cc new file mode 100644 index 0000000000000000000000000000000000000000..ebb0dac2fe62c664629e6124b04491a8da2393c8 --- /dev/null +++ b/koala_tools/interop/src/cpp/cangjie/convertors-cj.cc @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2024 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. +*/ \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/cangjie/convertors-cj.h b/koala_tools/interop/src/cpp/cangjie/convertors-cj.h new file mode 100644 index 0000000000000000000000000000000000000000..9611a0358488e0951df982957f888065b6fa3904 --- /dev/null +++ b/koala_tools/interop/src/cpp/cangjie/convertors-cj.h @@ -0,0 +1,943 @@ +/* + * 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. + */ + +#ifndef CONVERTORS_CJ_H +#define CONVERTORS_CJ_H + +#include +#include +#include +#include + +#include "koala-types.h" +#include "interop-logging.h" + +#define KOALA_INTEROP_EXPORT extern "C" + +#define MAKE_CJ_EXPORT(name, type, flag) \ + __attribute__((constructor)) \ + static void __init_ets_##name() { \ + CJExports::getInstance()->addImpl("_"#name, type, reinterpret_cast(Ark_##name), flag); \ + } + +class CJExports { + std::vector> implementations; + +public: + static CJExports* getInstance(); + + void addImpl(const char* name, const char* type, void* impl); + const std::vector>& getImpls() { + return implementations; + } +}; + +template +struct InteropTypeConverter { + using InteropType = T; + static inline T convertFrom(InteropType value) { return value; } + static inline InteropType convertTo(T value) { return value; } +}; + +template +inline T getArgument(typename InteropTypeConverter::InteropType arg) { + return InteropTypeConverter::convertFrom(arg); +} + +template +inline typename InteropTypeConverter::InteropType makeResult(T value) { + return InteropTypeConverter::convertTo(value); +} + +template<> +struct InteropTypeConverter { + using InteropType = KDouble; + static inline KInteropNumber convertFrom(InteropType value) { + return KInteropNumber::fromDouble(value); + } + static inline InteropType convertTo(KInteropNumber value) { + return value.asDouble(); + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = char*; + static KStringPtr convertFrom(InteropType value) { + return KStringPtr(value); + } + static InteropType convertTo(const KStringPtr& value) { + return value.data(); + } +}; + +// Improve: Rewrite all others to typed convertors. + +#define KOALA_INTEROP_0(name, Ret) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name() { \ + KOALA_MAYBE_LOG(name) \ + return makeResult(impl_##name()); \ +} +// MAKE_CJ_EXPORT(name, #Ret, 0) + +#define KOALA_INTEROP_1(name, Ret, P0) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name(InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + return makeResult(impl_##name(p0)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0, 0) + +#define KOALA_INTEROP_2(name, Ret, P0, P1) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + return makeResult(impl_##name(p0, p1)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1, 0) + +#define KOALA_INTEROP_3(name, Ret, P0, P1, P2) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + return makeResult(impl_##name(p0, p1, p2)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2, 0) + +#define KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + return makeResult(impl_##name(p0, p1, p2, p3)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) + +#define KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) + +#define KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) + +#define KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) + +#define KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) + +#define KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) + +#define KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) + +#define KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) + +#define KOALA_INTEROP_12(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11, 0) + +#define KOALA_INTEROP_13(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12, 0) + +#define KOALA_INTEROP_14(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + P13 p13 = getArgument(_p13); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ +} +// MAKE_CJ_EXPORT(name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12 "|" #P13, 0) + +#define KOALA_INTEROP_V0(name) \ +KOALA_INTEROP_EXPORT void name() { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(); \ + return; \ +} + +#define KOALA_INTEROP_V1(name, P0) \ +KOALA_INTEROP_EXPORT void name(typename InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + impl_##name(p0); \ + return; \ +} + +#define KOALA_INTEROP_V2(name, P0, P1) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + impl_##name(p0, p1); \ + return; \ +} + +#define KOALA_INTEROP_V3(name, P0, P1, P2) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + impl_##name(p0, p1, p2); \ + return; \ +} + +#define KOALA_INTEROP_V4(name, P0, P1, P2, P3) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + impl_##name(p0, p1, p2, p3); \ + return; \ +} + +#define KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + impl_##name(p0, p1, p2, p3, p4); \ + return; \ +} + +#define KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + impl_##name(p0, p1, p2, p3, p4, p5); \ + return; \ +} + +#define KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6); \ + return; \ +} + +#define KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7); \ + return; \ +} + +#define KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8); \ + return; \ +} + +#define KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8, \ + typename InteropTypeConverter::InteropType _p9 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); \ + return; \ +} + +#define KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8, \ + typename InteropTypeConverter::InteropType _p9, \ + typename InteropTypeConverter::InteropType _p10 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \ + return; \ +} + +#define KOALA_INTEROP_V12(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8, \ + typename InteropTypeConverter::InteropType _p9, \ + typename InteropTypeConverter::InteropType _p10, \ + typename InteropTypeConverter::InteropType _p11 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \ + return; \ +} + +#define KOALA_INTEROP_V13(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8, \ + typename InteropTypeConverter::InteropType _p9, \ + typename InteropTypeConverter::InteropType _p10, \ + typename InteropTypeConverter::InteropType _p11, \ + typename InteropTypeConverter::InteropType _p12 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \ + return; \ +} + +#define KOALA_INTEROP_V14(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8, \ + typename InteropTypeConverter::InteropType _p9, \ + typename InteropTypeConverter::InteropType _p10, \ + typename InteropTypeConverter::InteropType _p11, \ + typename InteropTypeConverter::InteropType _p12, \ + typename InteropTypeConverter::InteropType _p13 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + P13 p13 = getArgument(_p13); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); \ + return; \ +} + +#define KOALA_INTEROP_CTX_0(name, Ret) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name() { \ + KOALA_MAYBE_LOG(name) \ + KVMContext ctx = (KVMContext)0; \ + return makeResult(impl_##name(ctx)); \ +} + +#define KOALA_INTEROP_CTX_1(name, Ret, P0) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name(InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + KVMContext ctx = (KVMContext)0; \ + return makeResult(impl_##name(ctx, p0)); \ +} + +#define KOALA_INTEROP_CTX_2(name, Ret, P0, P1) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name(InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + KVMContext ctx = (KVMContext)0; \ + return makeResult(impl_##name(ctx, p0, p1)); \ +} + + +#define KOALA_INTEROP_CTX_3(name, Ret, P0, P1, P2) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + KVMContext ctx = (KVMContext)0; \ + return makeResult(impl_##name(ctx, p0, p1, p2)); \ +} + +#define KOALA_INTEROP_CTX_4(name, Ret, P0, P1, P2, P3) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + KVMContext ctx = (KVMContext)0; \ + return makeResult(impl_##name(ctx, p0, p1, p2, p3)); \ +} + +#define KOALA_INTEROP_CTX_5(name, Ret, P0, P1, P2, P3, P4) \ +KOALA_INTEROP_EXPORT InteropTypeConverter::InteropType name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + KVMContext ctx = (KVMContext)0; \ + return makeResult(impl_##name(ctx, p0, p1, p2, p3, p4)); \ +} + +#define KOALA_INTEROP_CALL_INT(venv, id, length, args) \ +{ \ + int32_t rv = 0; \ + return rv; \ +} +#define KOALA_INTEROP_CALL_VOID(venv, id, length, args) \ +{ \ +} + + +#define KOALA_INTEROP_CALL_VOID_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_VOID(venv, id, (argc) * sizeof(int32_t), args) +#define KOALA_INTEROP_CALL_INT_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_INT(venv, id, (argc) * sizeof(int32_t), args) + + +#define KOALA_INTEROP_CTX_V1(name, P0) \ +KOALA_INTEROP_EXPORT void name(InteropTypeConverter::InteropType _p0) {\ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + impl_##name(nullptr, p0); \ +} + +#define KOALA_INTEROP_CTX_V2(name, P0, P1) \ +KOALA_INTEROP_EXPORT void name(InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + impl_##name(nullptr, p0, p1); \ +} + +#define KOALA_INTEROP_CTX_V3(name, P0, P1, P2) \ +KOALA_INTEROP_EXPORT void name(InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + impl_##name(nullptr, p0, p1, p2); \ +} + +#define KOALA_INTEROP_CTX_V4(name, P0, P1, P2, P3) \ +KOALA_INTEROP_EXPORT void name(InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + impl_##name(nullptr, p0, p1, p2, p3); \ +} + +#define KOALA_INTEROP_CTX_V5(name, P0, P1, P2, P3, P4) \ +KOALA_INTEROP_EXPORT void name(InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + impl_##name(nullptr, p0, p1, p2, p3, p4); \ +} + + #define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + +#define KOALA_INTEROP_THROW(vmContext, object, ...) \ + do { \ + /* Improve: implement*/ ASSERT(false); \ + return __VA_ARGS__; \ + } while (0) + +#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ + do { \ + /* Improve: implement*/ ASSERT(false); \ + return __VA_ARGS__; \ + } while (0) + +#endif // CONVERTORS_CJ_H \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/common-interop.cc b/koala_tools/interop/src/cpp/common-interop.cc new file mode 100644 index 0000000000000000000000000000000000000000..7003f568e822951c9e31c1bde7d3f2be37ec61fd --- /dev/null +++ b/koala_tools/interop/src/cpp/common-interop.cc @@ -0,0 +1,781 @@ +/* + * 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. + */ +#include +#include +#include + +#ifndef KOALA_INTEROP_MEM_ANALYZER +#include +#endif + +#ifdef KOALA_INTEROP_MODULE +#undef KOALA_INTEROP_MODULE +#endif + +#define KOALA_INTEROP_MODULE InteropNativeModule +#include "common-interop.h" +#include "interop-logging.h" +#include "dynamic-loader.h" +#include "interop-utils.h" + +#ifdef KOALA_FOREIGN_NAPI +#ifndef KOALA_FOREIGN_NAPI_OHOS +#include +#else +#include +#include +#endif +#endif + +#if KOALA_INTEROP_PROFILER +#include "profiler.h" + +InteropProfiler* InteropProfiler::_instance = nullptr; + +#endif + +using std::string; + +#ifndef KOALA_INTEROP_MEM_ANALYZER +static std::atomic mallocCounter{0}; +#endif + +#if defined(KOALA_NAPI) || defined(KOALA_ANI) +// Callback dispatcher MOVED to convertors-napi.cc. +// Let's keep platform-specific parts of the code together + +typedef void (*hold_t)(KInt); + +KInteropBuffer impl_MaterializeBuffer(KNativePointer data, KLong length, KInt resourceId, KNativePointer holdPtr, KNativePointer releasePtr) { + auto hold = reinterpret_cast(holdPtr); + auto release = reinterpret_cast(releasePtr); + hold(resourceId); + return KInteropBuffer { length, data, resourceId, release }; +} +KOALA_INTEROP_5(MaterializeBuffer, KInteropBuffer, KNativePointer, KLong, KInt, KNativePointer, KNativePointer) + +KNativePointer impl_GetNativeBufferPointer(KInteropBuffer buffer) { + return buffer.data; +} +KOALA_INTEROP_1(GetNativeBufferPointer, KNativePointer, KInteropBuffer) + +#endif + +#ifdef KOALA_ETS_NAPI +#include "etsapi.h" + +static struct { + ets_class clazz = nullptr; + ets_method method = nullptr; +} g_koalaEtsNapiCallbackDispatcher; + +bool setKoalaEtsNapiCallbackDispatcher( + EtsEnv* etsEnv, + ets_class clazz, + const char* dispatcherMethodName, + const char* dispactherMethodSig +) { + g_koalaEtsNapiCallbackDispatcher.clazz = clazz; + etsEnv->NewGlobalRef(clazz); + ets_method method = etsEnv->GetStaticp_method( + clazz, dispatcherMethodName, dispactherMethodSig + ); + if (method == nullptr) { + return false; + } + g_koalaEtsNapiCallbackDispatcher.method = method; + return true; +} + +void getKoalaEtsNapiCallbackDispatcher(ets_class* clazz, ets_method* method) { + *clazz = g_koalaEtsNapiCallbackDispatcher.clazz; + *method = g_koalaEtsNapiCallbackDispatcher.method; +} +#endif + + +// Improve: move callback dispetchers to convertors-.cc. +#ifdef KOALA_JNI +#include "jni.h" +static struct { + jclass clazz = nullptr; + jmethodID method = nullptr; +} g_koalaJniCallbackDispatcher; + +bool setKoalaJniCallbackDispatcher( + JNIEnv* jniEnv, + jclass clazz, + const char* dispatcherMethodName, + const char* dispactherMethodSig +) { + g_koalaJniCallbackDispatcher.clazz = clazz; + jniEnv->NewGlobalRef(clazz); + jmethodID method = jniEnv->GetStaticMethodID( + clazz, dispatcherMethodName, dispactherMethodSig + ); + if (method == nullptr) { + return false; + } + g_koalaJniCallbackDispatcher.method = method; + return true; +} + +void getKoalaJniCallbackDispatcher(jclass* clazz, jmethodID* method) { + *clazz = g_koalaJniCallbackDispatcher.clazz; + *method = g_koalaJniCallbackDispatcher.method; +} +#endif + +KInt impl_StringLength(KNativePointer ptr) { + string* s = reinterpret_cast(ptr); + return s->length(); +} +KOALA_INTEROP_1(StringLength, KInt, KNativePointer) + +void impl_StringData(KNativePointer ptr, KByte* bytes, KInt size) { + string* s = reinterpret_cast(ptr); + if (s) { + interop_memcpy(bytes, size, s->c_str(), size); + } +} +KOALA_INTEROP_V3(StringData, KNativePointer, KByte*, KInt) + + +#ifdef KOALA_JNI +// For Java only yet. +KInteropBuffer impl_StringDataBytes(KVMContext vmContext, KNativePointer ptr) { + string* s = reinterpret_cast(ptr); + KInteropBuffer result = { (int32_t)s->length(), (void*)s->c_str()}; + return result; +} +KOALA_INTEROP_CTX_1(StringDataBytes, KInteropBuffer, KNativePointer) +#endif + +KNativePointer impl_StringMake(const KStringPtr& str) { + return new string(str.c_str()); +} +KOALA_INTEROP_1(StringMake, KNativePointer, KStringPtr) + +// For slow runtimes w/o fast encoders. +KInt impl_ManagedStringWrite(const KStringPtr& string, KSerializerBuffer buffer, KInt bufferSize, KInt offset) { + interop_memcpy((uint8_t*)buffer + offset, bufferSize, string.c_str(), string.length() + 1); + return string.length() + 1; +} +KOALA_INTEROP_4(ManagedStringWrite, KInt, KStringPtr, KSerializerBuffer, KInt, KInt) + +void stringFinalizer(string* ptr) { + delete ptr; +} +KNativePointer impl_GetStringFinalizer() { + return fnPtr(stringFinalizer); +} +KOALA_INTEROP_0(GetStringFinalizer, KNativePointer) + +void impl_InvokeFinalizer(KNativePointer obj, KNativePointer finalizer) { + auto finalizer_f = reinterpret_cast(finalizer); + finalizer_f(obj); +} +KOALA_INTEROP_V2(InvokeFinalizer, KNativePointer, KNativePointer) + +KInt impl_GetPtrVectorSize(KNativePointer ptr) { + return reinterpret_cast*>(ptr)->size(); +} +KOALA_INTEROP_1(GetPtrVectorSize, KInt, KNativePointer) + +KNativePointer impl_GetPtrVectorElement(KNativePointer ptr, KInt index) { + auto vector = reinterpret_cast*>(ptr); + auto element = vector->at(index); + return nativePtr(element); +} +KOALA_INTEROP_2(GetPtrVectorElement, KNativePointer, KNativePointer, KInt) + +inline KUInt unpackUInt(const KByte* bytes) { + return (bytes[0] | (bytes[1] << 8) | (bytes[2] << 16) | (bytes[3] << 24)); +} + +KNativePointer impl_GetGroupedLog(KInt index) { + return new std::string(GetDefaultLogger()->getGroupedLog(index)); +} +KOALA_INTEROP_1(GetGroupedLog, KNativePointer, KInt) + +void impl_StartGroupedLog(KInt index) { + GetDefaultLogger()->startGroupedLog(index); +} +KOALA_INTEROP_V1(StartGroupedLog, KInt) + +void impl_StopGroupedLog(KInt index) { + GetDefaultLogger()->stopGroupedLog(index); +} +KOALA_INTEROP_V1(StopGroupedLog, KInt) + +void impl_AppendGroupedLog(KInt index, const KStringPtr& message) { + if (GetDefaultLogger()->needGroupedLog(index)) + GetDefaultLogger()->appendGroupedLog(index, message.c_str()); +} +KOALA_INTEROP_V2(AppendGroupedLog, KInt, KStringPtr) + +void impl_PrintGroupedLog(KInt index) { +#ifdef KOALA_OHOS + LOGI("%" LOG_PUBLIC "s", GetDefaultLogger()->getGroupedLog(index)); +#else + fprintf(stdout, "%s\n", GetDefaultLogger()->getGroupedLog(index)); + fflush(stdout); +#endif +} +KOALA_INTEROP_V1(PrintGroupedLog, KInt) + +int32_t callCallback(KVMContext context, int32_t methodId, uint8_t* argsData, int32_t argsLength) { +#if KOALA_USE_NODE_VM || KOALA_USE_HZ_VM || KOALA_USE_PANDA_VM || KOALA_USE_JAVA_VM || KOALA_CJ + KOALA_INTEROP_CALL_INT(context, methodId, argsLength, argsData); + return 0; +#else + return 0; +#endif +} + +struct ForeignVMContext { + KVMContext vmContext; + int32_t (*callSync)(KVMContext vmContext, int32_t callback, uint8_t* data, int32_t length); +}; +typedef KInt (*LoadVirtualMachine_t)(KInt vmKind, const char* bootFiles, const char* userFiles, const char* libraryPath, const struct ForeignVMContext* foreignVM); +typedef KNativePointer (*StartApplication_t)(const char* appUrl, const char* appParams, int32_t loopIterationr); +typedef KBoolean (*RunApplication_t)(const KInt arg0, const KInt arg1); +typedef const char* (*EmitEvent_t)(const KInt type, const KInt target, const KInt arg0, const KInt arg1); +typedef void (*RestartWith_t)(const char* page); +typedef const char* (*LoadView_t)(const char* className, const char* params); + +void* getImpl(const char* path, const char* name) { + static void* lib = nullptr; + if (!lib && name) { + auto name = +#ifndef KOALA_OHOS // dlopen on OHOS doesn't like paths + std::string(path) + "/" + +#endif + libName("vmloader"); + lib = loadLibrary(name); + if (!lib) { + fprintf(stderr, "Ensure vmloader library %s was built\n", name.c_str()); + } + } + return findSymbol(lib, name); +} + +KInt impl_LoadVirtualMachine(KVMContext vmContext, KInt vmKind, const KStringPtr& bootFiles, const KStringPtr& userFiles, const KStringPtr& libraryPath) { + const char* envClassPath = std::getenv("PANDA_CLASS_PATH"); + if (envClassPath) { + LOGI("CLASS PATH updated from env var PANDA_CLASS_PATH, %" LOG_PUBLIC "s", envClassPath); + } + const char* bootFilesPath = envClassPath ? envClassPath : bootFiles.c_str(); + const char* nativeLibPath = envClassPath ? envClassPath : libraryPath.c_str(); + + static LoadVirtualMachine_t impl = nullptr; + if (!impl) impl = reinterpret_cast(getImpl(nativeLibPath, "LoadVirtualMachine")); + if (!impl) KOALA_INTEROP_THROW_STRING(vmContext, "Cannot load VM", -1); + const ForeignVMContext foreignVM = { + vmContext, &callCallback + }; + return impl(vmKind, bootFilesPath, userFiles.c_str(), nativeLibPath, &foreignVM); +} +KOALA_INTEROP_CTX_4(LoadVirtualMachine, KInt, KInt, KStringPtr, KStringPtr, KStringPtr) + +KNativePointer impl_StartApplication(const KStringPtr& appUrl, const KStringPtr& appParams, KInt loopIterations) { + static StartApplication_t impl = nullptr; + if (!impl) impl = reinterpret_cast(getImpl(nullptr, "StartApplication")); + return impl(appUrl.c_str(), appParams.c_str(), loopIterations); +} +KOALA_INTEROP_3(StartApplication, KNativePointer, KStringPtr, KStringPtr, KInt) + +KBoolean impl_RunApplication(const KInt arg0, const KInt arg1) { + static RunApplication_t impl = nullptr; + if (!impl) impl = reinterpret_cast(getImpl(nullptr, "RunApplication")); + return impl(arg0, arg1); +} +KOALA_INTEROP_2(RunApplication, KBoolean, KInt, KInt) + +KStringPtr impl_EmitEvent(KVMContext vmContext, KInt type, KInt target, KInt arg0, KInt arg1) { + static EmitEvent_t impl = nullptr; + if (!impl) impl = reinterpret_cast(getImpl(nullptr, "EmitEvent")); + const char* out = impl(type, target, arg0, arg1); + auto size = std::string(out).size(); + KStringPtr result(out, size, true); + return result; +} +KOALA_INTEROP_CTX_4(EmitEvent, KStringPtr, KInt, KInt, KInt, KInt) + +void impl_RestartWith(const KStringPtr& page) { + static RestartWith_t impl = nullptr; + if (!impl) impl = reinterpret_cast(getImpl(nullptr, "RestartWith")); + impl(page.c_str()); +} +KOALA_INTEROP_V1(RestartWith, KStringPtr) + +#ifdef KOALA_ANI +KStringPtr impl_LoadView(const KStringPtr& className, const KStringPtr& params) { + static LoadView_t impl = nullptr; + if (!impl) impl = reinterpret_cast(getImpl(nullptr, "LoadView")); + const char* result = impl(className.c_str(), params.c_str()); + return KStringPtr(result, interop_strlen(result), true); +} +KOALA_INTEROP_2(LoadView, KStringPtr, KStringPtr, KStringPtr) +#endif // KOALA_ANI + +KNativePointer impl_Malloc(KLong length) { + const auto ptr = static_cast(malloc(length)); + if (ptr == nullptr) { + INTEROP_FATAL("Memory allocation failed!"); + } +#ifndef KOALA_INTEROP_MEM_ANALYZER + mallocCounter.fetch_add(1, std::memory_order_release); +#endif + return ptr; +} +KOALA_INTEROP_DIRECT_1(Malloc, KNativePointer, KLong) + +void malloc_finalize(KNativePointer data) { + if (data) { + free(data); +#ifndef KOALA_INTEROP_MEM_ANALYZER + if (mallocCounter.fetch_sub(1, std::memory_order_release) == 0) { + INTEROP_FATAL("Double-free detected!"); + } +#endif + } +} + +KNativePointer impl_GetMallocFinalizer() { + return reinterpret_cast(malloc_finalize); +} +KOALA_INTEROP_DIRECT_0(GetMallocFinalizer, KNativePointer) + +void impl_Free(KNativePointer data) { + malloc_finalize(data); +} +KOALA_INTEROP_DIRECT_V1(Free, KNativePointer) + +KInt impl_ReadByte(KNativePointer data, KLong index, KLong length) { + if (index >= length) INTEROP_FATAL("impl_ReadByte: index %lld is equal or greater than length %lld", (long long)index, (long long) length); + uint8_t* ptr = reinterpret_cast(data); + return ptr[index]; +} +KOALA_INTEROP_DIRECT_3(ReadByte, KInt, KNativePointer, KLong, KLong) + +void impl_WriteByte(KNativePointer data, KInt index, KLong length, KInt value) { + if (index >= length) INTEROP_FATAL("impl_WriteByte: index %lld is equal or greater than length %lld", (long long)index, (long long) length); + uint8_t* ptr = reinterpret_cast(data); + ptr[index] = value; +} +KOALA_INTEROP_DIRECT_V4(WriteByte, KNativePointer, KLong, KLong, KInt) + +void impl_CopyArray(KNativePointer data, KLong length, KByte* array) { + if (!array || !data) { + INTEROP_FATAL("CopyArray called with incorrect nullptr args (array, data):(%p, %p)", array, data); + } + + interop_memcpy(data, length, array, length); +} +KOALA_INTEROP_V3(CopyArray, KNativePointer, KLong, KByte*) + +static const int API_KIND_MAX = 100; +static Callback_Caller_t g_callbackCaller[API_KIND_MAX] = { 0 }; +static Callback_Caller_Sync_t g_callbackCallerSync[API_KIND_MAX] = { 0 }; + +#define CHECK_VALID_API_KIND(apiKind) \ + if (apiKind < 0 || apiKind > API_KIND_MAX) \ + INTEROP_FATAL("Maximum api kind is %d, received %d", API_KIND_MAX, apiKind); +#define CHECK_HAS_CALLBACK_CALLER(apiKind, callbackCallers) \ + CHECK_VALID_API_KIND(apiKind); \ + if (callbackCallers[apiKind] == nullptr) \ + INTEROP_FATAL("Callback caller for api kind %d was not set", apiKind) +#define CHECK_HAS_NOT_CALLBACK_CALLER(apiKind, callbackCallers) \ + CHECK_VALID_API_KIND(apiKind); \ + if (callbackCallers[apiKind] != nullptr) \ + INTEROP_FATAL("Callback caller for api kind %d already was set", apiKind); + +void setCallbackCaller(int apiKind, Callback_Caller_t callbackCaller) { + CHECK_HAS_NOT_CALLBACK_CALLER(apiKind, g_callbackCaller); + g_callbackCaller[apiKind] = callbackCaller; +} + +void impl_CallCallback(KInt apiKind, KInt callbackKind, KSerializerBuffer args, KInt argsSize) { + CHECK_HAS_CALLBACK_CALLER(apiKind, g_callbackCaller); + g_callbackCaller[apiKind](callbackKind, args, argsSize); +} +KOALA_INTEROP_V4(CallCallback, KInt, KInt, KSerializerBuffer, KInt) + +void setCallbackCallerSync(int apiKind, Callback_Caller_Sync_t callbackCallerSync) { + CHECK_HAS_NOT_CALLBACK_CALLER(apiKind, g_callbackCallerSync); + g_callbackCallerSync[apiKind] = callbackCallerSync; +} + +void impl_CallCallbackSync(KVMContext vmContext, KInt apiKind, KInt callbackKind, KSerializerBuffer args, KInt argsSize) { + CHECK_HAS_CALLBACK_CALLER(apiKind, g_callbackCallerSync); + g_callbackCallerSync[apiKind](vmContext, callbackKind, args, argsSize); +} +KOALA_INTEROP_CTX_V4(CallCallbackSync, KInt, KInt, KSerializerBuffer, KInt) + +void impl_CallCallbackResourceHolder(KNativePointer holder, KInt resourceId) { + reinterpret_cast(holder)(resourceId); +} +KOALA_INTEROP_V2(CallCallbackResourceHolder, KNativePointer, KInt) + +void impl_CallCallbackResourceReleaser(KNativePointer releaser, KInt resourceId) { + reinterpret_cast(releaser)(resourceId); +} +KOALA_INTEROP_V2(CallCallbackResourceReleaser, KNativePointer, KInt) + +KInt impl_CallForeignVM(KNativePointer foreignContextRaw, KInt function, KSerializerBuffer data, KInt length) { + const ForeignVMContext* foreignContext = (const ForeignVMContext*)foreignContextRaw; + // Improve: set actuall callbacks caller/holder/releaser. + /* + *(int64_t*)(data + 8) = impl_CallCallbackSync; + *(int64_t*)(data + 16) = 0; + *(int64_t*)(data + 24) = 0; */ + return foreignContext->callSync(foreignContext->vmContext, function, reinterpret_cast(data), length); +} +KOALA_INTEROP_4(CallForeignVM, KInt, KNativePointer, KInt, KSerializerBuffer, KInt) + +#ifdef KOALA_FOREIGN_NAPI +KVMContext g_foreignVMContext = nullptr; +#endif +void impl_SetForeignVMContext(KNativePointer foreignVMContextRaw) { +#ifdef KOALA_FOREIGN_NAPI + if (foreignVMContextRaw == nullptr) { + g_foreignVMContext = nullptr; + } else { + auto foreignContext = (const ForeignVMContext*)foreignVMContextRaw; + g_foreignVMContext = foreignContext->vmContext; + } +#endif + + /* supress unused private fields */ + (void)foreignVMContextRaw; +} +KOALA_INTEROP_V1(SetForeignVMContext, KNativePointer) + +#ifndef __QUOTE + #define __QUOTE(x) #x +#endif + +#define QUOTE(x) __QUOTE(x) + +void impl_NativeLog(const KStringPtr& str) { +#ifdef KOALA_OHOS + LOGI("%{public}s: %{public}s", QUOTE(INTEROP_LIBRARY_NAME), str.c_str()); +#else + fprintf(stdout, "%s: %s\n", QUOTE(INTEROP_LIBRARY_NAME), str.c_str()); + fflush(stdout); +#endif +} +KOALA_INTEROP_V1(NativeLog, KStringPtr) + +void resolveDeferred(KVMDeferred* deferred, uint8_t* argsData, int32_t argsLength) { +#ifdef KOALA_NAPI + auto status = napi_call_threadsafe_function((napi_threadsafe_function)deferred->handler, deferred, napi_tsfn_nonblocking); + if (status != napi_ok) LOGE("cannot call thread-safe function; status=%d", status); + if (deferred->handler) { + napi_release_threadsafe_function((napi_threadsafe_function)deferred->handler, napi_tsfn_release); + deferred->handler = nullptr; + } +#endif +#ifdef KOALA_ANI + ani_vm* vm = (ani_vm*)deferred->context; + ani_env* env = nullptr; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + if (env == nullptr || status != ANI_OK) { + status = vm->AttachCurrentThread(nullptr, ANI_VERSION_1, &env); + CHECK_ANI_FATAL(status); + } + ani_ref undef = nullptr; + status = env->GetUndefined(&undef); + CHECK_ANI_FATAL(status); + status = env->PromiseResolver_Resolve((ani_resolver)deferred->handler, undef); + CHECK_ANI_FATAL(status); +#endif +} + +void rejectDeferred(KVMDeferred* deferred, const char* message) { +#ifdef KOALA_NAPI + if (deferred->handler) { + napi_release_threadsafe_function((napi_threadsafe_function)deferred->handler, napi_tsfn_release); + deferred->handler = nullptr; + } +#endif +#ifdef KOALA_ANI + if (deferred->handler) { + ani_vm* vm = (ani_vm*)deferred->context; + ani_env* env = nullptr; + ani_status status = vm->GetEnv(ANI_VERSION_1, &env); + if (env == nullptr || status != ANI_OK) { + status = vm->AttachCurrentThread(nullptr, ANI_VERSION_1, &env); + CHECK_ANI_FATAL(status); + } + status = env->PromiseResolver_Reject((ani_resolver)deferred->handler, nullptr); + CHECK_ANI_FATAL(status); + deferred->handler = nullptr; + } +#endif + +} + +#ifdef KOALA_NAPI +void resolveDeferredImpl(napi_env env, napi_value js_callback, KVMDeferred* deferred, void* data) { + napi_value undefined = nullptr; + napi_get_undefined(env, &undefined); + auto status = napi_resolve_deferred(env, (napi_deferred)deferred->context, undefined); + if (status != napi_ok) LOGE("cannot resolve deferred; status=%d", status); + delete deferred; +} +#endif + +KVMDeferred* CreateDeferred(KVMContext vmContext, KVMObjectHandle* promiseHandle) { + KVMDeferred* deferred = new KVMDeferred(); + deferred->resolve = resolveDeferred; + deferred->reject = rejectDeferred; +#ifdef KOALA_NAPI + // Improve: move to interop! + napi_env env = (napi_env)vmContext; + napi_value promise; + napi_value resourceName; + napi_create_string_utf8(env, "Async", 5, &resourceName); + auto status = napi_create_promise(env, (napi_deferred*)&deferred->context, &promise); + if (status != napi_ok) LOGE("cannot make a promise; status=%d", status); + status = napi_create_threadsafe_function(env, + nullptr, + nullptr, + resourceName, + 0, + 1, + nullptr, + nullptr, + deferred, + (napi_threadsafe_function_call_js)resolveDeferredImpl, + (napi_threadsafe_function*)&deferred->handler); + if (status != napi_ok) LOGE("cannot make threadsafe function; status=%d", status); + *promiseHandle = (KVMObjectHandle)promise; +#endif +#ifdef KOALA_ANI + ani_env* env = (ani_env*)vmContext; + ani_object promise = nullptr; + ani_resolver resolver = nullptr; + ani_status status = env->Promise_New(&resolver, &promise); + deferred->handler = resolver; + CHECK_ANI_FATAL(status); + *promiseHandle = (KVMObjectHandle)promise; + ani_vm* vm = nullptr; + status = env->GetVM(&vm); + CHECK_ANI_FATAL(status); + deferred->context = vm; +#endif + return deferred; +} + +class KoalaWork { +protected: + InteropVMContext vmContext; +#ifdef KOALA_FOREIGN_NAPI + KVMContext foreignVMContext; +#endif + void* vmWork; + void* handle; + void (*execute)(void* handle); + void (*complete)(void* handle); +public: + KoalaWork(InteropVMContext vmContext, + InteropNativePointer handle, + void (*execute)(InteropNativePointer handle), + void (*complete)(InteropNativePointer handle)); + void Queue(); + void Execute(); + void Cancel(); + void Complete(); +}; +static void DoQueue(void* handle) { + ((KoalaWork*)handle)->Queue(); +} +static void DoCancel(void* handle) { + ((KoalaWork*)handle)->Cancel(); +} + +InteropAsyncWork koalaCreateWork( + InteropVMContext vmContext, + InteropNativePointer handle, + void (*execute)(InteropNativePointer handle), + void (*complete)(InteropNativePointer handle) +) { + return { + new KoalaWork(vmContext, handle, execute, complete), + DoQueue, + DoCancel, + }; +} + +const InteropAsyncWorker* GetAsyncWorker() { + static InteropAsyncWorker worker = { + koalaCreateWork + }; + return &worker; +} + +#if defined(KOALA_NAPI) +static void DoExecute(napi_env env, void* handle) { + ((KoalaWork*)handle)->Execute(); +} +static void DoComplete(napi_env env, napi_status status, void* handle) { + ((KoalaWork*)handle)->Complete(); +} +KoalaWork::KoalaWork(InteropVMContext vmContext, + InteropNativePointer handle, + void (*execute)(InteropNativePointer handle), + void (*complete)(InteropNativePointer handle) +): vmContext(vmContext), handle(handle), execute(execute), complete(complete) { + napi_env env = (napi_env)vmContext; + napi_value resourceName = nullptr; + napi_create_string_utf8(env, "KoalaAsyncOperation", NAPI_AUTO_LENGTH, &resourceName); + napi_create_async_work(env, nullptr, resourceName, DoExecute, DoComplete, this, (napi_async_work*)&vmWork); + /* supress unused private fields */ + (void)vmContext; + (void)vmWork; +} +void KoalaWork::Queue() { + napi_env env = (napi_env)vmContext; + napi_queue_async_work(env, (napi_async_work)vmWork); +} +void KoalaWork::Execute() { + execute(handle); +} +void KoalaWork::Cancel() { + napi_env env = (napi_env)vmContext; + napi_cancel_async_work(env, (napi_async_work)vmWork); +} +void KoalaWork::Complete() { + complete(handle); + delete this; +} +#else +#ifdef KOALA_FOREIGN_NAPI +static void DoExecute(napi_env env, void* handle) { + ((KoalaWork*)handle)->Execute(); +} +static void DoComplete(napi_env env, napi_status status, void* handle) { + ((KoalaWork*)handle)->Complete(); +} +#endif +KoalaWork::KoalaWork(InteropVMContext vmContext, + InteropNativePointer handle, + void (*execute)(InteropNativePointer handle), + void (*complete)(InteropNativePointer handle) +): vmContext(vmContext), handle(handle), execute(execute), complete(complete) { +#ifdef KOALA_FOREIGN_NAPI + if (g_foreignVMContext == nullptr) + INTEROP_FATAL("Can not launch async work while foreign VM context is not available. Please ensure you have called SetForeignVMContext"); + foreignVMContext = g_foreignVMContext; + napi_env env = (napi_env)foreignVMContext; + napi_value resourceName = nullptr; + napi_create_string_utf8(env, "KoalaAsyncOperation", NAPI_AUTO_LENGTH, &resourceName); + napi_create_async_work(env, nullptr, resourceName, DoExecute, DoComplete, this, (napi_async_work*)&vmWork); +#endif + /* supress unused private fields */ + (void)vmContext; + (void)vmWork; +} +void KoalaWork::Queue() { +#ifdef KOALA_FOREIGN_NAPI + napi_env env = (napi_env)foreignVMContext; + napi_queue_async_work(env, (napi_async_work)vmWork); +#else + Execute(); + Complete(); +#endif +} +void KoalaWork::Execute() { + execute(handle); +} +void KoalaWork::Cancel() { +#ifdef KOALA_FOREIGN_NAPI + napi_env env = (napi_env)foreignVMContext; + napi_cancel_async_work(env, (napi_async_work)vmWork); +#else + INTEROP_FATAL("Cancelling async work is disabled for any VM except of Node"); +#endif +} +void KoalaWork::Complete() { + complete(handle); + delete this; +} +#endif + + +#if defined(KOALA_ETS_NAPI) || defined(KOALA_ANI) +KStringPtr impl_Utf8ToString(KVMContext vmContext, KNativePointer data, KInt offset, KInt length) { + KStringPtr result((const char*)data + offset, length, false); + return result; +} +KOALA_INTEROP_CTX_3(Utf8ToString, KStringPtr, KNativePointer, KInt, KInt) +#elif defined(KOALA_NAPI) || defined(KOALA_JNI) || defined(KOALA_CJ) +// Allocate, so CTX versions. +KStringPtr impl_Utf8ToString(KVMContext vmContext, KByte* data, KInt offset, KInt length) { + KStringPtr result((const char*)(data + offset), length, false); + return result; +} +KOALA_INTEROP_CTX_3(Utf8ToString, KStringPtr, KByte*, KInt, KInt) +#endif + +#if defined(KOALA_NAPI) || defined(KOALA_ANI) +KStringPtr impl_RawUtf8ToString(KVMContext vmContext, KNativePointer data) { + auto string = (const char*)data; + KStringPtr result(string, interop_strlen(string), false); + return result; +} +KOALA_INTEROP_CTX_1(RawUtf8ToString, KStringPtr, KNativePointer) +#endif + +#if defined(KOALA_NAPI) || defined(KOALA_JNI) || defined(KOALA_CJ) || defined(KOALA_ETS_NAPI) || defined(KOALA_ANI) || defined(KOALA_KOTLIN) +KStringPtr impl_StdStringToString(KVMContext vmContext, KNativePointer stringPtr) { + std::string* string = reinterpret_cast(stringPtr); + KStringPtr result(string->c_str(), string->size(), false); + return result; +} +KOALA_INTEROP_CTX_1(StdStringToString, KStringPtr, KNativePointer) + +KInteropReturnBuffer impl_RawReturnData(KVMContext vmContext, KInt v1, KInt v2) { + void* data = new int8_t[v1]; + interop_memset(data, v1, v2, v1); + KInteropReturnBuffer buffer = { v1, data, [](KNativePointer ptr, KInt) { delete[] (int8_t*)ptr; }}; + return buffer; +} +KOALA_INTEROP_CTX_2(RawReturnData, KInteropReturnBuffer, KInt, KInt) + +KInteropNumber impl_IncrementNumber(KInteropNumber number) { + if (number.tag == 102) + number.i32++; + else + number.f32 += 1.f; + return number; +} +KOALA_INTEROP_1(IncrementNumber, KInteropNumber, KInteropNumber) + +void impl_ReportMemLeaks() { +#ifndef KOALA_INTEROP_MEM_ANALYZER + const auto count = mallocCounter.load(std::memory_order_acquire); + if (count > 0) { + fprintf(stderr, "Memory leaks detected: %d blocks\n", count); + } else { + fprintf(stderr, "No memory leaks\n"); + } +#endif +} +KOALA_INTEROP_V0(ReportMemLeaks) + +#endif \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/common-interop.h b/koala_tools/interop/src/cpp/common-interop.h new file mode 100644 index 0000000000000000000000000000000000000000..1d106656c281928c57c2b9b99df5b5b3853df342 --- /dev/null +++ b/koala_tools/interop/src/cpp/common-interop.h @@ -0,0 +1,77 @@ +/* + * 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. + */ + +#ifndef COMMON_INTEROP_BASE_H +#define COMMON_INTEROP_BASE_H + +#include + +#include "koala-types.h" + +#define KOALA_INTEROP_PROFILER 0 +#define KOALA_INTEROP_TRACER 0 + +#if KOALA_INTEROP_PROFILER +#include "profiler.h" +#define KOALA_INTEROP_LOGGER(name) InteropMethodCall logger(#name); +#endif + +#if KOALA_INTEROP_TRACER +#include "tracer.h" +#define KOALA_INTEROP_LOGGER(name) InteropMethodCall logger(#name); +#endif + + +#ifdef KOALA_INTEROP_LOGGER +#define KOALA_MAYBE_LOG(name) KOALA_INTEROP_LOGGER(name); +#else +#define KOALA_MAYBE_LOG(name) +#endif + +#ifdef KOALA_WINDOWS +#define DLL_EXPORT __declspec(dllexport) +#else +#define DLL_EXPORT __attribute__ ((visibility ("default"))) +#endif + +typedef void (*Callback_Caller_t)(KInt callbackKind, KSerializerBuffer argsData, KInt argsLength); +typedef void (*Callback_Caller_Sync_t)(KVMContext vmContext, KInt callbackKind, KSerializerBuffer argsData, KInt argsLength); +extern "C" DLL_EXPORT void setCallbackCaller(int apiKind, Callback_Caller_t caller); +extern "C" DLL_EXPORT void setCallbackCallerSync(int apiKind, Callback_Caller_Sync_t callerSync); + +extern "C" DLL_EXPORT KVMDeferred* CreateDeferred(KVMContext context, KVMObjectHandle* promise); +extern "C" DLL_EXPORT const InteropAsyncWorker* GetAsyncWorker(); + +#if KOALA_USE_NODE_VM || KOALA_USE_HZ_VM +#include "convertors-napi.h" +#elif KOALA_USE_JSC_VM +#include "convertors-jsc.h" +#elif KOALA_ETS_NAPI +#include "convertors-ets.h" +#elif KOALA_USE_JAVA_VM +#include "convertors-jni.h" +#elif KOALA_WASM +#include "convertors-wasm.h" +#elif KOALA_CJ +#include "convertors-cj.h" +#elif KOALA_ANI +#include "convertors-ani.h" +#elif KOALA_KOTLIN +#include "convertors-kotlin.h" +#else +#error "One of above branches must be taken" +#endif + +#endif // COMMON_INTEROP_BASE_H diff --git a/koala_tools/interop/src/cpp/crashdump.h b/koala_tools/interop/src/cpp/crashdump.h new file mode 100644 index 0000000000000000000000000000000000000000..128f7ba61715fd378f73511dede93f01cd38b7ec --- /dev/null +++ b/koala_tools/interop/src/cpp/crashdump.h @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2024 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. + */ + +#ifndef _INTEROP_CRASHDUMP_H +#define _INTEROP_CRASHDUMP_H + +#ifdef KOALA_LINUX +#include +#include + +sighandler_t oldCrashHandler = nullptr; + +static void onCrashHandler(int signo) { + void* stack[20]; + size_t size = backtrace(stack, 20); + backtrace_symbols_fd(stack, size, STDERR_FILENO); + if (oldCrashHandler) oldCrashHandler(signo); +} + +static void installCrashHandlers() { + static bool installed = false; + if (!installed) { + oldCrashHandler = signal(SIGSEGV, onCrashHandler); + installed = true; + } +} +#else +static void installCrashHandlers() {} +#endif + +#endif // _INTEROP_CRASHDUMP_H \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/dynamic-loader.h b/koala_tools/interop/src/cpp/dynamic-loader.h new file mode 100644 index 0000000000000000000000000000000000000000..4eb38df35035cceded928135fc1d63841f3ed2cf --- /dev/null +++ b/koala_tools/interop/src/cpp/dynamic-loader.h @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2024 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. + */ + +#ifndef _DYNAMIC_LOADER_H +#define _DYNAMIC_LOADER_H + +#include +#include "interop-utils.h" + +#ifdef KOALA_WINDOWS +#include +// Here we need to find module where GetArkUINodeAPI() +// function is implemented. +inline void* loadLibrary(const std::string& libPath) { + return LoadLibraryA(libPath.c_str()); +} + +inline const char* libraryError() { + static char error[256]; + interop_snprintf(error, sizeof error, "error %lu", GetLastError()); + return error; +} + +inline void* findSymbol(void* library, const char* name) { + return (void*)GetProcAddress(reinterpret_cast(library), name); +} + +inline std::string libName(const char* lib) { + return std::string(lib) + ".dll"; +} + +#elif defined(KOALA_LINUX) || defined(KOALA_MACOS) || defined(KOALA_OHOS) +#include + +inline void* loadLibrary(const std::string& libPath) { + void* handle = dlopen(libPath.c_str(), RTLD_LOCAL | RTLD_NOW); + if (!handle) { + return nullptr; + } + return handle; +} + +inline const char* libraryError() { + return dlerror(); +} + +inline std::string symbolName(const char* name) { + return name; +} + +inline void* findSymbol(void* library, const char* name) { + return dlsym(library, symbolName(name).c_str()); +} + +inline std::string libName(const char* lib) { + std::string result; + std::string suffix = +#ifdef KOALA_MACOS + ".dylib" +#else + ".so" +#endif + ; + result = "lib" + std::string(lib) + suffix; + return result; +} + +#else + +#include + +inline void* loadLibrary(const std::string& libPath) { + fprintf(stderr, "No loadLibrary() on this platform\n"); + return nullptr; +} + +inline const char* libraryError() { + fprintf(stderr, "No libraryError() on this platform\n"); + return nullptr; +} + +inline std::string symbolName(const char* name) { + fprintf(stderr, "No symbolName() on this platform\n"); + return ""; +} + +inline void* findSymbol(void* library, const char* name) { + fprintf(stderr, "No findSymbol() on this platform\n"); + return nullptr; +} + +inline std::string libName(const char* lib) { + fprintf(stderr, "No libName() on this platform\n"); + return ""; +} + +#endif + +#endif // _DYNAMIC_LOADER_H \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/ets/convertors-ets.cc b/koala_tools/interop/src/cpp/ets/convertors-ets.cc new file mode 100644 index 0000000000000000000000000000000000000000..62ceb1e54b3b042496b776e816d73449f1fd65f6 --- /dev/null +++ b/koala_tools/interop/src/cpp/ets/convertors-ets.cc @@ -0,0 +1,149 @@ +/* + * 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. + */ + +#include +#include "convertors-ets.h" +#include "signatures.h" +#include "interop-logging.h" +#include "interop-types.h" + +static const char* callCallbackFromNative = "callCallbackFromNative"; +static const char* callCallbackFromNativeSig = "IJI:I"; + +static const char* FAST_NATIVE_PREFIX = "#F$"; + +const bool registerByOne = true; + +static bool registerNatives(ets_env *env, const ets_class clazz, const std::vector> impls) { + std::vector methods; + methods.reserve(impls.size()); + bool result = true; + for (const auto &[name, type, func, flag] : impls) { + EtsNativeMethod method; + method.name = name.c_str(); + method.func = func; + method.signature = (flag & ETS_SLOW_NATIVE_FLAG) == 0 ? FAST_NATIVE_PREFIX : nullptr; + if (registerByOne) { + result &= env->RegisterNatives(clazz, &method, 1) >= 0; + if (env->ErrorCheck()) { + env->ErrorClear(); + } + } + else { + methods.push_back(method); + } + } + if (!registerByOne) { + result = env->RegisterNatives(clazz, methods.data(), static_cast(methods.size())) >= 0; + } + return registerByOne ? true : result; +} + +bool registerAllModules(ets_env *env) { + auto moduleNames = EtsExports::getInstance()->getModules(); + + for (auto it = moduleNames.begin(); it != moduleNames.end(); ++it) { + std::string className = EtsExports::getInstance()->getClasspath(*it); + ets_class nativeModule = env->FindClass(className.c_str()); + if (nativeModule == nullptr) { + LOGE("Cannot find managed class %s", className.c_str()); + continue; + } + if (!registerNatives(env, nativeModule, EtsExports::getInstance()->getMethods(*it))) { + return false; + } + } + + return true; +} + +extern "C" ETS_EXPORT ets_int ETS_CALL EtsNapiOnLoad(ets_env *env) { + LOGE("Use ETSNAPI") + if (!registerAllModules(env)) { + LOGE("Failed to register ets modules"); + return ETS_ERR; + } + auto interopClasspath = EtsExports::getInstance()->getClasspath("InteropNativeModule"); + auto interopClass = env->FindClass(interopClasspath.c_str()); + if (interopClass == nullptr) { + LOGE("Can not find InteropNativeModule classpath to set callback dispatcher"); + return ETS_ERR; + } + if (!setKoalaEtsNapiCallbackDispatcher(env, interopClass, callCallbackFromNative, callCallbackFromNativeSig)) { + LOGE("Failed to set koala ets callback dispatcher"); + return ETS_ERR; + } + return ETS_NAPI_VERSION_1_0; +} + +EtsExports* EtsExports::getInstance() { + static EtsExports *instance = nullptr; + if (instance == nullptr) { + instance = new EtsExports(); + } + return instance; +} + +std::vector EtsExports::getModules() { + std::vector result; + for (auto it = implementations.begin(); it != implementations.end(); ++it) { + result.push_back(it->first); + } + return result; +} + +const std::vector>& EtsExports::getMethods(const std::string& module) { + auto it = implementations.find(module); + if (it == implementations.end()) { + LOGE("Module %s is not registered", module.c_str()); + } + return it->second; +} + +void EtsExports::addMethod(const char* module, const char *name, const char *type, void *impl, int flags) { + auto it = implementations.find(module); + if (it == implementations.end()) { + it = implementations.insert(std::make_pair(module, std::vector>())).first; + } + it->second.push_back(std::make_tuple(name, convertType(name, type), impl, flags)); +} + +void EtsExports::setClasspath(const char* module, const char *classpath) { + auto it = classpaths.find(module); + if (it == classpaths.end()) { + classpaths.insert(std::make_pair(module, classpath)); + } else { + LOGE("Classpath for module %s was redefined", module); + } +} + +static std::map g_defaultClasspaths = { + {"InteropNativeModule", "@koalaui/interop/InteropNativeModule/InteropNativeModule"}, + // Improve: leave just InteropNativeModule, define others via KOALA_ETS_INTEROP_MODULE_CLASSPATH + {"TestNativeModule", "arkui/generated/arkts/TestNativeModule/TestNativeModule"}, + {"ArkUINativeModule", "arkui/generated/arkts/ArkUINativeModule/ArkUINativeModule"}, + {"ArkUIGeneratedNativeModule", "arkui/generated/arkts/ArkUIGeneratedNativeModule/ArkUIGeneratedNativeModule"}, +}; +const std::string& EtsExports::getClasspath(const std::string& module) { + auto it = classpaths.find(module); + if (it != classpaths.end()) { + return it->second; + } + auto defaultClasspath = g_defaultClasspaths.find(module); + if (defaultClasspath != g_defaultClasspaths.end()) { + return defaultClasspath->second; + } + INTEROP_FATAL("Classpath for module %s was not registered", module.c_str()); +} diff --git a/koala_tools/interop/src/cpp/ets/convertors-ets.h b/koala_tools/interop/src/cpp/ets/convertors-ets.h new file mode 100644 index 0000000000000000000000000000000000000000..efef48798ba19d7e50e59d02c831d343b459612e --- /dev/null +++ b/koala_tools/interop/src/cpp/ets/convertors-ets.h @@ -0,0 +1,1810 @@ +/* + * 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. + */ + +#ifndef CONVERTORS_ETS_H +#define CONVERTORS_ETS_H + +#ifdef KOALA_ETS_NAPI + +#include +#include +#include +#include +#include +#include + +#include "etsapi.h" +#include "koala-types.h" +#include "interop-utils.h" + +template +struct InteropTypeConverter { + using InteropType = T; + static T convertFrom(EtsEnv* env, InteropType value) = delete; + static InteropType convertTo(EtsEnv* env, T value) = delete; + static void release(EtsEnv* env, InteropType value, T converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_boolean; + static KBoolean convertFrom(EtsEnv* env, InteropType value) { return value; } + static InteropType convertTo(EtsEnv* env, KBoolean value) { return value; } + static void release(EtsEnv* env, InteropType value, KBoolean converted) {} +}; + + +template<> +struct InteropTypeConverter { + using InteropType = ets_int; + static KInt convertFrom(EtsEnv* env, InteropType value) { return value; } + static InteropType convertTo(EtsEnv* env, KInt value) { return value; } + static void release(EtsEnv* env, InteropType value, KInt converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_int; + static KUInt convertFrom(EtsEnv* env, InteropType value) { return value; } + static InteropType convertTo(EtsEnv* env, KUInt value) { return value; } + static void release(EtsEnv* env, InteropType value, KUInt converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_byte; + static KByte convertFrom(EtsEnv* env, InteropType value) { return value; } + static InteropType convertTo(EtsEnv* env, KByte value) { return value; } + static void release(EtsEnv* env, InteropType value, KByte converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_float; + static KFloat convertFrom(EtsEnv* env, InteropType value) { return value; } + static InteropType convertTo(EtsEnv* env, InteropFloat32 value) { return value; } + static void release(EtsEnv* env, InteropType value, KFloat converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_double; + static KDouble convertFrom(EtsEnv* env, InteropType value) { return value; } + static InteropType convertTo(EtsEnv* env, InteropFloat64 value) { return value; } + static void release(EtsEnv* env, InteropType value, KDouble converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_long; + static KSerializerBuffer convertFrom(EtsEnv* env, InteropType value) { + return reinterpret_cast(static_cast(value)); + } + static InteropType convertTo(EtsEnv* env, KSerializerBuffer value) = delete; + static void release(EtsEnv* env, InteropType value, KSerializerBuffer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_object; + static KVMObjectHandle convertFrom(EtsEnv* env, InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(EtsEnv* env, KVMObjectHandle value) { + return reinterpret_cast(value); + } + static void release(EtsEnv* env, InteropType value, KVMObjectHandle converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_byteArray; + static KInteropBuffer convertFrom(EtsEnv* env, InteropType value) { + if (!value) return KInteropBuffer(); + KInteropBuffer result; + result.data = (KByte*)env->PinByteArray(value); + result.length = env->GetArrayLength(value); + return result; + } + static InteropType convertTo(EtsEnv* env, KInteropBuffer value) { + int bufferLength = value.length; + ets_byteArray array = env->NewByteArray(bufferLength); + KByte* data = (KByte*)env->PinByteArray(array); + interop_memcpy(data, bufferLength, (KByte*)value.data, bufferLength); + env->UnpinByteArray(array); + value.dispose(value.resourceId); + return array; + } + static void release(EtsEnv* env, InteropType value, KInteropBuffer converted) { + env->UnpinByteArray(value); + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_string; + static KStringPtr convertFrom(EtsEnv* env, InteropType value) { + if (value == nullptr) return KStringPtr(); + KStringPtr result; + // Notice that we use UTF length for buffer size, but counter is expressed in number of Unicode chars. + result.resize(env->GetStringUTFLength(value)); + env->GetStringUTFRegion(value, 0, env->GetStringLength(value), result.data()); + return result; + } + static InteropType convertTo(EtsEnv* env, const KStringPtr& value) { + return env->NewStringUTF(value.c_str()); + } + static void release(EtsEnv* env, InteropType value, const KStringPtr& converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_long; + static KNativePointer convertFrom(EtsEnv* env, InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(EtsEnv* env, KNativePointer value) { + return reinterpret_cast(value); + } + static void release(EtsEnv* env, InteropType value, KNativePointer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_long; + static KLong convertFrom(EtsEnv* env, InteropType value) { + return value; + } + static InteropType convertTo(EtsEnv* env, KLong value) { + return value; + } + static void release(EtsEnv* env, InteropType value, KLong converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_long; + static KULong convertFrom(EtsEnv* env, InteropType value) { + return static_cast(value); + } + static InteropType convertTo(EtsEnv* env, KULong value) { + return static_cast(value); + } + static void release(EtsEnv* env, InteropType value, KULong converted) {} +}; + + +template<> +struct InteropTypeConverter { + using InteropType = ets_intArray; + static KInt* convertFrom(EtsEnv* env, InteropType value) { + if (!value) return nullptr; + return env->PinIntArray(value); + } + static InteropType convertTo(EtsEnv* env, KInt* value) = delete; + static void release(EtsEnv* env, InteropType value, KInt* converted) { + if (value) env->UnpinIntArray(value); + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_floatArray; + static KFloat* convertFrom(EtsEnv* env, InteropType value) { + if (!value) return nullptr; + return env->PinFloatArray(value); + } + static InteropType convertTo(EtsEnv* env, KFloat* value) = delete; + static void release(EtsEnv* env, InteropType value, KFloat* converted) { + if (value) env->UnpinFloatArray(value); + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_byteArray; + static KInteropReturnBuffer convertFrom(EtsEnv* env, InteropType value) = delete; + static InteropType convertTo(EtsEnv* env, KInteropReturnBuffer value) { + int bufferLength = value.length; + ets_byteArray array = env->NewByteArray(bufferLength); + KByte* data = (KByte*)env->PinByteArray(array); + interop_memcpy(data, bufferLength, (KByte*)value.data, bufferLength); + env->UnpinByteArray(array); + value.dispose(value.data, bufferLength); + return array; + }; + static void release(EtsEnv* env, InteropType value, KInteropReturnBuffer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = ets_byteArray; + static KByte* convertFrom(EtsEnv* env, InteropType value) { + if (!value) return nullptr; + return (KByte*)env->PinByteArray(value); + } + static InteropType convertTo(EtsEnv* env, KByte* value) = delete; + static void release(EtsEnv* env, InteropType value, KByte* converted) { + if (value) env->UnpinByteArray((ets_byteArray)value); + } +}; + +template <> struct InteropTypeConverter { + using InteropType = ets_double; + static KInteropNumber convertFrom(EtsEnv *env, InteropType value) { + return KInteropNumber::fromDouble(value); + } + static InteropType convertTo(EtsEnv *env, KInteropNumber value) { + return value.asDouble(); + } + static void release(EtsEnv *env, InteropType value, KInteropNumber converted) {} +}; + +template +inline typename InteropTypeConverter::InteropType makeResult(EtsEnv* env, Type value) { + return InteropTypeConverter::convertTo(env, value); +} + +template +inline Type getArgument(EtsEnv* env, typename InteropTypeConverter::InteropType arg) { + return InteropTypeConverter::convertFrom(env, arg); +} + +template +inline void releaseArgument(EtsEnv* env, typename InteropTypeConverter::InteropType arg, Type& data) { + InteropTypeConverter::release(env, arg, data); +} + +template +struct DirectInteropTypeConverter { + using InteropType = T; + static T convertFrom(InteropType value) { return value; } + static InteropType convertTo(T value) { return value; } +}; + +template<> +struct DirectInteropTypeConverter { + using InteropType = ets_long; + static KNativePointer convertFrom(InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(KNativePointer value) { + return reinterpret_cast(value); + } +}; + +template<> +struct DirectInteropTypeConverter { + using InteropType = ets_long; + static KSerializerBuffer convertFrom(InteropType value) { + return reinterpret_cast(static_cast(value)); + } + static InteropType convertTo(KSerializerBuffer value) = delete; +}; + +template <> +struct DirectInteropTypeConverter { + using InteropType = ets_double; + static KInteropNumber convertFrom(InteropType value) { + return KInteropNumber::fromDouble(value); + } + static InteropType convertTo(KInteropNumber value) { + return value.asDouble(); + } +}; + +#define ETS_SLOW_NATIVE_FLAG 1 + +class EtsExports { + std::unordered_map>> implementations; + std::unordered_map classpaths; + +public: + static EtsExports* getInstance(); + + std::vector getModules(); + void addMethod(const char* module, const char* name, const char* type, void* impl, int flags); + const std::vector>& getMethods(const std::string& module); + + void setClasspath(const char* module, const char* classpath); + const std::string& getClasspath(const std::string& module); +}; + +#define KOALA_QUOTE0(x) #x +#define KOALA_QUOTE(x) KOALA_QUOTE0(x) + +#ifdef _MSC_VER +#define MAKE_ETS_EXPORT(module, name, type, flag) \ + static void __init_##name() { \ + EtsExports::getInstance()->addMethod(KOALA_QUOTE(module), "_"#name, type, reinterpret_cast(Ark_##name), flag); \ + } \ + namespace { \ + struct __Init_##name { \ + __Init_##name() { __init_##name(); } \ + } __Init_##name##_v; \ + } +#define KOALA_ETS_INTEROP_MODULE_CLASSPATH(module, classpath) \ + static void __init_classpath_##module() { \ + EtsExports::getInstance()->setClasspath(KOALA_QUOTE(module), classpath); \ + } \ + namespace { \ + struct __Init_classpath_##module { \ + __Init_classpath_##module() { __init_classpath_##module(); } \ + } __Init_classpath_##module##_v; \ + } +#else +#define MAKE_ETS_EXPORT(module, name, type, flag) \ + __attribute__((constructor)) \ + static void __init_ets_##name() { \ + EtsExports::getInstance()->addMethod(KOALA_QUOTE(module), "_"#name, type, reinterpret_cast(Ark_##name), flag); \ + } +#define KOALA_ETS_INTEROP_MODULE_CLASSPATH(module, classpath) \ + __attribute__((constructor)) \ + static void __init_ets_classpath_##module() { \ + EtsExports::getInstance()->setClasspath(KOALA_QUOTE(module), classpath); \ + } +#endif + +#define KOALA_INTEROP_0(name, Ret) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz) { \ + KOALA_MAYBE_LOG(name) \ + return makeResult(env, impl_##name()); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret, 0) + +#define KOALA_INTEROP_1(name, Ret, P0) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + auto rv = makeResult(env, impl_##name(p0)); \ + releaseArgument(env, _p0, p0); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0, 0) + +#define KOALA_INTEROP_2(name, Ret, P0, P1) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + auto rv = makeResult(env, impl_##name(p0, p1)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1, 0) + +#define KOALA_INTEROP_3(name, Ret, P0, P1, P2) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2, 0) + +#define KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) + +#define KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) + +#define KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) \ +InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) + +#define KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) + +#define KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) + +#define KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + return rv; \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) + +#define KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) + +#define KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) + +#define KOALA_INTEROP_12(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11, 0) + +#define KOALA_INTEROP_13(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + return rv; \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12, 0) + +#define KOALA_INTEROP_14(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + P13 p13 = getArgument(env, _p13); \ + auto rv = makeResult(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + releaseArgument(env, _p13, p13); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12 "|" #P13, 0) + +#define KOALA_INTEROP_V0(name) \ + void Ark_##name(EtsEnv *env) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void", 0) + +#define KOALA_INTEROP_V1(name, P0) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + impl_##name(p0); \ + releaseArgument(env, _p0, p0); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0, 0) + +#define KOALA_INTEROP_V2(name, P0, P1) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + impl_##name(p0, p1); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1, 0) + +#define KOALA_INTEROP_V3(name, P0, P1, P2) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + impl_##name(p0, p1, p2); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2, 0) + +#define KOALA_INTEROP_V4(name, P0, P1, P2, P3) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + impl_##name(p0, p1, p2, p3); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ +} \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) + +#define KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + impl_##name(p0, p1, p2, p3, p4); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ +} \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) + +#define KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + impl_##name(p0, p1, p2, p3, p4, p5); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) + +#define KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) + +#define KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) + +#define KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) + +#define KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ +} \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) + +#define KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) + +#define KOALA_INTEROP_V12(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ +} \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11, 0) + +#define KOALA_INTEROP_V13(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ +} \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12, 0) + +#define KOALA_INTEROP_V14(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + P13 p13 = getArgument(env, _p13); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + releaseArgument(env, _p13, p13); \ +} \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12 "|" #P13, 0) + +#define KOALA_INTEROP_V15(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13, \ + InteropTypeConverter::InteropType _p14) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + P13 p13 = getArgument(env, _p13); \ + P14 p14 = getArgument(env, _p14); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + releaseArgument(env, _p13, p13); \ + releaseArgument(env, _p14, p14); \ +} \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12 "|" #P13 "|" #P14, 0) + +#define KOALA_INTEROP_CTX_0(name, Ret) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz) { \ + KOALA_MAYBE_LOG(name) \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx)); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret, ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_1(name, Ret, P0) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx, p0)); \ + releaseArgument(env, _p0, p0); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0, ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_2(name, Ret, P0, P1) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx, p0, p1)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1, ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_3(name, Ret, P0, P1, P2) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx, p0, p1, p2)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2, ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_4(name, Ret, P0, P1, P2, P3) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx, p0, p1, p2, p3)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3, ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_5(name, Ret, P0, P1, P2, P3, P4) \ + InteropTypeConverter::InteropType Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = makeResult(env, impl_##name(ctx, p0, p1, p2, p3, p4)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + return rv; \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V0(name) \ + void Ark_##name(EtsEnv *env, ets_class clazz) { \ + KOALA_MAYBE_LOG(name) \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void", ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V1(name, P0) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0); \ + releaseArgument(env, _p0, p0); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0, ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V2(name, P0, P1) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1, ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V3(name, P0, P1, P2) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1, p2); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2, ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V4(name, P0, P1, P2, P3) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1, p2, p3); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3, ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_CTX_V5(name, P0, P1, P2, P3, P4) \ + void Ark_##name(EtsEnv *env, ets_class clazz, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1, p2, p3, p4); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + } \ +MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, ETS_SLOW_NATIVE_FLAG) + +#define KOALA_INTEROP_DIRECT_0(name, Ret) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name()); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret, 0) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0, 0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1, 0) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2, 0) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + inline InteropTypeConverter::InteropType Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9, \ + InteropTypeConverter::InteropType p10 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + return DirectInteropTypeConverter::convertTo(impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9), DirectInteropTypeConverter::convertFrom(p10))); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) +#define KOALA_INTEROP_DIRECT_V0(name) \ + inline void Ark_##name( \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void", 0) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0, 0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1, 0) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2, 0) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3, 0) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4, 0) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5, 0) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6, 0) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7, 0) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8, 0) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9, 0) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + inline void Ark_##name( \ + InteropTypeConverter::InteropType p0, \ + InteropTypeConverter::InteropType p1, \ + InteropTypeConverter::InteropType p2, \ + InteropTypeConverter::InteropType p3, \ + InteropTypeConverter::InteropType p4, \ + InteropTypeConverter::InteropType p5, \ + InteropTypeConverter::InteropType p6, \ + InteropTypeConverter::InteropType p7, \ + InteropTypeConverter::InteropType p8, \ + InteropTypeConverter::InteropType p9, \ + InteropTypeConverter::InteropType p10 \ + ) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(DirectInteropTypeConverter::convertFrom(p0), DirectInteropTypeConverter::convertFrom(p1), DirectInteropTypeConverter::convertFrom(p2), DirectInteropTypeConverter::convertFrom(p3), DirectInteropTypeConverter::convertFrom(p4), DirectInteropTypeConverter::convertFrom(p5), DirectInteropTypeConverter::convertFrom(p6), DirectInteropTypeConverter::convertFrom(p7), DirectInteropTypeConverter::convertFrom(p8), DirectInteropTypeConverter::convertFrom(p9), DirectInteropTypeConverter::convertFrom(p10)); \ + } \ + MAKE_ETS_EXPORT(KOALA_INTEROP_MODULE, name, "void" "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10, 0) + +bool setKoalaEtsNapiCallbackDispatcher( + EtsEnv* etsEnv, + ets_class clazz, + const char* dispatcherMethodName, + const char* dispactherMethodSig +); +void getKoalaEtsNapiCallbackDispatcher(ets_class* clazz, ets_method* method); + +#define KOALA_INTEROP_CALL_VOID(venv, id, length, args) \ +{ \ + ets_class clazz = nullptr; \ + ets_method method = nullptr; \ + getKoalaEtsNapiCallbackDispatcher(&clazz, &method); \ + EtsEnv* etsEnv = reinterpret_cast(vmContext); \ + etsEnv->PushLocalFrame(1); \ + etsEnv->CallStaticIntMethod(clazz, method, id, args, length); \ + etsEnv->PopLocalFrame(nullptr); \ +} + +#define KOALA_INTEROP_CALL_INT(venv, id, length, args) \ +{ \ + ets_class clazz = nullptr; \ + ets_method method = nullptr; \ + getKoalaEtsNapiCallbackDispatcher(&clazz, &method); \ + EtsEnv* etsEnv = reinterpret_cast(venv); \ + etsEnv->PushLocalFrame(1); \ + int32_t rv = etsEnv->CallStaticIntMethod(clazz, method, id, args, length); \ + etsEnv->PopLocalFrame(nullptr); \ + return rv; \ +} + +#define KOALA_INTEROP_CALL_VOID_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_VOID(venv, id, (argc) * sizeof(int32_t), args) +#define KOALA_INTEROP_CALL_INT_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_INT(venv, id, (argc) * sizeof(int32_t), args) + +#define KOALA_INTEROP_THROW(vmContext, object, ...) \ + do { \ + EtsEnv* env = reinterpret_cast(vmContext); \ + env->ThrowError(object); \ + return __VA_ARGS__; \ + } while (0) + +#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ + do { \ + EtsEnv* env = reinterpret_cast(vmContext); \ + const static ets_class errorClass = env->FindClass("std/core/Error"); \ + env->ThrowErrorNew(errorClass, message); \ + } while (0) + +#endif // KOALA_ETS_NAPI + +#endif // CONVERTORS_ETS_H \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/ets/etsapi.h b/koala_tools/interop/src/cpp/ets/etsapi.h new file mode 100644 index 0000000000000000000000000000000000000000..41641c97eb5e6588876fa795dd09278ab491a54e --- /dev/null +++ b/koala_tools/interop/src/cpp/ets/etsapi.h @@ -0,0 +1,1545 @@ +/** + * Copyright (c) 2021-2024 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. + */ + +#ifndef PANDA_RUNTIME_INTEROP_ETS_NAPI_H +#define PANDA_RUNTIME_INTEROP_ETS_NAPI_H + +// NOLINTBEGIN(modernize-use-using, readability-identifier-naming, cppcoreguidelines-pro-type-vararg) + +#ifdef __cplusplus +#include +#include +#else +#include +#include +#endif + +// NOLINTBEGIN(cppcoreguidelines-macro-usage) + +// Version Constants +#define ETS_NAPI_VERSION_1_0 0x00010000 + +// General return value constants +#define ETS_OK 0 // success +#define ETS_ERR (-1) // unknown error +#define ETS_ERR_VER (-2) // ETS version error +#define ETS_ERR_NOMEM (-3) // not enough memory +#define ETS_ERR_EXIST (-4) // VM already created +#define ETS_ERR_INVAL (-5) // invalid arguments + +// Boolean Constants +#define ETS_FALSE 0 +#define ETS_TRUE 1 + +// Mode Constants +#define ETS_COMMIT 1 +#define ETS_ABORT 2 + +// NOLINTEND(cppcoreguidelines-macro-usage) + +// Primitive Types +typedef uint8_t ets_boolean; +typedef int8_t ets_byte; +typedef uint16_t ets_char; +typedef int16_t ets_short; +typedef int32_t ets_int; +typedef int64_t ets_long; +typedef float ets_float; +typedef double ets_double; +typedef ets_int ets_size; + +// Reference Types +#ifdef __cplusplus +class __ets_object {}; +class __ets_class : public __ets_object {}; +class __ets_string : public __ets_object {}; +class __ets_array : public __ets_object {}; +class __ets_objectArray : public __ets_array {}; +class __ets_booleanArray : public __ets_array {}; +class __ets_byteArray : public __ets_array {}; +class __ets_charArray : public __ets_array {}; +class __ets_shortArray : public __ets_array {}; +class __ets_intArray : public __ets_array {}; +class __ets_longArray : public __ets_array {}; +class __ets_floatArray : public __ets_array {}; +class __ets_doubleArray : public __ets_array {}; +class __ets_error : public __ets_object {}; + +typedef __ets_object *ets_object; +typedef __ets_class *ets_class; +typedef __ets_string *ets_string; +typedef __ets_array *ets_array; +typedef __ets_objectArray *ets_objectArray; +typedef __ets_booleanArray *ets_booleanArray; +typedef __ets_byteArray *ets_byteArray; +typedef __ets_charArray *ets_charArray; +typedef __ets_shortArray *ets_shortArray; +typedef __ets_intArray *ets_intArray; +typedef __ets_longArray *ets_longArray; +typedef __ets_floatArray *ets_floatArray; +typedef __ets_doubleArray *ets_doubleArray; +typedef __ets_error *ets_error; +typedef __ets_object *ets_weak; + +#else // __cplusplus + +struct __ets_object; +typedef struct __ets_object *ets_object; +typedef ets_object ets_class; +typedef ets_object ets_string; +typedef ets_object ets_error; +typedef ets_object ets_weak; +typedef ets_object ets_array; +typedef ets_array ets_objectArray; +typedef ets_array ets_booleanArray; +typedef ets_array ets_byteArray; +typedef ets_array ets_charArray; +typedef ets_array ets_shortArray; +typedef ets_array ets_intArray; +typedef ets_array ets_longArray; +typedef ets_array ets_floatArray; +typedef ets_array ets_doubleArray; +#endif // __cplusplus + +struct __ets_deferred; +typedef struct __ets_deferred *ets_deferred; + +// Field and Method IDs +struct __ets_method; +struct __ets_field; +typedef struct __ets_method *ets_method; +typedef struct __ets_field *ets_field; + +// The Value Type +typedef union ets_value { + ets_boolean z; + ets_byte b; + ets_char c; + ets_short s; + ets_int i; + ets_long j; + ets_float f; + ets_double d; + ets_object l; +} ets_value; + +// Describe native method by name, signature and function pointer +typedef struct { + const char *name; + const char *signature; + void *func; +} EtsNativeMethod; + +// The object reference types +typedef enum { + ETS_INVALID_REF_TYPE = 0, + ETS_LOCAL_REF_TYPE = 1, + ETS_GLOBAL_REF_TYPE = 2, + ETS_WEAK_GLOBAL_REF_TYPE = 3 +} ets_objectRefType; + +#ifdef __cplusplus +typedef struct __EtsVM EtsVM; +typedef struct __EtsEnv ets_env; +#else +typedef const struct ETS_InvokeInterface *EtsVM; +typedef const struct ETS_NativeInterface *ets_env; +#endif + +// Deprecated types: +typedef ets_env EtsEnv; + +typedef enum { + ETS_OKAY, + ETS_INVALID_ARG, + ETS_GENERIC_FAILURE, + ETS_PENDING_EXCEPTION, + ETS_INVALID_VERSION, // NOTE(v.cherkashin): This status code doesn't match to napi interface. + // Should we probably delete this status code? +} ets_status; + +// clang-format off +// Interface Function Table +struct ETS_NativeInterface { + // NOTE(a.urakov): solve the "Array" naming problem + ets_int (*GetVersion)(EtsEnv *env); +#ifdef ETS_NAPI_DESIGN_FINISHED + ets_class (*DefineClass)(EtsEnv *env, const char *name, ets_object loader, const ets_byte *buf, ets_size bufLen); +#endif + ets_class (*FindClass)(EtsEnv *env, const char *name); +#ifdef ETS_NAPI_DESIGN_FINISHED + ets_method (*FromReflectedMethod)(EtsEnv *env, ets_object method); + ets_field (*FromReflectedField)(EtsEnv *env, ets_object field); + ets_object (*ToReflectedMethod)(EtsEnv *env, ets_class cls, ets_method p_method, ets_boolean isStatic); +#endif + ets_class (*GetSuperclass)(EtsEnv *env, ets_class cls); + ets_boolean (*IsAssignableFrom)(EtsEnv *env, ets_class cls1, ets_class cls2); +#ifdef ETS_NAPI_DESIGN_FINISHED + ets_object (*ToReflectedField)(EtsEnv *env, ets_class cls, ets_field p_field, ets_boolean isStatic); +#endif + ets_int (*ThrowError)(EtsEnv *env, ets_error obj); + ets_int (*ThrowErrorNew)(EtsEnv *env, ets_class cls, const char *message); + ets_error (*ErrorOccurred)(EtsEnv *env); + void (*ErrorDescribe)(EtsEnv *env); + void (*ErrorClear)(EtsEnv *env); + void (*FatalError)(EtsEnv *env, const char *message); + ets_int (*PushLocalFrame)(EtsEnv *env, ets_int capacity); + ets_object (*PopLocalFrame)(EtsEnv *env, ets_object result); + ets_object (*NewGlobalRef)(EtsEnv *env, ets_object obj); + void (*DeleteGlobalRef)(EtsEnv *env, ets_object globalRef); + void (*DeleteLocalRef)(EtsEnv *env, ets_object localRef); + ets_boolean (*IsSameObject)(EtsEnv *env, ets_object ref1, ets_object ref2); + ets_object (*NewLocalRef)(EtsEnv *env, ets_object ref); + ets_int (*EnsureLocalCapacity)(EtsEnv *env, ets_int capacity); + ets_object (*AllocObject)(EtsEnv *env, ets_class cls); + ets_object (*NewObject)(EtsEnv *env, ets_class cls, ets_method p_method, ...); + ets_object (*NewObjectList)(EtsEnv *env, ets_class cls, ets_method p_method, va_list args); + ets_object (*NewObjectArray)(EtsEnv *env, ets_class cls, ets_method p_method, const ets_value *args); + ets_class (*GetObjectClass)(EtsEnv *env, ets_object obj); + ets_boolean (*IsInstanceOf)(EtsEnv *env, ets_object obj, ets_class cls); + ets_method (*Getp_method)(EtsEnv *env, ets_class cls, const char *name, const char *sig); + ets_object (*CallObjectMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); + ets_object (*CallObjectMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); + ets_object (*CallObjectMethodArray)(EtsEnv *env, ets_object obj, ets_method p_method, const ets_value *args); + ets_boolean (*CallBooleanMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); + ets_boolean (*CallBooleanMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); + ets_boolean (*CallBooleanMethodArray)(EtsEnv *env, ets_object obj, ets_method p_method, const ets_value *args); + ets_byte (*CallByteMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); + ets_byte (*CallByteMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); + ets_byte (*CallByteMethodArray)(EtsEnv *env, ets_object obj, ets_method p_method, const ets_value *args); + ets_char (*CallCharMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); + ets_char (*CallCharMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); + ets_char (*CallCharMethodArray)(EtsEnv *env, ets_object obj, ets_method p_method, const ets_value *args); + ets_short (*CallShortMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); + ets_short (*CallShortMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); + ets_short (*CallShortMethodArray)(EtsEnv *env, ets_object obj, ets_method p_method, const ets_value *args); + ets_int (*CallIntMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); + ets_int (*CallIntMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); + ets_int (*CallIntMethodArray)(EtsEnv *env, ets_object obj, ets_method p_method, const ets_value *args); + ets_long (*CallLongMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); + ets_long (*CallLongMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); + ets_long (*CallLongMethodArray)(EtsEnv *env, ets_object obj, ets_method p_method, const ets_value *args); + ets_float (*CallFloatMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); + ets_float (*CallFloatMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); + ets_float (*CallFloatMethodArray)(EtsEnv *env, ets_object obj, ets_method p_method, const ets_value *args); + ets_double (*CallDoubleMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); + ets_double (*CallDoubleMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); + ets_double (*CallDoubleMethodArray)(EtsEnv *env, ets_object obj, ets_method p_method, const ets_value *args); + void (*CallVoidMethod)(EtsEnv *env, ets_object obj, ets_method p_method, ...); + void (*CallVoidMethodList)(EtsEnv *env, ets_object obj, ets_method p_method, va_list args); + void (*CallVoidMethodArray)(EtsEnv *env, ets_object obj, ets_method p_method, const ets_value *args); + + ets_object (*CallNonvirtualObjectMethod)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, ...); + ets_object (*CallNonvirtualObjectMethodList)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + va_list args); + ets_object (*CallNonvirtualObjectMethodArray)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + const ets_value *args); + ets_boolean (*CallNonvirtualBooleanMethod)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, ...); + ets_boolean (*CallNonvirtualBooleanMethodList)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + va_list args); + ets_boolean (*CallNonvirtualBooleanMethodArray)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + const ets_value *args); + ets_byte (*CallNonvirtualByteMethod)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, ...); + ets_byte (*CallNonvirtualByteMethodList)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + va_list args); + ets_byte (*CallNonvirtualByteMethodArray)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + const ets_value *args); + ets_char (*CallNonvirtualCharMethod)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, ...); + ets_char (*CallNonvirtualCharMethodList)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + va_list args); + ets_char (*CallNonvirtualCharMethodArray)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + const ets_value *args); + ets_short (*CallNonvirtualShortMethod)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, ...); + ets_short (*CallNonvirtualShortMethodList)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + va_list args); + ets_short (*CallNonvirtualShortMethodArray)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + const ets_value *args); + ets_int (*CallNonvirtualIntMethod)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, ...); + ets_int (*CallNonvirtualIntMethodList)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + va_list args); + ets_int (*CallNonvirtualIntMethodArray)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + const ets_value *args); + ets_long (*CallNonvirtualLongMethod)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, ...); + ets_long (*CallNonvirtualLongMethodList)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + va_list args); + ets_long (*CallNonvirtualLongMethodArray)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + const ets_value *args); + ets_float (*CallNonvirtualFloatMethod)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, ...); + ets_float (*CallNonvirtualFloatMethodList)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + va_list args); + ets_float (*CallNonvirtualFloatMethodArray)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + const ets_value *args); + ets_double (*CallNonvirtualDoubleMethod)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, ...); + ets_double (*CallNonvirtualDoubleMethodList)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + va_list args); + ets_double (*CallNonvirtualDoubleMethodArray)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + const ets_value *args); + void (*CallNonvirtualVoidMethod)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, ...); + void (*CallNonvirtualVoidMethodList)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, va_list args); + void (*CallNonvirtualVoidMethodArray)(EtsEnv *env, ets_object obj, ets_class cls, ets_method p_method, + const ets_value *args); + ets_field (*Getp_field)(EtsEnv *env, ets_class cls, const char *name, const char *sig); + ets_object (*GetObjectField)(EtsEnv *env, ets_object obj, ets_field p_field); + ets_boolean (*GetBooleanField)(EtsEnv *env, ets_object obj, ets_field p_field); + ets_byte (*GetByteField)(EtsEnv *env, ets_object obj, ets_field p_field); + ets_char (*GetCharField)(EtsEnv *env, ets_object obj, ets_field p_field); + ets_short (*GetShortField)(EtsEnv *env, ets_object obj, ets_field p_field); + ets_int (*GetIntField)(EtsEnv *env, ets_object obj, ets_field p_field); + ets_long (*GetLongField)(EtsEnv *env, ets_object obj, ets_field p_field); + ets_float (*GetFloatField)(EtsEnv *env, ets_object obj, ets_field p_field); + ets_double (*GetDoubleField)(EtsEnv *env, ets_object obj, ets_field p_field); + void (*SetObjectField)(EtsEnv *env, ets_object obj, ets_field p_field, ets_object value); + void (*SetBooleanField)(EtsEnv *env, ets_object obj, ets_field p_field, ets_boolean value); + void (*SetByteField)(EtsEnv *env, ets_object obj, ets_field p_field, ets_byte value); + void (*SetCharField)(EtsEnv *env, ets_object obj, ets_field p_field, ets_char value); + void (*SetShortField)(EtsEnv *env, ets_object obj, ets_field p_field, ets_short value); + void (*SetIntField)(EtsEnv *env, ets_object obj, ets_field p_field, ets_int value); + void (*SetLongField)(EtsEnv *env, ets_object obj, ets_field p_field, ets_long value); + void (*SetFloatField)(EtsEnv *env, ets_object obj, ets_field p_field, ets_float value); + void (*SetDoubleField)(EtsEnv *env, ets_object obj, ets_field p_field, ets_double value); + ets_method (*GetStaticp_method)(EtsEnv *env, ets_class cls, const char *name, const char *sig); + ets_object (*CallStaticObjectMethod)(EtsEnv *env, ets_class cls, ets_method p_method, ...); + ets_object (*CallStaticObjectMethodList)(EtsEnv *env, ets_class cls, ets_method p_method, va_list args); + ets_object (*CallStaticObjectMethodArray)(EtsEnv *env, ets_class cls, ets_method p_method, ets_value *args); + ets_boolean (*CallStaticBooleanMethod)(EtsEnv *env, ets_class cls, ets_method p_method, ...); + ets_boolean (*CallStaticBooleanMethodList)(EtsEnv *env, ets_class cls, ets_method p_method, va_list args); + ets_boolean (*CallStaticBooleanMethodArray)(EtsEnv *env, ets_class cls, ets_method p_method, ets_value *args); + ets_byte (*CallStaticByteMethod)(EtsEnv *env, ets_class cls, ets_method p_method, ...); + ets_byte (*CallStaticByteMethodList)(EtsEnv *env, ets_class cls, ets_method p_method, va_list args); + ets_byte (*CallStaticByteMethodArray)(EtsEnv *env, ets_class cls, ets_method p_method, ets_value *args); + ets_char (*CallStaticCharMethod)(EtsEnv *env, ets_class cls, ets_method p_method, ...); + ets_char (*CallStaticCharMethodList)(EtsEnv *env, ets_class cls, ets_method p_method, va_list args); + ets_char (*CallStaticCharMethodArray)(EtsEnv *env, ets_class cls, ets_method p_method, ets_value *args); + ets_short (*CallStaticShortMethod)(EtsEnv *env, ets_class cls, ets_method p_method, ...); + ets_short (*CallStaticShortMethodList)(EtsEnv *env, ets_class cls, ets_method p_method, va_list args); + ets_short (*CallStaticShortMethodArray)(EtsEnv *env, ets_class cls, ets_method p_method, ets_value *args); + ets_int (*CallStaticIntMethod)(EtsEnv *env, ets_class cls, ets_method p_method, ...); + ets_int (*CallStaticIntMethodList)(EtsEnv *env, ets_class cls, ets_method p_method, va_list args); + ets_int (*CallStaticIntMethodArray)(EtsEnv *env, ets_class cls, ets_method p_method, ets_value *args); + ets_long (*CallStaticLongMethod)(EtsEnv *env, ets_class cls, ets_method p_method, ...); + ets_long (*CallStaticLongMethodList)(EtsEnv *env, ets_class cls, ets_method p_method, va_list args); + ets_long (*CallStaticLongMethodArray)(EtsEnv *env, ets_class cls, ets_method p_method, ets_value *args); + ets_float (*CallStaticFloatMethod)(EtsEnv *env, ets_class cls, ets_method p_method, ...); + ets_float (*CallStaticFloatMethodList)(EtsEnv *env, ets_class cls, ets_method p_method, va_list args); + ets_float (*CallStaticFloatMethodArray)(EtsEnv *env, ets_class cls, ets_method p_method, ets_value *args); + ets_double (*CallStaticDoubleMethod)(EtsEnv *env, ets_class cls, ets_method p_method, ...); + ets_double (*CallStaticDoubleMethodList)(EtsEnv *env, ets_class cls, ets_method p_method, va_list args); + ets_double (*CallStaticDoubleMethodArray)(EtsEnv *env, ets_class cls, ets_method p_method, ets_value *args); + void (*CallStaticVoidMethod)(EtsEnv *env, ets_class cls, ets_method p_method, ...); + void (*CallStaticVoidMethodList)(EtsEnv *env, ets_class cls, ets_method p_method, va_list args); + void (*CallStaticVoidMethodArray)(EtsEnv *env, ets_class cls, ets_method p_method, ets_value *args); + ets_field (*GetStaticp_field)(EtsEnv *env, ets_class cls, const char *name, const char *sig); + ets_object (*GetStaticObjectField)(EtsEnv *env, ets_class cls, ets_field p_field); + ets_boolean (*GetStaticBooleanField)(EtsEnv *env, ets_class cls, ets_field p_field); + ets_byte (*GetStaticByteField)(EtsEnv *env, ets_class cls, ets_field p_field); + ets_char (*GetStaticCharField)(EtsEnv *env, ets_class cls, ets_field p_field); + ets_short (*GetStaticShortField)(EtsEnv *env, ets_class cls, ets_field p_field); + ets_int (*GetStaticIntField)(EtsEnv *env, ets_class cls, ets_field p_field); + ets_long (*GetStaticLongField)(EtsEnv *env, ets_class cls, ets_field p_field); + ets_float (*GetStaticFloatField)(EtsEnv *env, ets_class cls, ets_field p_field); + ets_double (*GetStaticDoubleField)(EtsEnv *env, ets_class cls, ets_field p_field); + void (*SetStaticObjectField)(EtsEnv *env, ets_class cls, ets_field p_field, ets_object value); + void (*SetStaticBooleanField)(EtsEnv *env, ets_class cls, ets_field p_field, ets_boolean value); + void (*SetStaticByteField)(EtsEnv *env, ets_class cls, ets_field p_field, ets_byte value); + void (*SetStaticCharField)(EtsEnv *env, ets_class cls, ets_field p_field, ets_char value); + void (*SetStaticShortField)(EtsEnv *env, ets_class cls, ets_field p_field, ets_short value); + void (*SetStaticIntField)(EtsEnv *env, ets_class cls, ets_field p_field, ets_int value); + void (*SetStaticLongField)(EtsEnv *env, ets_class cls, ets_field p_field, ets_long value); + void (*SetStaticFloatField)(EtsEnv *env, ets_class cls, ets_field p_field, ets_float value); + void (*SetStaticDoubleField)(EtsEnv *env, ets_class cls, ets_field p_field, ets_double value); + ets_string (*NewString)(EtsEnv *env, const ets_char *unicodeChars, ets_size len); + ets_size (*GetStringLength)(EtsEnv *env, ets_string string); + const ets_char *(*GetStringChars)(EtsEnv *env, ets_string string, ets_boolean *isCopy); + void (*ReleaseStringChars)(EtsEnv *env, ets_string string, const ets_char *chars); + ets_string (*NewStringUTF)(EtsEnv *env, const char *bytes); + ets_size (*GetStringUTFLength)(EtsEnv *env, ets_string string); + const char *(*GetStringUTFChars)(EtsEnv *env, ets_string string, ets_boolean *isCopy); + void (*ReleaseStringUTFChars)(EtsEnv *env, ets_string string, const char *utf); + ets_size (*GetArrayLength)(EtsEnv *env, ets_array array); + ets_objectArray (*NewObjectsArray)(EtsEnv *env, ets_size length, ets_class element_class, + ets_object initial_element); + ets_object (*GetObjectArrayElement)(EtsEnv *env, ets_objectArray array, ets_size index); + void (*SetObjectArrayElement)(EtsEnv *env, ets_objectArray array, ets_size index, ets_object value); + ets_booleanArray (*NewBooleanArray)(EtsEnv *env, ets_size length); + ets_byteArray (*NewByteArray)(EtsEnv *env, ets_size length); + ets_charArray (*NewCharArray)(EtsEnv *env, ets_size length); + ets_shortArray (*NewShortArray)(EtsEnv *env, ets_size length); + ets_intArray (*NewIntArray)(EtsEnv *env, ets_size length); + ets_longArray (*NewLongArray)(EtsEnv *env, ets_size length); + ets_floatArray (*NewFloatArray)(EtsEnv *env, ets_size length); + ets_doubleArray (*NewDoubleArray)(EtsEnv *env, ets_size length); + ets_boolean *(*PinBooleanArray)(EtsEnv *env, ets_booleanArray array); + ets_byte *(*PinByteArray)(EtsEnv *env, ets_byteArray array); + ets_char *(*PinCharArray)(EtsEnv *env, ets_charArray array); + ets_short *(*PinShortArray)(EtsEnv *env, ets_shortArray array); + ets_int *(*PinIntArray)(EtsEnv *env, ets_intArray array); + ets_long *(*PinLongArray)(EtsEnv *env, ets_longArray array); + ets_float *(*PinFloatArray)(EtsEnv *env, ets_floatArray array); + ets_double *(*PinDoubleArray)(EtsEnv *env, ets_doubleArray array); + void (*UnpinBooleanArray)(EtsEnv *env, ets_booleanArray array); + void (*UnpinByteArray)(EtsEnv *env, ets_byteArray array); + void (*UnpinCharArray)(EtsEnv *env, ets_charArray array); + void (*UnpinShortArray)(EtsEnv *env, ets_shortArray array); + void (*UnpinIntArray)(EtsEnv *env, ets_intArray array); + void (*UnpinLongArray)(EtsEnv *env, ets_longArray array); + void (*UnpinFloatArray)(EtsEnv *env, ets_floatArray array); + void (*UnpinDoubleArray)(EtsEnv *env, ets_doubleArray array); + void (*GetBooleanArrayRegion)(EtsEnv *env, ets_booleanArray array, ets_size start, ets_size len, ets_boolean *buf); + void (*GetByteArrayRegion)(EtsEnv *env, ets_byteArray array, ets_size start, ets_size len, ets_byte *buf); + void (*GetCharArrayRegion)(EtsEnv *env, ets_charArray array, ets_size start, ets_size len, ets_char *buf); + void (*GetShortArrayRegion)(EtsEnv *env, ets_shortArray array, ets_size start, ets_size len, ets_short *buf); + void (*GetIntArrayRegion)(EtsEnv *env, ets_intArray array, ets_size start, ets_size len, ets_int *buf); + void (*GetLongArrayRegion)(EtsEnv *env, ets_longArray array, ets_size start, ets_size len, ets_long *buf); + void (*GetFloatArrayRegion)(EtsEnv *env, ets_floatArray array, ets_size start, ets_size len, ets_float *buf); + void (*GetDoubleArrayRegion)(EtsEnv *env, ets_doubleArray array, ets_size start, ets_size len, ets_double *buf); + void (*SetBooleanArrayRegion)(EtsEnv *env, ets_booleanArray array, ets_size start, ets_size len, + const ets_boolean *buf); + void (*SetByteArrayRegion)(EtsEnv *env, ets_byteArray array, ets_size start, ets_size len, const ets_byte *buf); + void (*SetCharArrayRegion)(EtsEnv *env, ets_charArray array, ets_size start, ets_size len, const ets_char *buf); + void (*SetShortArrayRegion)(EtsEnv *env, ets_shortArray array, ets_size start, ets_size len, const ets_short *buf); + void (*SetIntArrayRegion)(EtsEnv *env, ets_intArray array, ets_size start, ets_size len, const ets_int *buf); + void (*SetLongArrayRegion)(EtsEnv *env, ets_longArray array, ets_size start, ets_size len, const ets_long *buf); + void (*SetFloatArrayRegion)(EtsEnv *env, ets_floatArray array, ets_size start, ets_size len, const ets_float *buf); + void (*SetDoubleArrayRegion)(EtsEnv *env, ets_doubleArray array, ets_size start, ets_size len, + const ets_double *buf); + ets_int (*RegisterNatives)(EtsEnv *env, ets_class cls, const EtsNativeMethod *methods, ets_int nMethods); + ets_int (*UnregisterNatives)(EtsEnv *env, ets_class cls); + ets_int (*GetEtsVM)(EtsEnv *env, EtsVM **vm); + void (*GetStringRegion)(EtsEnv *env, ets_string str, ets_size start, ets_size len, ets_char *buf); + void (*GetStringUTFRegion)(EtsEnv *env, ets_string str, ets_size start, ets_size len, char *buf); + ets_weak (*NewWeakGlobalRef)(EtsEnv *env, ets_object obj); + void (*DeleteWeakGlobalRef)(EtsEnv *env, ets_weak obj); + ets_boolean (*ErrorCheck)(EtsEnv *env); +#ifdef ETS_NAPI_DESIGN_FINISHED + ets_object (*NewDirectByteBuffer)(EtsEnv *env, void *address, ets_long capacity); + void *(*GetDirectBufferAddress)(EtsEnv *env, ets_object buf); + ets_long (*GetDirectBufferCapacity)(EtsEnv *env, ets_object buf); +#endif + ets_objectRefType (*GetObjectRefType)(EtsEnv *env, ets_object obj); + + /* 227 methods */ + + // Promise API + ets_status (*PromiseCreate)(EtsEnv *env, ets_deferred *deferred, ets_object *promise); + ets_status (*DeferredResolve)(EtsEnv *env, ets_deferred deferred, ets_object resolution); + ets_status (*DeferredReject)(EtsEnv *env, ets_deferred deferred, ets_object rejection); +}; +// clang-format on + +// Invocation API Functions +typedef enum { + ETS_LOG_LEVEL, + ETS_MOBILE_LOG, + ETS_BOOT_FILE, + ETS_AOT_FILE, + ETS_ARK_FILE, + ETS_JIT, + ETS_NO_JIT, + ETS_AOT, + ETS_NO_AOT, + ETS_GC_TRIGGER_TYPE, + ETS_GC_TYPE, + ETS_RUN_GC_IN_PLACE, + ETS_INTERPRETER_TYPE, + ETS_NATIVE_LIBRARY_PATH, + ETS_VERIFICATION_MODE +} EtsOptionType; + +typedef struct EtsVMOption { + EtsOptionType option; + const void *extraInfo; +} EtsVMOption; + +typedef struct EtsVMInitArgs { + ets_int version; + ets_int nOptions; + EtsVMOption *options; +} EtsVMInitArgs; + +typedef enum { + ETS_MOBILE_LOG_LEVEL_UNKNOWN = 0, + ETS_MOBILE_LOG_LEVEL_DEFAULT, + ETS_MOBILE_LOG_LEVEL_VERBOSE, + ETS_MOBILE_LOG_LEVEL_DEBUG, + ETS_MOBILE_LOG_LEVEL_INFO, + ETS_MOBILE_LOG_LEVEL_WARN, + ETS_MOBILE_LOG_LEVEL_ERROR, + ETS_MOBILE_LOG_LEVEL_FATAL, + ETS_MOBILE_LOG_LEVEL_SILENT +} EtsMobileLogggerLevel; + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _MSC_VER +#define ETS_EXPORT __declspec(dllexport) +#else +#define ETS_EXPORT __attribute__((visibility("default"))) +#endif +#define ETS_IMPORT +#define ETS_CALL + +ETS_EXPORT ets_int ETS_GetDefaultVMInitArgs(EtsVMInitArgs *vmArgs); +ETS_EXPORT ets_int ETS_GetCreatedVMs(EtsVM **vmBuf, ets_size bufLen, ets_size *nVms); +ETS_EXPORT ets_int ETS_CreateVM(EtsVM **pVm, EtsEnv **pEnv, EtsVMInitArgs *vmArgs); + +#ifdef __cplusplus +} +#endif + +struct ETS_InvokeInterface { + ets_int (*DestroyEtsVM)(EtsVM *vm); + ets_int (*GetEnv)(EtsVM *vm, EtsEnv **pEnv, ets_int version); +}; + +struct __EtsVM { + // NOLINTNEXTLINE(misc-non-private-member-variables-in-classes) + const struct ETS_InvokeInterface *invoke_interface; + +#ifdef __cplusplus + ets_int DestroyEtsVM() + { + return invoke_interface->DestroyEtsVM(this); + } + + ets_int GetEnv(EtsEnv **pEnv, ets_int version) + { + return invoke_interface->GetEnv(this, pEnv, version); + } +#endif +}; + +struct __EtsEnv { + // NOLINTNEXTLINE(misc-non-private-member-variables-in-classes) + const struct ETS_NativeInterface *native_interface; + +#ifdef __cplusplus + + ets_int GetVersion() + { + return native_interface->GetVersion(this); + } + // DefineClass, + ets_class FindClass(const char *name) + { + return native_interface->FindClass(this, name); + } + // FromReflectedMethod, + // FromReflectedField, + // ToReflectedMethod, + ets_class GetSuperclass(ets_class cls) + { + return native_interface->GetSuperclass(this, cls); + } + ets_boolean IsAssignableFrom(ets_class cls1, ets_class cls2) + { + return native_interface->IsAssignableFrom(this, cls1, cls2); + } + // ToReflectedField, + ets_int ThrowError(ets_error obj) + { + return native_interface->ThrowError(this, obj); + } + ets_int ThrowErrorNew(ets_class cls, const char *message) + { + return native_interface->ThrowErrorNew(this, cls, message); + } + ets_error ErrorOccurred() + { + return native_interface->ErrorOccurred(this); + } + void ErrorDescribe() + { + native_interface->ErrorDescribe(this); + } + void ErrorClear() + { + native_interface->ErrorClear(this); + } + void FatalError(const char *message) + { + native_interface->FatalError(this, message); + } + ets_int PushLocalFrame(ets_int capacity) + { + return native_interface->PushLocalFrame(this, capacity); + } + ets_object PopLocalFrame(ets_object result) + { + return native_interface->PopLocalFrame(this, result); + } + ets_object NewGlobalRef(ets_object obj) + { + return native_interface->NewGlobalRef(this, obj); + } + void DeleteGlobalRef(ets_object globalRef) + { + native_interface->DeleteGlobalRef(this, globalRef); + } + void DeleteLocalRef(ets_object localRef) + { + native_interface->DeleteLocalRef(this, localRef); + } + ets_boolean IsSameObject(ets_object ref1, ets_object ref2) + { + return native_interface->IsSameObject(this, ref1, ref2); + } + ets_object NewLocalRef(ets_object ref) + { + return native_interface->NewLocalRef(this, ref); + } + ets_int EnsureLocalCapacity(ets_int capacity) + { + return native_interface->EnsureLocalCapacity(this, capacity); + } + ets_object AllocObject(ets_class cls) + { + return native_interface->AllocObject(this, cls); + } + ets_object NewObject(ets_class cls, ets_method p_method, ...) + { + va_list args; + va_start(args, p_method); + ets_object ret = native_interface->NewObjectList(this, cls, p_method, args); + va_end(args); + return ret; + } + ets_object NewObjectList(ets_class cls, ets_method p_method, va_list args) + { + return native_interface->NewObjectList(this, cls, p_method, args); + } + ets_object NewObjectArray(ets_class cls, ets_method p_method, const ets_value *args) + { + return native_interface->NewObjectArray(this, cls, p_method, args); + } + ets_class GetObjectClass(ets_object obj) + { + return native_interface->GetObjectClass(this, obj); + } + ets_boolean IsInstanceOf(ets_object obj, ets_class cls) + { + return native_interface->IsInstanceOf(this, obj, cls); + } + ets_method Getp_method(ets_class cls, const char *name, const char *sig) + { + return native_interface->Getp_method(this, cls, name, sig); + } + ets_object CallObjectMethod(ets_object obj, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_object res = native_interface->CallObjectMethodList(this, obj, method_id, args); + va_end(args); + return res; + } + ets_object CallObjectMethodList(ets_object obj, ets_method method_id, va_list args) + { + return native_interface->CallObjectMethodList(this, obj, method_id, args); + } + ets_object CallObjectMethodArray(ets_object obj, ets_method method_id, const ets_value *args) + { + return native_interface->CallObjectMethodArray(this, obj, method_id, args); + } + ets_boolean CallBooleanMethod(ets_object obj, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_boolean res = native_interface->CallBooleanMethodList(this, obj, method_id, args); + va_end(args); + return res; + } + ets_boolean CallBooleanMethodList(ets_object obj, ets_method method_id, va_list args) + { + return native_interface->CallBooleanMethodList(this, obj, method_id, args); + } + ets_boolean CallBooleanMethodArray(ets_object obj, ets_method method_id, const ets_value *args) + { + return native_interface->CallBooleanMethodArray(this, obj, method_id, args); + } + ets_byte CallByteMethod(ets_object obj, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_byte res = native_interface->CallByteMethodList(this, obj, method_id, args); + va_end(args); + return res; + } + ets_byte CallByteMethodList(ets_object obj, ets_method method_id, va_list args) + { + return native_interface->CallByteMethodList(this, obj, method_id, args); + } + ets_byte CallByteMethodArray(ets_object obj, ets_method method_id, const ets_value *args) + { + return native_interface->CallByteMethodArray(this, obj, method_id, args); + } + ets_char CallCharMethod(ets_object obj, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_char res = native_interface->CallCharMethodList(this, obj, method_id, args); + va_end(args); + return res; + } + ets_char CallCharMethodList(ets_object obj, ets_method method_id, va_list args) + { + return native_interface->CallCharMethodList(this, obj, method_id, args); + } + ets_char CallCharMethodArray(ets_object obj, ets_method method_id, const ets_value *args) + { + return native_interface->CallCharMethodArray(this, obj, method_id, args); + } + ets_short CallShortMethod(ets_object obj, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_short res = native_interface->CallShortMethodList(this, obj, method_id, args); + va_end(args); + return res; + } + ets_short CallShortMethodList(ets_object obj, ets_method method_id, va_list args) + { + return native_interface->CallShortMethodList(this, obj, method_id, args); + } + ets_short CallShortMethodArray(ets_object obj, ets_method method_id, const ets_value *args) + { + return native_interface->CallShortMethodArray(this, obj, method_id, args); + } + ets_int CallIntMethod(ets_object obj, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_int res = native_interface->CallIntMethodList(this, obj, method_id, args); + va_end(args); + return res; + } + ets_int CallIntMethodList(ets_object obj, ets_method method_id, va_list args) + { + return native_interface->CallIntMethodList(this, obj, method_id, args); + } + ets_int CallIntMethodArray(ets_object obj, ets_method method_id, const ets_value *args) + { + return native_interface->CallIntMethodArray(this, obj, method_id, args); + } + ets_long CallLongMethod(ets_object obj, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_long res = native_interface->CallLongMethodList(this, obj, method_id, args); + va_end(args); + return res; + } + ets_long CallLongMethodList(ets_object obj, ets_method method_id, va_list args) + { + return native_interface->CallLongMethodList(this, obj, method_id, args); + } + ets_long CallLongMethodArray(ets_object obj, ets_method method_id, const ets_value *args) + { + return native_interface->CallLongMethodArray(this, obj, method_id, args); + } + ets_float CallFloatMethod(ets_object obj, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_float res = native_interface->CallFloatMethodList(this, obj, method_id, args); + va_end(args); + return res; + } + ets_float CallFloatMethodList(ets_object obj, ets_method method_id, va_list args) + { + return native_interface->CallFloatMethodList(this, obj, method_id, args); + } + ets_float CallFloatMethodArray(ets_object obj, ets_method method_id, const ets_value *args) + { + return native_interface->CallFloatMethodArray(this, obj, method_id, args); + } + ets_double CallDoubleMethod(ets_object obj, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_double res = native_interface->CallDoubleMethodList(this, obj, method_id, args); + va_end(args); + return res; + } + ets_double CallDoubleMethodList(ets_object obj, ets_method method_id, va_list args) + { + return native_interface->CallDoubleMethodList(this, obj, method_id, args); + } + ets_double CallDoubleMethodArray(ets_object obj, ets_method method_id, const ets_value *args) + { + return native_interface->CallDoubleMethodArray(this, obj, method_id, args); + } + void CallVoidMethod(ets_object obj, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + native_interface->CallVoidMethodList(this, obj, method_id, args); + va_end(args); + } + void CallVoidMethodList(ets_object obj, ets_method method_id, va_list args) + { + native_interface->CallVoidMethodList(this, obj, method_id, args); + } + void CallVoidMethodArray(ets_object obj, ets_method method_id, const ets_value *args) + { + native_interface->CallVoidMethodArray(this, obj, method_id, args); + } + ets_object CallNonvirtualObjectMethod(ets_object obj, ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_object res = native_interface->CallNonvirtualObjectMethodList(this, obj, cls, method_id, args); + va_end(args); + return res; + } + ets_object CallNonvirtualObjectMethodList(ets_object obj, ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallNonvirtualObjectMethodList(this, obj, cls, method_id, args); + } + ets_object CallNonvirtualObjectMethodArray(ets_object obj, ets_class cls, ets_method method_id, + const ets_value *args) + { + return native_interface->CallNonvirtualObjectMethodArray(this, obj, cls, method_id, args); + } + ets_boolean CallNonvirtualBooleanMethod(ets_object obj, ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_boolean res = native_interface->CallNonvirtualBooleanMethodList(this, obj, cls, method_id, args); + va_end(args); + return res; + } + ets_boolean CallNonvirtualBooleanMethodList(ets_object obj, ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallNonvirtualBooleanMethodList(this, obj, cls, method_id, args); + } + ets_boolean CallNonvirtualBooleanMethodArray(ets_object obj, ets_class cls, ets_method method_id, + const ets_value *args) + { + return native_interface->CallNonvirtualBooleanMethodArray(this, obj, cls, method_id, args); + } + ets_byte CallNonvirtualByteMethod(ets_object obj, ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_byte res = native_interface->CallNonvirtualByteMethodList(this, obj, cls, method_id, args); + va_end(args); + return res; + } + ets_byte CallNonvirtualByteMethodList(ets_object obj, ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallNonvirtualByteMethodList(this, obj, cls, method_id, args); + } + ets_byte CallNonvirtualByteMethodArray(ets_object obj, ets_class cls, ets_method method_id, const ets_value *args) + { + return native_interface->CallNonvirtualByteMethodArray(this, obj, cls, method_id, args); + } + ets_char CallNonvirtualCharMethod(ets_object obj, ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_char res = native_interface->CallNonvirtualCharMethodList(this, obj, cls, method_id, args); + va_end(args); + return res; + } + ets_char CallNonvirtualCharMethodList(ets_object obj, ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallNonvirtualCharMethodList(this, obj, cls, method_id, args); + } + ets_char CallNonvirtualCharMethodArray(ets_object obj, ets_class cls, ets_method method_id, const ets_value *args) + { + return native_interface->CallNonvirtualCharMethodArray(this, obj, cls, method_id, args); + } + ets_short CallNonvirtualShortMethod(ets_object obj, ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_short res = native_interface->CallNonvirtualShortMethodList(this, obj, cls, method_id, args); + va_end(args); + return res; + } + ets_short CallNonvirtualShortMethodList(ets_object obj, ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallNonvirtualShortMethodList(this, obj, cls, method_id, args); + } + ets_short CallNonvirtualShortMethodArray(ets_object obj, ets_class cls, ets_method method_id, const ets_value *args) + { + return native_interface->CallNonvirtualShortMethodArray(this, obj, cls, method_id, args); + } + ets_int CallNonvirtualIntMethod(ets_object obj, ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_int res = native_interface->CallNonvirtualIntMethodList(this, obj, cls, method_id, args); + va_end(args); + return res; + } + ets_int CallNonvirtualIntMethodList(ets_object obj, ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallNonvirtualIntMethodList(this, obj, cls, method_id, args); + } + ets_int CallNonvirtualIntMethodArray(ets_object obj, ets_class cls, ets_method method_id, const ets_value *args) + { + return native_interface->CallNonvirtualIntMethodArray(this, obj, cls, method_id, args); + } + ets_long CallNonvirtualLongMethod(ets_object obj, ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_long res = native_interface->CallNonvirtualLongMethodList(this, obj, cls, method_id, args); + va_end(args); + return res; + } + ets_long CallNonvirtualLongMethodList(ets_object obj, ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallNonvirtualLongMethodList(this, obj, cls, method_id, args); + } + ets_long CallNonvirtualLongMethodArray(ets_object obj, ets_class cls, ets_method method_id, const ets_value *args) + { + return native_interface->CallNonvirtualLongMethodArray(this, obj, cls, method_id, args); + } + ets_float CallNonvirtualFloatMethod(ets_object obj, ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_float res = native_interface->CallNonvirtualFloatMethodList(this, obj, cls, method_id, args); + va_end(args); + return res; + } + ets_float CallNonvirtualFloatMethodList(ets_object obj, ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallNonvirtualFloatMethodList(this, obj, cls, method_id, args); + } + ets_float CallNonvirtualFloatMethodArray(ets_object obj, ets_class cls, ets_method method_id, const ets_value *args) + { + return native_interface->CallNonvirtualFloatMethodArray(this, obj, cls, method_id, args); + } + ets_double CallNonvirtualDoubleMethod(ets_object obj, ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_double res = native_interface->CallNonvirtualDoubleMethodList(this, obj, cls, method_id, args); + va_end(args); + return res; + } + ets_double CallNonvirtualDoubleMethodList(ets_object obj, ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallNonvirtualDoubleMethodList(this, obj, cls, method_id, args); + } + ets_double CallNonvirtualDoubleMethodArray(ets_object obj, ets_class cls, ets_method method_id, + const ets_value *args) + { + return native_interface->CallNonvirtualDoubleMethodArray(this, obj, cls, method_id, args); + } + void CallNonvirtualVoidMethod(ets_object obj, ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + native_interface->CallNonvirtualVoidMethodList(this, obj, cls, method_id, args); + va_end(args); + } + void CallNonvirtualVoidMethodList(ets_object obj, ets_class cls, ets_method method_id, va_list args) + { + native_interface->CallNonvirtualVoidMethodList(this, obj, cls, method_id, args); + } + void CallNonvirtualVoidMethodArray(ets_object obj, ets_class cls, ets_method method_id, const ets_value *args) + { + native_interface->CallNonvirtualVoidMethodArray(this, obj, cls, method_id, args); + } + ets_field Getp_field(ets_class cls, const char *name, const char *sig) + { + return native_interface->Getp_field(this, cls, name, sig); + } + ets_object GetObjectField(ets_object obj, ets_field p_field) + { + return native_interface->GetObjectField(this, obj, p_field); + } + ets_boolean GetBooleanField(ets_object obj, ets_field p_field) + { + return native_interface->GetBooleanField(this, obj, p_field); + } + ets_byte GetByteField(ets_object obj, ets_field p_field) + { + return native_interface->GetByteField(this, obj, p_field); + } + ets_char GetCharField(ets_object obj, ets_field p_field) + { + return native_interface->GetCharField(this, obj, p_field); + } + ets_short GetShortField(ets_object obj, ets_field p_field) + { + return native_interface->GetShortField(this, obj, p_field); + } + ets_int GetIntField(ets_object obj, ets_field p_field) + { + return native_interface->GetIntField(this, obj, p_field); + } + ets_long GetLongField(ets_object obj, ets_field p_field) + { + return native_interface->GetLongField(this, obj, p_field); + } + ets_float GetFloatField(ets_object obj, ets_field p_field) + { + return native_interface->GetFloatField(this, obj, p_field); + } + ets_double GetDoubleField(ets_object obj, ets_field p_field) + { + return native_interface->GetDoubleField(this, obj, p_field); + } + void SetObjectField(ets_object obj, ets_field p_field, ets_object value) + { + return native_interface->SetObjectField(this, obj, p_field, value); + } + void SetBooleanField(ets_object obj, ets_field p_field, ets_boolean value) + { + return native_interface->SetBooleanField(this, obj, p_field, value); + } + void SetByteField(ets_object obj, ets_field p_field, ets_byte value) + { + return native_interface->SetByteField(this, obj, p_field, value); + } + void SetCharField(ets_object obj, ets_field p_field, ets_char value) + { + return native_interface->SetCharField(this, obj, p_field, value); + } + void SetShortField(ets_object obj, ets_field p_field, ets_short value) + { + return native_interface->SetShortField(this, obj, p_field, value); + } + void SetIntField(ets_object obj, ets_field p_field, ets_int value) + { + return native_interface->SetIntField(this, obj, p_field, value); + } + void SetLongField(ets_object obj, ets_field p_field, ets_long value) + { + return native_interface->SetLongField(this, obj, p_field, value); + } + void SetFloatField(ets_object obj, ets_field p_field, ets_float value) + { + return native_interface->SetFloatField(this, obj, p_field, value); + } + void SetDoubleField(ets_object obj, ets_field p_field, ets_double value) + { + return native_interface->SetDoubleField(this, obj, p_field, value); + } + ets_method GetStaticp_method(ets_class cls, const char *name, const char *sig) + { + return native_interface->GetStaticp_method(this, cls, name, sig); + } + ets_object CallStaticObjectMethod(ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_object res = native_interface->CallStaticObjectMethodList(this, cls, method_id, args); + va_end(args); + return res; + } + ets_object CallStaticObjectMethodList(ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallStaticObjectMethodList(this, cls, method_id, args); + } + ets_object CallStaticObjectMethodArray(ets_class cls, ets_method method_id, ets_value *args) + { + return native_interface->CallStaticObjectMethodArray(this, cls, method_id, args); + } + ets_boolean CallStaticBooleanMethod(ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_boolean res = native_interface->CallStaticBooleanMethodList(this, cls, method_id, args); + va_end(args); + return res; + } + ets_boolean CallStaticBooleanMethodList(ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallStaticBooleanMethodList(this, cls, method_id, args); + } + ets_boolean CallStaticBooleanMethodArray(ets_class cls, ets_method method_id, ets_value *args) + { + return native_interface->CallStaticBooleanMethodArray(this, cls, method_id, args); + } + ets_byte CallStaticByteMethod(ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_byte res = native_interface->CallStaticByteMethodList(this, cls, method_id, args); + va_end(args); + return res; + } + ets_byte CallStaticByteMethodList(ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallStaticByteMethodList(this, cls, method_id, args); + } + ets_byte CallStaticByteMethodArray(ets_class cls, ets_method method_id, ets_value *args) + { + return native_interface->CallStaticByteMethodArray(this, cls, method_id, args); + } + ets_char CallStaticCharMethod(ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_char res = native_interface->CallStaticCharMethodList(this, cls, method_id, args); + va_end(args); + return res; + } + ets_char CallStaticCharMethodList(ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallStaticCharMethodList(this, cls, method_id, args); + } + ets_char CallStaticCharMethodArray(ets_class cls, ets_method method_id, ets_value *args) + { + return native_interface->CallStaticCharMethodArray(this, cls, method_id, args); + } + ets_short CallStaticShortMethod(ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_short res = native_interface->CallStaticShortMethodList(this, cls, method_id, args); + va_end(args); + return res; + } + ets_short CallStaticShortMethodList(ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallStaticShortMethodList(this, cls, method_id, args); + } + ets_short CallStaticShortMethodArray(ets_class cls, ets_method method_id, ets_value *args) + { + return native_interface->CallStaticShortMethodArray(this, cls, method_id, args); + } + ets_int CallStaticIntMethod(ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_int res = native_interface->CallStaticIntMethodList(this, cls, method_id, args); + va_end(args); + return res; + } + ets_int CallStaticIntMethodList(ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallStaticIntMethodList(this, cls, method_id, args); + } + ets_int CallStaticIntMethodArray(ets_class cls, ets_method method_id, ets_value *args) + { + return native_interface->CallStaticIntMethodArray(this, cls, method_id, args); + } + ets_long CallStaticLongMethod(ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_long res = native_interface->CallStaticLongMethodList(this, cls, method_id, args); + va_end(args); + return res; + } + ets_long CallStaticLongMethodList(ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallStaticLongMethodList(this, cls, method_id, args); + } + ets_long CallStaticLongMethodArray(ets_class cls, ets_method method_id, ets_value *args) + { + return native_interface->CallStaticLongMethodArray(this, cls, method_id, args); + } + ets_float CallStaticFloatMethod(ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_float res = native_interface->CallStaticFloatMethodList(this, cls, method_id, args); + va_end(args); + return res; + } + ets_float CallStaticFloatMethodList(ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallStaticFloatMethodList(this, cls, method_id, args); + } + ets_float CallStaticFloatMethodArray(ets_class cls, ets_method method_id, ets_value *args) + { + return native_interface->CallStaticFloatMethodArray(this, cls, method_id, args); + } + ets_double CallStaticDoubleMethod(ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + ets_double res = native_interface->CallStaticDoubleMethodList(this, cls, method_id, args); + va_end(args); + return res; + } + ets_double CallStaticDoubleMethodList(ets_class cls, ets_method method_id, va_list args) + { + return native_interface->CallStaticDoubleMethodList(this, cls, method_id, args); + } + ets_double CallStaticDoubleMethodArray(ets_class cls, ets_method method_id, ets_value *args) + { + return native_interface->CallStaticDoubleMethodArray(this, cls, method_id, args); + } + void CallStaticVoidMethod(ets_class cls, ets_method method_id, ...) + { + va_list args; + va_start(args, method_id); + native_interface->CallStaticVoidMethodList(this, cls, method_id, args); + va_end(args); + } + void CallStaticVoidMethodList(ets_class cls, ets_method method_id, va_list args) + { + native_interface->CallStaticVoidMethodList(this, cls, method_id, args); + } + void CallStaticVoidMethodArray(ets_class cls, ets_method method_id, ets_value *args) + { + native_interface->CallStaticVoidMethodArray(this, cls, method_id, args); + } + ets_field GetStaticp_field(ets_class cls, const char *name, const char *sig) + { + return native_interface->GetStaticp_field(this, cls, name, sig); + } + ets_object GetStaticObjectField(ets_class cls, ets_field p_field) + { + return native_interface->GetStaticObjectField(this, cls, p_field); + } + ets_boolean GetStaticBooleanField(ets_class cls, ets_field p_field) + { + return native_interface->GetStaticBooleanField(this, cls, p_field); + } + ets_byte GetStaticByteField(ets_class cls, ets_field p_field) + { + return native_interface->GetStaticByteField(this, cls, p_field); + } + ets_char GetStaticCharField(ets_class cls, ets_field p_field) + { + return native_interface->GetStaticCharField(this, cls, p_field); + } + ets_short GetStaticShortField(ets_class cls, ets_field p_field) + { + return native_interface->GetStaticShortField(this, cls, p_field); + } + ets_int GetStaticIntField(ets_class cls, ets_field p_field) + { + return native_interface->GetStaticIntField(this, cls, p_field); + } + ets_long GetStaticLongField(ets_class cls, ets_field p_field) + { + return native_interface->GetStaticLongField(this, cls, p_field); + } + ets_float GetStaticFloatField(ets_class cls, ets_field p_field) + { + return native_interface->GetStaticFloatField(this, cls, p_field); + } + ets_double GetStaticDoubleField(ets_class cls, ets_field p_field) + { + return native_interface->GetStaticDoubleField(this, cls, p_field); + } + void SetStaticObjectField(ets_class cls, ets_field p_field, ets_object value) + { + return native_interface->SetStaticObjectField(this, cls, p_field, value); + } + void SetStaticBooleanField(ets_class cls, ets_field p_field, ets_boolean value) + { + return native_interface->SetStaticBooleanField(this, cls, p_field, value); + } + void SetStaticByteField(ets_class cls, ets_field p_field, ets_byte value) + { + return native_interface->SetStaticByteField(this, cls, p_field, value); + } + void SetStaticCharField(ets_class cls, ets_field p_field, ets_char value) + { + return native_interface->SetStaticCharField(this, cls, p_field, value); + } + void SetStaticShortField(ets_class cls, ets_field p_field, ets_short value) + { + return native_interface->SetStaticShortField(this, cls, p_field, value); + } + void SetStaticIntField(ets_class cls, ets_field p_field, ets_int value) + { + return native_interface->SetStaticIntField(this, cls, p_field, value); + } + void SetStaticLongField(ets_class cls, ets_field p_field, ets_long value) + { + return native_interface->SetStaticLongField(this, cls, p_field, value); + } + void SetStaticFloatField(ets_class cls, ets_field p_field, ets_float value) + { + return native_interface->SetStaticFloatField(this, cls, p_field, value); + } + void SetStaticDoubleField(ets_class cls, ets_field p_field, ets_double value) + { + return native_interface->SetStaticDoubleField(this, cls, p_field, value); + } + ets_string NewString(const ets_char *unicode_chars, ets_size len) + { + return native_interface->NewString(this, unicode_chars, len); + } + ets_size GetStringLength(ets_string string) + { + return native_interface->GetStringLength(this, string); + } + const ets_char *GetStringChars(ets_string string, ets_boolean *is_copy) + { + return native_interface->GetStringChars(this, string, is_copy); + } + void ReleaseStringChars(ets_string string, const ets_char *chars) + { + native_interface->ReleaseStringChars(this, string, chars); + } + ets_string NewStringUTF(const char *bytes) + { + return native_interface->NewStringUTF(this, bytes); + } + ets_size GetStringUTFLength(ets_string string) + { + return native_interface->GetStringUTFLength(this, string); + } + const char *GetStringUTFChars(ets_string string, ets_boolean *is_copy) + { + return native_interface->GetStringUTFChars(this, string, is_copy); + } + void ReleaseStringUTFChars(ets_string string, const char *chars) + { + native_interface->ReleaseStringUTFChars(this, string, chars); + } + ets_size GetArrayLength(ets_array array) + { + return native_interface->GetArrayLength(this, array); + } + ets_objectArray NewObjectsArray(ets_size length, ets_class element_class, ets_object initial_element) + { + return native_interface->NewObjectsArray(this, length, element_class, initial_element); + } + ets_object GetObjectArrayElement(ets_objectArray array, ets_size index) + { + return native_interface->GetObjectArrayElement(this, array, index); + } + + void SetObjectArrayElement(ets_objectArray array, ets_size index, ets_object value) + { + native_interface->SetObjectArrayElement(this, array, index, value); + } + + // SetObjectArrayElement, + ets_booleanArray NewBooleanArray(ets_size length) + { + return native_interface->NewBooleanArray(this, length); + } + ets_byteArray NewByteArray(ets_size length) + { + return native_interface->NewByteArray(this, length); + } + ets_charArray NewCharArray(ets_size length) + { + return native_interface->NewCharArray(this, length); + } + ets_shortArray NewShortArray(ets_size length) + { + return native_interface->NewShortArray(this, length); + } + ets_intArray NewIntArray(ets_size length) + { + return native_interface->NewIntArray(this, length); + } + ets_longArray NewLongArray(ets_size length) + { + return native_interface->NewLongArray(this, length); + } + ets_floatArray NewFloatArray(ets_size length) + { + return native_interface->NewFloatArray(this, length); + } + ets_doubleArray NewDoubleArray(ets_size length) + { + return native_interface->NewDoubleArray(this, length); + } + ets_boolean *PinBooleanArray(ets_booleanArray array) + { + return native_interface->PinBooleanArray(this, array); + } + ets_byte *PinByteArray(ets_byteArray array) + { + return native_interface->PinByteArray(this, array); + } + ets_char *PinCharArray(ets_charArray array) + { + return native_interface->PinCharArray(this, array); + } + ets_short *PinShortArray(ets_shortArray array) + { + return native_interface->PinShortArray(this, array); + } + ets_int *PinIntArray(ets_intArray array) + { + return native_interface->PinIntArray(this, array); + } + ets_long *PinLongArray(ets_longArray array) + { + return native_interface->PinLongArray(this, array); + } + ets_float *PinFloatArray(ets_floatArray array) + { + return native_interface->PinFloatArray(this, array); + } + ets_double *PinDoubleArray(ets_doubleArray array) + { + return native_interface->PinDoubleArray(this, array); + } + void UnpinBooleanArray(ets_booleanArray array) + { + return native_interface->UnpinBooleanArray(this, array); + } + void UnpinByteArray(ets_byteArray array) + { + return native_interface->UnpinByteArray(this, array); + } + void UnpinCharArray(ets_charArray array) + { + return native_interface->UnpinCharArray(this, array); + } + void UnpinShortArray(ets_shortArray array) + { + return native_interface->UnpinShortArray(this, array); + } + void UnpinIntArray(ets_intArray array) + { + return native_interface->UnpinIntArray(this, array); + } + void UnpinLongArray(ets_longArray array) + { + return native_interface->UnpinLongArray(this, array); + } + void UnpinFloatArray(ets_floatArray array) + { + return native_interface->UnpinFloatArray(this, array); + } + void UnpinDoubleArray(ets_doubleArray array) + { + return native_interface->UnpinDoubleArray(this, array); + } + void GetBooleanArrayRegion(ets_booleanArray array, ets_size start, ets_size len, ets_boolean *buf) + { + return native_interface->GetBooleanArrayRegion(this, array, start, len, buf); + } + void GetByteArrayRegion(ets_byteArray array, ets_size start, ets_size len, ets_byte *buf) + { + return native_interface->GetByteArrayRegion(this, array, start, len, buf); + } + void GetCharArrayRegion(ets_charArray array, ets_size start, ets_size len, ets_char *buf) + { + return native_interface->GetCharArrayRegion(this, array, start, len, buf); + } + void GetShortArrayRegion(ets_shortArray array, ets_size start, ets_size len, ets_short *buf) + { + return native_interface->GetShortArrayRegion(this, array, start, len, buf); + } + void GetIntArrayRegion(ets_intArray array, ets_size start, ets_size len, ets_int *buf) + { + return native_interface->GetIntArrayRegion(this, array, start, len, buf); + } + void GetLongArrayRegion(ets_longArray array, ets_size start, ets_size len, ets_long *buf) + { + return native_interface->GetLongArrayRegion(this, array, start, len, buf); + } + void GetFloatArrayRegion(ets_floatArray array, ets_size start, ets_size len, ets_float *buf) + { + return native_interface->GetFloatArrayRegion(this, array, start, len, buf); + } + void GetDoubleArrayRegion(ets_doubleArray array, ets_size start, ets_size len, ets_double *buf) + { + return native_interface->GetDoubleArrayRegion(this, array, start, len, buf); + } + void SetBooleanArrayRegion(ets_booleanArray array, ets_size start, ets_size length, const ets_boolean *buf) + { + native_interface->SetBooleanArrayRegion(this, array, start, length, buf); + } + void SetByteArrayRegion(ets_byteArray array, ets_size start, ets_size length, const ets_byte *buf) + { + native_interface->SetByteArrayRegion(this, array, start, length, buf); + } + void SetCharArrayRegion(ets_charArray array, ets_size start, ets_size length, const ets_char *buf) + { + native_interface->SetCharArrayRegion(this, array, start, length, buf); + } + void SetShortArrayRegion(ets_shortArray array, ets_size start, ets_size length, const ets_short *buf) + { + native_interface->SetShortArrayRegion(this, array, start, length, buf); + } + void SetIntArrayRegion(ets_intArray array, ets_size start, ets_size length, const ets_int *buf) + { + native_interface->SetIntArrayRegion(this, array, start, length, buf); + } + void SetLongArrayRegion(ets_longArray array, ets_size start, ets_size length, const ets_long *buf) + { + native_interface->SetLongArrayRegion(this, array, start, length, buf); + } + void SetFloatArrayRegion(ets_floatArray array, ets_size start, ets_size length, const ets_float *buf) + { + native_interface->SetFloatArrayRegion(this, array, start, length, buf); + } + void SetDoubleArrayRegion(ets_doubleArray array, ets_size start, ets_size length, const ets_double *buf) + { + native_interface->SetDoubleArrayRegion(this, array, start, length, buf); + } + ets_int RegisterNatives(ets_class cls, const EtsNativeMethod *methods, ets_int nMethods) + { + return native_interface->RegisterNatives(this, cls, methods, nMethods); + } + ets_int UnregisterNatives(ets_class cls) + { + return native_interface->UnregisterNatives(this, cls); + } + ets_int GetEtsVM(EtsVM **vm) + { + return native_interface->GetEtsVM(this, vm); + } + void GetStringRegion(ets_string str, ets_size start, ets_size len, ets_char *buf) + { + native_interface->GetStringRegion(this, str, start, len, buf); + } + void GetStringUTFRegion(ets_string str, ets_size start, ets_size len, char *buf) + { + native_interface->GetStringUTFRegion(this, str, start, len, buf); + } + ets_weak NewWeakGlobalRef(ets_object obj) + { + return native_interface->NewWeakGlobalRef(this, obj); + } + void DeleteWeakGlobalRef(ets_weak obj) + { + native_interface->DeleteWeakGlobalRef(this, obj); + } + ets_boolean ErrorCheck() + { + return native_interface->ErrorCheck(this); + } + // NewDirectByteBuffer, + // GetDirectBufferAddress, + // GetDirectBufferCapacity, + ets_objectRefType GetObjectRefType(ets_object obj) + { + return native_interface->GetObjectRefType(this, obj); + } + + // Promise + ets_status PromiseCreate(ets_deferred *deferred, ets_object *promise) + { + return native_interface->PromiseCreate(this, deferred, promise); + } + ets_status DeferredResolve(ets_deferred deferred, ets_object resolution) + { + return native_interface->DeferredResolve(this, deferred, resolution); + } + ets_status DeferredReject(ets_deferred deferred, ets_object rejection) + { + return native_interface->DeferredReject(this, deferred, rejection); + } +#endif +}; + +// NOLINTEND(modernize-use-using, readability-identifier-naming, cppcoreguidelines-pro-type-vararg) + +#endif // PANDA_RUNTIME_INTEROP_ETS_NAPI_H diff --git a/koala_tools/interop/src/cpp/interop-logging.cc b/koala_tools/interop/src/cpp/interop-logging.cc new file mode 100644 index 0000000000000000000000000000000000000000..9f04c822476e6386ad9996e91c72ef6153c9aa94 --- /dev/null +++ b/koala_tools/interop/src/cpp/interop-logging.cc @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2024 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. + */ +#include +#include +#include + +#include "interop-logging.h" +#include "interop-utils.h" + +namespace { + +struct Log { + std::string log; + bool isActive = true; +}; + +std::vector groupedLogs; + +void startGroupedLog(int index) { + if (index >= static_cast(groupedLogs.size())) { + groupedLogs.resize(index + 1); + for (int i = 0; i <= index; i++) { + if (!groupedLogs[i]) groupedLogs[i] = new Log(); + } + } + groupedLogs[index]->isActive = true; + groupedLogs[index]->log.clear(); +} + +void stopGroupedLog(int index) { + if (index < static_cast(groupedLogs.size())) { + groupedLogs[index]->isActive = false; + } +} + +void appendGroupedLog(int index, const char* str) { + if (index < static_cast(groupedLogs.size())) { + groupedLogs[index]->log.append(str); + } +} + +const char* getGroupedLog(int index) { + if (index < static_cast(groupedLogs.size())) { + const char* result = groupedLogs[index]->log.c_str(); + return result; + } + return ""; +} + +int needGroupedLog(int index) { + if (index < static_cast(groupedLogs.size())) { + return groupedLogs[index]->isActive; + } + return 0; +} + +const GroupLogger defaultInstance = { + startGroupedLog, + stopGroupedLog, + appendGroupedLog, + getGroupedLog, + needGroupedLog, +}; + +} // namespace + +const GroupLogger* GetDefaultLogger() { + return &defaultInstance; +} + +extern "C" [[noreturn]] void InteropLogFatal(const char* format, ...) { + va_list args; + va_start(args, format); + char buffer[4096]; + interop_vsnprintf(buffer, sizeof(buffer) - 1, format, args); + LOGE("FATAL: %s", buffer); + va_end(args); + abort(); +} \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/interop-logging.h b/koala_tools/interop/src/cpp/interop-logging.h new file mode 100644 index 0000000000000000000000000000000000000000..61b49069987c266a238ddeb8347d51385908c2de --- /dev/null +++ b/koala_tools/interop/src/cpp/interop-logging.h @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ +#ifndef _INTEROP_LGGING_H +#define _INTEROP_LGGING_H + +#ifdef __cplusplus + #include + #include + #include +#else + #include + #include + #include +#endif + +#if defined(KOALA_OHOS) +#include "oh_sk_log.h" +#define LOG(msg) OH_SK_LOG_INFO(msg); +#define LOGI(msg, ...) OH_SK_LOG_INFO_A(msg, ##__VA_ARGS__); +#define LOGE(msg, ...) OH_SK_LOG_ERROR_A(msg, ##__VA_ARGS__); +#define LOG_PUBLIC "{public}" +#else +#define LOG(msg) fprintf(stdout, msg "\n"); +#define LOGI(msg, ...) fprintf(stdout, msg "\n", ##__VA_ARGS__); +#define LOGE(msg, ...) fprintf(stderr, msg "\n", ##__VA_ARGS__); +#define LOG_PUBLIC "" +#endif + +#if defined(KOALA_WINDOWS) +#define INTEROP_API_EXPORT __declspec(dllexport) +#else +#define INTEROP_API_EXPORT __attribute__((visibility("default"))) +#endif + +#ifndef ASSERT + #define ASSERT(expression) assert(expression) +#endif + +// Grouped logs. Keep consistent with type in ServiceGroupLogger +typedef struct GroupLogger { + void (*startGroupedLog)(int kind); + void (*stopGroupedLog)(int kind); + void (*appendGroupedLog)(int kind, const char* str); + const char* (*getGroupedLog)(int kind); + int (*needGroupedLog)(int kind); +} GroupLogger; + +extern "C" INTEROP_API_EXPORT const GroupLogger* GetDefaultLogger(); + +#endif // _INTEROP_LOGGING_H \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/interop-types.h b/koala_tools/interop/src/cpp/interop-types.h new file mode 100644 index 0000000000000000000000000000000000000000..cabdbc450bd4718ba4dd765ea0d5ddce991a4424 --- /dev/null +++ b/koala_tools/interop/src/cpp/interop-types.h @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2024 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. +*/ + +#ifndef _INTEROP_TYPES_H_ +#define _INTEROP_TYPES_H_ + +#ifdef __cplusplus + #include +#else + #include +#endif + +#ifdef __cplusplus +extern "C" [[noreturn]] +#endif +void InteropLogFatal(const char* format, ...); +#define INTEROP_FATAL(msg, ...) do { InteropLogFatal(msg, ##__VA_ARGS__); } while (0) + +typedef enum InteropTag +{ + INTEROP_TAG_UNDEFINED = 101, + INTEROP_TAG_INT32 = 102, + INTEROP_TAG_FLOAT32 = 103, + INTEROP_TAG_STRING = 104, + INTEROP_TAG_LENGTH = 105, + INTEROP_TAG_RESOURCE = 106, + INTEROP_TAG_OBJECT = 107, +} InteropTag; + +typedef enum InteropRuntimeType +{ + INTEROP_RUNTIME_UNEXPECTED = -1, + INTEROP_RUNTIME_NUMBER = 1, + INTEROP_RUNTIME_STRING = 2, + INTEROP_RUNTIME_OBJECT = 3, + INTEROP_RUNTIME_BOOLEAN = 4, + INTEROP_RUNTIME_UNDEFINED = 5, + INTEROP_RUNTIME_BIGINT = 6, + INTEROP_RUNTIME_FUNCTION = 7, + INTEROP_RUNTIME_SYMBOL = 8, + INTEROP_RUNTIME_MATERIALIZED = 9, +} InteropRuntimeType; + +typedef float InteropFloat32; +typedef double InteropFloat64; +typedef int32_t InteropInt32; +typedef unsigned int InteropUInt32; // Improve: update unsigned int +typedef int64_t InteropInt64; +typedef uint64_t InteropUInt64; +typedef int8_t InteropInt8; +typedef uint8_t InteropUInt8; +typedef int64_t InteropDate; +typedef int8_t InteropBoolean; +typedef const char* InteropCharPtr; +typedef void* InteropNativePointer; + +struct _InteropVMContext; +typedef struct _InteropVMContext* InteropVMContext; +struct _InteropPipelineContext; +typedef struct _InteropPipelineContext* InteropPipelineContext; +struct _InteropVMObject; +typedef struct _InteropVMObject* InteropVMObject; +struct _InteropNode; +typedef struct _InteropNode* InteropNodeHandle; +typedef struct InteropDeferred { + void* handler; + void* context; + void (*resolve)(struct InteropDeferred* thiz, uint8_t* data, int32_t length); + void (*reject)(struct InteropDeferred* thiz, const char* message); +} InteropDeferred; + +// Binary layout of InteropString must match that of KStringPtrImpl. +typedef struct InteropString { + const char* chars; + InteropInt32 length; +} InteropString; + +typedef struct InteropEmpty { + InteropInt32 dummy; // Empty structs are forbidden in C. +} InteropEmpty; + +typedef struct InteropNumber { + InteropInt8 tag; + union { + InteropFloat32 f32; + InteropInt32 i32; + }; +} InteropNumber; + +typedef struct InteropCustomObject { + char kind[20]; + InteropInt32 id; + // Data of custom object. + union { + InteropInt32 ints[4]; + InteropFloat32 floats[4]; + void* pointers[4]; + InteropString string; + }; +} InteropCustomObject; + +typedef struct InteropUndefined { + InteropInt32 dummy; // Empty structs are forbidden in C. +} InteropUndefined; + +typedef struct InteropVoid { + InteropInt32 dummy; // Empty structs are forbidden in C. +} InteropVoid; + +typedef struct InteropFunction { + InteropInt32 id; +} InteropFunction; +typedef InteropFunction InteropCallback; +typedef InteropFunction InteropErrorCallback; + +typedef struct InteropMaterialized { + InteropNativePointer ptr; +} InteropMaterialized; + +typedef struct InteropCallbackResource { + InteropInt32 resourceId; + void (*hold)(InteropInt32 resourceId); + void (*release)(InteropInt32 resourceId); +} InteropCallbackResource; + +typedef struct InteropBuffer { + InteropCallbackResource resource; + InteropNativePointer data; + InteropInt64 length; +} InteropBuffer; + +typedef struct InteropAsyncWork { + InteropNativePointer workId; + void (*queue)(InteropNativePointer workId); + void (*cancel)(InteropNativePointer workId); +} InteropAsyncWork; + +typedef struct InteropAsyncWorker { + InteropAsyncWork (*createWork)( + InteropVMContext context, + InteropNativePointer handle, + void (*execute)(InteropNativePointer handle), + void (*complete)(InteropNativePointer handle) + ); +} InteropAsyncWorker; +typedef const InteropAsyncWorker* InteropAsyncWorkerPtr; + +typedef struct InteropObject { + InteropCallbackResource resource; +} InteropObject; + +#endif // _INTEROP_TYPES_H_ diff --git a/koala_tools/interop/src/cpp/interop-utils.h b/koala_tools/interop/src/cpp/interop-utils.h new file mode 100644 index 0000000000000000000000000000000000000000..49fb00cc0e281a52ef6a6b3c5164731431b3d43c --- /dev/null +++ b/koala_tools/interop/src/cpp/interop-utils.h @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _INTEROP_UTILS_H_ +#define _INTEROP_UTILS_H_ + +#include +#include + +#ifdef __STDC_LIB_EXT1__ + #include "securec.h" + #define USE_SAFE(name, ...) name##_s(__VA_ARGS__) +#else + /* handle possible unsafe case */ + #define USE_SAFE(name, ...) name(__VA_ARGS__) +#endif + +inline char *interop_strcpy(char *dest, size_t destsz, const char *src) +{ +#ifdef __STDC_LIB_EXT1__ + return reinterpret_cast(USE_SAFE(strcpy, dest, reinterpret_cast(destsz), src)); +#else + /* handle possible unsafe case */ + return USE_SAFE(strcpy, dest, src); +#endif +} + +inline char *interop_strcat(char *dest, size_t destsz, const char *src) +{ +#ifdef __STDC_LIB_EXT1__ + return reinterpret_cast(USE_SAFE(strcat, dest, reinterpret_cast(destsz), src)); +#else + /* handle possible unsafe case */ + return USE_SAFE(strcat, dest, src); +#endif +} + +inline void *interop_memcpy(void *dest, size_t destsz, const void *src, size_t count) +{ +#ifdef __STDC_LIB_EXT1__ + return reinterpret_cast(USE_SAFE(memcpy, dest, reinterpret_cast(destsz), src, count)); +#else + /* handle possible unsafe case */ + return USE_SAFE(memcpy, dest, src, count); +#endif +} + +inline void *interop_memset(void *dest, size_t destsz, int ch, size_t count) +{ +#ifdef __STDC_LIB_EXT1__ + return reinterpret_cast(USE_SAFE(memset, dest, reinterpret_cast(destsz), ch, count)) +#else + /* handle possible unsafe case */ + return USE_SAFE(memset, dest, ch, count); +#endif +} + +template +inline int interop_sprintf(char *buffer, size_t bufsz, const char *format, T... args) +{ +#ifdef __STDC_LIB_EXT1__ + return USE_SAFE(sprintf, buffer, reinterpret_cast(bufsz), format, args...); +#else + /* handle possible unsafe case */ + return USE_SAFE(sprintf, buffer, format, args...); +#endif +} + +template +inline int interop_snprintf(char *buffer, size_t bufsz, const char *format, T... args) +{ + return USE_SAFE(snprintf, buffer, bufsz, format, args...); +} + +inline int interop_vsnprintf(char *buffer, size_t bufsz, const char *format, va_list vlist) +{ + return USE_SAFE(vsnprintf, buffer, bufsz, format, vlist); +} + +inline size_t interop_strlen(const char *str) +{ +#ifdef __STDC_LIB_EXT1__ + return USE_SAFE(strnlen, str, UINT_MAX); +#else + /* handle possible unsafe case */ + return USE_SAFE(strlen, str); +#endif +} + +#endif // _INTEROP_UTILS_H_ \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/jni/convertors-jni.cc b/koala_tools/interop/src/cpp/jni/convertors-jni.cc new file mode 100644 index 0000000000000000000000000000000000000000..683625b09e9e7cac39905f70d84ee8f2c7ddbd45 --- /dev/null +++ b/koala_tools/interop/src/cpp/jni/convertors-jni.cc @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2024 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. + */ + + +#define KOALA_INTEROP_MODULE +#include "convertors-jni.h" +#include "signatures.h" +#include "interop-logging.h" +#include "interop-types.h" + +static const char* nativeModule = "org/koalaui/arkoala/InteropNativeModule"; +static const char* nativeModulePrefix = "org/koalaui/arkoala/"; +static const char* callCallbackFromNative = "callCallbackFromNative"; +static const char* callCallbackFromNativeSig = "(I[BI)I"; + +const bool registerByOne = true; + +static bool registerNatives(JNIEnv *env, jclass clazz, const std::vector> impls) { + size_t numMethods = impls.size(); + JNINativeMethod *methods = new JNINativeMethod[numMethods]; + bool result = true; + for (size_t i = 0; i < numMethods; i++) + { + methods[i].name = (char *)std::get<0>(impls[i]).c_str(); + methods[i].signature = (char *)std::get<1>(impls[i]).c_str(); + methods[i].fnPtr = std::get<2>(impls[i]); + if (registerByOne) { + result &= (env->RegisterNatives(clazz, methods + i, 1) >= 0); + if (env->ExceptionCheck()) { + env->ExceptionDescribe(); + env->ExceptionClear(); + result = false; + } + } + } + return registerByOne ? true : env->RegisterNatives(clazz, methods, numMethods) >= 0; +} + +constexpr bool splitPerModule = true; + +JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { + JNIEnv *env; + if (vm->GetEnv(reinterpret_cast(&env), JNI_VERSION_1_8) != JNI_OK) { + return JNI_ERR; + } + auto modules = JniExports::getInstance()->getModules(); + jclass defaultNativeModule = env->FindClass(nativeModule); + for (auto it = modules.begin(); it != modules.end(); ++it) { + std::string className = std::string(nativeModulePrefix) + *it; + jclass nativeModule = + (!splitPerModule) ? defaultNativeModule : env->FindClass(className.c_str()); + if (nativeModule == nullptr) { + LOGE("Cannot find managed class %s", className.c_str()); + continue; + } + registerNatives(env, nativeModule, JniExports::getInstance()->getMethods(*it)); + } + if (!setKoalaJniCallbackDispatcher(env, defaultNativeModule, callCallbackFromNative, callCallbackFromNativeSig)) return JNI_ERR; + return JNI_VERSION_1_8; +} + +JniExports *JniExports::getInstance() +{ + static JniExports *instance = nullptr; + if (instance == nullptr) + { + instance = new JniExports(); + } + return instance; +} + +std::vector JniExports::getModules() { + std::vector result; + for (auto it = implementations.begin(); it != implementations.end(); ++it) { + result.push_back(it->first); + } + return result; +} + +const std::vector>& JniExports::getMethods(const std::string& module) { + auto it = implementations.find(module); + if (it == implementations.end()) { + LOGE("Module %s is not registered", module.c_str()); + INTEROP_FATAL("Fatal error: not registered module %s", module.c_str()); + } + return it->second; +} + +void JniExports::addMethod(const char* module, const char *name, const char *type, void *impl) { + auto it = implementations.find(module); + if (it == implementations.end()) { + it = implementations.insert(std::make_pair(module, std::vector>())).first; + } + it->second.push_back(std::make_tuple(name, convertType(name, type), impl)); +} diff --git a/koala_tools/interop/src/cpp/jni/convertors-jni.h b/koala_tools/interop/src/cpp/jni/convertors-jni.h new file mode 100644 index 0000000000000000000000000000000000000000..e80ab9f9ab872e1e46f7403884423ea9fe443160 --- /dev/null +++ b/koala_tools/interop/src/cpp/jni/convertors-jni.h @@ -0,0 +1,1520 @@ +/* + * Copyright (c) 2024 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. + */ + +#ifndef CONVERTORS_JNI_H +#define CONVERTORS_JNI_H + +#ifdef KOALA_JNI + +#include + +#include +#include +#include +#include +#include + +#include "koala-types.h" +#include "interop-utils.h" + +#define KOALA_JNI_CALL(type) extern "C" JNIEXPORT type JNICALL + +class JniExports { + std::unordered_map>> implementations; + +public: + static JniExports* getInstance(); + + std::vector getModules(); + void addMethod(const char* module, const char* name, const char* type, void* impl); + const std::vector>& getMethods(const std::string& module); +}; + +#define KOALA_QUOTE0(x) #x +#define KOALA_QUOTE(x) KOALA_QUOTE0(x) + +#ifdef _MSC_VER +#define MAKE_JNI_EXPORT(module, name, type) \ + static void __init_##name() { \ + JniExports::getInstance()->addMethod(KOALA_QUOTE(module), "_"#name, type, reinterpret_cast(Java_org_##name)); \ + } \ + namespace { \ + struct __Init_##name { \ + __Init_##name() { __init_##name(); } \ + } __Init_##name##_v; \ + } +#else +#define MAKE_JNI_EXPORT(module, name, type) \ + __attribute__((constructor)) \ + static void __init_jni_##name() { \ + JniExports::getInstance()->addMethod(KOALA_QUOTE(module), "_"#name, type, reinterpret_cast(Java_org_##name)); \ + } +#endif + +template +struct InteropTypeConverter { + using InteropType = T; + static T convertFrom(JNIEnv* env, InteropType value) { return value; } + static InteropType convertTo(JNIEnv* env, T value) { return value; } + static void release(JNIEnv* env, InteropType value, T converted) {} +}; + +template +struct SlowInteropTypeConverter { + using InteropType = T; + static inline T convertFrom(JNIEnv* env, InteropType value) { return value; } + static inline InteropType convertTo(JNIEnv* env, T value) { return value; } + static void release(JNIEnv* env, InteropType value, T converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = jstring; + static inline KStringPtr convertFrom0(JNIEnv* env, InteropType value) { + if (value == nullptr) return KStringPtr(); + jboolean isCopy; + // Improve: use GetStringCritical() instead and utf-8 encode manually. + const char* str_value = env->GetStringUTFChars(value, &isCopy); + int len = env->GetStringUTFLength(value); + KStringPtr result(str_value, len, false); + return result; + } + static KStringPtr convertFrom(JNIEnv* env, InteropType value) { + if (value == nullptr) return KStringPtr(); + KStringPtr result; + // Notice that we use UTF length for buffer size, but counter is expressed in number of Unicode chars. + result.resize( env->GetStringUTFLength(value)); + env->GetStringUTFRegion(value, 0, env->GetStringLength(value), result.data()); + return result; + } + static InteropType convertTo(JNIEnv* env, KStringPtr value) { + return env->NewStringUTF(value.c_str()); + } + static inline void release(JNIEnv* env, InteropType value, const KStringPtr& converted) { + } +}; + +template<> +struct SlowInteropTypeConverter { + using InteropType = jobject; + static inline KVMObjectHandle convertFrom(JNIEnv* env, InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(JNIEnv* env, KVMObjectHandle value) { + return reinterpret_cast(value); + } + static inline void release(JNIEnv* env, InteropType value, KVMObjectHandle converted) { + } +}; + +template<> +struct SlowInteropTypeConverter { + using InteropType = jstring; + static inline KStringPtr convertFrom(JNIEnv* env, InteropType value) { + if (value == nullptr) return KStringPtr(); + jboolean isCopy; + const char* str_value = env->GetStringUTFChars(value, &isCopy); + int len = env->GetStringLength(value); + KStringPtr result(str_value, len, false); + return result; + } + static InteropType convertTo(JNIEnv* env, KStringPtr value) { + return env->NewStringUTF(value.c_str()); + } + static inline void release(JNIEnv* env, InteropType value, const KStringPtr& converted) { + env->ReleaseStringUTFChars(value, converted.data()); + } +}; + +template<> +struct SlowInteropTypeConverter { + using InteropType = jarray; + static inline KInteropBuffer convertFrom(JNIEnv* env, InteropType value) { + if (value == nullptr) return KInteropBuffer(); + KInteropBuffer result({env->GetArrayLength(value), reinterpret_cast(env->GetPrimitiveArrayCritical(value, nullptr))}); + return result; + } + static InteropType convertTo(JNIEnv* env, KInteropBuffer value) { + int bufferLength = value.length; + jarray result = env->NewByteArray(bufferLength); + void* data = env->GetPrimitiveArrayCritical(result, nullptr); + interop_memcpy(data, bufferLength, value.data, bufferLength); + env->ReleasePrimitiveArrayCritical(result, data, 0); + return result; + } + static inline void release(JNIEnv* env, InteropType value, const KInteropBuffer& converted) { + env->ReleasePrimitiveArrayCritical(value, converted.data, 0); + } +}; + +template<> +struct SlowInteropTypeConverter { + using InteropType = jarray; + static inline KInteropReturnBuffer convertFrom(JNIEnv* env, InteropType value) = delete; + static InteropType convertTo(JNIEnv* env, KInteropReturnBuffer value) { + int bufferLength = value.length; + jarray result = env->NewByteArray(bufferLength); + void* data = env->GetPrimitiveArrayCritical(result, nullptr); + interop_memcpy(data, bufferLength, value.data, bufferLength); + env->ReleasePrimitiveArrayCritical(result, data, 0); + value.dispose(value.data, bufferLength); + return result; + } + static inline void release(JNIEnv* env, InteropType value, const KInteropReturnBuffer& converted) = delete; +}; + +template<> +struct InteropTypeConverter { + using InteropType = jbyteArray; + static inline KByte* convertFrom(JNIEnv* env, InteropType value) { + return value ? reinterpret_cast(env->GetPrimitiveArrayCritical(value, nullptr)) : nullptr; + } + static InteropType convertTo(JNIEnv* env, KByte* value) = delete; + static inline void release(JNIEnv* env, InteropType value, KByte* converted) { + if (converted) env->ReleasePrimitiveArrayCritical(value, converted, 0); + } +}; + +template<> +struct SlowInteropTypeConverter { + using InteropType = jbyteArray; + static inline KByte* convertFrom(JNIEnv* env, InteropType value) { + return value ? reinterpret_cast(env->GetByteArrayElements(value, nullptr)) : nullptr; + } + static InteropType convertTo(JNIEnv* env, KByte* value) = delete; + static inline void release(JNIEnv* env, InteropType value, KByte* converted) { + if (converted) env->ReleaseByteArrayElements(value, reinterpret_cast(converted), 0); + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = jintArray; + static KInt* convertFrom(JNIEnv* env, InteropType value) { + return value ? reinterpret_cast(env->GetPrimitiveArrayCritical(value, nullptr)) : nullptr; + } + static InteropType convertTo(JNIEnv* env, KInt* value) = delete; + static void release(JNIEnv* env, InteropType value, KInt* converted) { + env->ReleasePrimitiveArrayCritical(value, converted, 0); + } +}; + +template<> +struct SlowInteropTypeConverter { + using InteropType = jintArray; + static KInt* convertFrom(JNIEnv* env, InteropType value) { + return value ? reinterpret_cast(env->GetIntArrayElements(value, nullptr)) : nullptr; + } + static InteropType convertTo(JNIEnv* env, KInt* value) = delete; + static void release(JNIEnv* env, InteropType value, KInt* converted) { + env->ReleaseIntArrayElements(value, reinterpret_cast(converted), 0); + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = jfloatArray; + static KFloat* convertFrom(JNIEnv* env, InteropType value) { + return value ? reinterpret_cast(env->GetPrimitiveArrayCritical(value, nullptr)) : nullptr; + } + static InteropType convertTo(JNIEnv* env, KFloat* value) = delete; + static void release(JNIEnv* env, InteropType value, KFloat* converted) { + env->ReleasePrimitiveArrayCritical(value, converted, 0); + } +}; + +template<> +struct SlowInteropTypeConverter { + using InteropType = jfloatArray; + static KFloat* convertFrom(JNIEnv* env, InteropType value) { + return value ? reinterpret_cast(env->GetFloatArrayElements(value, nullptr)) : nullptr; + } + static InteropType convertTo(JNIEnv* env, KFloat* value) = delete; + static void release(JNIEnv* env, InteropType value, KFloat* converted) { + env->ReleaseFloatArrayElements(value, reinterpret_cast(converted), 0); + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = jlong; + static KNativePointer convertFrom(JNIEnv* env, InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(JNIEnv* env, KNativePointer value) { + return reinterpret_cast(value); + } + static inline void release(JNIEnv* env, InteropType value, KNativePointer converted) {} +}; + +template<> +struct SlowInteropTypeConverter { + using InteropType = jlong; + static KNativePointer convertFrom(JNIEnv* env, InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(JNIEnv* env, KNativePointer value) { + return reinterpret_cast(value); + } + static void release(JNIEnv* env, InteropType value, KNativePointer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = jdouble; + static KInteropNumber convertFrom(JNIEnv* env, InteropType value) { + return KInteropNumber::fromDouble(value); + } + static InteropType convertTo(JNIEnv* env, KInteropNumber value) { + return value.asDouble(); + } + static inline void release(JNIEnv* env, InteropType value, KInteropNumber converted) {} +}; + +template<> +struct SlowInteropTypeConverter { + using InteropType = jdouble; + static KInteropNumber convertFrom(JNIEnv* env, InteropType value) { + return KInteropNumber::fromDouble(value); + } + static InteropType convertTo(JNIEnv* env, KInteropNumber value) { + return value.asDouble(); + } + static void release(JNIEnv* env, InteropType value, KInteropNumber converted) {} +}; + +template +inline Type getArgument(JNIEnv* env, typename InteropTypeConverter::InteropType arg) { + return InteropTypeConverter::convertFrom(env, arg); +} + +template +inline void releaseArgument(JNIEnv* env, typename InteropTypeConverter::InteropType arg, Type& data) { + InteropTypeConverter::release(env, arg, data); +} + +#ifndef KOALA_INTEROP_MODULE +#error KOALA_INTEROP_MODULE is undefined +#endif + +#define KOALA_INTEROP_0(name, Ret) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance) { \ + KOALA_MAYBE_LOG(name) \ + return InteropTypeConverter::convertTo(env, impl_##name()); \ + } \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret) + +#define KOALA_INTEROP_1(name, Ret, P0) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) \ + Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0)); \ + releaseArgument(env, _p0, p0); \ + return rv; \ + } \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0) + +#define KOALA_INTEROP_2(name, Ret, P0, P1) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1) + +#define KOALA_INTEROP_3(name, Ret, P0, P1, P2) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2) + +#define KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2, p3)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3) + +#define KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2, p3, p4)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4) + +#define KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2, p3, p4, p5)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5) + +#define KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2, p3, p4, p5, p6)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6) + +#define KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7) + +#define KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8) + +#define KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9) + +#define KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10) + +#define KOALA_INTEROP_12(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11) + +#define KOALA_INTEROP_13(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9"|" #P10 "|" #P11 "|" #P12) + +#define KOALA_INTEROP_14(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + KOALA_JNI_CALL(InteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + P13 p13 = getArgument(env, _p13); \ + auto rv = InteropTypeConverter::convertTo(env, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + releaseArgument(env, _p13, p13); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9"|" #P10 "|" #P11 "|" #P12 "|" #P13) + + +#define KOALA_INTEROP_V0(name) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(); \ + } \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void") + +#define KOALA_INTEROP_V1(name, P0) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + impl_##name(p0); \ + releaseArgument(env, _p0, p0); \ + } \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0) + +#define KOALA_INTEROP_V2(name, P0, P1) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + impl_##name(p0, p1); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1) + +#define KOALA_INTEROP_V3(name, P0, P1, P2) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + impl_##name(p0, p1, p2); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2) + +#define KOALA_INTEROP_V4(name, P0, P1, P2, P3) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + impl_##name(p0, p1, p2, p3); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3) + +#define KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + impl_##name(p0, p1, p2, p3, p4); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4) + +#define KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + impl_##name(p0, p1, p2, p3, p4, p5); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5) + +#define KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6) + +#define KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7) + +#define KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8) + +#define KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9) + +#define KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10) + +#define KOALA_INTEROP_V12(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11) + +#define KOALA_INTEROP_V13(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12) + +#define KOALA_INTEROP_V14(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + P13 p13 = getArgument(env, _p13); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + releaseArgument(env, _p13, p13); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12 "|" #P13) + +#define KOALA_INTEROP_V15(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13, \ + InteropTypeConverter::InteropType _p14) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + P5 p5 = getArgument(env, _p5); \ + P6 p6 = getArgument(env, _p6); \ + P7 p7 = getArgument(env, _p7); \ + P8 p8 = getArgument(env, _p8); \ + P9 p9 = getArgument(env, _p9); \ + P10 p10 = getArgument(env, _p10); \ + P11 p11 = getArgument(env, _p11); \ + P12 p12 = getArgument(env, _p12); \ + P13 p13 = getArgument(env, _p13); \ + P14 p14 = getArgument(env, _p14); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + releaseArgument(env, _p5, p5); \ + releaseArgument(env, _p6, p6); \ + releaseArgument(env, _p7, p7); \ + releaseArgument(env, _p8, p8); \ + releaseArgument(env, _p9, p9); \ + releaseArgument(env, _p10, p10); \ + releaseArgument(env, _p11, p11); \ + releaseArgument(env, _p12, p12); \ + releaseArgument(env, _p13, p13); \ + releaseArgument(env, _p14, p14); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4 "|" #P5 "|" #P6 "|" #P7 "|" #P8 "|" #P9 "|" #P10 "|" #P11 "|" #P12 "|" #P13 "|" #P14) + +#define KOALA_INTEROP_CTX_0(name, Ret) \ + KOALA_JNI_CALL(SlowInteropTypeConverter::InteropType) \ + Java_org_##name(JNIEnv* env, jclass instance) { \ + KOALA_MAYBE_LOG(name) \ + KVMContext ctx = (KVMContext)env; \ + auto rv = SlowInteropTypeConverter::convertTo(env, impl_##name(ctx)); \ + return rv; \ + } \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret) + +#define KOALA_INTEROP_CTX_1(name, Ret, P0) \ + KOALA_JNI_CALL(SlowInteropTypeConverter::InteropType) \ + Java_org_##name(JNIEnv* env, jclass instance, \ + SlowInteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = SlowInteropTypeConverter::convertTo(env, impl_##name(ctx, p0)); \ + releaseArgument(env, _p0, p0); \ + return rv; \ + } \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0) + +#define KOALA_INTEROP_CTX_2(name, Ret, P0, P1) \ + KOALA_JNI_CALL(SlowInteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + SlowInteropTypeConverter::InteropType _p0, \ + SlowInteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = SlowInteropTypeConverter::convertTo(env, impl_##name(ctx, p0, p1)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1) + +#define KOALA_INTEROP_CTX_3(name, Ret, P0, P1, P2) \ + KOALA_JNI_CALL(SlowInteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + SlowInteropTypeConverter::InteropType _p0, \ + SlowInteropTypeConverter::InteropType _p1, \ + SlowInteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = SlowInteropTypeConverter::convertTo(env, impl_##name(ctx, p0, p1, p2)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2) + +#define KOALA_INTEROP_CTX_4(name, Ret, P0, P1, P2, P3) \ + KOALA_JNI_CALL(SlowInteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + SlowInteropTypeConverter::InteropType _p0, \ + SlowInteropTypeConverter::InteropType _p1, \ + SlowInteropTypeConverter::InteropType _p2, \ + SlowInteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = SlowInteropTypeConverter::convertTo(env, impl_##name(ctx, p0, p1, p2, p3)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3) + +#define KOALA_INTEROP_CTX_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_JNI_CALL(SlowInteropTypeConverter::InteropType) Java_org_##name(JNIEnv* env, jclass instance, \ + SlowInteropTypeConverter::InteropType _p0, \ + SlowInteropTypeConverter::InteropType _p1, \ + SlowInteropTypeConverter::InteropType _p2, \ + SlowInteropTypeConverter::InteropType _p3, \ + SlowInteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + KVMContext ctx = (KVMContext)env; \ + auto rv = SlowInteropTypeConverter::convertTo(env, impl_##name(ctx, p0, p1, p2, p3, p4)); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ + return rv; \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, #Ret "|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4) + +#define KOALA_INTEROP_CTX_V0(name) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance) { \ + KOALA_MAYBE_LOG(name) \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx); \ + } \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void") + +#define KOALA_INTEROP_CTX_V1(name, P0) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + SlowInteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0); \ + releaseArgument(env, _p0, p0); \ + } \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0) + +#define KOALA_INTEROP_CTX_V2(name, P0, P1) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + SlowInteropTypeConverter::InteropType _p0, \ + SlowInteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1) + +#define KOALA_INTEROP_CTX_V3(name, P0, P1, P2) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + SlowInteropTypeConverter::InteropType _p0, \ + SlowInteropTypeConverter::InteropType _p1, \ + SlowInteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1, p2); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2) + +#define KOALA_INTEROP_CTX_V4(name, P0, P1, P2, P3) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + SlowInteropTypeConverter::InteropType _p0, \ + SlowInteropTypeConverter::InteropType _p1, \ + SlowInteropTypeConverter::InteropType _p2, \ + SlowInteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1, p2, p3); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3) + +#define KOALA_INTEROP_CTX_V5(name, P0, P1, P2, P3, P4) \ + KOALA_JNI_CALL(void) Java_org_##name(JNIEnv* env, jclass instance, \ + SlowInteropTypeConverter::InteropType _p0, \ + SlowInteropTypeConverter::InteropType _p1, \ + SlowInteropTypeConverter::InteropType _p2, \ + SlowInteropTypeConverter::InteropType _p3, \ + SlowInteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(env, _p0); \ + P1 p1 = getArgument(env, _p1); \ + P2 p2 = getArgument(env, _p2); \ + P3 p3 = getArgument(env, _p3); \ + P4 p4 = getArgument(env, _p4); \ + KVMContext ctx = (KVMContext)env; \ + impl_##name(ctx, p0, p1, p2, p3, p4); \ + releaseArgument(env, _p0, p0); \ + releaseArgument(env, _p1, p1); \ + releaseArgument(env, _p2, p2); \ + releaseArgument(env, _p3, p3); \ + releaseArgument(env, _p4, p4); \ +} \ +MAKE_JNI_EXPORT(KOALA_INTEROP_MODULE, name, "void|" #P0 "|" #P1 "|" #P2 "|" #P3 "|" #P4) + +#define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + +bool setKoalaJniCallbackDispatcher( + JNIEnv* env, + jclass clazz, + const char* dispatcherMethodName, + const char* dispactherMethodSig +); +void getKoalaJniCallbackDispatcher(jclass* clazz, jmethodID* method); + +#define KOALA_INTEROP_CALL_VOID(venv, id, length, args) \ +{ \ + jclass clazz = nullptr; \ + jmethodID method = nullptr; \ + getKoalaJniCallbackDispatcher(&clazz, &method); \ + JNIEnv* jniEnv = reinterpret_cast(venv); \ + jniEnv->PushLocalFrame(1); \ + jbyteArray args_jni = jniEnv->NewByteArray(length); \ + jniEnv->SetByteArrayRegion(args_jni, 0, length, reinterpret_cast(args)); \ + jniEnv->CallStaticIntMethod(clazz, method, id, args_jni, length); \ + jniEnv->GetByteArrayRegion(args_jni, 0, length, reinterpret_cast(args)); \ + jniEnv->PopLocalFrame(nullptr); \ +} + +#define KOALA_INTEROP_CALL_INT(venv, id, length, args) \ +{ \ + jclass clazz = nullptr; \ + jmethodID method = nullptr; \ + getKoalaJniCallbackDispatcher(&clazz, &method); \ + JNIEnv* jniEnv = reinterpret_cast(venv); \ + jniEnv->PushLocalFrame(1); \ + jbyteArray args_jni = jniEnv->NewByteArray(length); \ + jniEnv->SetByteArrayRegion(args_jni, 0, length, reinterpret_cast(args)); \ + int32_t rv = jniEnv->CallStaticIntMethod(clazz, method, id, args_jni, length); \ + jniEnv->GetByteArrayRegion(args_jni, 0, length, reinterpret_cast(args)); \ + jniEnv->PopLocalFrame(nullptr); \ + return rv; \ +} + +#define KOALA_INTEROP_CALL_VOID_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_VOID(venv, id, (argc) * sizeof(int32_t), args) +#define KOALA_INTEROP_CALL_INT_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_INT(venv, id, (argc) * sizeof(int32_t), args) + +#define KOALA_INTEROP_THROW(vmContext, object, ...) \ + do { \ + JNIEnv* env = reinterpret_cast(vmContext); \ + env->Throw(object); \ + return __VA_ARGS__; \ + } while (0) + +#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ + do { \ + JNIEnv* env = reinterpret_cast(vmContext); \ + const static jclass errorClass = env->FindClass("java/lang/RuntimeException"); \ + env->ThrowNew(errorClass, message); \ + } while (0) + +#endif // KOALA_JNI_CALL + +#endif // CONVERTORS_JNI_H \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/jsc/convertors-jsc.cc b/koala_tools/interop/src/cpp/jsc/convertors-jsc.cc new file mode 100644 index 0000000000000000000000000000000000000000..7245991c75710c03d07fc8eab367530a5ae92f71 --- /dev/null +++ b/koala_tools/interop/src/cpp/jsc/convertors-jsc.cc @@ -0,0 +1,303 @@ +/* + * 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. + */ + +#include +#include <_types/_uint32_t.h> +#include <_types/_uint8_t.h> +#include + +#include "convertors-jsc.h" + +#include "interop-logging.h" +#include "interop-utils.h" + +// See https://github.com/BabylonJS/BabylonNative/blob/master/Dependencies/napi/napi-direct/source/js_native_api_javascriptcore.cc +// for convertors logic. + + +KInt* getInt32Elements(JSContextRef context, const JSValueRef arguments) { + return getTypedElements(context, arguments); +} + +uint32_t* getUInt32Elements(JSContextRef context, const JSValueRef arguments) { + return getTypedElements(context, arguments); +} + +float* getFloat32Elements(JSContextRef context, const JSValueRef arguments) { + return getTypedElements(context, arguments); +} + +KByte* getByteElements(JSContextRef context, const JSValueRef arguments) { + return getTypedElements(context, arguments); +} + +KStringArray getKStringArray(JSContextRef context, const JSValueRef arguments) { + return getTypedElements(context, arguments); +} + +KUShort* getUShortElements(JSContextRef context, const JSValueRef arguments) { + return getTypedElements(context, arguments); +} + +KShort* getShortElements(JSContextRef context, const JSValueRef arguments) { + return getTypedElements(context, arguments); +} + +int32_t getInt32(JSContextRef context, JSValueRef value) { + JSValueRef exception {}; + if (JSValueIsNull(context, value)) { + return 0; + } + if (JSValueIsUndefined(context, value)) { + ASSERT(false); + return 0; + } + double result = JSValueToNumber(context, value, &exception); + return static_cast(result); +} + +uint32_t getUInt32(JSContextRef context, JSValueRef value) { + JSValueRef exception {}; + if (JSValueIsNull(context, value)) { + return 0; + } + if (JSValueIsUndefined(context, value)) { + ASSERT(false); + return 0; + } + double result = JSValueToNumber(context, value, &exception); + return static_cast(result); +} + +uint8_t getUInt8(JSContextRef context, JSValueRef value) { + JSValueRef exception {}; + if (JSValueIsNull(context, value)) { + return 0; + } + if (JSValueIsUndefined(context, value)) { + ASSERT(false); + return 0; + } + double result = JSValueToNumber(context, value, &exception); + return static_cast(result); +} + +/* +static JSStringRef bigintToArrayCastFuncName = JSStringCreateWithUTF8CString("__JSC__castFromBigInt"); +static JSStringRef bigintToArrayCastFuncParams[] = { JSStringCreateWithUTF8CString("ptr") }; +static JSStringRef bigintToArrayCastFuncBody = JSStringCreateWithUTF8CString( + "return new Uint32Array([ptr & 0xFFFFFFFFn, (ptr >> 32n) & 0xFFFFFFFFn]);" +); + +static JSStringRef arrayToBigintCastFuncName = JSStringCreateWithUTF8CString("__JSC__castToBigInt"); +static JSStringRef arrayToBigintCastFuncParams[] = { JSStringCreateWithUTF8CString("ptr") }; +static JSStringRef arrayToBigintCastFuncBody = JSStringCreateWithUTF8CString( + "return BigInt(ptr[1]) << 32n | BigInt(ptr[0])" +); +*/ + +#ifdef KOALA_JSC_USE_CALLBACK_CAST + +static JSStringRef bigIntFromPartsFuncName = JSStringCreateWithUTF8CString("__JSC__bigIntFromParts"); +static JSStringRef bigIntFromPartsFuncParams[] = { JSStringCreateWithUTF8CString("hi"), JSStringCreateWithUTF8CString("lo") }; +static JSStringRef bigIntFromPartsFuncBody = JSStringCreateWithUTF8CString( + "return BigInt(hi) << 32n | BigInt(lo);" +); + +static JSObjectRef getGlobalCallback(JSContextRef context, JSStringRef name, JSStringRef params[], JSStringRef body) { + JSObjectRef globalThis = JSContextGetGlobalObject(context); + JSValueRef propname = JSValueMakeString(context, name); + JSValueRef castFunc = JSObjectGetPropertyForKey(context, globalThis, propname, nullptr); + if (JSValueIsUndefined(context, castFunc)) { + JSObjectRef castFuncObj = JSObjectMakeFunction(context, name, 1, params, body, nullptr, 0, nullptr); + JSPropertyAttributes attributes = kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontEnum; + JSObjectSetPropertyForKey(context, globalThis, propname, castFuncObj, attributes, nullptr); + return castFuncObj; + } + return JSValueToObject(context, castFunc, nullptr); +} + +static JSObjectRef getBigIntFromParts(JSContextRef context) { + return getGlobalCallback(context, bigIntFromPartsFuncName, bigIntFromPartsFuncParams, bigIntFromPartsFuncBody); +} + +#endif + +static JSValueRef u64ToBigInt(JSContextRef context, uint64_t value) { + JSValueRef bigint; +#ifdef KOALA_JSC_USE_CALLBACK_CAST + // Improve: benchmark this + JSObjectRef bigIntFromParts = getBigIntFromParts(context); + JSValueRef parts[2] = { + JSValueMakeNumber(context, (double) (value >> 32)), + JSValueMakeNumber(context, (double) (value & 0xFFFFFFFF)), + }; + bigint = JSObjectCallAsFunction(context, bigIntFromParts, nullptr, 2, parts, nullptr); +#else + char buffer[128] = {0}; + interop_snprintf(buffer, sizeof(buffer) - 1, "%zun", static_cast(value)); + JSStringRef script = JSStringCreateWithUTF8CString(buffer); + bigint = JSEvaluateScript(context, script, nullptr, nullptr, 0, nullptr); + JSStringRelease(script); +#endif + return bigint; +} + +static uint64_t bigIntToU64(JSContextRef ctx, JSValueRef value) { + char buf[128]; + JSStringRef strRef = JSValueToStringCopy(ctx, value, nullptr); + size_t len = JSStringGetUTF8CString(strRef, buf, sizeof(buf)); + JSStringRelease(strRef); + ASSERT(len < sizeof(buf)); + char* suf; + uint64_t numValue = std::strtoull(buf, &suf, 10); + ASSERT(*suf == '\0'); + return numValue; +} + +KNativePointer getPointer(JSContextRef context, JSValueRef value) { + uint64_t raw = bigIntToU64(context, value); + return reinterpret_cast(static_cast(raw)); +} + +KNativePointerArray getPointerElements(JSContextRef context, JSValueRef value) { + if (JSValueIsNull(context, value) || JSValueIsUndefined(context, value)) { + return nullptr; + } + + ASSERT(JSValueIsObject(context, value)); + ASSERT(JSValueGetTypedArrayType(context, value, nullptr) == kJSTypedArrayTypeBigUint64Array); + + JSObjectRef typedArray = JSValueToObject(context, value, nullptr); + return reinterpret_cast(JSObjectGetTypedArrayBytesPtr(context, typedArray, nullptr)); +} + +KFloat getFloat(JSContextRef context, JSValueRef value) { + JSValueRef exception {}; + if (JSValueIsNull(context, value)) { + return 0; + } + if (JSValueIsUndefined(context, value)) { + ASSERT(false); + return 0; + } + double result = JSValueToNumber(context, value, &exception); + return static_cast(result); +} + +KDouble getDouble(JSContextRef context, JSValueRef value) { + JSValueRef exception {}; + if (JSValueIsNull(context, value)) { + return 0; + } + if (JSValueIsUndefined(context, value)) { + ASSERT(false); + return 0; + } + return JSValueToNumber(context, value, &exception); +} + +KShort getShort(JSContextRef context, JSValueRef value) { + JSValueRef exception {}; + if (JSValueIsNull(context, value)) { + return 0; + } + if (JSValueIsUndefined(context, value)) { + ASSERT(false); + return 0; + } + double result = JSValueToNumber(context, value, &exception); + return static_cast(result); +} + +KUShort getUShort(JSContextRef context, JSValueRef value) { + JSValueRef exception {}; + if (JSValueIsNull(context, value)) { + return 0; + } + if (JSValueIsUndefined(context, value)) { + ASSERT(false); + return 0; + } + double result = JSValueToNumber(context, value, &exception); + return static_cast(result); +} + +KStringPtr getString(JSContextRef context, JSValueRef value) { + if (JSValueIsNull(context, value)) { + return KStringPtr(); + } + if (JSValueIsUndefined(context, value)) { + return KStringPtr(); + } + KStringPtr result; + JSStringRef valueString = JSValueToStringCopy(context, value, NULL); + size_t size = JSStringGetMaximumUTF8CStringSize(valueString); + result.resize(size); + JSStringGetUTF8CString(valueString, result.data(), size); + JSStringRelease(valueString); + return result; +} + +KBoolean getBoolean(JSContextRef context, JSValueRef value) { + bool result = JSValueToBoolean(context, value); + return static_cast(result); +} + +JSValueRef makeInt32(JSContextRef context, int32_t value) { + return JSValueMakeNumber(context, value); +} + +JSValueRef makeUInt32(JSContextRef context, uint32_t value) { + return JSValueMakeNumber(context, value); +} + +JSValueRef makePointer(JSContextRef context, KNativePointer value) { + return u64ToBigInt(context, static_cast(reinterpret_cast(value))); +} + +JSValueRef makeFloat(JSContextRef context, KFloat value) { + return JSValueMakeNumber(context, value); +} + +JSValueRef makeDouble(JSContextRef context, KDouble value) { + return JSValueMakeNumber(context, value); +} + +JSValueRef makeBoolean(JSContextRef context, KBoolean value) { + return JSValueMakeBoolean(context, value); +} + +JSValueRef makeVoid(JSContextRef context) { + return JSValueMakeUndefined(context); +} + +Exports* Exports::getInstance() { + static Exports *instance = nullptr; + if (instance == nullptr) { + instance = new Exports(); + } + return instance; +} + +void InitExports(JSGlobalContextRef globalContext) { + JSObjectRef globalObject = JSContextGetGlobalObject(globalContext); + for (auto impl: Exports::getInstance()->getImpls()) { + JSStringRef functionName = JSStringCreateWithUTF8CString(impl.first.c_str()); + JSObjectRef functionObject = JSObjectMakeFunctionWithCallback(globalContext, functionName, impl.second); + JSObjectSetProperty(globalContext, globalObject, functionName, functionObject, kJSPropertyAttributeNone, nullptr); + JSStringRelease(functionName); + } +} diff --git a/koala_tools/interop/src/cpp/jsc/convertors-jsc.h b/koala_tools/interop/src/cpp/jsc/convertors-jsc.h new file mode 100644 index 0000000000000000000000000000000000000000..8ad7a4284950464c40aef715ae98bb7f2601b23a --- /dev/null +++ b/koala_tools/interop/src/cpp/jsc/convertors-jsc.h @@ -0,0 +1,786 @@ +/* + * 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. + */ + +#ifndef CONVERTORS_JSC_H +#define CONVERTORS_JSC_H + +#if defined(linux) +#include // For IDE completion +#else +#include +#endif +#include <_types/_uint8_t.h> +#include +#include +#include + +#include "koala-types.h" +#include "interop-logging.h" + +template +inline ElemType* getTypedElements(JSContextRef context, const JSValueRef arguments) { + if (JSValueIsNull(context, arguments)) { + return nullptr; + } + if (JSValueIsUndefined(context, arguments)) { + ASSERT(false); + return nullptr; + } + JSValueRef exception {}; + ElemType* data = reinterpret_cast(JSObjectGetTypedArrayBytesPtr(context, + JSValueToObject(context, arguments, &exception), &exception)); + return data; +} + +template +inline ElemType* getTypedElements(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getTypedElements(context, arguments[index]); +} + +uint8_t* getUInt8Elements(JSContextRef context, const JSValueRef arguments); +int32_t* getInt32Elements(JSContextRef context, const JSValueRef arguments); +uint32_t* getUInt32Elements(JSContextRef context, const JSValueRef arguments); +float* getFloat32Elements(JSContextRef context, const JSValueRef arguments); +KByte* getByteElements(JSContextRef context, const JSValueRef arguments); +KUShort* getUShortElements(JSContextRef context, const JSValueRef arguments); +KShort* getShortElements(JSContextRef context, const JSValueRef arguments); +KNativePointerArray getPointerElements(JSContextRef context, const JSValueRef arguments); +KStringArray getKStringArray(JSContextRef context, const JSValueRef arguments); + +uint8_t getUInt8(JSContextRef context, JSValueRef value); +int32_t getInt32(JSContextRef context, JSValueRef value); +uint32_t getUInt32(JSContextRef context, JSValueRef value); +KNativePointer getPointer(JSContextRef context, JSValueRef value); +KFloat getFloat(JSContextRef context, JSValueRef value); +KDouble getDouble(JSContextRef context, JSValueRef value); +KStringPtr getString(JSContextRef context, JSValueRef value); +KBoolean getBoolean(JSContextRef context, JSValueRef value); +KStringPtr getString(JSContextRef context, JSValueRef value); + +template +inline Type getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) = delete; + +template <> +inline int32_t getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getInt32(context, arguments[index]); +} + +template <> +inline uint32_t getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getUInt32(context, arguments[index]); +} + +template <> +inline uint8_t getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getUInt8(context, arguments[index]); +} + +template <> +inline KNativePointer getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getPointer(context, arguments[index]); +} + +template <> +inline KFloat getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getFloat(context, arguments[index]); +} + +template<> +inline KDouble getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getDouble(context, arguments[index]); +} + +template <> +inline KStringPtr getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getString(context, arguments[index]); +} + +template <> +inline KBoolean getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getBoolean(context, arguments[index]); +} + +template <> +inline KInt* getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getInt32Elements(context, arguments[index]); +} + +template <> +inline float* getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getFloat32Elements(context, arguments[index]); +} + +template <> +inline KByte* getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getByteElements(context, arguments[index]); +} + +template <> +inline KStringArray getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getKStringArray(context, arguments[index]); +} + +template <> +inline KUShort* getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getUShortElements(context, arguments[index]); +} + +template <> +inline KNativePointerArray getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getPointerElements(context, arguments[index]); +} + +template <> +inline KShort* getArgument(JSContextRef context, size_t argumentCount, const JSValueRef arguments[], int index) { + ASSERT(index < argumentCount); + return getShortElements(context, arguments[index]); +} + +JSValueRef makeInt32(JSContextRef context, int32_t value); +JSValueRef makeUInt32(JSContextRef context, uint32_t value); +JSValueRef makePointer(JSContextRef context, KNativePointer value); +JSValueRef makeFloat(JSContextRef context, KFloat value); +JSValueRef makeDouble(JSContextRef context, KDouble value); +JSValueRef makeBoolean(JSContextRef context, KBoolean value); +JSValueRef makeVoid(JSContextRef context); + +template +inline JSValueRef makeResult(JSContextRef context, Type value) = delete; + +template <> +inline JSValueRef makeResult(JSContextRef context, int32_t value) { + return makeInt32(context, value); +} + +template <> +inline JSValueRef makeResult(JSContextRef context, uint32_t value) { + return makeUInt32(context, value); +} + +template <> +inline JSValueRef makeResult(JSContextRef context, KNativePointer value) { + return makePointer(context, value); +} + +template <> +inline JSValueRef makeResult(JSContextRef context, KFloat value) { + return makeFloat(context, value); +} + +template <> +inline JSValueRef makeResult(JSContextRef context, KDouble value) { + return makeDouble(context, value); +} + +template <> +inline JSValueRef makeResult(JSContextRef context, KBoolean value) { + return makeBoolean(context, value); +} + +typedef JSValueRef (*jsc_type_t)(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception); + +class Exports { + std::vector> implementations; + +public: + static Exports* getInstance(); + + void addImpl(const char* name, jsc_type_t impl) { + implementations.push_back(std::make_pair(name, impl)); + } + + const std::vector>& getImpls() { + return implementations; + } +}; + +void InitExports(JSGlobalContextRef globalContext); + +#define MAKE_JSC_EXPORT(name) \ + __attribute__((constructor)) \ + static void __init_##name() { \ + Exports::getInstance()->addImpl("_"#name, Jsc_##name); \ + } + +#define MAKE_JSC_EXPORT_V1(name) \ + __attribute__((constructor)) \ + static void __init_##name() { \ + Exports::getInstance()->addImpl(#name, Jsc_##name); \ + } + +#define KOALA_INTEROP_0(name, Ret) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + return makeResult(ctx, impl_##name()); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_1(name, Ret, P0) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + return makeResult(ctx, impl_##name(p0)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_2(name, Ret, P0, P1) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + return makeResult(ctx, impl_##name(p0, p1)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_3(name, Ret, P0, P1, P2) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + return makeResult(ctx, impl_##name(p0,p1,p2)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + return makeResult(ctx, impl_##name(p0,p1,p2,p3)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + return makeResult(ctx, impl_##name(p0,p1,p2,p3,p4)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + return makeResult(ctx, impl_##name(p0,p1,p2,p3,p4,p5)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + return makeResult(ctx, impl_##name(p0,p1,p2,p3,p4,p5,p6)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + return makeResult(ctx, impl_##name(p0,p1,p2,p3,p4,p5,p6,p7)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + return makeResult(ctx, impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + P9 p9 = getArgument(ctx, argumentCount, arguments, 9); \ + return makeResult(ctx, impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + P9 p9 = getArgument(ctx, argumentCount, arguments, 9); \ + P10 p10 = getArgument(ctx, argumentCount, arguments, 10); \ + return makeResult(ctx, impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_12(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + P9 p9 = getArgument(ctx, argumentCount, arguments, 9); \ + P10 p10 = getArgument(ctx, argumentCount, arguments, 10); \ + P11 p11 = getArgument(ctx, argumentCount, arguments, 11); \ + return makeResult(ctx, impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_13(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + P9 p9 = getArgument(ctx, argumentCount, arguments, 9); \ + P10 p10 = getArgument(ctx, argumentCount, arguments, 10); \ + P11 p11 = getArgument(ctx, argumentCount, arguments, 11); \ + P12 p12 = getArgument(ctx, argumentCount, arguments, 12); \ + return makeResult(ctx, impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_14(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + P9 p9 = getArgument(ctx, argumentCount, arguments, 9); \ + P10 p10 = getArgument(ctx, argumentCount, arguments, 10); \ + P11 p11 = getArgument(ctx, argumentCount, arguments, 11); \ + P12 p12 = getArgument(ctx, argumentCount, arguments, 12); \ + P13 p13 = getArgument(ctx, argumentCount, arguments, 13); \ + return makeResult(ctx, impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V0(name) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V1(name, P0) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + impl_##name(p0); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V2(name, P0, P1) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + impl_##name(p0,p1); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V3(name, P0, P1, P2) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + impl_##name(p0,p1,p2); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V4(name, P0, P1, P2, P3) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + impl_##name(p0,p1,p2,p3); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + impl_##name(p0,p1,p2,p3,p4); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + impl_##name(p0,p1,p2,p3,p4,p5); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + impl_##name(p0,p1,p2,p3,p4,p5,p6); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + impl_##name(p0,p1,p2,p3,p4,p5,p6,p7); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + P9 p9 = getArgument(ctx, argumentCount, arguments, 9); \ + impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + P9 p9 = getArgument(ctx, argumentCount, arguments, 9); \ + P10 p10 = getArgument(ctx, argumentCount, arguments, 10); \ + impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V12(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + P9 p9 = getArgument(ctx, argumentCount, arguments, 9); \ + P10 p10 = getArgument(ctx, argumentCount, arguments, 10); \ + P11 p11 = getArgument(ctx, argumentCount, arguments, 11); \ + impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V13(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + P9 p9 = getArgument(ctx, argumentCount, arguments, 9); \ + P10 p10 = getArgument(ctx, argumentCount, arguments, 10); \ + P11 p11 = getArgument(ctx, argumentCount, arguments, 11); \ + P12 p12 = getArgument(ctx, argumentCount, arguments, 12); \ + impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_V14(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + P4 p4 = getArgument(ctx, argumentCount, arguments, 4); \ + P5 p5 = getArgument(ctx, argumentCount, arguments, 5); \ + P6 p6 = getArgument(ctx, argumentCount, arguments, 6); \ + P7 p7 = getArgument(ctx, argumentCount, arguments, 7); \ + P8 p8 = getArgument(ctx, argumentCount, arguments, 8); \ + P9 p9 = getArgument(ctx, argumentCount, arguments, 9); \ + P10 p10 = getArgument(ctx, argumentCount, arguments, 10); \ + P11 p11 = getArgument(ctx, argumentCount, arguments, 11); \ + P12 p12 = getArgument(ctx, argumentCount, arguments, 12); \ + P13 p13 = getArgument(ctx, argumentCount, arguments, 13); \ + impl_##name(p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +// Improve: implement properly +#define KOALA_INTEROP_CTX_3(name, Ret, P0, P1, P2) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef *exception) \ + { \ + printf("Improve: implement KOALA_INTEROP_CTX_3 for jsc"); \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + return makeResult(ctx, impl_##name(nullptr, p0, p1, p2)); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_CTX_4(name, Ret, P0, P1, P2, P4) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef *exception) \ + { \ + printf("Improve: implement KOALA_INTEROP_CTX_4 for jsc"); \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + return makeResult(ctx, impl_##name(nullptr, p0, p1, p2, p3)); \ + } \ + MAKE_JSC_EXPORT(name) + +// Improve: implement properly +#define KOALA_INTEROP_CTX_V3(name, P0, P1, P2) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + printf("Improve: implement KOALA_INTEROP_CTX_V3 for jsc"); \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + impl_##name(nullptr, p0, p1, p2); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + +#define KOALA_INTEROP_CTX_V4(name, P0, P1, P2, P3) \ + JSValueRef Jsc_##name(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) { \ + printf("Improve: implement KOALA_INTEROP_CTX_V4 for jsc"); \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(ctx, argumentCount, arguments, 0); \ + P1 p1 = getArgument(ctx, argumentCount, arguments, 1); \ + P2 p2 = getArgument(ctx, argumentCount, arguments, 2); \ + P3 p3 = getArgument(ctx, argumentCount, arguments, 3); \ + impl_##name(nullptr, p0, p1, p2, p3); \ + return makeVoid(ctx); \ + } \ + MAKE_JSC_EXPORT(name) + + #define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + +#define KOALA_INTEROP_THROW(vmContext, object, ...) \ + do { \ + /* Improve: implement*/ ASSERT(false); \ + return __VA_ARGS__; \ + } while (0) + +#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ + do { \ + ASSERT(false); /* Improve: implement*/ \ + return __VA_ARGS__; \ + } while (0) + +#endif // CONVERTORS_JSC_H \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/kotlin/cinterop-interop_native_module.def b/koala_tools/interop/src/cpp/kotlin/cinterop-interop_native_module.def new file mode 100644 index 0000000000000000000000000000000000000000..57e8fa3db4d165e819592c4624e423621b418a70 --- /dev/null +++ b/koala_tools/interop/src/cpp/kotlin/cinterop-interop_native_module.def @@ -0,0 +1 @@ +headers = cinterop-interop_native_module.h diff --git a/koala_tools/interop/src/cpp/kotlin/cinterop-interop_native_module.h b/koala_tools/interop/src/cpp/kotlin/cinterop-interop_native_module.h new file mode 100644 index 0000000000000000000000000000000000000000..f0ce25b7e4001bc5af66d01c00ad97e39f7ad4e2 --- /dev/null +++ b/koala_tools/interop/src/cpp/kotlin/cinterop-interop_native_module.h @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef CINTEROP_INTEROP_NATIVE_MODULE_H +#define CINTEROP_INTEROP_NATIVE_MODULE_H + +// This header is intended to be used only in Kotlin Native cinterop headers. +// Do not include it elsewhere. + +#include "kotlin-cinterop.h" + +KOALA_INTEROP_1(GetGroupedLog, KNativePointer, KInt) +KOALA_INTEROP_V1(StartGroupedLog, KInt) +KOALA_INTEROP_V1(StopGroupedLog, KInt) +KOALA_INTEROP_V2(AppendGroupedLog, KInt, KStringPtr) +KOALA_INTEROP_V1(PrintGroupedLog, KInt) +KOALA_INTEROP_0(GetStringFinalizer, KNativePointer) +KOALA_INTEROP_V2(InvokeFinalizer, KNativePointer, KNativePointer) +KOALA_INTEROP_1(IncrementNumber, KInteropNumber, KInteropNumber) +KOALA_INTEROP_2(GetPtrVectorElement, KNativePointer, KNativePointer, KInt) +KOALA_INTEROP_1(StringLength, KInt, KNativePointer) +KOALA_INTEROP_V3(StringData, KNativePointer, KByte*, KInt) +KOALA_INTEROP_1(StringMake, KNativePointer, KStringPtr) +KOALA_INTEROP_1(GetPtrVectorSize, KInt, KNativePointer) +KOALA_INTEROP_4(ManagedStringWrite, KInt, KStringPtr, KSerializerBuffer, KInt, KInt) +KOALA_INTEROP_V1(NativeLog, KStringPtr) +KOALA_INTEROP_CTX_3(Utf8ToString, KStringPtr, KNativePointer, KInt, KInt) +KOALA_INTEROP_CTX_1(StdStringToString, KStringPtr, KNativePointer) +KOALA_INTEROP_DIRECT_2(CheckCallbackEvent, KInt, KSerializerBuffer, KInt) +KOALA_INTEROP_V1(ReleaseCallbackResource, KInt) +KOALA_INTEROP_V1(HoldCallbackResource, KInt) +KOALA_INTEROP_V4(CallCallback, KInt, KInt, KSerializerBuffer, KInt) +KOALA_INTEROP_CTX_V4(CallCallbackSync, KInt, KInt, KSerializerBuffer, KInt) +KOALA_INTEROP_V2(CallCallbackResourceHolder, KNativePointer, KInt) +KOALA_INTEROP_V2(CallCallbackResourceReleaser, KNativePointer, KInt) +KOALA_INTEROP_CTX_4(LoadVirtualMachine, KInt, KInt, KStringPtr, KStringPtr, KStringPtr) +KOALA_INTEROP_2(RunApplication, KBoolean, KInt, KInt) +KOALA_INTEROP_2(StartApplication, KNativePointer, KStringPtr, KStringPtr) +KOALA_INTEROP_CTX_4(EmitEvent, KStringPtr, KInt, KInt, KInt, KInt) +KOALA_INTEROP_4(CallForeignVM, KInt, KNativePointer, KInt, KSerializerBuffer, KInt) +KOALA_INTEROP_V1(SetForeignVMContext, KNativePointer) +KOALA_INTEROP_V1(RestartWith, KStringPtr) +KOALA_INTEROP_DIRECT_3(ReadByte, KInt, KNativePointer, KLong, KLong) +KOALA_INTEROP_DIRECT_V4(WriteByte, KNativePointer, KLong, KLong, KInt) +KOALA_INTEROP_DIRECT_1(Malloc, KNativePointer, KLong) +KOALA_INTEROP_DIRECT_0(GetMallocFinalizer, KNativePointer) +KOALA_INTEROP_DIRECT_V1(Free, KNativePointer) +KOALA_INTEROP_V3(CopyArray, KNativePointer, KLong, KByte*) +KOALA_INTEROP_V0(ReportMemLeaks) + +KOALA_INTEROP_V1(SetKoalaKotlinCallbackDispatcher, KNativePointer) + +#endif // CINTEROP_INTEROP_NATIVE_MODULE_H diff --git a/koala_tools/interop/src/cpp/kotlin/convertors-kotlin.cc b/koala_tools/interop/src/cpp/kotlin/convertors-kotlin.cc new file mode 100644 index 0000000000000000000000000000000000000000..00c8a994f0adfe677850dd7b7a97abf7d0804bfe --- /dev/null +++ b/koala_tools/interop/src/cpp/kotlin/convertors-kotlin.cc @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "koala-types.h" +#include "common-interop.h" +#include "interop-logging.h" + +typedef KInt (*KoalaCallbackDispatcher_t)(KInt id, KInt length, KSerializerBuffer buffer); +static KoalaCallbackDispatcher_t g_koalaKotlinCallbackDispatcher = nullptr; + +void callKoalaKotlinCallbackVoid(KInt id, KInt length, KSerializerBuffer buffer) { + g_koalaKotlinCallbackDispatcher(id, length, buffer); +} + +KInt callKoalaKotlinCallbackInt(KInt id, KInt length, KSerializerBuffer buffer) { + return g_koalaKotlinCallbackDispatcher(id, length, buffer); +} + +void impl_SetKoalaKotlinCallbackDispatcher(KNativePointer ptr) { + g_koalaKotlinCallbackDispatcher = reinterpret_cast(ptr); +} +KOALA_INTEROP_V1(SetKoalaKotlinCallbackDispatcher, KNativePointer) diff --git a/koala_tools/interop/src/cpp/kotlin/convertors-kotlin.h b/koala_tools/interop/src/cpp/kotlin/convertors-kotlin.h new file mode 100644 index 0000000000000000000000000000000000000000..d2ffceb39c4c403f6924f2e11ce4eba832d3dc80 --- /dev/null +++ b/koala_tools/interop/src/cpp/kotlin/convertors-kotlin.h @@ -0,0 +1,1429 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef CONVERTORS_KOTLIN_H +#define CONVERTORS_KOTLIN_H + +#ifdef KOALA_KOTLIN + +#include +#include +#include +#include + +#include "koala-types.h" +#include "interop-logging.h" +#include "interop-utils.h" + +struct KotlinInteropBuffer { + int32_t length; + void *data; +}; + +template +struct InteropTypeConverter { + using InteropType = T; + static T convertFrom(InteropType value) = delete; + static InteropType convertTo(T value) = delete; + static void release(InteropType value, T converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = uint8_t; + static inline KByte convertFrom(InteropType value) { + return value; + } + static inline InteropType convertTo(KByte value) { + return value; + } + static inline void release(InteropType value, KByte converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = int8_t; + static inline KBoolean convertFrom(InteropType value) { + return value; + } + static inline InteropType convertTo(KBoolean value) { + return value; + } + static inline void release(InteropType value, KBoolean converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = int32_t; + static inline KInt convertFrom(InteropType value) { + return value; + } + static inline InteropType convertTo(KInt value) { + return value; + } + static inline void release(InteropType value, KInt converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = uint32_t; + static inline KUInt convertFrom(InteropType value) { + return value; + } + static inline InteropType convertTo(KUInt value) { + return value; + } + static inline void release(InteropType value, KUInt converted) {} +}; + + +template<> +struct InteropTypeConverter { + using InteropType = float; + static inline KFloat convertFrom(InteropType value) { + return value; + } + static inline InteropType convertTo(KFloat value) { + return value; + } + static inline void release(InteropType value, KFloat converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = double; + static inline KDouble convertFrom(InteropType value) { + return value; + } + static inline InteropType convertTo(KDouble value) { + return value; + } + static inline void release(InteropType value, KDouble converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = int64_t; + static inline KLong convertFrom(InteropType value) { + return value; + } + static inline InteropType convertTo(KLong value) { + return value; + } + static inline void release(InteropType value, KLong converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = void*; + static inline KVMObjectHandle convertFrom(InteropType value) { + return reinterpret_cast(value); + } + static inline InteropType convertTo(KVMObjectHandle value) { + return reinterpret_cast(value); + } + static inline void release(InteropType value, KVMObjectHandle converted) {} +}; + +// Improve: do we really need this converter? +template<> +struct InteropTypeConverter { + using InteropType = KotlinInteropBuffer; + static inline KInteropBuffer convertFrom(InteropType value) { + KInteropBuffer result = { 0 }; + result.data = value.data; + result.length = value.length; + return result; + } + static inline InteropType convertTo(KInteropBuffer value) { + // Improve: can we use KInteropBuffer::data without copying? + void *data = nullptr; + if (value.length > 0) { + data = malloc(value.length); + if (!data) { + INTEROP_FATAL("Cannot allocate memory"); + } + interop_memcpy(data, value.length, value.data, value.length); + } + InteropType result = { + .length = static_cast(value.length), + .data = data, + }; + value.dispose(value.resourceId); + return result; + } + static inline void release(InteropType value, KInteropBuffer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = void*; + static KSerializerBuffer convertFrom(InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(KSerializerBuffer value) = delete; + static inline void release(InteropType value, KSerializerBuffer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = KotlinInteropBuffer; + static inline KInteropReturnBuffer convertFrom(InteropType value) = delete; + static inline InteropType convertTo(KInteropReturnBuffer value) { + InteropType result = { + .length = value.length, + .data = value.data, + }; + return result; + }; + static inline void release(InteropType value, KInteropReturnBuffer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = const char*; + static KStringPtr convertFrom(InteropType value) { + return KStringPtr(value); + } + static InteropType convertTo(const KStringPtr& value) { + // Improve: can we return KStringPtr::_value without copying? + if (!value.c_str()) { + return nullptr; + } + size_t bufferSize = value.length() + 1; + char *result = reinterpret_cast(malloc(bufferSize)); + if (!result) { + INTEROP_FATAL("Cannot allocate memory"); + } + interop_strcpy(result, bufferSize, value.c_str()); + return result; + } + static void release(InteropType value, const KStringPtr& converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = void*; + static KNativePointer convertFrom(InteropType value) { + return value; + } + static InteropType convertTo(KNativePointer value) { + return value; + } + static void release(InteropType value, KNativePointer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = KInt*; + static KInt* convertFrom(InteropType value) { + return value; + } + static InteropType convertTo(KInt* value) = delete; + static void release(InteropType value, KInt* converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = KFloat*; + static KFloat* convertFrom(InteropType value) { + return value; + } + static InteropType convertTo(KFloat* value) = delete; + static void release(InteropType value, KFloat* converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = KByte*; + static KByte* convertFrom(InteropType value) { + return value; + } + static InteropType convertTo(KByte* value) = delete; + static void release(InteropType value, KByte* converted) {} +}; + +template <> struct InteropTypeConverter { + using InteropType = double; + static KInteropNumber convertFrom(InteropType value) { + return KInteropNumber::fromDouble(value); + } + static InteropType convertTo(KInteropNumber value) { + return value.asDouble(); + } + static void release(InteropType value, KInteropNumber converted) {} +}; + +template +inline typename InteropTypeConverter::InteropType makeResult(Type value) { + return InteropTypeConverter::convertTo(value); +} + +template +inline Type getArgument(typename InteropTypeConverter::InteropType arg) { + return InteropTypeConverter::convertFrom(arg); +} + +template +inline void releaseArgument(typename InteropTypeConverter::InteropType arg, Type& data) { + InteropTypeConverter::release(arg, data); +} + +#define KOALA_QUOTE0(x) #x +#define KOALA_QUOTE(x) KOALA_QUOTE0(x) + +#define KOTLIN_EXPORT extern "C" + +#define KOTLIN_PREFIX(name) kotlin_##name + +#define KOALA_INTEROP_0(name, Ret) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)() { \ + KOALA_MAYBE_LOG(name) \ + return makeResult(impl_##name()); \ + } + +#define KOALA_INTEROP_1(name, Ret, P0) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + auto rv = makeResult(impl_##name(p0)); \ + releaseArgument(_p0, p0); \ + return rv; \ + } + +#define KOALA_INTEROP_2(name, Ret, P0, P1) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + auto rv = makeResult(impl_##name(p0, p1)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + return rv; \ + } + +#define KOALA_INTEROP_3(name, Ret, P0, P1, P2) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + auto rv = makeResult(impl_##name(p0, p1, p2)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + return rv; \ + } + +#define KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + auto rv = makeResult(impl_##name(p0, p1, p2, p3)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + return rv; \ + } + +#define KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + auto rv = makeResult(impl_##name(p0, p1, p2, p3, p4)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + return rv; \ + } + +#define KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + auto rv = makeResult(impl_##name(p0, p1, p2, p3, p4, p5)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + return rv; \ + } + +#define KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + auto rv = makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + return rv; \ + } + +#define KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + auto rv = makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + return rv; \ + } + +#define KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + auto rv = makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + return rv; \ + } + +#define KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + auto rv = makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + releaseArgument(_p9, p9); \ + return rv; \ + } + +#define KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + auto rv = makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + releaseArgument(_p9, p9); \ + releaseArgument(_p10, p10); \ + return rv; \ + } + +#define KOALA_INTEROP_12(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + auto rv = makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + releaseArgument(_p9, p9); \ + releaseArgument(_p10, p10); \ + releaseArgument(_p11, p11); \ + return rv; \ + } + +#define KOALA_INTEROP_13(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + auto rv = makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + releaseArgument(_p9, p9); \ + releaseArgument(_p10, p10); \ + releaseArgument(_p11, p11); \ + releaseArgument(_p12, p12); \ + return rv; \ + } + +#define KOALA_INTEROP_14(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + P13 p13 = getArgument(_p13); \ + auto rv = makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + releaseArgument(_p9, p9); \ + releaseArgument(_p10, p10); \ + releaseArgument(_p11, p11); \ + releaseArgument(_p12, p12); \ + releaseArgument(_p13, p13); \ + return rv; \ + } + +#define KOALA_INTEROP_V0(name) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)() { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(); \ + } + +#define KOALA_INTEROP_V1(name, P0) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + impl_##name(p0); \ + releaseArgument(_p0, p0); \ + } + +#define KOALA_INTEROP_V2(name, P0, P1) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + impl_##name(p0, p1); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + } + +#define KOALA_INTEROP_V3(name, P0, P1, P2) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + impl_##name(p0, p1, p2); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + } + +#define KOALA_INTEROP_V4(name, P0, P1, P2, P3) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + impl_##name(p0, p1, p2, p3); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ +} + +#define KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + impl_##name(p0, p1, p2, p3, p4); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ +} + +#define KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + impl_##name(p0, p1, p2, p3, p4, p5); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + } + +#define KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + } + +#define KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + } + +#define KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + } + +#define KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + releaseArgument(_p9, p9); \ +} + +#define KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + releaseArgument(_p9, p9); \ + releaseArgument(_p10, p10); \ + } + +#define KOALA_INTEROP_V12(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + releaseArgument(_p9, p9); \ + releaseArgument(_p10, p10); \ + releaseArgument(_p11, p11); \ +} + +#define KOALA_INTEROP_V13(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + releaseArgument(_p9, p9); \ + releaseArgument(_p10, p10); \ + releaseArgument(_p11, p11); \ + releaseArgument(_p12, p12); \ +} + +#define KOALA_INTEROP_V14(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + P13 p13 = getArgument(_p13); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + releaseArgument(_p9, p9); \ + releaseArgument(_p10, p10); \ + releaseArgument(_p11, p11); \ + releaseArgument(_p12, p12); \ + releaseArgument(_p13, p13); \ +} + +#define KOALA_INTEROP_V15(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13, \ + InteropTypeConverter::InteropType _p14) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + P13 p13 = getArgument(_p13); \ + P14 p14 = getArgument(_p14); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + releaseArgument(_p5, p5); \ + releaseArgument(_p6, p6); \ + releaseArgument(_p7, p7); \ + releaseArgument(_p8, p8); \ + releaseArgument(_p9, p9); \ + releaseArgument(_p10, p10); \ + releaseArgument(_p11, p11); \ + releaseArgument(_p12, p12); \ + releaseArgument(_p13, p13); \ + releaseArgument(_p14, p14); \ +} + +#define KOALA_INTEROP_CTX_0(name, Ret) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)() { \ + KOALA_MAYBE_LOG(name) \ + KVMContext ctx = (KVMContext)nullptr; \ + auto rv = makeResult(impl_##name(ctx)); \ + return rv; \ + } + +#define KOALA_INTEROP_CTX_1(name, Ret, P0) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + KVMContext ctx = (KVMContext)nullptr; \ + auto rv = makeResult(impl_##name(ctx, p0)); \ + releaseArgument(_p0, p0); \ + return rv; \ + } + +#define KOALA_INTEROP_CTX_2(name, Ret, P0, P1) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + KVMContext ctx = (KVMContext)nullptr; \ + auto rv = makeResult(impl_##name(ctx, p0, p1)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + return rv; \ + } + +#define KOALA_INTEROP_CTX_3(name, Ret, P0, P1, P2) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + KVMContext ctx = (KVMContext)nullptr; \ + auto rv = makeResult(impl_##name(ctx, p0, p1, p2)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + return rv; \ + } + +#define KOALA_INTEROP_CTX_4(name, Ret, P0, P1, P2, P3) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + KVMContext ctx = (KVMContext)nullptr; \ + auto rv = makeResult(impl_##name(ctx, p0, p1, p2, p3)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + return rv; \ + } + +#define KOALA_INTEROP_CTX_5(name, Ret, P0, P1, P2, P3, P4) \ + KOTLIN_EXPORT InteropTypeConverter::InteropType KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + KVMContext ctx = (KVMContext)nullptr; \ + auto rv = makeResult(impl_##name(ctx, p0, p1, p2, p3, p4)); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + return rv; \ + } + +#define KOALA_INTEROP_CTX_V0(name) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)() { \ + KOALA_MAYBE_LOG(name) \ + KVMContext ctx = (KVMContext)nullptr; \ + impl_##name(ctx); \ + } + +#define KOALA_INTEROP_CTX_V1(name, P0) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + KVMContext ctx = (KVMContext)nullptr; \ + impl_##name(ctx, p0); \ + releaseArgument(_p0, p0); \ + } + +#define KOALA_INTEROP_CTX_V2(name, P0, P1) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + KVMContext ctx = (KVMContext)nullptr; \ + impl_##name(ctx, p0, p1); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + } + +#define KOALA_INTEROP_CTX_V3(name, P0, P1, P2) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + KVMContext ctx = (KVMContext)nullptr; \ + impl_##name(ctx, p0, p1, p2); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + } + +#define KOALA_INTEROP_CTX_V4(name, P0, P1, P2, P3) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + KVMContext ctx = (KVMContext)nullptr; \ + impl_##name(ctx, p0, p1, p2, p3); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + } + +#define KOALA_INTEROP_CTX_V5(name, P0, P1, P2, P3, P4) \ + KOTLIN_EXPORT void KOTLIN_PREFIX(name)( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + KVMContext ctx = (KVMContext)nullptr; \ + impl_##name(ctx, p0, p1, p2, p3, p4); \ + releaseArgument(_p0, p0); \ + releaseArgument(_p1, p1); \ + releaseArgument(_p2, p2); \ + releaseArgument(_p3, p3); \ + releaseArgument(_p4, p4); \ + } + +#define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + +void callKoalaKotlinCallbackVoid(KInt id, KInt length, KSerializerBuffer buffer); +KInt callKoalaKotlinCallbackInt(KInt id, KInt length, KSerializerBuffer buffer); + +#define KOALA_INTEROP_CALL_VOID(venv, id, length, args) \ +{ \ + callKoalaKotlinCallbackVoid(id, length, reinterpret_cast(args)); \ +} + +#define KOALA_INTEROP_CALL_INT(venv, id, length, args) \ +{ \ + KInt result = callKoalaKotlinCallbackInt(id, length, reinterpret_cast(args)); \ + return result; \ +} + +#define KOALA_INTEROP_CALL_VOID_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_VOID(venv, id, (argc) * sizeof(int32_t), args) +#define KOALA_INTEROP_CALL_INT_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_INT(venv, id, (argc) * sizeof(int32_t), args) + +// Improve: +#define KOALA_INTEROP_THROW(vmContext, object, ...) \ + do { \ + KOALA_MAYBE_LOG("KOALA_INTEROP_THROW") \ + std::terminate(); \ + } while (0) + +// Improve: +#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ + do { \ + KOALA_MAYBE_LOG("KOALA_INTEROP_THROW_STRING") \ + KOALA_MAYBE_LOG(message) \ + std::terminate(); \ + } while (0) + +#endif // KOALA_KOTLIN + +#endif // CONVERTORS_KOTLIN_H \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/kotlin/kotlin-cinterop.h b/koala_tools/interop/src/cpp/kotlin/kotlin-cinterop.h new file mode 100644 index 0000000000000000000000000000000000000000..f5094f285347076ce55388c407708cf4dfb6c319 --- /dev/null +++ b/koala_tools/interop/src/cpp/kotlin/kotlin-cinterop.h @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This header is intended to be used only in Kotlin Native cinterop headers. +// Do not include it elsewhere. + +#ifndef _KOTLIN_CINTEROP_H +#define _KOTLIN_CINTEROP_H + +#include + +struct KotlinInteropBuffer { + int32_t length; + void *data; +}; + +// All type aliases below are defined using macros so as not to collide with their Kotlin counterparts. +#define KInteropReturnBuffer struct KotlinInteropBuffer +#define KInteropBuffer struct KotlinInteropBuffer + +#define KBoolean int8_t +#define KByte uint8_t +#define KShort int16_t +#define KUShort uint16_t +#define KInt int32_t +#define KUInt uint32_t +#define KLong int64_t +#define KULong uint64_t +#define KFloat float +#define KDouble double +#define KInteropNumber double +#define KStringPtr const char * +#define KSerializerBuffer void * +#define KNativePointer void * +#define KByteArray uint8_t * +#define KIntArray int32_t * +#define KFloatArray float * + +#define KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, ...) \ + Ret kotlin_##name(__VA_ARGS__); + +#define KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, ...) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, void, __VA_ARGS__) + +// NORMAL +#define KOALA_INTEROP_0(name, Ret) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret) +#define KOALA_INTEROP_1(name, Ret, P0) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, P0) +#define KOALA_INTEROP_2(name, Ret, P0, P1) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, P0, P1) +#define KOALA_INTEROP_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_FUNCTION_DECLARATION(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_V0(name) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name) +#define KOALA_INTEROP_V1(name, P0) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, P0) +#define KOALA_INTEROP_V2(name, P0, P1) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, P0, P1) +#define KOALA_INTEROP_V3(name, P0, P1, P2) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, P0, P1, P2) +#define KOALA_INTEROP_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, P0, P1, P2, P3) +#define KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_VOID_FUNCTION_DECLARATION(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + +// CTX +#define KOALA_INTEROP_CTX_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_CTX_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_CTX_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_CTX_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_CTX_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_CTX_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_CTX_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_CTX_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_CTX_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_CTX_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_CTX_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_CTX_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) + +// DIRECT +#define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + +#endif /* _KOTLIN_CINTEROP_H */ diff --git a/koala_tools/interop/src/cpp/kotlin/kotlin_vmloader_wrapper.h b/koala_tools/interop/src/cpp/kotlin/kotlin_vmloader_wrapper.h new file mode 100644 index 0000000000000000000000000000000000000000..980a5abdc3d5f875d6cecaae2c76654ffc3f8e41 --- /dev/null +++ b/koala_tools/interop/src/cpp/kotlin/kotlin_vmloader_wrapper.h @@ -0,0 +1,44 @@ +#ifndef KOTLIN_VMLOADER_WRAPPER_H +#define KOTLIN_VMLOADER_WRAPPER_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +typedef bool kotlin_KBoolean; +#else +typedef _Bool kotlin_KBoolean; +#endif +typedef unsigned short kotlin_KChar; +typedef signed char kotlin_KByte; +typedef short kotlin_KShort; +typedef int kotlin_KInt; +typedef long long kotlin_KLong; +typedef unsigned char kotlin_KUByte; +typedef unsigned short kotlin_KUShort; +typedef unsigned int kotlin_KUInt; +typedef unsigned long long kotlin_KULong; +typedef float kotlin_KFloat; +typedef double kotlin_KDouble; +typedef float __attribute__ ((__vector_size__ (16))) kotlin_KVector128; +typedef void* kotlin_KNativePtr; +struct kotlin_KType; +typedef struct kotlin_KType kotlin_KType; + +typedef struct { + kotlin_KNativePtr pinned; +} kotlin_kref_VMLoaderApplication; +typedef struct { + kotlin_KNativePtr pinned; +} kotlin_kref_PeerNodeStub; + +typedef kotlin_kref_VMLoaderApplication (*application_create_t)(const char* appUrl, const char* appParams); +typedef kotlin_KBoolean (*application_enter_t)(kotlin_kref_VMLoaderApplication app); +typedef kotlin_kref_PeerNodeStub (*application_start_t)(kotlin_kref_VMLoaderApplication app); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* KOTLIN_VMLOADER_WRAPPER_H */ diff --git a/koala_tools/interop/src/cpp/napi/convertors-napi.cc b/koala_tools/interop/src/cpp/napi/convertors-napi.cc new file mode 100644 index 0000000000000000000000000000000000000000..f0b49b53b35b33dc81a4dd3eb01f26ce3c7bf288 --- /dev/null +++ b/koala_tools/interop/src/cpp/napi/convertors-napi.cc @@ -0,0 +1,404 @@ +/* + * 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. + */ +#include +#include +#include +#include + +#include "interop-logging.h" +#undef KOALA_INTEROP_MODULE +#define KOALA_INTEROP_MODULE InteropNativeModule +#include "convertors-napi.h" + + +// Adapter for NAPI_MODULE +#define NODE_API_MODULE_ADAPTER(modname, regfunc) \ + static napi_value __napi_##regfunc(napi_env env, napi_value exports) { \ + return Napi::RegisterModule(env, exports, regfunc); \ + } \ + NAPI_MODULE(modname, __napi_##regfunc) + +napi_valuetype getValueTypeChecked(napi_env env, napi_value value) { + napi_valuetype type; + napi_status status = napi_typeof(env, value, &type); + KOALA_NAPI_THROW_IF_FAILED(env, status, napi_undefined); + return type; +} + +bool isTypedArray(napi_env env, napi_value value) { + bool result = false; + napi_status status = napi_is_typedarray(env, value, &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, false); + return result; +} + +KBoolean getBoolean(napi_env env, napi_value value) { + if (getValueTypeChecked(env, value) == napi_valuetype::napi_boolean) { + bool result = false; + napi_get_value_bool(env, value, &result); + return static_cast(result); + } + return static_cast(getInt32(env, value) != 0); +} + +KInt getInt32(napi_env env, napi_value value) { + if (getValueTypeChecked(env, value) != napi_valuetype::napi_number) { + napi_throw_error(env, nullptr, "Expected Number"); + return 0; + } + int32_t result = false; + napi_get_value_int32(env, value, &result); + return static_cast(result); +} + +KUInt getUInt32(napi_env env, napi_value value) { + if (getValueTypeChecked(env, value) != napi_valuetype::napi_number) { + napi_throw_error(env, nullptr, "Expected Number"); + return 0; + } + uint32_t result = false; + napi_get_value_uint32(env, value, &result); + return static_cast(result); +} + +KFloat getFloat32(napi_env env, napi_value value) { + if (getValueTypeChecked(env, value) != napi_valuetype::napi_number) { + napi_throw_error(env, nullptr, "Expected Number"); + return 0.0f; + } + double result = false; + napi_get_value_double(env, value, &result); + return static_cast(static_cast(result)); +} + +KDouble getFloat64(napi_env env, napi_value value) { + if (getValueTypeChecked(env, value) != napi_valuetype::napi_number) { + napi_throw_error(env, nullptr, "Expected Number"); + return 0.0; + } + double result = false; + napi_get_value_double(env, value, &result); + return static_cast(result); +} + +KStringPtr getString(napi_env env, napi_value value) { + KStringPtr result {}; + napi_valuetype valueType = getValueTypeChecked(env, value); + if (valueType == napi_valuetype::napi_null || valueType == napi_valuetype::napi_undefined) { + return result; + } + + if (valueType != napi_valuetype::napi_string) { + napi_throw_error(env, nullptr, "Expected String"); + return result; + } + + size_t length = 0; + napi_status status = napi_get_value_string_utf8(env, value, nullptr, 0, &length); + if (status != 0) return result; + result.resize(length); + status = napi_get_value_string_utf8(env, value, result.data(), length + 1, nullptr); + return result; +} + +KNativePointer getPointerSlow(napi_env env, napi_value value) { + napi_valuetype valueType = getValueTypeChecked(env, value); + if (valueType == napi_valuetype::napi_external) { + KNativePointer result = nullptr; + napi_status status = napi_get_value_external(env, value, &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, nullptr); + return result; + } + + if (valueType != napi_valuetype::napi_bigint) { + napi_throw_error(env, nullptr, "cannot be coerced to pointer"); + return nullptr; + } + + bool isWithinRange = true; + uint64_t ptrU64 = 0; + napi_status status = napi_get_value_bigint_uint64(env, value, &ptrU64, &isWithinRange); + KOALA_NAPI_THROW_IF_FAILED(env, status, nullptr); + if (!isWithinRange) { + napi_throw_error(env, nullptr, "cannot be coerced to uint64, value is too large"); + return nullptr; + } + return reinterpret_cast(ptrU64); +} + +KLong getInt64(napi_env env, napi_value value) { + if (getValueTypeChecked(env, value) == napi_valuetype::napi_number) { + int64_t result = 0; + if (napi_get_value_int64(env, value, &result) != napi_ok) { + napi_throw_error(env, nullptr, "cannot be coerced to int64"); + return -1; + } + return static_cast(result); + } + if (getValueTypeChecked(env, value) == napi_valuetype::napi_bigint) { + bool isWithinRange = true; + int64_t ptr64 = 0; + if (napi_get_value_bigint_int64(env, value, &ptr64, &isWithinRange) != napi_ok) { + napi_throw_error(env, nullptr, "cannot be coerced to int64"); + return -1; + } + if (!isWithinRange) { + napi_throw_error(env, nullptr, "cannot be coerced to int64, value is too large"); + return -1; + } + return static_cast(ptr64); + } + napi_throw_error(env, nullptr, "cannot be coerced to int64"); + return -1; +} + +KULong getUInt64(napi_env env, napi_value value) { + if (getValueTypeChecked(env, value) != napi_valuetype::napi_bigint) { + napi_throw_error(env, nullptr, "cannot be coerced to uint64"); + return -1; + } + + bool isWithinRange = true; + uint64_t ptr64 = 0; + napi_get_value_bigint_uint64(env, value, &ptr64, &isWithinRange); + if (!isWithinRange) { + napi_throw_error(env, nullptr, "cannot be coerced to uint64, value is too large"); + return -1; + } + return static_cast(ptr64); +} + +napi_value makeString(napi_env env, const KStringPtr& value) { + napi_value result; + napi_status status; + status = napi_create_string_utf8(env, value.isNull() ? "" : value.data(), value.length(), &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +napi_value makeString(napi_env env, const std::string& value) { + napi_value result; + napi_status status; + status = napi_create_string_utf8(env, value.c_str(), value.length(), &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +napi_value makeBoolean(napi_env env, int8_t value) { + napi_value result; + napi_status status; + status = napi_get_boolean(env, value != 0, &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +napi_value makeInt32(napi_env env, int32_t value) { + napi_value result; + napi_status status; + status = napi_create_int32(env, value, &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +napi_value makeUInt32(napi_env env, uint32_t value) { + napi_value result; + napi_status status; + status = napi_create_uint32(env, value, &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +napi_value makeInt64(napi_env env, int64_t value) { + napi_value result; + napi_status status; + status = napi_create_bigint_int64(env, value, &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +napi_value makeUInt64(napi_env env, uint64_t value) { + napi_value result; + napi_status status; + status = napi_create_bigint_uint64(env, value, &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +napi_value makeFloat32(napi_env env, float value) { + napi_value result; + napi_status status; + status = napi_create_double(env, value, &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +napi_value makeFloat64(napi_env env, double value) { + napi_value result; + napi_status status; + status = napi_create_double(env, value, &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +napi_value makePointer(napi_env env, void* value) { + napi_value result; + napi_status status; + status = napi_create_bigint_uint64(env, static_cast(reinterpret_cast(value)), &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +napi_value makeVoid(napi_env env) { + napi_value result; + napi_status status; + status = napi_get_undefined(env, &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +napi_value makeObject(napi_env env, napi_value object) { + napi_value result; + napi_status status; + status = napi_create_object(env, &result); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + return result; +} + +#if _MSC_VER >= 1932 // Visual Studio 2022 version 17.2+ +# pragma comment(linker, "/alternatename:__imp___std_init_once_complete=__imp_InitOnceComplete") +# pragma comment(linker, "/alternatename:__imp___std_init_once_begin_initialize=__imp_InitOnceBeginInitialize") +#endif + +Exports* Exports::getInstance() { + static Exports *instance = nullptr; + if (instance == nullptr) { + instance = new Exports(); + } + return instance; +} + +std::vector Exports::getModules() { + std::vector result; + for (auto it = implementations.begin(); it != implementations.end(); ++it) { + result.push_back(it->first); + } + return result; +} + +void Exports::addMethod(const char* module, const char* name, napi_type_t impl) { + auto it = implementations.find(module); + if (it == implementations.end()) { + it = implementations.insert(std::make_pair(module, std::vector>())).first; + } + it->second.push_back(std::make_pair(name, impl)); + +} + +const std::vector>& Exports::getMethods(const std::string& module) { + auto it = implementations.find(module); + if (it == implementations.end()) { + LOGE("Module %s is not registered", module.c_str()); + INTEROP_FATAL("Fatal error"); + } + return it->second; +} + +// +// Callback dispatcher +// +// Improve: Should we get rid of explicit Node_* declrations and hide the naming convention behind the macro definitions? + +static napi_ref g_koalaNapiCallbackDispatcher = nullptr; + +// Improve: shall we pass name in globalThis instead of object reference? +napi_value Node_SetCallbackDispatcher(napi_env env, napi_callback_info cbinfo) { + fprintf(stderr, "Node_SetCallbackDispatcher!\n"); + + CallbackInfo info(env, cbinfo); + napi_value dispatcher = info[0]; + napi_value result = makeVoid(env); + napi_status status = napi_create_reference(env, dispatcher, 1, &g_koalaNapiCallbackDispatcher); + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + + return result; +} +MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, SetCallbackDispatcher) + +napi_value Node_CleanCallbackDispatcher(napi_env env, napi_callback_info cbinfo) { + napi_value result = makeVoid(env); + if (g_koalaNapiCallbackDispatcher) { + napi_status status = napi_delete_reference(env, g_koalaNapiCallbackDispatcher); + g_koalaNapiCallbackDispatcher = nullptr; + KOALA_NAPI_THROW_IF_FAILED(env, status, result); + } + return result; +} +MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, CleanCallbackDispatcher) + +napi_value getKoalaNapiCallbackDispatcher(napi_env env) { + if (!g_koalaNapiCallbackDispatcher) { + abort(); + } + napi_value value; + napi_status status = napi_get_reference_value(env, g_koalaNapiCallbackDispatcher, &value); + KOALA_NAPI_THROW_IF_FAILED(env, status, makeVoid(env)); + return value; +} + +// +// Module initialization +// + +using ModuleRegisterCallback = napi_value (*)(napi_env env, napi_value exports); + +/** + * Sets a new callback and returns its previous value. + */ +ModuleRegisterCallback ProvideModuleRegisterCallback(ModuleRegisterCallback value = nullptr) { + static const ModuleRegisterCallback DEFAULT_CB = [](napi_env env, napi_value exports) { return exports; }; + static ModuleRegisterCallback curCallback = DEFAULT_CB; + + ModuleRegisterCallback prevCallback = curCallback; + curCallback = value ? value : DEFAULT_CB; + return prevCallback; +} + +static constexpr bool splitModules = true; + +static napi_value InitModule(napi_env env, napi_value exports) { + // LOG("InitModule: " QUOTE(INTEROP_LIBRARY_NAME)); + Exports* inst = Exports::getInstance(); + napi_status status; + napi_value target = exports; + for (const auto &module : inst->getModules()) { + if (splitModules) { + status = napi_create_object(env, &target); + KOALA_NAPI_THROW_IF_FAILED(env, status, exports); + status = napi_set_named_property(env, exports, module.c_str(), target); + KOALA_NAPI_THROW_IF_FAILED(env, status, exports); + } + + for (const auto &impl : inst->getMethods(module)) { + napi_value implFunc; + status = napi_create_function(env, impl.first.c_str(), NAPI_AUTO_LENGTH, impl.second, nullptr, &implFunc); + KOALA_NAPI_THROW_IF_FAILED(env, status, exports); + status = napi_set_named_property(env, target, impl.first.c_str(), implFunc); + KOALA_NAPI_THROW_IF_FAILED(env, status, exports); + } + } + return ProvideModuleRegisterCallback()(env, exports); +} + +NAPI_MODULE(INTEROP_LIBRARY_NAME, InitModule) diff --git a/koala_tools/interop/src/cpp/napi/convertors-napi.h b/koala_tools/interop/src/cpp/napi/convertors-napi.h new file mode 100644 index 0000000000000000000000000000000000000000..d1551ad4addffb7f2b741f09d1f6066827865af1 --- /dev/null +++ b/koala_tools/interop/src/cpp/napi/convertors-napi.h @@ -0,0 +1,1440 @@ +/* + * 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. + */ + +#ifndef _CONVERTORS_NAPI_H_ +#define _CONVERTORS_NAPI_H_ + +#ifdef KOALA_NAPI + +#include +#include +#include + +#ifndef KOALA_NAPI_OHOS +#include +#else +#include +#include +#endif +#include "koala-types.h" +#include "interop-types.h" + +// Improve: switch to more generic convertors eventually. +template +struct InteropTypeConverter { + using InteropType = T; + static T convertFrom(napi_env env, InteropType value) { return value; } + static InteropType convertTo(napi_env env, T value) { return value; } + static void release(napi_env env, InteropType value, T converted) {} +}; + +template +inline typename InteropTypeConverter::InteropType makeResult(napi_env env, Type value) { + return InteropTypeConverter::convertTo(env, value); +} + +template +inline Type getArgument(napi_env env, typename InteropTypeConverter::InteropType arg) { + return InteropTypeConverter::convertFrom(env, arg); +} + +template +inline void releaseArgument(napi_env env, typename InteropTypeConverter::InteropType arg, Type data) { + InteropTypeConverter::release(env, arg, data); +} + + +napi_value makeString(napi_env env, KStringPtr value); +napi_value makeString(napi_env env, const std::string& value); +napi_value makeBoolean(napi_env env, KBoolean value); +napi_value makeInt32(napi_env env, int32_t value); +napi_value makeUInt32(napi_env env, uint32_t value); +napi_value makeInt64(napi_env env, int64_t value); +napi_value makeUInt64(napi_env env, uint64_t value); +napi_value makeFloat32(napi_env env, float value); +napi_value makeFloat64(napi_env env, double value); +napi_value makePointer(napi_env env, void* value); +napi_value makeVoid(napi_env env); + +void* getPointerSlow(napi_env env, napi_value value); + +inline void* getPointer(napi_env env, napi_value value) { + bool isWithinRange = true; + uint64_t ptrU64 = 0; + napi_status status = napi_get_value_bigint_uint64(env, value, &ptrU64, &isWithinRange); + if (status != 0 || !isWithinRange) + return getPointerSlow(env, value); + else + return reinterpret_cast(ptrU64); +} +void* getSerializerBufferPointer(napi_env env, napi_value value); + +template<> +struct InteropTypeConverter { + using InteropType = napi_value; + static KInteropBuffer convertFrom(napi_env env, InteropType value) { + KInteropBuffer result {}; + bool isArrayBuffer = false; + napi_is_arraybuffer(env, value, &isArrayBuffer); + if (isArrayBuffer) { + napi_get_arraybuffer_info(env, value, &result.data, reinterpret_cast(&result.length)); + } else { + bool isDataView = false; + napi_is_dataview(env, value, &isDataView); + if (isDataView) { + napi_get_dataview_info(env, value, reinterpret_cast(&result.length), &result.data, nullptr, nullptr); + } + } + return result; + } + static InteropType convertTo(napi_env env, KInteropBuffer value) { + KInteropBuffer* copy = new KInteropBuffer(value); + napi_value result; + napi_status status = napi_create_external_arraybuffer( + env, + value.data, + value.length, + [](napi_env env, void* finalize_data, void* finalize_hint) { + KInteropBuffer* buffer = reinterpret_cast(finalize_hint); + buffer->dispose(buffer->resourceId); + delete buffer; + }, + (void*)copy, + &result + ); + if (status != napi_ok) { + // do smth here + } + return result; + }; + static void release(napi_env env, InteropType value, KInteropBuffer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = napi_value; + static KStringPtr convertFrom(napi_env env, InteropType value) { + if (value == nullptr) return KStringPtr(); + KStringPtr result; + size_t length = 0; + napi_status status = napi_get_value_string_utf8(env, value, nullptr, 0, &length); + if (status != 0) return result; + result.resize(length); + status = napi_get_value_string_utf8(env, value, result.data(), length + 1, nullptr); + return result; + } + static InteropType convertTo(napi_env env, const KStringPtr& value) { + napi_value result; + napi_create_string_utf8(env, value.c_str(), value.length(), &result); + return result; + } + static void release(napi_env env, InteropType value, const KStringPtr& converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = napi_value; + static KInteropNumber convertFrom(napi_env env, InteropType interopValue) { + double value = 0.0; + napi_get_value_double(env, interopValue, &value); + return KInteropNumber::fromDouble(value); + } + static InteropType convertTo(napi_env env, KInteropNumber value) { + napi_value result; + napi_create_double(env, value.asDouble(), &result); + return result; + } + static void release(napi_env env, InteropType value, KInteropNumber converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = napi_value; + static KSerializerBuffer convertFrom(napi_env env, InteropType value) { + return (KSerializerBuffer)getSerializerBufferPointer(env, value); // Improve: we are receiving Uint8Array from the native side + } + static InteropType convertTo(napi_env env, KSerializerBuffer value) { + return makePointer(env, value); + } + static void release(napi_env env, InteropType value, KSerializerBuffer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = napi_value; + static inline KVMObjectHandle convertFrom(napi_env env, InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(napi_env env, KVMObjectHandle value) { + return reinterpret_cast(value); + } + static inline void release(napi_env env, InteropType value, KVMObjectHandle converted) { + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = napi_value; + static inline KInteropReturnBuffer convertFrom(napi_env env, InteropType value) = delete; + static void disposer(napi_env env, void* data, void* hint) { + KInteropReturnBuffer* bufferCopy = (KInteropReturnBuffer*)hint; + bufferCopy->dispose(bufferCopy->data, bufferCopy->length); + delete bufferCopy; + } + static InteropType convertTo(napi_env env, KInteropReturnBuffer value) { + napi_value result = nullptr; + napi_value arrayBuffer = nullptr; + auto clone = new KInteropReturnBuffer(); + *clone = value; + napi_create_external_arraybuffer(env, value.data, value.length, disposer, clone, &arrayBuffer); + napi_create_typedarray(env, napi_uint8_array, value.length, arrayBuffer, 0, &result); + return result; + } + static inline void release(napi_env env, InteropType value, const KInteropReturnBuffer& converted) = delete; +}; + + +#define KOALA_INTEROP_THROW(vmContext, object, ...) \ + do { \ + napi_env env = (napi_env)vmContext; \ + napi_handle_scope scope = nullptr; \ + napi_open_handle_scope(env, &scope); \ + napi_throw(env, object); \ + napi_close_handle_scope(env, scope); \ + return __VA_ARGS__; \ + } while (0) + +#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ + do { \ + napi_env env = (napi_env)vmContext; \ + napi_handle_scope scope = nullptr; \ + napi_open_handle_scope(env, &scope); \ + napi_throw_error(env, nullptr, message); \ + napi_close_handle_scope(env, scope); \ + return __VA_ARGS__; \ + } while (0) + +#define NAPI_ASSERT_INDEX(info, index, result) \ + do { \ + if (static_cast(index) >= info.Length()) { \ + napi_throw_error(info.Env(), nullptr, "No such element");\ + return result; \ + } \ + } while (0) + +// Helpers from node-addon-api +#define KOALA_NAPI_THROW_IF_FAILED(env, status, ...) \ + if ((status) != napi_ok) { \ + const napi_extended_error_info* errorInfo; \ + napi_get_last_error_info(env, &errorInfo); \ + napi_throw_error(env, nullptr, errorInfo->error_message); \ + return __VA_ARGS__; \ + } +#define KOALA_NAPI_THROW_IF_FAILED_VOID(env, status) \ + if ((status) != napi_ok) { \ + const napi_extended_error_info* errorInfo; \ + napi_get_last_error_info(env, &errorInfo); \ + napi_throw_error(env, nullptr, errorInfo->error_message); \ + return; \ + } + +class CallbackInfo { +public: + CallbackInfo(napi_env env, napi_callback_info info) : _env(env) { + size_t size = 0; + napi_status status; + status = napi_get_cb_info(env, info, &size, nullptr, nullptr, nullptr); + KOALA_NAPI_THROW_IF_FAILED_VOID(env, status); + if (size > 0) { + args.resize(size); // Improve: statically allocate small array for common case with few arguments passed + status = napi_get_cb_info(env, info, &size, args.data(), nullptr, nullptr); + KOALA_NAPI_THROW_IF_FAILED_VOID(env, status); + } + } + + napi_value operator[](size_t idx) const { + if (idx >= Length()) { + napi_value result; + napi_get_undefined(_env, &result); + return result; + } + return args[idx]; + } + + napi_env Env() const { + return _env; + } + + size_t Length() const { + return args.size(); + } +private: + napi_env _env; + // napi_callback_info _info; + std::vector args; +}; + +template +inline napi_typedarray_type getNapiType() = delete; + +template <> +inline napi_typedarray_type getNapiType() { + return napi_float32_array; +} + +template <> +inline napi_typedarray_type getNapiType() { + return napi_float64_array; +} + +template <> +inline napi_typedarray_type getNapiType() { + return napi_int8_array; +} + +template <> +inline napi_typedarray_type getNapiType() { + return napi_uint8_array; +} + +template <> +inline napi_typedarray_type getNapiType() { + return napi_int16_array; +} + +template <> +inline napi_typedarray_type getNapiType() { + return napi_uint16_array; +} + +template <> +inline napi_typedarray_type getNapiType() { + return napi_int32_array; +} + +template <> +inline napi_typedarray_type getNapiType() { + return napi_uint32_array; +} + +template <> +inline napi_typedarray_type getNapiType() { + return napi_biguint64_array; +} + +napi_valuetype getValueTypeChecked(napi_env env, napi_value value); +bool isTypedArray(napi_env env, napi_value value); + +template +inline ElemType* getTypedElements(napi_env env, napi_value value) { + napi_valuetype valueType = getValueTypeChecked(env, value); + if (valueType == napi_null) { + return nullptr; + } + if (!isTypedArray(env, value)) { + napi_throw_error(env, nullptr, "Expected TypedArray"); + return nullptr; + } + napi_value arrayBuffer; + void* data = nullptr; + size_t byteLength; + size_t byteOffset; + napi_typedarray_type type; + napi_status status = napi_get_typedarray_info(env, + value, + &type, + &byteLength, + &data, + &arrayBuffer, + &byteOffset); + KOALA_NAPI_THROW_IF_FAILED(env, status, nullptr); + if (type != getNapiType()) { + printf("Array type mismatch. Expected %d got %d\n", getNapiType(), type); + napi_throw_error(env, nullptr, "Array type mismatch"); + return nullptr; + } + return reinterpret_cast(data); +} + +template +inline ElemType* getTypedElements(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, nullptr); + return getTypedElements(info.Env(), info[index]); +} + +inline uint8_t* getUInt8Elements(const CallbackInfo& info, int index) { + return getTypedElements(info, index); +} + +inline int8_t* getInt8Elements(const CallbackInfo& info, int index) { + return getTypedElements(info, index); +} + +inline uint16_t* getUInt16Elements(const CallbackInfo& info, int index) { + return getTypedElements(info, index); +} + +inline int16_t* getInt16Elements(const CallbackInfo& info, int index) { + return getTypedElements(info, index); +} + +inline uint32_t* getUInt32Elements(const CallbackInfo& info, int index) { + return getTypedElements(info, index); +} + +inline uint32_t* getUInt32Elements(napi_env env, napi_value value) { + return getTypedElements(env, value); +} + +inline int32_t* getInt32Elements(const CallbackInfo& info, int index) { + return getTypedElements(info, index); +} + +inline float* getFloat32Elements(const CallbackInfo& info, int index) { + return getTypedElements(info, index); +} + +inline double* getFloat64Elements(const CallbackInfo& info, int index) { + return getTypedElements(info, index); +} + +inline KNativePointer* getPointerElements(const CallbackInfo& info, int index) { + return getTypedElements(info, index); +} + +inline void* getSerializerBufferPointer(napi_env env, napi_value value) { + return getTypedElements(env, value); +} + +KInt getInt32(napi_env env, napi_value value); +inline int32_t getInt32(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, 0); + return getInt32(info.Env(), info[index]); +} +KUInt getUInt32(napi_env env, napi_value value); +inline uint32_t getUInt32(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, 0); + return getUInt32(info.Env(), info[index]); +} +KFloat getFloat32(napi_env env, napi_value value); +inline float getFloat32(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, 0.0f); + return getFloat32(info.Env(), info[index]); +} +KDouble getFloat64(napi_env env, napi_value value); +inline KDouble getFloat64(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, 0.0); + return getFloat64(info.Env(), info[index]); +} +KStringPtr getString(napi_env env, napi_value value); +inline KStringPtr getString(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, KStringPtr()); + return getString(info.Env(), info[index]); +} +inline void* getPointer(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, nullptr); + return getPointer(info.Env(), info[index]); +} +KULong getUInt64(napi_env env, napi_value value); +inline KULong getUInt64(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, 0); + return getUInt64(info.Env(), info[index]); +} +KLong getInt64(napi_env env, napi_value value); +inline KLong getInt64(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, 0); + return getInt64(info.Env(), info[index]); +} +KBoolean getBoolean(napi_env env, napi_value value); +inline KBoolean getBoolean(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, false); + return getBoolean(info.Env(), info[index]); +} +template +inline Type getArgument(const CallbackInfo& info, int index) = delete; + +template <> +inline KBoolean getArgument(const CallbackInfo& info, int index) { + return getBoolean(info, index); +} + +template <> +inline KUInt getArgument(const CallbackInfo& info, int index) { + return getUInt32(info, index); +} + +template <> +inline KInt getArgument(const CallbackInfo& info, int index) { + return getInt32(info, index); +} + +template <> +inline KInteropNumber getArgument(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, { 0 }); + return getArgument(info.Env(), info[index]); +} + +template <> +inline KSerializerBuffer getArgument(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, nullptr); + return getArgument(info.Env(), info[index]); +} + +template <> +inline KInteropBuffer getArgument(const CallbackInfo& info, int index) { + NAPI_ASSERT_INDEX(info, index, {}); + return getArgument((napi_env)info.Env(), (napi_value)info[index]); +} + +template <> +inline KFloat getArgument(const CallbackInfo& info, int index) { + return getFloat32(info, index); +} + +template <> +inline KDouble getArgument(const CallbackInfo& info, int index) { + return getFloat64(info, index); +} + +template <> +inline KNativePointer getArgument(const CallbackInfo& info, int index) { + return getPointer(info, index); +} + +template <> +inline KLong getArgument(const CallbackInfo& info, int index) { + return getInt64(info, index); +} + +template <> +inline KULong getArgument(const CallbackInfo& info, int index) { + return getUInt64(info, index); +} + +template <> +inline KNativePointerArray getArgument(const CallbackInfo& info, int index) { + return getPointerElements(info, index); +} + +template <> +inline uint8_t* getArgument(const CallbackInfo& info, int index) { + return getUInt8Elements(info, index); +} + +template <> +inline const uint8_t* getArgument(const CallbackInfo& info, int index) { + return getUInt8Elements(info, index); +} + +template <> +inline int8_t* getArgument(const CallbackInfo& info, int index) { + return getInt8Elements(info, index); +} + +template <> +inline int16_t* getArgument(const CallbackInfo& info, int index) { + return getInt16Elements(info, index); +} + +template <> +inline uint16_t* getArgument(const CallbackInfo& info, int index) { + return getUInt16Elements(info, index); +} + +template <> +inline int32_t* getArgument(const CallbackInfo& info, int index) { + return getInt32Elements(info, index); +} + +template <> +inline uint32_t* getArgument(const CallbackInfo& info, int index) { + return getUInt32Elements(info, index); +} + +template <> +inline float* getArgument(const CallbackInfo& info, int index) { + return getFloat32Elements(info, index); +} + +template <> +inline KStringPtr getArgument(const CallbackInfo& info, int index) { + return getString(info, index); +} + +inline napi_value makeVoid(const CallbackInfo& info) { + return makeVoid(info.Env()); +} + +template +inline napi_value makeResult(const CallbackInfo& info, Type value) = delete; + +template <> +inline napi_value makeResult(const CallbackInfo& info, KBoolean value) { + return makeBoolean(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, int32_t value) { + return makeInt32(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, uint32_t value) { + return makeUInt32(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, int64_t value) { + return makeInt64(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, uint64_t value) { + return makeUInt64(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, float value) { + return makeFloat32(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, double value) { + return makeFloat64(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, KNativePointer value) { + return makePointer(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, KVMObjectHandle value) { + return InteropTypeConverter::convertTo(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, KStringPtr value) { + return InteropTypeConverter::convertTo(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, KInteropBuffer value) { + return InteropTypeConverter::convertTo(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, KInteropReturnBuffer value) { + return InteropTypeConverter::convertTo(info.Env(), value); +} + +template <> +inline napi_value makeResult(const CallbackInfo& info, KInteropNumber value) { + return InteropTypeConverter::convertTo(info.Env(), value); +} + +typedef napi_value (*napi_type_t)(napi_env, napi_callback_info); + +class Exports { + std::unordered_map>> implementations; + +public: + static Exports* getInstance(); + + std::vector getModules(); + void addMethod(const char* module, const char* name, napi_type_t impl); + const std::vector>& getMethods(const std::string& module); +}; + +#define __QUOTE(x) #x +#define QUOTE(x) __QUOTE(x) + +#ifdef _MSC_VER +#define MAKE_NODE_EXPORT(module, name) \ + static void __init_##name() { \ + Exports::getInstance()->addMethod(QUOTE(module), "_"#name, Node_##name); \ + } \ + namespace { \ + struct __Init_##name { \ + __Init_##name() { __init_##name(); } \ + } __Init_##name##_v; \ + } +#else +#define MAKE_NODE_EXPORT(module, name) \ + __attribute__((constructor)) \ + static void __init_##name() { \ + Exports::getInstance()->addMethod(QUOTE(module), "_"#name, Node_##name); \ + } +#endif + +#ifndef KOALA_INTEROP_MODULE +#error KOALA_INTEROP_MODULE is undefined +#endif + +#define MAKE_INTEROP_NODE_EXPORT(name) MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_0(name, Ret) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + return makeResult(info, impl_##name()); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_1(name, Ret, P0) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + return makeResult(info, impl_##name(p0)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_2(name, Ret, P0, P1) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + return makeResult(info, impl_##name(p0, p1)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_3(name, Ret, P0, P1, P2) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + return makeResult(info, impl_##name(p0, p1, p2)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + return makeResult(info, impl_##name(p0, p1, p2, p3)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + return makeResult(info, impl_##name(p0, p1, p2, p3, p4)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + return makeResult(info, impl_##name(p0, p1, p2, p3, p4, p5)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + return makeResult(info, impl_##name(p0, p1, p2, p3, p4, p5, p6)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + return makeResult(info, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + return makeResult(info, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + P9 p9 = getArgument(info, 9); \ + return makeResult(info, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + P9 p9 = getArgument(info, 9); \ + P10 p10 = getArgument(info, 10); \ + return makeResult(info, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_12(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + P9 p9 = getArgument(info, 9); \ + P10 p10 = getArgument(info, 10); \ + P11 p11 = getArgument(info, 11); \ + return makeResult(info, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_13(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + P9 p9 = getArgument(info, 9); \ + P10 p10 = getArgument(info, 10); \ + P11 p11 = getArgument(info, 11); \ + P12 p12 = getArgument(info, 12); \ + return makeResult(info, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_14(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + P9 p9 = getArgument(info, 9); \ + P10 p10 = getArgument(info, 10); \ + P11 p11 = getArgument(info, 11); \ + P12 p12 = getArgument(info, 12); \ + P13 p13 = getArgument(info, 13); \ + return makeResult(info, impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V0(name) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + impl_##name(); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V1(name, P0) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + impl_##name(p0); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V2(name, P0, P1) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + impl_##name(p0, p1); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V3(name, P0, P1, P2) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + impl_##name(p0, p1, p2); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V4(name, P0, P1, P2, P3) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + impl_##name(p0, p1, p2, p3); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + impl_##name(p0, p1, p2, p3, p4); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + impl_##name(p0, p1, p2, p3, p4, p5); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(impl_##name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + P9 p9 = getArgument(info, 9); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(impl_##name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + P9 p9 = getArgument(info, 9); \ + P10 p10 = getArgument(info, 10); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V12(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(impl_##name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + P9 p9 = getArgument(info, 9); \ + P10 p10 = getArgument(info, 10); \ + P11 p11 = getArgument(info, 11); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V13(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(impl_##name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + P9 p9 = getArgument(info, 9); \ + P10 p10 = getArgument(info, 10); \ + P11 p11 = getArgument(info, 11); \ + P12 p12 = getArgument(info, 12); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V14(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + P9 p9 = getArgument(info, 9); \ + P10 p10 = getArgument(info, 10); \ + P11 p11 = getArgument(info, 11); \ + P12 p12 = getArgument(info, 12); \ + P13 p13 = getArgument(info, 13); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_V15(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + P5 p5 = getArgument(info, 5); \ + P6 p6 = getArgument(info, 6); \ + P7 p7 = getArgument(info, 7); \ + P8 p8 = getArgument(info, 8); \ + P9 p9 = getArgument(info, 9); \ + P10 p10 = getArgument(info, 10); \ + P11 p11 = getArgument(info, 11); \ + P12 p12 = getArgument(info, 12); \ + P13 p13 = getArgument(info, 13); \ + P14 p14 = getArgument(info, 14); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_CTX_0(name, Ret) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(impl_##name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + return makeResult(info, impl_##name(ctx)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_CTX_1(name, Ret, P0) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(impl_##name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + P0 p0 = getArgument(info, 0); \ + return makeResult(info, impl_##name(ctx, p0)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_CTX_2(name, Ret, P0, P1) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + return makeResult(info, impl_##name(ctx, p0, p1)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_CTX_3(name, Ret, P0, P1, P2) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + return makeResult(info, impl_##name(ctx, p0, p1, p2)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_CTX_4(name, Ret, P0, P1, P2, P3) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + return makeResult(info, impl_##name(ctx, p0, p1, p2, p3)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_CTX_5(name, Ret, P0, P1, P2, P3, P4) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + return makeResult(info, impl_##name(ctx, p0, p1, p2, p3, p4)); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_CTX_V0(name) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + impl_##name(ctx); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + + +#define KOALA_INTEROP_CTX_V1(name, P0) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + P0 p0 = getArgument(info, 0); \ + impl_##name(ctx, p0); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_CTX_V2(name, P0, P1) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + impl_##name(ctx, p0, p1); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_CTX_V3(name, P0, P1, P2) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + impl_##name(ctx, p0, p1, p2); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_CTX_V4(name, P0, P1, P2, P3) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + impl_##name(ctx, p0, p1, p2, p3); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define KOALA_INTEROP_CTX_V5(name, P0, P1, P2, P3, P4) \ + napi_value Node_##name(napi_env env, napi_callback_info cbinfo) { \ + KOALA_MAYBE_LOG(name) \ + CallbackInfo info(env, cbinfo); \ + KVMContext ctx = reinterpret_cast((napi_env)info.Env()); \ + P0 p0 = getArgument(info, 0); \ + P1 p1 = getArgument(info, 1); \ + P2 p2 = getArgument(info, 2); \ + P3 p3 = getArgument(info, 3); \ + P4 p4 = getArgument(info, 4); \ + impl_##name(ctx, p0, p1, p2, p3, p4); \ + return makeVoid(info); \ + } \ + MAKE_NODE_EXPORT(KOALA_INTEROP_MODULE, name) + +#define NODEJS_GET_AND_THROW_LAST_ERROR(env) \ + do { \ + const napi_extended_error_info *error_info; \ + napi_get_last_error_info((env), &error_info); \ + bool is_pending; \ + napi_is_exception_pending((env), &is_pending); \ + /* If an exception is already pending, don't rethrow it */ \ + if (!is_pending) { \ + const char* error_message = error_info->error_message != NULL ? \ + error_info->error_message : \ + "empty error message"; \ + napi_throw_error((env), NULL, error_message); \ + } \ + } while (0) + + #define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + +napi_value getKoalaNapiCallbackDispatcher(napi_env env); +// Improve: can/shall we cache bridge reference? + +#define KOALA_INTEROP_CALL_VOID(venv, id, length, args) \ +{ \ + napi_env env = reinterpret_cast(venv); \ + napi_value bridge = getKoalaNapiCallbackDispatcher(env), \ + global = nullptr, return_val = nullptr; \ + napi_handle_scope scope = nullptr; \ + napi_open_handle_scope(env, &scope); \ + napi_status status = napi_get_global(env, &global); \ + napi_value node_args[3]; \ + napi_create_int32(env, id, &node_args[0]); \ + napi_value buffer = nullptr; \ + napi_create_external_arraybuffer(env, \ + args, length, \ + [](napi_env, void* data, void* hint) {}, nullptr, &buffer); \ + napi_create_typedarray(env, napi_uint8_array, length, buffer, 0, &node_args[1]); \ + napi_create_int32(env, length, &node_args[2]); \ + status = napi_call_function(env, global, bridge, 3, node_args, &return_val); \ + if (status != napi_ok) NODEJS_GET_AND_THROW_LAST_ERROR((env)); \ + napi_close_handle_scope(env, scope); \ +} + +#define KOALA_INTEROP_CALL_INT(venv, id, length, args) \ +{ \ + napi_env env = reinterpret_cast(venv); \ + napi_value bridge = getKoalaNapiCallbackDispatcher(env), \ + global = nullptr, return_val = nullptr; \ + napi_handle_scope scope = nullptr; \ + napi_open_handle_scope(env, &scope); \ + napi_status status = napi_get_global(env, &global); \ + napi_value node_args[3]; \ + napi_create_int32(env, id, &node_args[0]); \ + napi_value buffer = nullptr; \ + napi_create_external_arraybuffer(env, \ + args, length, \ + [](napi_env, void* data, void* hint) {}, nullptr, &buffer); \ + napi_create_typedarray(env, napi_uint8_array, length, buffer, 0, &node_args[1]); \ + napi_create_int32(env, length, &node_args[2]); \ + status = napi_call_function(env, global, bridge, 3, node_args, &return_val); \ + if (status != napi_ok) NODEJS_GET_AND_THROW_LAST_ERROR((env)); \ + int result; \ + status = napi_get_value_int32(env, return_val, &result); \ + napi_close_handle_scope(env, scope); \ + return result; \ +} + +#define KOALA_INTEROP_CALL_VOID_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_VOID(venv, id, (argc) * sizeof(int32_t), args) +#define KOALA_INTEROP_CALL_INT_INTS32(venv, id, argc, args) KOALA_INTEROP_CALL_INT(venv, id, (argc) * sizeof(int32_t), args) + +#endif // KOALA_NAPI + +#endif // _CONVERTORS_NAPI_H_ \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/napi/win-dynamic-node.cc b/koala_tools/interop/src/cpp/napi/win-dynamic-node.cc new file mode 100644 index 0000000000000000000000000000000000000000..6709d3c3465e9c5d6e40bcc502586a17ea80703b --- /dev/null +++ b/koala_tools/interop/src/cpp/napi/win-dynamic-node.cc @@ -0,0 +1,688 @@ +/* + * Copyright (c) 2024 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. + */ + +#ifdef __cplusplus + #include + #include +#else + #include + #include +#endif + +#include +#include "node_api.h" + +#define NAPI_CDECL __cdecl + +#define NAPI_FUNCTIONS(op) \ + op(napi_module_register) \ + op(napi_create_function) \ + op(napi_set_named_property) \ + op(napi_create_string_utf8) \ + op(napi_add_env_cleanup_hook) \ + op(napi_get_last_error_info) \ + op(napi_get_value_bigint_int64) \ + op(napi_get_value_bigint_uint64) \ + op(napi_create_object) \ + op(napi_get_arraybuffer_info) \ + op(napi_create_bigint_uint64) \ + op(napi_is_typedarray) \ + op(napi_add_finalizer) \ + op(napi_get_typedarray_info) \ + op(napi_set_property) \ + op(napi_get_value_bool) \ + op(napi_coerce_to_string) \ + op(napi_get_value_uint32) \ + op(napi_get_value_int32) \ + op(napi_throw) \ + op(napi_get_cb_info) \ + op(napi_create_error) \ + op(napi_get_value_string_utf8) \ + op(napi_define_properties) \ + op(napi_delete_reference) \ + op(napi_get_reference_value) \ + op(napi_open_handle_scope) \ + op(napi_close_handle_scope) \ + op(napi_open_escapable_handle_scope) \ + op(napi_close_escapable_handle_scope) \ + op(napi_is_exception_pending) \ + op(napi_create_type_error) \ + op(napi_escape_handle) \ + op(napi_get_and_clear_last_exception) \ + op(napi_fatal_error) \ + op(napi_create_double) \ + op(napi_typeof) \ + op(napi_get_property) \ + op(napi_get_named_property) \ + op(napi_create_reference) \ + op(napi_get_global) \ + op(napi_has_property) \ + op(napi_get_undefined) \ + op(napi_get_value_double) \ + op(napi_close_callback_scope) \ + op(napi_async_destroy) \ + op(napi_call_function) \ + op(napi_get_value_external) \ + op(napi_throw_error) \ + op(napi_create_int32) \ + op(napi_create_external_arraybuffer) \ + op(napi_create_typedarray) \ + op(napi_create_string_latin1) \ + op(napi_create_async_work) \ + op(napi_delete_async_work) \ + op(napi_queue_async_work) \ + op(napi_resolve_deferred) \ + op(napi_reject_deferred) \ + op(napi_create_promise) \ + op(napi_create_threadsafe_function) \ + op(napi_acquire_threadsafe_function) \ + op(napi_release_threadsafe_function) \ + op(napi_call_threadsafe_function) \ + op(napi_is_dataview) \ + op(napi_is_arraybuffer) \ + op(napi_get_dataview_info) \ + op(napi_get_value_int64) \ + op(napi_get_boolean) \ + op(napi_create_uint32) \ + op(napi_create_bigint_int64) \ + op(napi_cancel_async_work) \ + +#define DECL_NAPI_IMPL(fn_name, ...) decltype(&fn_name) p_##fn_name; + +NAPI_FUNCTIONS(DECL_NAPI_IMPL) + +bool LoadNapiFunctions() { + static bool isLoaded = false; + if (isLoaded) return true; + HMODULE nodeModule = GetModuleHandle(NULL); + FARPROC fn_addr = GetProcAddress(nodeModule, "napi_module_register"); + + if (fn_addr == NULL) { + nodeModule = GetModuleHandleA("node.dll"); + if (nodeModule == NULL) return false; + fn_addr = GetProcAddress(nodeModule, "napi_module_register"); + if (fn_addr == NULL) { + return false; + } + } + bool apiLoadFailed = false; + +#define GET_NAPI_IMPL(fn_name) \ + fn_addr = GetProcAddress(nodeModule, #fn_name); \ + if (fn_addr == NULL) apiLoadFailed = true; \ + p_##fn_name = (decltype(p_##fn_name))fn_addr; + + // Assign the addresses of the needed functions to the "p*" named pointers. + NAPI_FUNCTIONS(GET_NAPI_IMPL); + + // If any required APIs failed to load, return false + if (apiLoadFailed) return false; + + isLoaded = true; + + return true; +} + +NAPI_EXTERN void NAPI_CDECL +napi_module_register(napi_module* mod) { + LoadNapiFunctions(); + p_napi_module_register(mod); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_get_last_error_info(napi_env env, const napi_extended_error_info** result) { + LoadNapiFunctions(); + return p_napi_get_last_error_info(env, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_value_bigint_int64( + napi_env env, napi_value value, int64_t* result, bool* lossless) { + LoadNapiFunctions(); + return p_napi_get_value_bigint_int64(env, value, result, lossless); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_value_bigint_uint64( + napi_env env, napi_value value, uint64_t* result, bool* lossless) { + LoadNapiFunctions(); + return p_napi_get_value_bigint_uint64(env, value, result, lossless); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_object(napi_env env, napi_value* result) { + LoadNapiFunctions(); + return p_napi_create_object(env, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_arraybuffer_info(napi_env env, napi_value arraybuffer, void** data, size_t* byte_length) { + LoadNapiFunctions(); + return p_napi_get_arraybuffer_info(env, arraybuffer, data, byte_length); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_create_bigint_uint64(napi_env env, uint64_t value, napi_value* result) { + LoadNapiFunctions(); + return p_napi_create_bigint_uint64(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_is_typedarray(napi_env env, napi_value value, bool* result) { + LoadNapiFunctions(); + return p_napi_is_typedarray(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_add_finalizer(napi_env env, + napi_value js_object, + void* finalize_data, + napi_finalize finalize_cb, + void* finalize_hint, + napi_ref* result) { + LoadNapiFunctions(); + return p_napi_add_finalizer(env, js_object, finalize_data, finalize_cb, finalize_hint, result); +} + + +NAPI_EXTERN napi_status NAPI_CDECL +napi_get_typedarray_info(napi_env env, + napi_value typedarray, + napi_typedarray_type* type, + size_t* length, + void** data, + napi_value* arraybuffer, + size_t* byte_offset) { + LoadNapiFunctions(); + return p_napi_get_typedarray_info(env, typedarray, type, length, data, arraybuffer, byte_offset); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_set_property(napi_env env, + napi_value object, + napi_value key, + napi_value value) { + LoadNapiFunctions(); + return p_napi_set_property(env, object, key, value); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_value_bool(napi_env env, + napi_value value, + bool* result) { + LoadNapiFunctions(); + return p_napi_get_value_bool(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_coerce_to_string(napi_env env, + napi_value value, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_coerce_to_string(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_value_int32(napi_env env, + napi_value value, + int32_t* result) { + LoadNapiFunctions(); + return p_napi_get_value_int32(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_cb_info( + napi_env env, + napi_callback_info cbinfo, + size_t* argc, + napi_value* argv, + napi_value* this_arg, + void** data) { + LoadNapiFunctions(); + return p_napi_get_cb_info(env, cbinfo, argc, argv, this_arg, data); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_string_utf8(napi_env env, + const char* str, + size_t length, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_create_string_utf8(env, str, length, result); +} + + +NAPI_EXTERN napi_status NAPI_CDECL napi_throw(napi_env env, napi_value error) { + LoadNapiFunctions(); + return p_napi_throw(env, error); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_error(napi_env env, + napi_value code, + napi_value msg, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_create_error(env, code, msg, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_value_string_utf8( + napi_env env, napi_value value, char* buf, size_t bufsize, size_t* result) { + LoadNapiFunctions(); + return p_napi_get_value_string_utf8(env, value, buf, bufsize, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_define_properties(napi_env env, + napi_value object, + size_t property_count, + const napi_property_descriptor* properties) { + LoadNapiFunctions(); + return p_napi_define_properties(env, object, property_count, properties); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_delete_reference(napi_env env, + napi_ref ref) { + LoadNapiFunctions(); + return p_napi_delete_reference(env, ref); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_reference_value(napi_env env, + napi_ref ref, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_get_reference_value(env, ref, result); +} +NAPI_EXTERN napi_status NAPI_CDECL +napi_open_handle_scope(napi_env env, napi_handle_scope* result) { + LoadNapiFunctions(); + return p_napi_open_handle_scope(env, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_close_handle_scope(napi_env env, napi_handle_scope scope) { + LoadNapiFunctions(); + return p_napi_close_handle_scope(env, scope); +} +NAPI_EXTERN napi_status NAPI_CDECL napi_open_escapable_handle_scope( + napi_env env, napi_escapable_handle_scope* result) { + return p_napi_open_escapable_handle_scope(env, result); +} +NAPI_EXTERN napi_status NAPI_CDECL napi_close_escapable_handle_scope( + napi_env env, napi_escapable_handle_scope scope) { + LoadNapiFunctions(); + return p_napi_close_escapable_handle_scope(env, scope); +} +NAPI_EXTERN napi_status NAPI_CDECL napi_is_exception_pending(napi_env env, + bool* result) { + LoadNapiFunctions(); + return p_napi_is_exception_pending(env, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_property(napi_env env, + napi_value object, + napi_value key, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_get_property(env, object, key, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_value_uint32(napi_env env, + napi_value value, + uint32_t* result) { + LoadNapiFunctions(); + return p_napi_get_value_uint32(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_typeof(napi_env env, + napi_value value, + napi_valuetype* result) { + LoadNapiFunctions(); + return p_napi_typeof(env, value, result); +} +NAPI_EXTERN napi_status NAPI_CDECL +napi_get_and_clear_last_exception(napi_env env, napi_value* result) { + LoadNapiFunctions(); + return p_napi_get_and_clear_last_exception(env, result); +} +NAPI_EXTERN NAPI_NO_RETURN void NAPI_CDECL +napi_fatal_error(const char* location, + size_t location_len, + const char* message, + size_t message_len) { + LoadNapiFunctions(); + p_napi_fatal_error(location, location_len, message, message_len); + // Not reachable, but not represented in type signature. + exit(0); +} +NAPI_EXTERN napi_status NAPI_CDECL +napi_get_value_external(napi_env env, napi_value value, void** result) { + LoadNapiFunctions(); + return p_napi_get_value_external(env, value, result); +} +NAPI_EXTERN napi_status NAPI_CDECL napi_create_double(napi_env env, + double value, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_create_double(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_type_error(napi_env env, + napi_value code, + napi_value msg, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_create_type_error(env, code, msg, result); +} +NAPI_EXTERN napi_status NAPI_CDECL napi_get_named_property(napi_env env, + napi_value object, + const char* utf8name, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_get_named_property(env, object, utf8name, result); +} +NAPI_EXTERN napi_status NAPI_CDECL +napi_create_reference(napi_env env, + napi_value value, + uint32_t initial_refcount, + napi_ref* result) { + LoadNapiFunctions(); + return p_napi_create_reference(env, value, initial_refcount, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_escape_handle(napi_env env, + napi_escapable_handle_scope scope, + napi_value escapee, + napi_value* result); +NAPI_EXTERN napi_status NAPI_CDECL napi_get_global(napi_env env, + napi_value* result) { + + LoadNapiFunctions(); + return p_napi_get_global(env, result); +} +NAPI_EXTERN napi_status NAPI_CDECL napi_has_property(napi_env env, + napi_value object, + napi_value key, + bool* result) { + LoadNapiFunctions(); + return p_napi_has_property(env, object, key, result); +} +NAPI_EXTERN napi_status NAPI_CDECL napi_create_function(napi_env env, + const char* utf8name, + size_t length, + napi_callback cb, + void* data, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_create_function(env, utf8name, length, cb, data, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_escape_handle(napi_env env, + napi_escapable_handle_scope scope, + napi_value escapee, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_escape_handle(env, scope, escapee, result); +} +NAPI_EXTERN napi_status NAPI_CDECL napi_get_undefined(napi_env env, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_get_undefined(env, result); +} +NAPI_EXTERN napi_status NAPI_CDECL napi_get_value_double(napi_env env, + napi_value value, + double* result) { + LoadNapiFunctions(); + return p_napi_get_value_double(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_close_callback_scope(napi_env env, napi_callback_scope scope) { + LoadNapiFunctions(); + return p_napi_close_callback_scope(env, scope); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_async_destroy(napi_env env, napi_async_context async_context) { + LoadNapiFunctions(); + return p_napi_async_destroy(env, async_context); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_call_function(napi_env env, + napi_value recv, + napi_value func, + size_t argc, + const napi_value* argv, + napi_value* result) { + LoadNapiFunctions(); + return p_napi_call_function(env, recv, func, argc, argv, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_throw_error(napi_env env, + const char* code, + const char* msg) + { + LoadNapiFunctions(); + return p_napi_throw_error(env, code, msg); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_int32(napi_env env, + int32_t value, + napi_value* result) + { + LoadNapiFunctions(); + return p_napi_create_int32(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_external_arraybuffer( + napi_env env, + void* external_data, + size_t byte_length, + napi_finalize finalize_cb, + void* finalize_hint, + napi_value* result) +{ + LoadNapiFunctions(); + return p_napi_create_external_arraybuffer(env, external_data, byte_length, finalize_cb, finalize_hint, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_typedarray( + napi_env env, + napi_typedarray_type type, + size_t length, + napi_value array_buffer, + size_t byte_offset, + napi_value* result +) +{ + LoadNapiFunctions(); + return p_napi_create_typedarray(env, type, length, array_buffer, byte_offset, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_string_latin1( + napi_env env, + const char* str, + size_t length, + napi_value* result +) +{ + LoadNapiFunctions(); + return p_napi_create_string_latin1(env, str, length, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_async_work( + napi_env env, + napi_value async_resource, + napi_value async_resource_name, + napi_async_execute_callback execute, + napi_async_complete_callback complete, + void* data, + napi_async_work* result +) +{ + LoadNapiFunctions(); + return p_napi_create_async_work(env, async_resource, async_resource_name, execute, complete, data, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_delete_async_work( + napi_env env, + napi_async_work work +) +{ + LoadNapiFunctions(); + return p_napi_delete_async_work(env, work); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_queue_async_work( + napi_env env, + napi_async_work work +) +{ + LoadNapiFunctions(); + return p_napi_queue_async_work(env, work); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_promise( + napi_env env, + napi_deferred* deferred, + napi_value* promise) +{ + LoadNapiFunctions(); + return p_napi_create_promise(env, deferred, promise); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_resolve_deferred( + napi_env env, + napi_deferred deferred, + napi_value resolution) +{ + LoadNapiFunctions(); + return p_napi_resolve_deferred(env, deferred, resolution); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_reject_deferred( + napi_env env, + napi_deferred deferred, + napi_value rejection) +{ + LoadNapiFunctions(); + return p_napi_reject_deferred(env, deferred, rejection); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_threadsafe_function( + napi_env env, + napi_value func, + napi_value async_resource, + napi_value async_resource_name, + size_t max_queue_size, + size_t initial_thread_count, + void* thread_finalize_data, + napi_finalize thread_finalize_cb, + void* context, + napi_threadsafe_function_call_js call_js_cb, + napi_threadsafe_function* result) +{ + LoadNapiFunctions(); + return p_napi_create_threadsafe_function(env, func, async_resource, async_resource_name, max_queue_size, initial_thread_count, thread_finalize_data, thread_finalize_cb, context, call_js_cb, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_acquire_threadsafe_function(napi_threadsafe_function func) +{ + LoadNapiFunctions(); + return p_napi_acquire_threadsafe_function(func); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_release_threadsafe_function(napi_threadsafe_function func, napi_threadsafe_function_release_mode mode) +{ + LoadNapiFunctions(); + return p_napi_release_threadsafe_function(func, mode); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_call_threadsafe_function( + napi_threadsafe_function func, + void* data, + napi_threadsafe_function_call_mode is_blocking) +{ + LoadNapiFunctions(); + return p_napi_call_threadsafe_function(func, data, is_blocking); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_is_dataview(napi_env env, + napi_value value, + bool* result) { + LoadNapiFunctions(); + return p_napi_is_dataview(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_is_arraybuffer(napi_env env, + napi_value value, + bool* result) { + LoadNapiFunctions(); + return p_napi_is_arraybuffer(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_get_dataview_info(napi_env env, + napi_value dataview, + size_t* bytelength, + void** data, + napi_value* arraybuffer, + size_t* byte_offset) { + LoadNapiFunctions(); + return p_napi_get_dataview_info(env, dataview, bytelength, data, arraybuffer, byte_offset); +} + +NAPI_EXTERN napi_status NAPI_CDECL +napi_set_named_property(napi_env env, + napi_value object, + const char* utf8name, + napi_value value) { + LoadNapiFunctions(); + return p_napi_set_named_property(env, object, utf8name, value); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_value_int64(napi_env env, + napi_value value, + int64_t* result) +{ + LoadNapiFunctions(); + return p_napi_get_value_int64(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_get_boolean(napi_env env, + bool value, + napi_value* result) +{ +LoadNapiFunctions(); +return p_napi_get_boolean(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_uint32(napi_env env, + uint32_t value, + napi_value* result) +{ +LoadNapiFunctions(); +return p_napi_create_uint32(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_create_bigint_int64(napi_env env, + int64_t value, + napi_value* result) +{ + LoadNapiFunctions(); + return p_napi_create_bigint_int64(env, value, result); +} + +NAPI_EXTERN napi_status NAPI_CDECL napi_cancel_async_work(napi_env env, + napi_async_work work) +{ + LoadNapiFunctions(); + return p_napi_cancel_async_work(env, work); +} \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/ohos/hilog/log.h b/koala_tools/interop/src/cpp/ohos/hilog/log.h new file mode 100644 index 0000000000000000000000000000000000000000..7452137c280d212fc271cca2f31466f0dc11bd6f --- /dev/null +++ b/koala_tools/interop/src/cpp/ohos/hilog/log.h @@ -0,0 +1,286 @@ +/* + * Copyright (c) 2021-2022 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. + */ + +#ifndef HIVIEWDFX_HILOG_H +#define HIVIEWDFX_HILOG_H +/** + * @addtogroup HiLog + * @{ + * + * @brief Provides logging functions. + * + * For example, you can use these functions to output logs of the specified log type, service domain, log tag, + * and log level. + * + * @syscap SystemCapability.HiviewDFX.HiLog + * + * @since 8 + */ + +/** + * @file log.h + * + * @brief Defines the logging functions of the HiLog module. + * + * Before outputting logs, you must define the service domain, and log tag, use the function with + * the specified log type and level, and specify the privacy identifier.\n + *
  • Service domain: used to identify the subsystem and module of a service. Its value is a hexadecimal + * integer ranging from 0x0 to 0xFFFF. \n + *
  • Log tag: a string used to identify the class, file, or service.
  • \n + *
  • Log level: DEBUG, INFO, WARN, ERROR, and FATAL
  • \n + *
  • Parameter format: a printf format string that starts with a % character, including format specifiers + * and variable parameters.
  • \n + *
  • Privacy identifier: {public} or {private} added between the % character and the format specifier in + * each parameter. Note that each parameter has a privacy identifier. If no privacy identifier is added, + * the parameter is considered to be private.
\n + * + * Sample code:\n + * Defining the service domain and log tag:\n + * #include \n + * #define LOG_DOMAIN 0x0201\n + * #define LOG_TAG "MY_TAG"\n + * Outputting logs:\n + * HILOG_WARN({@link LOG_APP}, "Failed to visit %{private}s, reason:%{public}d.", url, errno);\n + * Output result:\n + * 05-06 15:01:06.870 1051 1051 W 0201/MY_TAG: Failed to visit , reason:503.\n + * + * @since 8 + */ +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Defines the service domain for a log file. + * + * The service domain is used to identify the subsystem and module of a service. Its value is a hexadecimal integer + * ranging from 0x0 to 0xFFFF. If the value is beyond the range, its significant bits are automatically truncated. \n + * + * @since 8 + */ +#ifndef LOG_DOMAIN +#define LOG_DOMAIN 0 +#endif + +/** + * @brief Defines a string constant used to identify the class, file, or service. + * + * @since 8 + */ +#ifndef LOG_TAG +#define LOG_TAG NULL +#endif + +/** + * @brief Enumerates log types. + * + * Currently, LOG_APP is available. \n + * + * @since 8 + */ +typedef enum { + /** Third-party application logs */ + LOG_APP = 0, +} LogType; + +/** + * @brief Enumerates log levels. + * + * You are advised to select log levels based on their respective usage scenarios:\n + *
  • DEBUG: used for debugging and disabled from commercial releases
  • \n + *
  • INFO: used for logging important system running status and steps in key processes
  • \n + *
  • WARN: used for logging unexpected exceptions that have little impact on user experience and can + * automatically recover. Logs at this level are generally output when such exceptions are detected and + * captured.
  • \n + *
  • ERROR: used for logging malfunction that affects user experience and cannot automatically + * recover
  • \n + *
  • FATAL: used for logging major exceptions that have severely affected user experience and should + * not occur.
\n + * + * @since 8 + */ +typedef enum { + /** Debug level to be used by {@link OH_LOG_DEBUG} */ + LOG_DEBUG = 3, + /** Informational level to be used by {@link OH_LOG_INFO} */ + LOG_INFO = 4, + /** Warning level to be used by {@link OH_LOG_WARN} */ + LOG_WARN = 5, + /** Error level to be used by {@link OH_LOG_ERROR} */ + LOG_ERROR = 6, + /** Fatal level to be used by {@link OH_LOG_FATAL} */ + LOG_FATAL = 7, +} LogLevel; + +/** + * @brief Outputs logs. + * + * You can use this function to output logs based on the specified log type, log level, service domain, log tag, + * and variable parameters determined by the format specifier and privacy identifier in the printf format. + * + * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. + * @param level Indicates the log level, which can be LOG_DEBUG, LOG_INFO, LOG_WARN, + * LOG_ERROR, and LOG_FATAL. + * @param domain Indicates the service domain of logs. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFF. + * @param tag Indicates the log tag, which is a string used to identify the class, file, or service behavior. + * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the privacy + * identifier. Specifically, {public} or {private} is added between the % character and the format specifier + * in each parameter. \n + * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers + * in the format string. + * @return Returns 0 or a larger value if the operation is successful; returns a value smaller + * than 0 otherwise. + * @since 8 + */ +int OH_LOG_Print(LogType type, LogLevel level, unsigned int domain, const char *tag, const char *fmt, ...) + __attribute__((__format__(os_log, 5, 6))); + +/** + * @brief Checks whether logs of the specified service domain, log tag, and log level can be output. + * + * @param domain Indicates the service domain of logs. + * @param tag Indicates the log tag. + * @param level Indicates the log level. + * @return Returns true if the specified logs can be output; returns false otherwise. + * @since 8 + */ +bool OH_LOG_IsLoggable(unsigned int domain, const char *tag, LogLevel level); + +/** + * @brief Outputs debug logs. This is a function-like macro. + * + * Before calling this function, define the log service domain and log tag. Generally, you need to define them at + * the beginning of the source file. \n + * + * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. + * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the + * privacy identifier. Specifically, {public} or {private} is added between the % character and the format specifier + * in each parameter. \n + * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers + * in the format string. + * @see OH_LOG_Print + * @since 8 + */ +#define OH_LOG_DEBUG(type, ...) ((void)OH_LOG_Print((type), LOG_DEBUG, LOG_DOMAIN, LOG_TAG, __VA_ARGS__)) + +/** + * @brief Outputs informational logs. This is a function-like macro. + * + * Before calling this function, define the log service domain and log tag. Generally, you need to define them + * at the beginning of the source file. \n + * + * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. + * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the privacy + * identifier. Specifically, {public} or {private} is added between the % character and the format specifier in + * each parameter. \n + * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers + * in the format string. + * @see OH_LOG_Print + * @since 8 + */ +#define OH_LOG_INFO(type, ...) ((void)OH_LOG_Print((type), LOG_INFO, LOG_DOMAIN, LOG_TAG, __VA_ARGS__)) + +/** + * @brief Outputs warning logs. This is a function-like macro. + * + * Before calling this function, define the log service domain and log tag. Generally, you need to define them + * at the beginning of the source file. \n + * + * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. + * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the + * privacy identifier. Specifically, {public} or {private} is added between the % character and the format specifier + * in each parameter. \n + * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers + * in the format string. + * @see OH_LOG_Print + * @since 8 + */ +#define OH_LOG_WARN(type, ...) ((void)OH_LOG_Print((type), LOG_WARN, LOG_DOMAIN, LOG_TAG, __VA_ARGS__)) + +/** + * @brief Outputs error logs. This is a function-like macro. + * + * Before calling this function, define the log service domain and log tag. Generally, you need to define + * them at the beginning of the source file. \n + * + * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. + * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the privacy + * identifier. Specifically, {public} or {private} is added between the % character and the format specifier in each + * parameter. \n + * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers + * in the format string. + * @see OH_LOG_Print + * @since 8 + */ +#define OH_LOG_ERROR(type, ...) ((void)OH_LOG_Print((type), LOG_ERROR, LOG_DOMAIN, LOG_TAG, __VA_ARGS__)) + +/** + * @brief Outputs fatal logs. This is a function-like macro. + * + * Before calling this function, define the log service domain and log tag. Generally, you need to define them at + * the beginning of the source file. \n + * + * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. + * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the privacy + * identifier. Specifically, {public} or {private} is added between the % character and the format specifier in + * each parameter. \n + * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers + * in the format string. + * @see OH_LOG_Print + * @since 8 + */ +#define OH_LOG_FATAL(type, ...) ((void)OH_LOG_Print((type), LOG_FATAL, LOG_DOMAIN, LOG_TAG, __VA_ARGS__)) + +/** + * @brief Defines the function pointer type for the user-defined log processing function. + * + * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. + * @param level Indicates the log level, which can be LOG_DEBUG, LOG_INFO, LOG_WARN, + * LOG_ERROR, and LOG_FATAL. + * @param domain Indicates the service domain of logs. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFF. + * @param tag Indicates the log tag, which is a string used to identify the class, file, or service behavior. + * @param msg Indicates the log message itself, which is a formatted log string. + * @since 11 + */ +typedef void (*LogCallback)(const LogType type, const LogLevel level, const unsigned int domain, const char *tag, + const char *msg); + +/** + * @brief Set the user-defined log processing function. + * + * After calling this function, the callback function implemented by the user can receive all hilogs of the + * current process. + * Note that it will not change the default behavior of hilog logs of the current process, no matter whether this + * interface is called or not. \n + * + * @param callback Indicates the callback function implemented by the user. If you do not need to process hilog logs, + * you can transfer a null pointer. + * @since 11 + */ +void OH_LOG_SetCallback(LogCallback callback); + +#ifdef __cplusplus +} +#endif +/** @} */ + +#ifdef HILOG_RAWFORMAT +#include "hilog/log_inner.h" +#endif + +#endif // HIVIEWDFX_HILOG_C_H diff --git a/koala_tools/interop/src/cpp/ohos/oh_sk_log.cc b/koala_tools/interop/src/cpp/ohos/oh_sk_log.cc new file mode 100644 index 0000000000000000000000000000000000000000..a6ed96d11f8b2868b113af43012616ba8bf49c7e --- /dev/null +++ b/koala_tools/interop/src/cpp/ohos/oh_sk_log.cc @@ -0,0 +1,69 @@ +/* + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "oh_sk_log.h" +#include "interop-utils.h" + +static const char* KOALAUI_OHOS_LOG_ROOT = "/data/storage/el2/base/files/logs"; + +#define APPLY_LOG_FILE_PATTERN(buf, bufLen, t, ms, pid) \ + interop_sprintf(buf, bufLen, "%s/%d_%d_%d_%lld.pid%d.log", \ + KOALAUI_OHOS_LOG_ROOT, (t).tm_year + 1900, (t).tm_mon + 1, (t).tm_mday, (ms).tv_sec, pid) + +const char* oh_sk_log_type_str(oh_sk_log_type type) { + switch (type) { + case Log_Debug: return "D"; + case Log_Info: return "I"; + case Log_Warn: return "W"; + case Log_Error: return "E"; + case Log_Fatal: return "F"; + } +} + +void oh_sk_file_log(oh_sk_log_type type, const char* msg, ...) { + time_t t = time(nullptr); + struct tm lt = *localtime(&t); + struct timeval ms{}; + gettimeofday(&ms, nullptr); + + static char* path = nullptr; + if (!path) { + size_t len = interop_strlen(KOALAUI_OHOS_LOG_ROOT) + 100; + path = new char[len]; + APPLY_LOG_FILE_PATTERN(path, len, lt, ms, getpid()); + mkdir(KOALAUI_OHOS_LOG_ROOT, 0777); + } + + std::unique_ptr file(fopen(path, "a"), fclose); + if (!file) return; + + fprintf(file.get(), "%02d-%02d %02d:%02d:%02d.%03lld %s koala: ", + lt.tm_mon + 1, lt.tm_mday, lt.tm_hour, lt.tm_min, lt.tm_sec, ms.tv_usec / 1000, + oh_sk_log_type_str(type)); + + va_list args; + va_start(args, msg); + vfprintf(file.get(), msg, args); + va_end(args); + + fprintf(file.get(), "\n"); +} diff --git a/koala_tools/interop/src/cpp/ohos/oh_sk_log.h b/koala_tools/interop/src/cpp/ohos/oh_sk_log.h new file mode 100644 index 0000000000000000000000000000000000000000..b268d0c46090778b184b3797f16479fc6696961d --- /dev/null +++ b/koala_tools/interop/src/cpp/ohos/oh_sk_log.h @@ -0,0 +1,60 @@ +/* + * 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. + */ + +#ifndef OH_SK_LOG_H +#define OH_SK_LOG_H + +#include + +typedef enum { + Log_Debug, + Log_Info, + Log_Warn, + Log_Error, + Log_Fatal +} oh_sk_log_type; + +void oh_sk_file_log(oh_sk_log_type type, const char* msg, ...); +const char* oh_sk_log_type_str(oh_sk_log_type type); + +#ifdef OH_SK_LOG_TO_FILE + +#define OH_SK_LOG_INFO(msg) oh_sk_file_log(oh_sk_log_type::Log_Info, msg) +#define OH_SK_LOG_INFO_A(msg, ...) oh_sk_file_log(oh_sk_log_type::Log_Info, msg, ##__VA_ARGS__) +#define OH_SK_LOG_ERROR(msg) oh_sk_file_log(oh_sk_log_type::Log_Error, msg) +#define OH_SK_LOG_ERROR_A(msg, ...) oh_sk_file_log(oh_sk_log_type::Log_Error, msg, ##__VA_ARGS__) +#define OH_SK_LOG_DEBUG(msg) oh_sk_file_log(oh_sk_log_type::Log_Debug, msg) +#define OH_SK_LOG_DEBUG_A(msg, ...) oh_sk_file_log(oh_sk_log_type::Log_Debug, msg, ##__VA_ARGS__) +#define OH_SK_LOG_WARN(msg) oh_sk_file_log(oh_sk_log_type::Log_Warn, msg) +#define OH_SK_LOG_WARN_A(msg, ...) oh_sk_file_log(oh_sk_log_type::Log_Warn, msg, ##__VA_ARGS__) +#define OH_SK_LOG_FATAL(msg) oh_sk_file_log(oh_sk_log_type::Log_Fatal, msg) +#define OH_SK_LOG_FATAL_A(msg, ...) oh_sk_file_log(oh_sk_log_type::Log_Fatal, msg, ##__VA_ARGS__) + +#else + +#define OH_SK_LOG_INFO(msg) OH_LOG_Print(LOG_APP, LOG_INFO, 0xFF00, "Koala", msg) +#define OH_SK_LOG_INFO_A(msg, ...) OH_LOG_Print(LOG_APP, LOG_INFO, 0xFF00, "Koala", msg, ##__VA_ARGS__) +#define OH_SK_LOG_ERROR(msg) OH_LOG_Print(LOG_APP, LOG_ERROR, 0xFF00, "Koala", msg) +#define OH_SK_LOG_ERROR_A(msg, ...) OH_LOG_Print(LOG_APP, LOG_ERROR, 0xFF00, "Koala", msg, ##__VA_ARGS__) +#define OH_SK_LOG_DEBUG(msg) OH_LOG_Print(LOG_APP, LOG_DEBUG, 0xFF00, "Koala", msg) +#define OH_SK_LOG_DEBUG_A(msg, ...) OH_LOG_Print(LOG_APP, LOG_DEBUG, 0xFF00, "Koala", msg, ##__VA_ARGS__) +#define OH_SK_LOG_WARN(msg) OH_LOG_Print(LOG_APP, LOG_WARN, 0xFF00, "Koala", msg) +#define OH_SK_LOG_WARN_A(msg, ...) OH_LOG_Print(LOG_APP, LOG_WARN, 0xFF00, "Koala", msg, ##__VA_ARGS__) +#define OH_SK_LOG_FATAL(msg) OH_LOG_Print(LOG_APP, LOG_FATAL, 0xFF00, "Koala", msg) +#define OH_SK_LOG_FATAL_A(msg, ...) OH_LOG_Print(LOG_APP, LOG_FATAL, 0xFF00, "Koala", msg, ##__VA_ARGS__) + +#endif + +#endif // OH_SK_LOG_H \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/profiler.h b/koala_tools/interop/src/cpp/profiler.h new file mode 100644 index 0000000000000000000000000000000000000000..9fc1c77a7655d09ff2619a946cd174f4bb0e2184 --- /dev/null +++ b/koala_tools/interop/src/cpp/profiler.h @@ -0,0 +1,100 @@ +/* + * 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. + */ + +#ifndef _KOALA_PROFILER_ +#define _KOALA_PROFILER_ + +#include +#include + +#include +#include +#include +#include +#include + +#include "interop-utils.h" + +struct InteropProfilerRecord { + int64_t time; + int64_t count; + InteropProfilerRecord(int64_t time, int64_t count) : time(time), count(count) {} +}; + +class InteropProfiler { + private: + std::unordered_map records; + static InteropProfiler* _instance; + InteropProfiler() {} + + public: + static InteropProfiler* instance() { + if (!_instance) _instance = new InteropProfiler(); + return _instance; + } + + void record(const char* name, int64_t ns) { + auto it = records.find(name); + if (it == records.end()) { + records.insert({name, InteropProfilerRecord(ns, 1)}); + } else { + it->second.time += ns; + it->second.count++; + } + } + + std::string report() { + std::vector> elems(records.begin(), records.end()); + std::sort(elems.begin(), elems.end(), + [](const std::pair&a, const std::pair&b) { + return b.second.time < a.second.time; + }); + int64_t total = 0; + std::for_each(elems.begin(), elems.end(), [&total](const std::pair&a) { + total += a.second.time; + }); + std::string result; + std::for_each(elems.begin(), elems.end(), [total, &result](const std::pair&a) { + auto ns = a.second.time; + auto count = a.second.count; + char buffer[1024]; + interop_snprintf(buffer, sizeof buffer, "for %s[%lld]: %.01f%% (%lld)\n", a.first.c_str(), (long long)count, (double)ns / total * 100.0, (long long)ns); + result += buffer; + }); + return result; + } + + void reset() { + records.clear(); + } +}; + + +class InteropMethodCall { + private: + const char* name; + std::chrono::steady_clock::time_point begin; + public: + InteropMethodCall(const char* name) : name(name) { + begin = std::chrono::steady_clock::now(); + } + ~InteropMethodCall() { + auto end = std::chrono::steady_clock::now(); + int64_t ns = std::chrono::duration_cast(end - begin).count(); + InteropProfiler::instance()->record(name, ns); + } +}; + +#endif // _KOALA_PROFILER_ \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/tracer.h b/koala_tools/interop/src/cpp/tracer.h new file mode 100644 index 0000000000000000000000000000000000000000..3211e6d685c819860cfa1dd4fb481c785241e0d2 --- /dev/null +++ b/koala_tools/interop/src/cpp/tracer.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2024 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. +*/ + +#ifndef _KOALA_TRACER_ +#define _KOALA_TRACER_ + +#ifdef KOALA_OHOS +#include +#define KOALA_TRACE(msg, str) OH_LOG_Print(LOG_APP, LOG_INFO, 0xFF00, "Koala", msg, str) +// Also do +// hdc shell hilog -p off +// hdc shell hilog -Q pidoff +// to see the output. +#define KOALA_TRACE_PUBLIC "%{public}s" +#else +#include +#define KOALA_TRACE(msg, str) fprintf(stderr, "Koala: " msg "\n", str) +#define KOALA_TRACE_PUBLIC "%s" +#endif + +class InteropMethodCall { + private: + const char* name; + public: + InteropMethodCall(const char* name) : name(name) { + KOALA_TRACE(">>> " KOALA_TRACE_PUBLIC, name); + } + ~InteropMethodCall() { + KOALA_TRACE("<<< " KOALA_TRACE_PUBLIC, name); + } +}; + +#endif // _KOALA_TRACER_ \ No newline at end of file diff --git a/koala_tools/interop/src/cpp/types/koala-types.h b/koala_tools/interop/src/cpp/types/koala-types.h new file mode 100644 index 0000000000000000000000000000000000000000..0c5bd658fc468409c5cf7ed5add19a3a2af9f8d1 --- /dev/null +++ b/koala_tools/interop/src/cpp/types/koala-types.h @@ -0,0 +1,273 @@ +/* + * Copyright (c) 2024 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. + */ + +#ifndef _KOALA_TYPES_H +#define _KOALA_TYPES_H + +#include +#include +#include +#include + +#include "interop-types.h" +#include "interop-utils.h" + +#ifdef _MSC_VER +#define KOALA_EXECUTE(name, code) \ + static void __init_##name() { \ + code; \ + } \ + namespace { \ + struct __Init_##name { \ + __Init_##name() { __init_##name(); } \ + } __Init_##name##_v; \ + } +#else +#define KOALA_EXECUTE(name, code) \ + __attribute__((constructor)) \ + static void __init_jni_##name() { \ + code; \ + } +#endif + +struct KStringPtrImpl { + KStringPtrImpl(const uint8_t* str) : _value(nullptr), _owned(true) { + int len = str ? interop_strlen((const char*)str) : 0; + assign((const char*)str, len); + } + KStringPtrImpl(const char* str) : _value(nullptr), _owned(true) { + int len = str ? interop_strlen(str) : 0; + assign(str, len); + } + KStringPtrImpl(const char* str, int len, bool owned) : _value(nullptr), _owned(owned) { + assign(str, len); + } + KStringPtrImpl(const uint8_t* str, int len, bool owned) : _value(nullptr), _owned(owned) { + assign((const char*)str, len); + } + KStringPtrImpl() : _value(nullptr), _length(0), _owned(true) {} + + KStringPtrImpl(const KStringPtrImpl& other) = delete; + KStringPtrImpl& operator=(const KStringPtrImpl& other) = delete; + + KStringPtrImpl(InteropString value): KStringPtrImpl(value.chars, value.length, true) {} + + KStringPtrImpl(KStringPtrImpl&& other) { + this->_value = other.release(); + this->_owned = other._owned; + other._owned = false; + this->_length = other._length; + } + + ~KStringPtrImpl() { if (_value && _owned) free(_value); } + + bool isNull() const { return _value == nullptr; } + const char* c_str() const { return _value; } + char* data() const { return _value; } + int length() const { return _length; } + + void resize(int size) { + _length = size; + if (!_owned) return; + // Ignore old content. + if (_value && _owned) free(_value); + _value = reinterpret_cast(malloc(size + 1)); + if (!_value) { + INTEROP_FATAL("Cannot allocate memory"); + } + _value[size] = 0; + } + + void assign(const char* data) { + assign(data, data ? interop_strlen(data) : 0); + } + + void assign(const char* data, int len) { + if (_value && _owned) free(_value); + if (data) { + if (_owned) { + _value = reinterpret_cast(malloc(len + 1)); + if (!_value) { + INTEROP_FATAL("Cannot allocate memory"); + } + interop_memcpy(_value, len, data, len); + _value[len] = 0; + } else { + _value = const_cast(data); + } + } else { + _value = nullptr; + } + _length = len; + } + + protected: + char* release() { + char* result = this->_value; + this->_value = nullptr; + return result; + } + private: + char* _value; + int _length; + bool _owned; +}; + +struct KInteropNumber { + int8_t tag; + union { + int32_t i32; + float f32; + }; + KInteropNumber() { + this->tag = 0; + this->i32 = 0; + } + KInteropNumber(int32_t value) { + this->tag = INTEROP_TAG_INT32; + this->i32 = value; + } + KInteropNumber(float value) { + this->tag = INTEROP_TAG_FLOAT32; + this->f32 = value; + } + KInteropNumber(InteropNumber value) { + this->tag = value.tag; + this->i32 = value.i32; + } + InteropNumber toCType() { + InteropNumber result; + result.tag = this->tag; + result.i32 = this->i32; + return result; + } + static inline KInteropNumber fromDouble(double value) { + KInteropNumber result; + // Improve: boundary check + if (value == std::floor(value)) { + result.tag = INTEROP_TAG_INT32; + result.i32 = static_cast(value); + } else { + result.tag = INTEROP_TAG_FLOAT32; + result.f32 = (float)value; + } + return result; + } + inline double asDouble() { + if (tag == INTEROP_TAG_INT32) + return (double)i32; + else + return (double)f32; + } + inline int32_t asInt32() { + if (tag == INTEROP_TAG_INT32) + return i32; + else + return (int32_t)f32; + } +}; + +typedef InteropBoolean KBoolean; +typedef InteropUInt8 KByte; +typedef int16_t KChar; +typedef int16_t KShort; +typedef uint16_t KUShort; +typedef InteropInt32 KInt; +typedef InteropUInt32 KUInt; +typedef InteropInt64 KLong; +typedef InteropUInt64 KULong; +typedef InteropFloat32 KFloat; +typedef InteropFloat64 KDouble; +typedef InteropNativePointer KNativePointer; +typedef KStringPtrImpl KStringPtr; + +typedef KFloat* KFloatArray; +typedef const uint8_t* KStringArray; +typedef KNativePointer* KNativePointerArray; + +struct KSerializerBufferOpaque { + explicit operator KByte* () { + return reinterpret_cast(this); + } +}; +typedef KSerializerBufferOpaque* KSerializerBuffer; + +struct KInteropBuffer { + + KInteropBuffer(KLong len = 0, KNativePointer ptr = nullptr, KInt resId = 0, void (*dis)(KInt) = nullptr) + : length(len), data(ptr), resourceId(resId), dispose(dis) {} + + /** + * Takes ownership of given InteropBuffer + */ + KInteropBuffer(InteropBuffer value) { + length = value.length; + data = value.data; + resourceId = value.resource.resourceId; + dispose = value.resource.release; + } + + KLong length; + KNativePointer data; + + KInt resourceId; + void (*dispose)( KInt /* resourceId for now */); +}; + +struct KInteropReturnBuffer { + KInt length; + KNativePointer data; + void (*dispose)(KNativePointer data, KInt length); +}; + +typedef _InteropVMContext *KVMContext; + +// BEWARE: this MUST never be used in user code, only in very rare service code. +struct _KVMObject; +typedef _KVMObject *KVMObjectHandle; + +typedef struct KVMDeferred { + + KVMDeferred() {} + KVMDeferred(InteropDeferred value) { + handler = value.handler; + context = value.context; + resolve = reinterpret_cast(value.resolve); + reject = reinterpret_cast(value.reject); + } + + void* handler; + void* context; + void (*resolve)(KVMDeferred* thiz, uint8_t* data, int32_t length); + void (*reject)(KVMDeferred* thiz, const char* message); +} KVMDeferred; + +template T* ptr(KNativePointer ptr) { + return reinterpret_cast(ptr); +} + +template T& ref(KNativePointer ptr) { + return *reinterpret_cast(ptr); +} + +inline KNativePointer nativePtr(void* pointer) { + return reinterpret_cast(pointer); +} + +template KNativePointer fnPtr(void (*pointer)(T*)) { + return reinterpret_cast(pointer); +} + +#endif /* _KOALA_TYPES_H */ diff --git a/koala_tools/interop/src/cpp/types/signatures.cc b/koala_tools/interop/src/cpp/types/signatures.cc new file mode 100644 index 0000000000000000000000000000000000000000..a796ba76032fac54b6511d17c957b0f18d508d1b --- /dev/null +++ b/koala_tools/interop/src/cpp/types/signatures.cc @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2024 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. + */ + +#ifdef __cplusplus + #include + #include +#else + #include + #include +#endif + +#include + +#include "signatures.h" +#include "interop-types.h" + +// For types with the same name on ets and jni +#define KOALA_INTEROP_TYPEDEF(func, lang, CPP_TYPE, SIG_TYPE, CODE_TYPE) \ + if (std::strcmp(func, "sigType") == 0) if (type == (CPP_TYPE)) return SIG_TYPE; \ + if (std::strcmp(func, "codeType") == 0) if (type == (CPP_TYPE)) return CODE_TYPE; + +// For types with distinct names on ets and jni +#define KOALA_INTEROP_TYPEDEF_LS(func, lang, CPP_TYPE, ETS_SIG_TYPE, ETS_CODE_TYPE, JNI_SIG_TYPE, JNI_CODE_TYPE) \ + if (std::strcmp(func, "sigType") == 0 && std::strcmp(lang, "ets") == 0) if (type == (CPP_TYPE)) return ETS_SIG_TYPE; \ + if (std::strcmp(func, "codeType") == 0 && std::strcmp(lang, "ets") == 0) if (type == (CPP_TYPE)) return ETS_CODE_TYPE; \ + if (std::strcmp(func, "sigType") == 0 && std::strcmp(lang, "jni") == 0) if (type == (CPP_TYPE)) return JNI_SIG_TYPE; \ + if (std::strcmp(func, "codeType") == 0 && std::strcmp(lang, "jni") == 0) if (type == (CPP_TYPE)) return JNI_CODE_TYPE; + +#define KOALA_INTEROP_TYPEDEFS(func, lang) \ + KOALA_INTEROP_TYPEDEF(func, lang, "void", "V", "void") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KBoolean", "Z", "boolean") \ + KOALA_INTEROP_TYPEDEF(func, lang, "OH_Boolean", "Z", "boolean") \ + KOALA_INTEROP_TYPEDEF(func, lang, "Ark_Boolean", "Z", "boolean") \ + KOALA_INTEROP_TYPEDEF(func, lang, "int32_t", "I", "int") \ + KOALA_INTEROP_TYPEDEF(func, lang, "uint32_t", "I", "int") \ + KOALA_INTEROP_TYPEDEF(func, lang, "int", "I", "int") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KInt", "I", "int") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KUInt", "I", "int") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KLong", "J", "long") \ + KOALA_INTEROP_TYPEDEF(func, lang, "OH_Int32", "I", "int") \ + KOALA_INTEROP_TYPEDEF(func, lang, "OH_Int64", "J", "long") \ + KOALA_INTEROP_TYPEDEF(func, lang, "Ark_Int32", "I", "int") \ + KOALA_INTEROP_TYPEDEF(func, lang, "Ark_Int64", "J", "long") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KNativePointer", "J", "long") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KSerializerBuffer", "J", "long") \ + KOALA_INTEROP_TYPEDEF(func, lang, "Ark_NativePointer", "J", "long") \ + KOALA_INTEROP_TYPEDEF(func, lang, "OH_NativePointer", "J", "long") \ + KOALA_INTEROP_TYPEDEF(func, lang, "float", "F", "float") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KFloat", "F", "float") \ + KOALA_INTEROP_TYPEDEF(func, lang, "Ark_Float32", "F", "float") \ + KOALA_INTEROP_TYPEDEF(func, lang, "double", "D", "double") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KDouble", "D", "double") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KInteropNumber", "D", "double") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KVMObjectHandle", "Ljava/lang/Object;", "Object") \ + KOALA_INTEROP_TYPEDEF(func, lang, "uint8_t*", "[B", "byte[]") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KByte*", "[B", "byte[]") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KInteropBuffer", "[B", "byte[]") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KShort*", "[S", "short[]") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KUShort*", "[S", "short[]") \ + KOALA_INTEROP_TYPEDEF(func, lang, "int32_t*", "[I", "int[]") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KInt*", "[I", "int[]") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KNativePointerArray", "[J", "long[]") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KInteropReturnBuffer", "[B", "byte[]") \ + KOALA_INTEROP_TYPEDEF(func, lang, "float*", "[F", "float[]") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KFloatArray", "[F", "float[]") \ + KOALA_INTEROP_TYPEDEF(func, lang, "KFloat*", "[F", "float[]") \ + KOALA_INTEROP_TYPEDEF_LS(func, lang, "KStringPtr", "Lstd/core/String;", "String", "Ljava/lang/String;", "String") \ + KOALA_INTEROP_TYPEDEF_LS(func, lang, "KStringArray", "[Lstd/core/String;", "String[]", "[Ljava/lang/String;", "String[]") + +std::string sigType(const std::string &type) { +#if KOALA_USE_PANDA_VM + KOALA_INTEROP_TYPEDEFS("sigType", "ets") +#elif KOALA_USE_JAVA_VM + KOALA_INTEROP_TYPEDEFS("sigType", "jni") +#endif + INTEROP_FATAL("Unhandled type: %s\n", type.c_str()); + return type; +} + +std::string codeType(const std::string &type) { +#if KOALA_USE_PANDA_VM + KOALA_INTEROP_TYPEDEFS("codeType", "ets") +#elif KOALA_USE_JAVA_VM + KOALA_INTEROP_TYPEDEFS("codeType", "jni") +#endif + INTEROP_FATAL("Unhandled type: %s\n", type.c_str()); + return ""; +} + +std::string convertType(const char* name, const char* koalaType) { + std::string result; + size_t current = 0, last = 0; + std::string input(koalaType); + std::vector tokens; + while ((current = input.find('|', last)) != std::string::npos) + { + auto token = input.substr(last, current - last); + tokens.push_back(token); + last = current + 1; + } + tokens.push_back(input.substr(last, input.length() - last)); + +#if KOALA_USE_PANDA_VM + + for (int i = 1; i < static_cast(tokens.size()); i++) + { + result.append(sigType(tokens[i])); + } + result.append(":"); + result.append(sigType(tokens[0])); + +#elif KOALA_USE_JAVA_VM + + result.append("("); + for (int i = 1; i < static_cast(tokens.size()); i++) + { + result.append(sigType(tokens[i])); + } + result.append(")"); + result.append(sigType(tokens[0])); + +#endif + +#ifdef KOALA_BUILD_FOR_SIGNATURES + #ifdef KOALA_USE_PANDA_VM + std::string params; + for (int i = 1; i < static_cast(tokens.size()); i++) + { + params.append("arg"); + params.append(std::to_string(i)); + params.append(": "); + params.append(codeType(tokens[i])); + if (i < static_cast(tokens.size() - 1)) + params.append(", "); + } + fprintf(stderr, " static native %s(%s): %s;\n", name, params.c_str(), codeType(tokens[0]).c_str()); + #elif KOALA_USE_JAVA_VM + std::string params; + for (int i = 1; i < static_cast(tokens.size()); i++) + { + params.append(codeType(tokens[i])); + params.append(" arg"); + params.append(std::to_string(i)); + if (i < static_cast(tokens.size() - 1)) + params.append(", "); + } + fprintf(stderr, " public static native %s %s(%s);\n", codeType(tokens[0]).c_str(), name, params.c_str()); + #endif +#endif + + return result; +} diff --git a/koala_tools/interop/src/cpp/types/signatures.h b/koala_tools/interop/src/cpp/types/signatures.h new file mode 100644 index 0000000000000000000000000000000000000000..05ddf1cc8df0cf621f9403fbbc3caa43e33bc2e8 --- /dev/null +++ b/koala_tools/interop/src/cpp/types/signatures.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 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. + */ + +#ifndef _SIGNATURES_H +#define _SIGNATURES_H + +#include + +std::string sigType(const std::string &type); +std::string codeType(const std::string &type); +std::string convertType(const char* name, const char* koalaType); + +#endif // _SIGNATURES_H diff --git a/koala_tools/interop/src/cpp/vmloader.cc b/koala_tools/interop/src/cpp/vmloader.cc new file mode 100644 index 0000000000000000000000000000000000000000..6a5cf93c12c986eeff240538444c60f57cc76986 --- /dev/null +++ b/koala_tools/interop/src/cpp/vmloader.cc @@ -0,0 +1,1194 @@ +/* + * Copyright (c) 2024 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. + */ + +#include +#include +#include +#include +#include + +#include "interop-logging.h" +#include "dynamic-loader.h" +#include "koala-types.h" +#include "interop-utils.h" + +// DO NOT USE KOALA INTEROP MECHANISMS IN THIS FILE! + +#ifdef KOALA_JNI +#include "jni.h" +#endif + +#ifdef KOALA_ETS_NAPI +#include "etsapi.h" +#endif + +#ifdef KOALA_ANI +#include "ani.h" +#endif + +#ifdef KOALA_KOTLIN +#include "kotlin_vmloader_wrapper.h" +#endif + +#if defined(KOALA_LINUX) || defined(KOALA_MACOS) || defined(KOALA_OHOS) +#include "sys/stat.h" +#include "dirent.h" +#endif + +#define OHOS_USER_LIBS "/data/storage/el1/bundle/libs" +#ifdef KOALA_OHOS_ARM32 +#define USE_SYSTEM_ARKVM 1 +#elif KOALA_OHOS_ARM64 +#define USE_SYSTEM_ARKVM 1 +#else +#define USE_SYSTEM_ARKVM 0 +#endif + +#if USE_SYSTEM_ARKVM +#define SYSTEM_ARK_STDLIB_PATH "/system/etc/etsstdlib.abc" +#endif + +#ifndef KOALA_USE_PANDA_VM +#ifdef KOALA_ANI +#define KOALA_USE_PANDA_VM 1 +#endif +#ifdef KOALA_ETS_NAPI +#define KOALA_USE_PANDA_VM 1 +#endif +#endif + +void traverseDir(const std::string& root, std::vector& paths, std::string suffix, const std::vector& fallbackPaths = {}); + +struct VMLibInfo { + const char* sdkPath; + const char* platform; + const char* lib; +}; + +#ifdef KOALA_JNI +const VMLibInfo javaVMLib = { + getenv("JAVA_HOME"), + #if defined(KOALA_LINUX) || defined(KOALA_MACOS) + "lib/server" + #elif KOALA_WINDOWS + "bin/server" + #else + #error "Unknown platform" + #endif + , + "jvm" +}; +#endif + +#if defined(KOALA_ETS_NAPI) || defined(KOALA_ANI) +const VMLibInfo pandaVMLib = { + // sdkPath + #if defined(KOALA_OHOS) + #ifdef KOALA_OHOS_ARM32 + "/system/lib" + #elif KOALA_OHOS_ARM64 + "/system/lib64" + #else + OHOS_USER_LIBS + #endif + #else + getenv("PANDA_HOME") + #endif + , + + // platform + #ifdef KOALA_LINUX + #ifdef KOALA_LINUX_ARM64 + "linux_arm64_host_tools/lib" + #else + "linux_host_tools/lib" + #endif + #elif KOALA_MACOS + "macos_host_tools/lib" + #elif KOALA_WINDOWS + "_host_tools/lib" + #elif KOALA_OHOS_ARM64 + "arm64" + #elif KOALA_OHOS_ARM32 + "arm" + #else + #error "Unknown platform" + #endif + , + + // lib + "arkruntime" +}; +#endif + +#ifdef KOALA_KOTLIN +const VMLibInfo kotlinLib = { + .sdkPath = nullptr, + .platform = nullptr, + .lib = "kotlin_koala", +}; +#endif + +struct VMInitArgs { + int version; + int nOptions; + void* options; +}; + +#define JAVA_VM_KIND 1 +#define PANDA_VM_KIND 2 +#define ES2PANDA_KIND 3 +#define PANDA_ANI_VM_KIND 4 +#define KOTLIN_KIND 5 + +struct ForeignVMContext { + void* currentVMContext; + int32_t (*callSync)(void* vmContext, int32_t callback, int8_t* data, int32_t length); +}; + +struct VMEntry { + int vmKind; + void* env; + void* app; + void* create; + void* start; + void* enter; + void* emitEvent; + void* restartWith; + void* loadView; + ForeignVMContext foreignVMContext; + std::string userFilesAbcPaths; +}; + +VMEntry g_vmEntry = {}; + +typedef int (*createVM_t)(void** pVM, void** pEnv, void* vmInitArgs); + +#ifdef KOALA_WINDOWS +#define DLL_EXPORT __declspec(dllexport) +#else +#define DLL_EXPORT __attribute__ ((visibility ("default"))) +#endif + +int loadES2Panda(const char* appClassPath, const char* appLibPath) { + fprintf(stderr, "native: es2panda %s\n", appClassPath); + return 0; +} + +#ifdef KOALA_ETS_NAPI +namespace { + +enum PandaLog2MobileLog : int { + UNKNOWN = 0, + DEFAULT, + VERBOSE, + DEBUG, + INFO, + WARN, + ERROR, + FATAL, + SILENT, +}; + +int ArkMobileLog(int id, int level, const char *component, const char *fmt, const char *msg) +{ + switch (level) { + case PandaLog2MobileLog::DEFAULT: + case PandaLog2MobileLog::VERBOSE: + case PandaLog2MobileLog::DEBUG: + case PandaLog2MobileLog::INFO: + case PandaLog2MobileLog::SILENT: + LOGI("ArkRuntime [%" LOG_PUBLIC "s]: %" LOG_PUBLIC "s", component, msg); + break; + case PandaLog2MobileLog::UNKNOWN: + case PandaLog2MobileLog::WARN: + case PandaLog2MobileLog::ERROR: + case PandaLog2MobileLog::FATAL: + default: + LOGE("ArkRuntime [%" LOG_PUBLIC "s]: %" LOG_PUBLIC "s", component, msg); + break; + } + return 0; +} + +} +#endif + +#ifdef KOALA_ANI + +static void AniMobileLog([[maybe_unused]] FILE *stream, int level, + const char *component, const char *msg) +{ + switch (level) { + case ANI_LOGLEVEL_INFO: + case ANI_LOGLEVEL_DEBUG: + LOGI("ArkRuntime [%" LOG_PUBLIC "s]: %" LOG_PUBLIC "s", component, msg); + break; + case ANI_LOGLEVEL_FATAL: + case ANI_LOGLEVEL_ERROR: + case ANI_LOGLEVEL_WARNING: + default: + LOGE("ArkRuntime [%" LOG_PUBLIC "s]: %" LOG_PUBLIC "s", component, msg); + break; + } +} + +static std::string makeClasspath(const std::vector& files) +{ + std::stringstream stream; + for (size_t index = 0, end = files.size(); index < end; ++index) { + if (index > 0) { + stream << ':'; + } + stream << files[index]; + } + return stream.str(); +} + +static std::pair GetBootAndAppPandaFiles(const VMLibInfo* thisVM, const char* bootFilesPath, const char* userFilesPath) +{ + std::vector bootFiles; +#if USE_SYSTEM_ARKVM + bootFiles.push_back(SYSTEM_ARK_STDLIB_PATH); +#elif defined(KOALA_OHOS) + bootFiles.push_back(std::string(OHOS_USER_LIBS) + "/etsstdlib.abc"); +#elif defined(KOALA_LINUX) || defined(KOALA_MACOS) || defined(KOALA_WINDOWS) + bootFiles.push_back(std::string(thisVM->sdkPath) + "/ets/etsstdlib.abc"); +#endif + +#if defined(KOALA_OHOS) + traverseDir("/system/framework", bootFiles, ".abc", { + "etsstdlib_bootabc" + }); +#endif + + std::vector userFiles; + traverseDir(userFilesPath, userFiles, ".abc"); + std::sort(userFiles.begin(), userFiles.end()); + + traverseDir(bootFilesPath, bootFiles, ".abc"); + std::sort(bootFiles.begin(), bootFiles.end()); + + if (bootFiles.empty() || userFiles.empty()) + return {"",""}; + + return { makeClasspath(bootFiles), makeClasspath(userFiles) }; +} + +static std::string GetAOTFiles(const char* appClassPath) +{ + std::vector files; + traverseDir(std::string(appClassPath), files, ".an"); + return makeClasspath(files); +} + +static bool ResetErrorIfExists(ani_env *env) +{ + ani_boolean hasError = ANI_FALSE; + env->ExistUnhandledError(&hasError); + if (hasError == ANI_TRUE) { + env->DescribeError(); + env->ResetError(); + return true; + } + return false; +} + +#endif + +std::string makeLibPath(const char *sdkPath, const char *platform, const char *lib) { + std::string result; + result.reserve(255); + if (sdkPath) { + result.append(sdkPath).append("/"); + } + if (platform) { + result.append(platform).append("/"); + } + result.append(libName(lib)); + return result; +} + +extern "C" DLL_EXPORT KInt LoadVirtualMachine(KInt vmKind, const char* bootFilesDir, const char* userFilesDir, const char* appLibPath, const ForeignVMContext* foreignVMContext) +{ + if (vmKind == ES2PANDA_KIND) { + return loadES2Panda(bootFilesDir, appLibPath); + } + + const VMLibInfo* thisVM = + #ifdef KOALA_JNI + (vmKind == JAVA_VM_KIND) ? &javaVMLib : + #endif + #if defined(KOALA_ETS_NAPI) || defined(KOALA_ANI) + (vmKind == PANDA_VM_KIND || vmKind == PANDA_ANI_VM_KIND) ? &pandaVMLib : + #endif + #ifdef KOALA_KOTLIN + (vmKind == KOTLIN_KIND) ? &kotlinLib : + #endif + nullptr; + + if (!thisVM) { + LOGE("Unknown VM kind: %" LOG_PUBLIC "d\n (possibly %" LOG_PUBLIC "s is compiled without expected flags)", vmKind, __FILE__); + return -1; + } + + LOGI("Starting VM %" LOG_PUBLIC "d with bootFilesDir=%" LOG_PUBLIC "s userFilesDir=%" LOG_PUBLIC "s native=%" LOG_PUBLIC "s", vmKind, bootFilesDir, userFilesDir, appLibPath); + + std::string libPath = +#if USE_SYSTEM_ARKVM + std::string(thisVM->sdkPath) + "/" + libName(thisVM->lib) +#elif defined(KOALA_LINUX) || defined(KOALA_MACOS) || defined(KOALA_WINDOWS) + makeLibPath(thisVM->sdkPath, thisVM->platform, thisVM->lib) +#elif defined(KOALA_OHOS) + std::string(OHOS_USER_LIBS) + "/" + libName(thisVM->lib) +#else + #error "Library path not specified for this platform" +#endif + ; + void *handle = loadLibrary(libPath); + if (!handle) { + LOGE("Cannot load library %" LOG_PUBLIC "s: %" LOG_PUBLIC "s\n", libPath.c_str(), libraryError()); + return -1; + } + + void* vm = nullptr; + void* env = nullptr; + int result = 0; + +#ifdef KOALA_JNI + if (vmKind == JAVA_VM_KIND) { + typedef int (*createVM_t)(void** pVM, void** pEnv, void* vmInitArgs); + createVM_t createVM = (createVM_t)findSymbol(handle, "JNI_CreateJavaVM"); + if (!createVM) { + LOGE("Cannot find %" LOG_PUBLIC "s\n", "JNI_CreateJavaVM"); + return -1; + } + JavaVMInitArgs javaVMArgs; + javaVMArgs.version = JNI_VERSION_10; + javaVMArgs.ignoreUnrecognized = false; + std::vector javaVMOptions; + javaVMOptions = { + {(char*)strdup((std::string("-Djava.class.path=") + bootFilesDir).c_str())}, + {(char*)strdup((std::string("-Djava.library.path=") + appLibPath).c_str())}, + }; + javaVMArgs.nOptions = javaVMOptions.size(); + javaVMArgs.options = javaVMOptions.data(); + g_vmEntry.vmKind = JAVA_VM_KIND; + result = createVM(&vm, &env, &javaVMArgs); + } +#endif + +#if defined(KOALA_ANI) + if (vmKind == PANDA_ANI_VM_KIND) { + g_vmEntry.vmKind = vmKind; + + uint32_t version = ANI_VERSION_1; + size_t nVMs = 0; + typedef int (*getVMs_t)(void** pVM, size_t bufLen, size_t* nVMs); + typedef int (*createVM_t)(const void* args, uint32_t version, void** pVM); + createVM_t createVM = (createVM_t)findSymbol(handle, "ANI_CreateVM"); + getVMs_t getVMs = (getVMs_t)findSymbol(handle, "ANI_GetCreatedVMs"); + result = getVMs ? getVMs(&vm, 1, &nVMs) : 0; + if (nVMs == 0 && result == 0) { + std::vector pandaVMOptions; + + auto [bootFiles, userFiles] = GetBootAndAppPandaFiles(thisVM, bootFilesDir, userFilesDir); + LOGI("ANI: user abc-files \"%" LOG_PUBLIC "s\" from %" LOG_PUBLIC "s", userFiles.c_str(), userFilesDir); + g_vmEntry.userFilesAbcPaths = std::move(userFiles); + + bootFiles = "--ext:--boot-panda-files=" + bootFiles; + LOGI("ANI boot-panda-files option: \"%" LOG_PUBLIC "s\"", bootFiles.c_str()); + pandaVMOptions.push_back({bootFiles.c_str(), nullptr}); + + auto aotFiles = GetAOTFiles(bootFilesDir); + if (!aotFiles.empty()) { + LOGI("ANI AOT files: \"%" LOG_PUBLIC "s\"", aotFiles.c_str()); + aotFiles = "--ext:--aot-files=" + aotFiles; + pandaVMOptions.push_back({aotFiles.c_str(), nullptr}); + } + + pandaVMOptions.push_back({"--ext:--gc-trigger-type=heap-trigger", nullptr}); + std::string nativeLibraryPathOption = + std::string("--ext:--native-library-path=") + appLibPath; + pandaVMOptions.push_back({nativeLibraryPathOption.c_str(), nullptr}); + pandaVMOptions.push_back({"--ext:--verification-mode=on-the-fly", nullptr}); + pandaVMOptions.push_back({"--ext:--compiler-enable-jit=true", nullptr}); + pandaVMOptions.push_back({"--logger", reinterpret_cast(AniMobileLog)}); + pandaVMOptions.push_back({"--ext:--enable-an", nullptr}); + ani_options optionsPtr = {pandaVMOptions.size(), pandaVMOptions.data()}; + + result = createVM(&optionsPtr, version, &vm); + } + + if (result == 0) { + ani_vm* vmInstance = (ani_vm*)vm; + ani_env* pEnv = nullptr; + result = vmInstance->GetEnv(version, &pEnv); + env = static_cast(pEnv); + } + } +#endif /* KOALA_ANI */ + +// For now we use ETS API for VM startup and entry. +#if defined(KOALA_ETS_NAPI) + if (vmKind == PANDA_VM_KIND) { + EtsVMInitArgs pandaVMArgs; + pandaVMArgs.version = ETS_NAPI_VERSION_1_0; + std::vector etsVMOptions; + std::vector files; + traverseDir(std::string(bootFilesDir), files, ".abc"); + std::sort(files.begin(), files.end()); + std::vector files_aot; + traverseDir(std::string(bootFilesDir), files_aot, ".an"); + std::sort(files_aot.begin(), files_aot.end()); + etsVMOptions = { +#if USE_SYSTEM_ARKVM + {EtsOptionType::ETS_BOOT_FILE, SYSTEM_ARK_STDLIB_PATH}, +#elif defined(KOALA_OHOS) + {EtsOptionType::ETS_BOOT_FILE, (std::string(OHOS_USER_LIBS) + "/" + "etsstdlib.abc").c_str() }, + +#elif defined(KOALA_LINUX) || defined(KOALA_MACOS) || defined(KOALA_WINDOWS) + {EtsOptionType::ETS_BOOT_FILE, (char*)strdup((std::string(thisVM->sdkPath) + "/ets/etsstdlib.abc").c_str())}, +#endif + }; + std::string all_files; + for (const std::string& path : files) { + etsVMOptions.push_back({EtsOptionType::ETS_BOOT_FILE, (char*)strdup(path.c_str())}); + if (all_files.size() > 0) all_files.append(":"); + all_files.append(path); + } + LOGI("Using ETSNAPI: classpath \"%" LOG_PUBLIC "s\" from %" LOG_PUBLIC "s", all_files.c_str(), bootFilesDir); + std::string all_files_aot; + for (const std::string& path : files_aot) { + etsVMOptions.push_back({EtsOptionType::ETS_AOT_FILE, (char*)strdup(path.c_str())}); + if (all_files_aot.size() > 0) all_files_aot.append(":"); + all_files_aot.append(path); + } + LOGI("ETSNAPI classpath (aot) \"%" LOG_PUBLIC "s\" from %" LOG_PUBLIC "s", all_files_aot.c_str(), bootFilesDir); + etsVMOptions.push_back({EtsOptionType::ETS_GC_TRIGGER_TYPE, "heap-trigger"}); + etsVMOptions.push_back({EtsOptionType::ETS_NATIVE_LIBRARY_PATH, (char*)strdup(std::string(appLibPath).c_str())}); + etsVMOptions.push_back({EtsOptionType::ETS_VERIFICATION_MODE, "on-the-fly"}); + etsVMOptions.push_back({EtsOptionType::ETS_JIT, nullptr}); + etsVMOptions.push_back({EtsOptionType::ETS_MOBILE_LOG, (void*)ArkMobileLog}); + etsVMOptions.push_back({EtsOptionType::ETS_AOT, nullptr}); + pandaVMArgs.nOptions = etsVMOptions.size(); + pandaVMArgs.options = etsVMOptions.data(); + g_vmEntry.vmKind = vmKind; + + int32_t nVMs = 0; + typedef int (*createVM_t)(void** pVM, void** pEnv, void* vmInitArgs); + typedef int (*getVMs_t)(void** pVM, int32_t bufLen, int32_t* nVMs); + createVM_t createVM = (createVM_t)findSymbol(handle, "ETS_CreateVM"); + getVMs_t getVMs = (getVMs_t)findSymbol(handle, "ETS_GetCreatedVMs"); + result = getVMs ? getVMs(&vm, 1, &nVMs) : 0; + if (nVMs != 0) { + __EtsVM* vmInstance = (__EtsVM*)vm; + EtsEnv* pEnv = nullptr; + vmInstance->GetEnv(&pEnv, ETS_NAPI_VERSION_1_0); + env = static_cast(pEnv); + + } else { + result = createVM(&vm, &env, &pandaVMArgs); + } + } +#endif + +#ifdef KOALA_KOTLIN + if (vmKind == KOTLIN_KIND) { + g_vmEntry.vmKind = vmKind; + (void)vm; + + application_create_t application_create = (application_create_t)findSymbol(handle, "application_create"); + application_start_t application_start = (application_start_t)findSymbol(handle, "application_start"); + application_enter_t application_enter = (application_enter_t)findSymbol(handle, "application_enter"); + g_vmEntry.create = (void*)application_create; + g_vmEntry.start = (void*)application_start; + g_vmEntry.enter = (void*)application_enter; + + result = 0; + } +#endif + + if (result != 0) { + LOGE("Error creating a VM of kind %" LOG_PUBLIC "d: %" LOG_PUBLIC "d\n", vmKind, result); + return result; + } + g_vmEntry.env = env; + g_vmEntry.foreignVMContext = *foreignVMContext; + return 0; +} + +struct AppInfo { + const char* className; + const char* createMethodName; + const char* createMethodSig; + const char* startMethodName; + const char* startMethodSig; + const char* enterMethodName; + const char* enterMethodSig; + const char* emitEventMethodName; + const char* emitEventMethodSig; + const char* restartWithMethodName; + const char* restartWithMethodSig; + const char* loadViewMethodName; + const char* loadViewMethodSig; +}; + +#ifdef KOALA_JNI +const AppInfo javaAppInfo = { + "org/koalaui/arkoala/Application", + "createApplication", + "(Ljava/lang/String;Ljava/lang/String;)Lorg/koalaui/arkoala/Application;", + "start", + "(JI)J", + "enter", + "(IIJ)Z", + "emitEvent", + "(IIII)Ljava/lang/String;", + "UNUSED", + "()V" +}; +#endif + +#ifdef KOALA_ETS_NAPI +const AppInfo pandaAppInfo = { + "arkui/ArkUIEntry/Application", + "createApplication", + "Lstd/core/String;Lstd/core/String;ZI:Larkui/ArkUIEntry/Application;", + "start", + "JI:J", + "enter", + "IIJ:Z", + "emitEvent", + "IIII:Lstd/core/String;", + "UNUSED", + "I:I" +}; +const AppInfo harnessAppInfo = { + "@koalaui/ets-harness/src/EtsHarnessApplication/EtsHarnessApplication", + "createApplication", + "Lstd/core/String;Lstd/core/String;ZI:L@koalaui/ets-harness/src/EtsHarnessApplication/EtsHarnessApplication;", + "start", + "J:J", + "enter", + "IIJ:Z", + "emitEvent", + "IIII:Lstd/core/String;", + "restartWith", + "Lstd/core/String;:V", + }; +#endif +#ifdef KOALA_ANI +const AppInfo harnessAniAppInfo = { + "@koalaui.ets-harness.src.EtsHarnessApplication.EtsHarnessApplication", + "createApplication", + "C{std.core.String}C{std.core.String}C{std.core.String}zi:C{@koalaui.ets-harness.src.EtsHarnessApplication.EtsHarnessApplication}", + "start", + "li:l", + "enter", + "iil:z", + "emitEvent", + "iiii:C{std.core.String}", + "restartWith", + "C{std.core.String}:", + "UNUSED", + "i:i" +}; +const AppInfo aniAppInfo = { + "arkui.ArkUIEntry.Application", + "createApplication", + "C{std.core.String}C{std.core.String}C{std.core.String}zi:C{arkui.ArkUIEntry.Application}", + "start", + "li:l", + "enter", + "il:z", + "emitEvent", + "iiii:C{std.core.String}", + "UNUSED", + "i:i", + "loadView", + "C{std.core.String}C{std.core.String}:C{std.core.String}", +}; +#endif + +#ifdef KOALA_KOTLIN +const AppInfo kotlinAppInfo = { 0 }; +#endif + +extern "C" DLL_EXPORT KNativePointer StartApplication(const char* appUrl, const char* appParams, int32_t loopIterations) +{ + const auto isTestEnv = std::string(appUrl) == "EtsHarness"; + const AppInfo* appInfo = + #ifdef KOALA_JNI + (g_vmEntry.vmKind == JAVA_VM_KIND) ? &javaAppInfo : + #endif + #if defined(KOALA_ETS_NAPI) + (g_vmEntry.vmKind == PANDA_VM_KIND) ? isTestEnv ? &harnessAppInfo : &pandaAppInfo : + #endif + #if defined(KOALA_ANI) + (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) ? isTestEnv ? &harnessAniAppInfo : &aniAppInfo : + #endif + #if defined(KOALA_KOTLIN) + (g_vmEntry.vmKind == KOTLIN_KIND) ? &kotlinAppInfo : + #endif + nullptr; + + if (!appInfo) { + LOGE("No appInfo provided for VM kind %" LOG_PUBLIC "d (recompile vmloader.cc with the missing flags)\n", g_vmEntry.vmKind); + return nullptr; + } + + LOGI("Starting application %" LOG_PUBLIC "s with params %" LOG_PUBLIC "s", appUrl, appParams); +#ifdef KOALA_JNI + if (g_vmEntry.vmKind == JAVA_VM_KIND) { + JNIEnv* jEnv = (JNIEnv*)(g_vmEntry.env); + jclass appClass = jEnv->FindClass(appInfo->className); + if (!appClass) { + LOGE("Cannot load main class %s\n", appInfo->className); + return nullptr; + } + jmethodID create = jEnv->GetStaticMethodID(appClass, appInfo->createMethodName, appInfo->createMethodSig); + if (!create) { + LOGE("Cannot find create method %s\n", appInfo->createMethodName); + return nullptr; + } + auto app = jEnv->NewGlobalRef(jEnv->CallStaticObjectMethod(appClass, create, jEnv->NewStringUTF(appUrl), jEnv->NewStringUTF(appParams))); + g_vmEntry.app = app; + auto start = jEnv->GetMethodID(appClass, appInfo->startMethodName, appInfo->startMethodSig); + if (!start) { + LOGE("Cannot find start method \"%s %s\"\n", appInfo->startMethodName, appInfo->startMethodSig); + return nullptr; + } + g_vmEntry.enter = (void*)(jEnv->GetMethodID(appClass, appInfo->enterMethodName, appInfo->enterMethodSig)); + if (!g_vmEntry.enter) { + LOGE("Cannot find enter method %s\n", appInfo->enterMethodName); + return nullptr; + } + g_vmEntry.emitEvent = (void*)(jEnv->GetMethodID(appClass, appInfo->emitEventMethodName, appInfo->emitEventMethodSig)); + if (!g_vmEntry.emitEvent) { + LOGE("Cannot find emitEvent method %s\n", appInfo->emitEventMethodName); + return nullptr; + } + return reinterpret_cast(jEnv->CallLongMethod( + app, start)); + } +#endif +#if defined(KOALA_ETS_NAPI) + if (g_vmEntry.vmKind == PANDA_VM_KIND) { + EtsEnv* etsEnv = (EtsEnv*)g_vmEntry.env; + ets_class appClass = etsEnv->FindClass(appInfo->className); + if (!appClass) { + LOGE("Cannot load main class %" LOG_PUBLIC "s\n", appInfo->className); + if (etsEnv->ErrorCheck()) { + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + } + return nullptr; + } + ets_method create = etsEnv->GetStaticp_method(appClass, appInfo->createMethodName, appInfo->createMethodSig); + if (!create) { + LOGE("Cannot find create method %" LOG_PUBLIC "s\n", appInfo->createMethodName); + if (etsEnv->ErrorCheck()) { + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + } + return nullptr; + } + auto useNativeLog = false; + auto app = etsEnv->NewGlobalRef(etsEnv->CallStaticObjectMethod( + appClass, create, + etsEnv->NewStringUTF(appUrl), etsEnv->NewStringUTF(appParams), + useNativeLog, + g_vmEntry.vmKind + )); + if (!app) { + LOGE("createApplication returned null"); + if (etsEnv->ErrorCheck()) { + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + return nullptr; + } + return nullptr; + } + g_vmEntry.app = (void*)app; + auto start = etsEnv->Getp_method(appClass, appInfo->startMethodName, appInfo->startMethodSig); + g_vmEntry.enter = (void*)(etsEnv->Getp_method(appClass, appInfo->enterMethodName, nullptr /*appInfo->enterMethodSig */)); + if (!g_vmEntry.enter) { + LOGE("Cannot find enter method %" LOG_PUBLIC "s", appInfo->enterMethodName); + if (etsEnv->ErrorCheck()) { + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + } + return nullptr; + } + if (etsEnv->ErrorCheck()) { + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + return nullptr; + } + g_vmEntry.emitEvent = (void*)(etsEnv->Getp_method(appClass, appInfo->emitEventMethodName, appInfo->emitEventMethodSig)); + if (!g_vmEntry.emitEvent) { + LOGE("Cannot find enter emitEvent %" LOG_PUBLIC "s", appInfo->emitEventMethodSig); + if (etsEnv->ErrorCheck()) { + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + } + return nullptr; + } + if (isTestEnv) { + g_vmEntry.restartWith = (void*)(etsEnv->Getp_method(appClass, appInfo->restartWithMethodName, appInfo->restartWithMethodSig)); + if (!g_vmEntry.restartWith) { + LOGE("Cannot find enter restartWith %" LOG_PUBLIC "s", appInfo->restartWithMethodSig); + if (etsEnv->ErrorCheck()) { + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + } + return nullptr; + } + } + // Improve: pass app entry point! + return reinterpret_cast(etsEnv->CallLongMethod((ets_object)(app), start, &g_vmEntry.foreignVMContext)); + } +#endif +#if defined(KOALA_ANI) + if (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) { + auto *env = reinterpret_cast(g_vmEntry.env); + + ani_class appClass {}; + auto status = env->FindClass(appInfo->className, &appClass); + if (status != ANI_OK) { + LOGE("Cannot load main class %" LOG_PUBLIC "s\n", appInfo->className); + ResetErrorIfExists(env); + return nullptr; + } + ani_static_method create {}; + status = env->Class_FindStaticMethod(appClass, appInfo->createMethodName, appInfo->createMethodSig, &create); + if (status != ANI_OK) { + LOGE("Cannot find create method %" LOG_PUBLIC "s\n", appInfo->createMethodName); + ResetErrorIfExists(env); + return nullptr; + } + + ani_boolean useNativeLog = ANI_FALSE; + ani_string appUrlString {}; + status = env->String_NewUTF8(appUrl, interop_strlen(appUrl), &appUrlString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return nullptr; + } + + ani_string userPandaFilesPathString {}; + status = env->String_NewUTF8(g_vmEntry.userFilesAbcPaths.c_str(), g_vmEntry.userFilesAbcPaths.size(), &userPandaFilesPathString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return nullptr; + } + + ani_string appParamsString {}; + status = env->String_NewUTF8(appParams, interop_strlen(appParams), &appParamsString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return nullptr; + } + + ani_ref appInstance {}; + status = env->Class_CallStaticMethod_Ref(appClass, create, &appInstance, appUrlString, userPandaFilesPathString, appParamsString, + useNativeLog, static_cast(g_vmEntry.vmKind)); + if (status != ANI_OK) { + LOGE("createApplication returned null"); + ResetErrorIfExists(env); + return nullptr; + } + ani_ref app {}; + status = env->GlobalReference_Create(appInstance, &app); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return nullptr; + } + g_vmEntry.app = (void*)app; + + ani_method start {}; + status = env->Class_FindMethod(appClass, appInfo->startMethodName, appInfo->startMethodSig, &start); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return nullptr; + } + ani_method enter {}; + status = env->Class_FindMethod(appClass, appInfo->enterMethodName, nullptr, &enter); + if (status != ANI_OK) { + LOGE("Cannot find `enter` method %" LOG_PUBLIC "s", appInfo->enterMethodName); + ResetErrorIfExists(env); + return nullptr; + } + g_vmEntry.enter = reinterpret_cast(enter); + ani_method emitEvent {}; + status = env->Class_FindMethod(appClass, appInfo->emitEventMethodName, appInfo->emitEventMethodSig, &emitEvent); + if (status != ANI_OK) { + LOGE("Cannot find `emitEvent` method %" LOG_PUBLIC "s", appInfo->emitEventMethodSig); + ResetErrorIfExists(env); + return nullptr; + } + g_vmEntry.emitEvent = reinterpret_cast(emitEvent); + ani_method loadView {}; + status = env->Class_FindMethod(appClass, appInfo->loadViewMethodName, appInfo->loadViewMethodSig, &loadView); + if (status != ANI_OK) { + LOGE("Cannot find `%" LOG_PUBLIC "s` method %" LOG_PUBLIC "s", + appInfo->loadViewMethodName, appInfo->loadViewMethodSig); + ResetErrorIfExists(env); + return nullptr; + } + g_vmEntry.loadView = reinterpret_cast(loadView); + + if (isTestEnv) { + ani_method restartWith {}; + status = env->Class_FindMethod(appClass, appInfo->restartWithMethodName, appInfo->restartWithMethodSig, &restartWith); + if (status != ANI_OK) { + LOGE("Cannot find `restartWith` method sig=%" LOG_PUBLIC "s", appInfo->restartWithMethodSig); + ResetErrorIfExists(env); + return nullptr; + } + g_vmEntry.restartWith = reinterpret_cast(restartWith); + } + + ani_long ptr = 0; + // Improve: pass app entry point! + status = env->Object_CallMethod_Long(static_cast(appInstance), start, &ptr, + reinterpret_cast(&g_vmEntry.foreignVMContext), loopIterations); + if (status != ANI_OK) { + LOGE("Cannot start application"); + ResetErrorIfExists(env); + return nullptr; + } + return reinterpret_cast(ptr); + } +#endif + +#if defined(KOALA_KOTLIN) + if (g_vmEntry.vmKind == KOTLIN_KIND) { + application_create_t application_create = (application_create_t)g_vmEntry.create; + application_start_t application_start = (application_start_t)g_vmEntry.start; + + kotlin_kref_VMLoaderApplication app = application_create(appUrl, appParams); + g_vmEntry.app = app.pinned; + + kotlin_kref_PeerNodeStub root = application_start(app); + return root.pinned; + } +#endif + + return nullptr; +} + +extern "C" DLL_EXPORT KBoolean RunApplication(const KInt arg0, const KInt arg1) { +#ifdef KOALA_JNI + if (g_vmEntry.vmKind == JAVA_VM_KIND) { + JNIEnv* jEnv = (JNIEnv*)(g_vmEntry.env); + auto result = jEnv->CallBooleanMethod( + (jobject)(g_vmEntry.app), + (jmethodID)(g_vmEntry.enter), + (jint)arg0, + (jint)arg1, + (int64_t)(intptr_t)(&g_vmEntry.foreignVMContext) + ); + if (jEnv->ExceptionCheck()) { + jEnv->ExceptionDescribe(); + jEnv->ExceptionClear(); + } + return result; + } +#endif +#if defined(KOALA_ETS_NAPI) + if (g_vmEntry.vmKind == PANDA_VM_KIND) { + EtsEnv* etsEnv = (EtsEnv*)(g_vmEntry.env); + if (!g_vmEntry.enter) { + LOGE("Cannot find enter method"); + return -1; + } + auto result = etsEnv->CallBooleanMethod( + (ets_object)(g_vmEntry.app), + (ets_method)(g_vmEntry.enter), + (ets_int)arg0, + (ets_int)arg1, + (int64_t)(intptr_t)(&g_vmEntry.foreignVMContext) + ); + if (etsEnv->ErrorCheck()) { + LOGE("Calling enter() method gave an error"); + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + } + return result; + } +#endif +#if defined(KOALA_ANI) + if (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) { + ani_env* env = reinterpret_cast(g_vmEntry.env); + if (g_vmEntry.enter == nullptr) { + LOGE("Cannot find enter method"); + return -1; + } + ani_boolean result = ANI_FALSE; + auto status = env->Object_CallMethod_Boolean(reinterpret_cast(g_vmEntry.app), + reinterpret_cast(g_vmEntry.enter), &result, + static_cast(arg0), static_cast(arg1), + reinterpret_cast(&g_vmEntry.foreignVMContext)); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return ANI_FALSE; + } + return result; + } +#endif + +#ifdef KOALA_KOTLIN + if (g_vmEntry.vmKind == KOTLIN_KIND) { + kotlin_kref_VMLoaderApplication app = { .pinned = g_vmEntry.app }; + application_enter_t application_enter = (application_enter_t)g_vmEntry.enter; + return application_enter(app) ? 1 : 0; + } +#endif + + return 1; +} + +extern "C" DLL_EXPORT const char* EmitEvent(const KInt type, const KInt target, const KInt arg0, const KInt arg1) +{ +#ifdef KOALA_JNI + if (g_vmEntry.vmKind == JAVA_VM_KIND) { + JNIEnv* jEnv = (JNIEnv*)(g_vmEntry.env); + if (!g_vmEntry.emitEvent) { + LOGE("Cannot find emitEvent method"); + return "-1"; + } + auto rv = (jstring)jEnv->CallObjectMethod( + (jobject)(g_vmEntry.app), + (jmethodID)(g_vmEntry.emitEvent), + (jint)type, + (jint)target, + (jint)arg0, + (jint)arg1 + ); + if (jEnv->ExceptionCheck()) { + jEnv->ExceptionDescribe(); + jEnv->ExceptionClear(); + } + const char *result = jEnv->GetStringUTFChars(rv, 0); + return result; + } +#endif + +#if defined(KOALA_ETS_NAPI) + if (g_vmEntry.vmKind == PANDA_VM_KIND) { + EtsEnv* etsEnv = (EtsEnv*)(g_vmEntry.env); + if (!g_vmEntry.emitEvent) { + LOGE("Cannot find emitEvent method"); + return "-1"; + } + auto rv = (ets_string)etsEnv->CallObjectMethod( + (ets_object)(g_vmEntry.app), + (ets_method)(g_vmEntry.emitEvent), + (ets_int)type, + (ets_int)target, + (ets_int)arg0, + (ets_int)arg1 + ); + if (etsEnv->ErrorCheck()) { + LOGE("Calling emitEvent() method gave an error"); + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + } + const char *result = etsEnv->GetStringUTFChars(rv, 0); + return result; + } +#endif +#if defined(KOALA_ANI) + if (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) { + ani_env *env = reinterpret_cast(g_vmEntry.env); + if (g_vmEntry.emitEvent == nullptr) { + LOGE("Cannot find emitEvent method"); + return "-1"; + } + ani_ref result {}; + auto status = env->Object_CallMethod_Ref(reinterpret_cast(g_vmEntry.app), + reinterpret_cast(g_vmEntry.emitEvent), + &result, + static_cast(type), + static_cast(target), + static_cast(arg0), + static_cast(arg1)); + if (status != ANI_OK) { + LOGE("Calling emitEvent() method gave an error"); + ResetErrorIfExists(env); + return "-1"; + } + + auto str = static_cast(result); + ani_size sz = 0; + status = env->String_GetUTF8Size(str, &sz); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return "-1"; + } + auto buffer = new char[sz + 1]; + ani_size writtenChars = 0; + status = env->String_GetUTF8(str, buffer, sz + 1, &writtenChars); + if (status != ANI_OK || writtenChars != sz) { + delete [] buffer; + ResetErrorIfExists(env); + return "-1"; + } + return buffer; + } +#endif + return "-1"; +} + +extern "C" DLL_EXPORT void RestartWith(const char* page) +{ +#ifdef KOALA_JNI + if (g_vmEntry.vmKind == JAVA_VM_KIND) { + JNIEnv* jEnv = (JNIEnv*)(g_vmEntry.env); + if (!g_vmEntry.restartWith) { + LOGE("Cannot find restartWith method"); + return; + } + jEnv->CallVoidMethod( + (jobject)(g_vmEntry.app), + (jmethodID)(g_vmEntry.restartWith), + jEnv->NewStringUTF(page) + ); + if (jEnv->ExceptionCheck()) { + jEnv->ExceptionDescribe(); + jEnv->ExceptionClear(); + } + } +#endif +#if defined(KOALA_ETS_NAPI) + if (g_vmEntry.vmKind == PANDA_VM_KIND) { + EtsEnv* etsEnv = (EtsEnv*)(g_vmEntry.env); + if (!g_vmEntry.restartWith) { + LOGE("Cannot find restartWith method"); + return; + } + etsEnv->CallVoidMethod( + (ets_object)(g_vmEntry.app), + (ets_method)(g_vmEntry.restartWith), + etsEnv->NewStringUTF(page) + ); + if (etsEnv->ErrorCheck()) { + LOGE("Calling restartWith() method gave an error"); + etsEnv->ErrorDescribe(); + etsEnv->ErrorClear(); + } + } +#endif +#if defined(KOALA_ANI) + if (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) { + ani_env *env = reinterpret_cast(g_vmEntry.env); + if (!g_vmEntry.restartWith) { + LOGE("Cannot find restartWith method"); + return; + } + ani_string pageString {}; + auto status = env->String_NewUTF8(page, interop_strlen(page), &pageString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return; + } + status = env->Object_CallMethod_Void(reinterpret_cast(g_vmEntry.app), + reinterpret_cast(g_vmEntry.restartWith), pageString); + if (status != ANI_OK) { + LOGE("Calling restartWith() method gave an error"); + ResetErrorIfExists(env); + } + } +#endif +} + +extern "C" DLL_EXPORT const char* LoadView(const char* className, const char* params) +{ +#if defined(KOALA_ANI) + if (g_vmEntry.vmKind == PANDA_ANI_VM_KIND) { + ani_env *env = reinterpret_cast(g_vmEntry.env); + if (!g_vmEntry.loadView) { + return strdup("Cannot find loadView() method"); + } + ani_string classNameString {}; + auto status = env->String_NewUTF8(className, interop_strlen(className), &classNameString); + if (status != ANI_OK) { + return strdup("Cannot make ANI string"); + } + ani_string paramsString {}; + status = env->String_NewUTF8(params, interop_strlen(params), ¶msString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return strdup("Cannot make ANI string"); + } + ani_string resultString = nullptr; + status = env->Object_CallMethod_Ref(reinterpret_cast(g_vmEntry.app), + reinterpret_cast(g_vmEntry.loadView), + (ani_ref*)&resultString, + classNameString, paramsString); + if (status != ANI_OK) { + ResetErrorIfExists(env); + return strdup("Calling laodView() method gave an error"); + } + ani_size resultStringLength = 0; + status = env->String_GetUTF8Size(resultString, &resultStringLength); + char* resultChars = (char*)malloc(resultStringLength); + if (!resultChars) { + return strdup("Cannot allocate memory"); + } + status = env->String_GetUTF8(resultString, resultChars, resultStringLength, &resultStringLength); + return resultChars; + } +#endif + return strdup("Unsupported"); +} + +namespace fs = std::filesystem; + +bool ends_with(std::string str, std::string suffix) +{ + return str.size() >= suffix.size() && str.compare(str.size()-suffix.size(), suffix.size(), suffix) == 0; +} + +void traverseDir(const std::string& root, std::vector& paths, std::string suffix, const std::vector& fallbackPaths) +{ + #ifdef KOALA_OHOS_ARM32 + // selinux prohibits any access to "/system/framework" + if (root == "/system/framework") { + for (auto path: fallbackPaths) { + paths.push_back(root + "/" + path + suffix); + } + return; + } + #endif + + if (!fs::exists(root)) { + LOGE("Cannot open dir %" LOG_PUBLIC "s\n", root.c_str()); + return; + } + + #if defined(KOALA_OHOS) + suffix += ".so"; + #endif + + LOGI("Searching in %" LOG_PUBLIC "s\n", root.c_str()); + for (auto &file : fs::recursive_directory_iterator(root)) { + if (ends_with(file.path().string(), suffix) && fs::is_regular_file(file)) { + paths.push_back(file.path().string()); + } + } +} diff --git a/koala_tools/interop/src/cpp/wasm/convertors-wasm.h b/koala_tools/interop/src/cpp/wasm/convertors-wasm.h new file mode 100644 index 0000000000000000000000000000000000000000..d6a1220f6372c72b7f587dcc7c6f1d27fae599a6 --- /dev/null +++ b/koala_tools/interop/src/cpp/wasm/convertors-wasm.h @@ -0,0 +1,1033 @@ +/* + * 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. + */ + +#ifndef CONVERTORS_WASM_H +#define CONVERTORS_WASM_H + +#include "koala-types.h" + +#include +#define KOALA_INTEROP_EXPORT EMSCRIPTEN_KEEPALIVE extern "C" + +#include "interop-logging.h" + +template +struct InteropTypeConverter { + using InteropType = T; + static T convertFrom(InteropType value) = delete; + static InteropType convertTo(T value) = delete; + static void release(InteropType value, T converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = const uint8_t*; + static KStringPtr convertFrom(InteropType value) { + if (value == nullptr) return KStringPtr(); + KStringPtr result; + int len = (value[0] | (value[1] << 8) | (value[2] << 16) | (value[3] << 24)); + return KStringPtr(value + sizeof(int), len, true); + } + static InteropType convertTo(KStringPtr &value) { + return (InteropType)value.c_str(); + }; +}; + +template<> +struct InteropTypeConverter { + using InteropType = bool; + static KBoolean convertFrom(InteropType value) { return value; } + static InteropType convertTo(KBoolean value) { return value; } + static void release(InteropType value, KBoolean converted) {} +}; + + +template<> +struct InteropTypeConverter { + using InteropType = int; + static KInt convertFrom(InteropType value) { return value; } + static InteropType convertTo(KInt value) { return value; } + static void release(InteropType value, KInt converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = uint32_t; + static KUInt convertFrom(InteropType value) { return value; } + static InteropType convertTo(KUInt value) { return value; } + static void release(InteropType value, KUInt converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = uint8_t; + static KByte convertFrom(InteropType value) { return value; } + static InteropType convertTo(KByte value) { return value; } + static void release(InteropType value, KByte converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = float; + static KFloat convertFrom(InteropType value) { return value; } + static InteropType convertTo(InteropFloat32 value) { return value; } + static void release(InteropType value, KFloat converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = double; + static KDouble convertFrom(InteropType value) { return value; } + static InteropType convertTo(InteropFloat64 value) { return value; } + static void release(InteropType value, KDouble converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = void *; + static KNativePointer convertFrom(InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(KNativePointer value) { + return reinterpret_cast(value); + } + static void release(InteropType value, KNativePointer converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = void **; + static KNativePointerArray convertFrom(InteropType value) { + return reinterpret_cast(value); + } + static InteropType convertTo(KNativePointerArray value) { + return reinterpret_cast(value); + } + static void release(InteropType value, KNativePointerArray converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = long; + static KLong convertFrom(InteropType value) { + return value; + } + static InteropType convertTo(KLong value) { + return value; + } + static void release(InteropType value, KLong converted) {} +}; + +template<> +struct InteropTypeConverter { + using InteropType = uint64_t; + static KULong convertFrom(InteropType value) { + return static_cast(value); + } + static InteropType convertTo(KULong value) { + return static_cast(value); + } + static void release(InteropType value, KULong converted) {} +}; + + +template<> +struct InteropTypeConverter { + using InteropType = int32_t*; + static KInt* convertFrom(InteropType value) { + if (!value) return nullptr; + return value; + } + static InteropType convertTo(KInt* value) = delete; + static void release(InteropType value, KInt* converted) { + if (value) delete value; + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = float*; + static KFloat* convertFrom(InteropType value) { + if (!value) return nullptr; + return value; + } + static InteropType convertTo(KFloat* value) = delete; + static void release(InteropType value, KFloat* converted) { + if (value) delete value; + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = unsigned char *; + static KByte* convertFrom(InteropType value) { + if (!value) return nullptr; + return (KByte*)value; + } + static InteropType convertTo(KByte* value) = delete; + static void release(InteropType value, KByte* converted) { + if (value) delete value; + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = unsigned short *; + static KUShort* convertFrom(InteropType value) { + if (!value) return nullptr; + return (KUShort*)value; + } + static InteropType convertTo(KUShort* value) = delete; + static void release(InteropType value, KUShort* converted) { + if (value) delete value; + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = short *; + static KShort* convertFrom(InteropType value) { + if (!value) return nullptr; + return (KShort*)value; + } + static InteropType convertTo(KShort* value) = delete; + static void release(InteropType value, KShort* converted) { + if (value) delete value; + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = const unsigned char *; + static KStringArray convertFrom(InteropType value) { + if (!value) return nullptr; + return (KStringArray)value; + } + static InteropType convertTo(KStringArray value) = delete; + static void release(InteropType value, KStringArray converted) { + if (value) delete value; + } +}; + +template<> +struct InteropTypeConverter { + using InteropType = long; + static KSerializerBuffer convertFrom(InteropType value) { + return reinterpret_cast(static_cast(value)); + } + static InteropType convertTo(KSerializerBuffer value) = delete; + static void release(InteropType value, KSerializerBuffer converted) {} +}; + +template <> struct InteropTypeConverter { + using InteropType = double; + static KInteropNumber convertFrom(InteropType value) { + return KInteropNumber::fromDouble(value); + } + static InteropType convertTo(KInteropNumber value) { + return value.asDouble(); + } + static void release(InteropType value, KInteropNumber converted) {} +}; + +template +inline Type getArgument(typename InteropTypeConverter::InteropType arg) { + return InteropTypeConverter::convertFrom(arg); +} + +template +inline void releaseArgument(typename InteropTypeConverter::InteropType arg, Type& data) { + InteropTypeConverter::release(arg, data); +} + +template +inline typename InteropTypeConverter::InteropType makeResult(T value) { + return InteropTypeConverter::convertTo(value); +} + +// Improve: Rewrite all others to typed convertors. + +#define KOALA_INTEROP_0(name, Ret) \ +KOALA_INTEROP_EXPORT Ret name() { \ + KOALA_MAYBE_LOG(name) \ + return makeResult(impl_##name()); \ +} + +#define KOALA_INTEROP_1(name, Ret, P0) \ +KOALA_INTEROP_EXPORT Ret name(InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + return makeResult(impl_##name(p0)); \ +} + +#define KOALA_INTEROP_2(name, Ret, P0, P1) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + return makeResult(impl_##name(p0, p1)); \ +} + +#define KOALA_INTEROP_3(name, Ret, P0, P1, P2) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + return makeResult(impl_##name(p0, p1, p2)); \ +} + +#define KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + return makeResult(impl_##name(p0, p1, p2, p3)); \ +} + +#define KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4)); \ +} + +#define KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5)); \ +} + +#define KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6)); \ +} + +#define KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7)); \ +} + +#define KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8)); \ +} + +#define KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9)); \ +} + +#define KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)); \ +} + +#define KOALA_INTEROP_12(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11)); \ +} + +#define KOALA_INTEROP_13(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); \ +} + +#define KOALA_INTEROP_14(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3, \ + InteropTypeConverter::InteropType _p4, \ + InteropTypeConverter::InteropType _p5, \ + InteropTypeConverter::InteropType _p6, \ + InteropTypeConverter::InteropType _p7, \ + InteropTypeConverter::InteropType _p8, \ + InteropTypeConverter::InteropType _p9, \ + InteropTypeConverter::InteropType _p10, \ + InteropTypeConverter::InteropType _p11, \ + InteropTypeConverter::InteropType _p12, \ + InteropTypeConverter::InteropType _p13 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + P13 p13 = getArgument(_p13); \ + return makeResult(impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13)); \ +} + + + +#define KOALA_INTEROP_V0(name) \ +KOALA_INTEROP_EXPORT void name() { \ + KOALA_MAYBE_LOG(name) \ + impl_##name(); \ + return; \ +} + +#define KOALA_INTEROP_V1(name, P0) \ +KOALA_INTEROP_EXPORT void name(typename InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + impl_##name(p0); \ + return; \ +} + +#define KOALA_INTEROP_V2(name, P0, P1) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + impl_##name(p0, p1); \ + return; \ +} + +#define KOALA_INTEROP_V3(name, P0, P1, P2) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + impl_##name(p0, p1, p2); \ + return; \ +} + +#define KOALA_INTEROP_V4(name, P0, P1, P2, P3) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + impl_##name(p0, p1, p2, p3); \ + return; \ +} + +#define KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + impl_##name(p0, p1, p2, p3, p4); \ + return; \ +} + +#define KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + impl_##name(p0, p1, p2, p3, p4, p5); \ + return; \ +} + +#define KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6); \ + return; \ +} + +#define KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7); \ + return; \ +} + +#define KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8); \ + return; \ +} + +#define KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8, \ + typename InteropTypeConverter::InteropType _p9 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); \ + return; \ +} + +#define KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8, \ + typename InteropTypeConverter::InteropType _p9, \ + typename InteropTypeConverter::InteropType _p10 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); \ + return; \ +} + +#define KOALA_INTEROP_V12(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8, \ + typename InteropTypeConverter::InteropType _p9, \ + typename InteropTypeConverter::InteropType _p10, \ + typename InteropTypeConverter::InteropType _p11 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); \ + return; \ +} + +#define KOALA_INTEROP_V13(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8, \ + typename InteropTypeConverter::InteropType _p9, \ + typename InteropTypeConverter::InteropType _p10, \ + typename InteropTypeConverter::InteropType _p11, \ + typename InteropTypeConverter::InteropType _p12 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); \ + return; \ +} + +#define KOALA_INTEROP_V14(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ +KOALA_INTEROP_EXPORT void name( \ + typename InteropTypeConverter::InteropType _p0, \ + typename InteropTypeConverter::InteropType _p1, \ + typename InteropTypeConverter::InteropType _p2, \ + typename InteropTypeConverter::InteropType _p3, \ + typename InteropTypeConverter::InteropType _p4, \ + typename InteropTypeConverter::InteropType _p5, \ + typename InteropTypeConverter::InteropType _p6, \ + typename InteropTypeConverter::InteropType _p7, \ + typename InteropTypeConverter::InteropType _p8, \ + typename InteropTypeConverter::InteropType _p9, \ + typename InteropTypeConverter::InteropType _p10, \ + typename InteropTypeConverter::InteropType _p11, \ + typename InteropTypeConverter::InteropType _p12, \ + typename InteropTypeConverter::InteropType _p13 \ +) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + P4 p4 = getArgument(_p4); \ + P5 p5 = getArgument(_p5); \ + P6 p6 = getArgument(_p6); \ + P7 p7 = getArgument(_p7); \ + P8 p8 = getArgument(_p8); \ + P9 p9 = getArgument(_p9); \ + P10 p10 = getArgument(_p10); \ + P11 p11 = getArgument(_p11); \ + P12 p12 = getArgument(_p12); \ + P13 p13 = getArgument(_p13); \ + impl_##name(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); \ + return; \ +} + +#define KOALA_INTEROP_CTX_1(name, Ret, P0) \ +KOALA_INTEROP_EXPORT Ret name(InteropTypeConverter::InteropType _p0) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + return makeResult(impl_##name(nullptr, p0)); \ +} + +#define KOALA_INTEROP_CTX_2(name, Ret, P0, P1) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + return makeResult(impl_##name(nullptr, p0, p1)); \ +} + +#define KOALA_INTEROP_CTX_3(name, Ret, P0, P1, P2) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + return makeResult(impl_##name(nullptr, p0, p1, p2)); \ +} + +#define KOALA_INTEROP_CTX_4(name, Ret, P0, P1, P2, P3) \ +KOALA_INTEROP_EXPORT Ret name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + return makeResult(impl_##name(nullptr, p0, p1, p2, p3)); \ +} + +#define KOALA_INTEROP_CTX_V3(name, P0, P1, P2) \ +KOALA_INTEROP_EXPORT void name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + impl_##name(nullptr, p0, p1, p2); \ +} + +#define KOALA_INTEROP_CTX_V4(name, P0, P1, P2, P3) \ +KOALA_INTEROP_EXPORT void name( \ + InteropTypeConverter::InteropType _p0, \ + InteropTypeConverter::InteropType _p1, \ + InteropTypeConverter::InteropType _p2, \ + InteropTypeConverter::InteropType _p3) { \ + KOALA_MAYBE_LOG(name) \ + P0 p0 = getArgument(_p0); \ + P1 p1 = getArgument(_p1); \ + P2 p2 = getArgument(_p2); \ + P3 p3 = getArgument(_p3); \ + impl_##name(nullptr, p0, p1, p2, p3); \ +} + +#define KOALA_INTEROP_DIRECT_0(name, Ret) \ + KOALA_INTEROP_0(name, Ret) +#define KOALA_INTEROP_DIRECT_1(name, Ret, P0) \ + KOALA_INTEROP_1(name, Ret, P0) +#define KOALA_INTEROP_DIRECT_2(name, Ret, P0, P1) \ + KOALA_INTEROP_2(name, Ret, P0, P1) +#define KOALA_INTEROP_DIRECT_3(name, Ret, P0, P1, P2) \ + KOALA_INTEROP_3(name, Ret, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_4(name, Ret, P0, P1, P2, P3) \ + KOALA_INTEROP_4(name, Ret, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_5(name, Ret, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_5(name, Ret, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_6(name, Ret, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_6(name, Ret, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_7(name, Ret, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_8(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_9(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_10(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_11(name, Ret, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) +#define KOALA_INTEROP_DIRECT_V0(name) \ + KOALA_INTEROP_V0(name) +#define KOALA_INTEROP_DIRECT_V1(name, P0) \ + KOALA_INTEROP_V1(name, P0) +#define KOALA_INTEROP_DIRECT_V2(name, P0, P1) \ + KOALA_INTEROP_V2(name, P0, P1) +#define KOALA_INTEROP_DIRECT_V3(name, P0, P1, P2) \ + KOALA_INTEROP_V3(name, P0, P1, P2) +#define KOALA_INTEROP_DIRECT_V4(name, P0, P1, P2, P3) \ + KOALA_INTEROP_V4(name, P0, P1, P2, P3) +#define KOALA_INTEROP_DIRECT_V5(name, P0, P1, P2, P3, P4) \ + KOALA_INTEROP_V5(name, P0, P1, P2, P3, P4) +#define KOALA_INTEROP_DIRECT_V6(name, P0, P1, P2, P3, P4, P5) \ + KOALA_INTEROP_V6(name, P0, P1, P2, P3, P4, P5) +#define KOALA_INTEROP_DIRECT_V7(name, P0, P1, P2, P3, P4, P5, P6) \ + KOALA_INTEROP_V7(name, P0, P1, P2, P3, P4, P5, P6) +#define KOALA_INTEROP_DIRECT_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) \ + KOALA_INTEROP_V8(name, P0, P1, P2, P3, P4, P5, P6, P7) +#define KOALA_INTEROP_DIRECT_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) \ + KOALA_INTEROP_V9(name, P0, P1, P2, P3, P4, P5, P6, P7, P8) +#define KOALA_INTEROP_DIRECT_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ + KOALA_INTEROP_V10(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9) +#define KOALA_INTEROP_DIRECT_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ + KOALA_INTEROP_V11(name, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) + +#define KOALA_INTEROP_THROW(vmContext, object, ...) \ + do { \ + ASSERT(false); /* Improve: implement*/ \ + return __VA_ARGS__; \ + } while (0) + +#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ + do { \ + ASSERT(false); /* Improve: implement*/ \ + return __VA_ARGS__; \ + } while (0) + +#endif // CONVERTORS_WASM_H \ No newline at end of file diff --git a/koala_tools/interop/src/interop/DeserializerBase.ts b/koala_tools/interop/src/interop/DeserializerBase.ts new file mode 100644 index 0000000000000000000000000000000000000000..675299b3b0436a0ecc27cee5645a56421b7ab4f1 --- /dev/null +++ b/koala_tools/interop/src/interop/DeserializerBase.ts @@ -0,0 +1,242 @@ +/* + * Copyright (c) 2024 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 { CustomTextDecoder, float32, float64, int32, int64 } from "@koalaui/common" +import { Tags, CallbackResource } from "./SerializerBase"; +import { pointer, KUint8ArrayPtr, KSerializerBuffer } from "./InteropTypes" +import { NativeBuffer } from "./NativeBuffer"; +import { ResourceHolder } from "../arkts/ResourceManager"; +import { InteropNativeModule } from "./InteropNativeModule"; + +export class DeserializerBase { + private position = 0 + private readonly buffer: ArrayBuffer + private readonly length: int32 + private view: DataView + private static textDecoder = new CustomTextDecoder() + private static customDeserializers: CustomDeserializer | undefined = undefined + + static registerCustomDeserializer(deserializer: CustomDeserializer) { + let current = DeserializerBase.customDeserializers + if (current == undefined) { + DeserializerBase.customDeserializers = deserializer + } else { + while (current.next != undefined) { + current = current.next + } + current.next = deserializer + } + } + + constructor(buffer: ArrayBuffer|KSerializerBuffer|KUint8ArrayPtr, length: int32) { + if (typeof buffer != 'object') + throw new Error('Must be used only with ArrayBuffer') + if (buffer && ("buffer" in buffer)) { + buffer = buffer.buffer as ArrayBuffer + } + this.buffer = buffer as ArrayBuffer + this.length = length + this.view = new DataView(this.buffer) + } + + static get( + factory: (args: Uint8Array, length: int32) => T, + args: Uint8Array, length: int32): T { + + // Improve: Use cache + return factory(args, length); + } + + asBuffer(position?: int32, length?: int32): KSerializerBuffer { + return new Uint8Array(this.buffer, position, length) + } + + asArray(position?: int32, length?: int32): Uint8Array { + return new Uint8Array(this.buffer, position, length) + } + + currentPosition(): int32 { + return this.position + } + + resetCurrentPosition(): void { + this.position = 0 + } + + private checkCapacity(value: int32) { + if (value > this.length) { + throw new Error(`${value} is less than remaining buffer length`) + } + } + + readInt8(): int32 { + this.checkCapacity(1) + const value = this.view.getInt8(this.position) + this.position += 1 + return value + } + + readInt32(): int32 { + this.checkCapacity(4) + const value = this.view.getInt32(this.position, true) + this.position += 4 + return value + } + + readInt64(): int64 { + this.checkCapacity(8) + const value = this.view.getBigInt64(this.position, true) + this.position += 8 + return Number(value) + } + + readPointer(): pointer { + this.checkCapacity(8) + const value = this.view.getBigInt64(this.position, true) + this.position += 8 + return value + } + + readFloat32(): float32 { + this.checkCapacity(4) + const value = this.view.getFloat32(this.position, true) + this.position += 4 + return value + } + + readFloat64(): float64 { + this.checkCapacity(8) + const value = this.view.getFloat64(this.position, true) + this.position += 8 + return value + } + + readBoolean(): boolean { + this.checkCapacity(1) + const value = this.view.getInt8(this.position) + this.position += 1 + return value == 1 + } + + readFunction(): any { + // Improve: not exactly correct. + const id = this.readInt32() + return id + } + + readMaterialized(): object { + const ptr = this.readPointer() + return { ptr: ptr } + } + + readString(): string { + const length = this.readInt32() + this.checkCapacity(length) + // read without null-terminated byte + const value = DeserializerBase.textDecoder.decode(this.asArray(this.position, length - 1)); + this.position += length + return value + } + + readCustomObject(kind: string): any { + let current = DeserializerBase.customDeserializers + while (current) { + if (current.supports(kind)) { + return current.deserialize(this, kind) + } + current = current.next + } + // consume tag + const tag = this.readInt8() + return undefined + } + + readNumber(): int32 | undefined { + const tag = this.readInt8() + switch (tag) { + case Tags.UNDEFINED: + return undefined; + case Tags.INT32: + return this.readInt32() + case Tags.FLOAT32: + return this.readFloat32() + default: + throw new Error(`Unknown number tag: ${tag}`) + break + } + } + + readCallbackResource(): CallbackResource { + return { + resourceId: this.readInt32(), + hold: this.readPointer(), + release: this.readPointer(), + } + } + readObject():any { + const resource = this.readCallbackResource() + return ResourceHolder.instance().get(resource.resourceId) + } + + static lengthUnitFromInt(unit: int32): string { + let suffix: string + switch (unit) { + case 0: + suffix = "px" + break + case 1: + suffix = "vp" + break + case 3: + suffix = "%" + break + case 4: + suffix = "lpx" + break + default: + suffix = "" + } + return suffix + } + readBuffer(): ArrayBuffer { + const resource = this.readCallbackResource() + const data = this.readPointer() + const length = this.readInt64() + return InteropNativeModule._MaterializeBuffer(data, BigInt(length), resource.resourceId, resource.hold, resource.release) + } +} + +export abstract class CustomDeserializer { + protected constructor(protected supported: Array) { + } + + supports(kind: string): boolean { + return this.supported.includes(kind) + } + + abstract deserialize(serializer: DeserializerBase, kind: string): any + + next: CustomDeserializer | undefined = undefined +} + +class DateDeserializer extends CustomDeserializer { + constructor() { + super(["Date"]); + } + + deserialize(serializer: DeserializerBase, kind: string): any { + return new Date(serializer.readString()) + } +} +DeserializerBase.registerCustomDeserializer(new DateDeserializer()) diff --git a/koala_tools/interop/src/interop/Finalizable.ts b/koala_tools/interop/src/interop/Finalizable.ts new file mode 100644 index 0000000000000000000000000000000000000000..4fd12c9da41d3b67d27dce1fcb9952427aac3a68 --- /dev/null +++ b/koala_tools/interop/src/interop/Finalizable.ts @@ -0,0 +1,109 @@ +/* + * 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 { Wrapper, nullptr } from "./Wrapper" +import { finalizerRegister, finalizerUnregister, Thunk } from "@koalaui/common" +import { InteropNativeModule } from "./InteropNativeModule" +import { pointer } from "./InteropTypes" + +export class NativeThunk implements Thunk { + finalizer: pointer + obj: pointer + name: string|undefined + + constructor(obj: pointer, finalizer: pointer, name?: string) { + this.finalizer = finalizer + this.obj = obj + this.name = name + } + + clean() { + if (this.obj != nullptr) { + this.destroyNative(this.obj, this.finalizer) + } + this.obj = nullptr + } + + destroyNative(ptr: pointer, finalizer: pointer): void { + InteropNativeModule._InvokeFinalizer(ptr, finalizer) + } +} + +/** + * Class with the custom finalizer, usually used to release a native peer. + * Do not use directly, only via subclasses. + */ +export class Finalizable extends Wrapper { + finalizer: pointer + cleaner?: NativeThunk = undefined + managed: boolean + constructor(ptr: pointer, finalizer: pointer, managed: boolean = true) { + super(ptr) + this.finalizer = finalizer + this.managed = managed + const handle = this.createHandle() + + if (this.managed) { + // Improve: reenable exception. + if (this.ptr == nullptr) return // throw new Error("Can't have nullptr ptr ${}") + if (this.finalizer == nullptr) throw new Error("Managed finalizer is 0") + + const thunk = this.makeNativeThunk(ptr, finalizer, handle) + finalizerRegister(this, thunk) + this.cleaner = thunk + } + } + + createHandle(): string | undefined { + return undefined + } + + makeNativeThunk(ptr: pointer, finalizer: pointer, handle: string | undefined): NativeThunk { + return new NativeThunk(ptr, finalizer, handle) + } + + close() { + if (this.ptr == nullptr) { + throw new Error(`Closing a closed object: ` + this.toString()) + } else if (this.cleaner == null) { + throw new Error(`No thunk assigned to ` + this.toString()) + } else { + finalizerUnregister(this) + this.cleaner.clean() + this.cleaner = undefined + this.ptr = nullptr + } + } + + release(): pointer { + finalizerUnregister(this) + if (this.cleaner) + this.cleaner.obj = nullptr + let result = this.ptr + this.ptr = nullptr + return result + } + + resetPeer(pointer: pointer) { + if (this.managed) throw new Error("Can only reset peer for an unmanaged object") + this.ptr = pointer + } + + use(body: (value: Finalizable) => R): R { + let result = body(this) + this.close() + return result + } +} diff --git a/koala_tools/interop/src/interop/InteropNativeModule.ts b/koala_tools/interop/src/interop/InteropNativeModule.ts new file mode 100644 index 0000000000000000000000000000000000000000..0b5fe6119dd8fdc09cf16fef88cc88c4ce7c71ff --- /dev/null +++ b/koala_tools/interop/src/interop/InteropNativeModule.ts @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2024 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 { int32, int64 } from "@koalaui/common"; +import { KPointer, KSerializerBuffer, KStringPtr, KUint8ArrayPtr } from "./InteropTypes"; +import { loadNativeModuleLibrary } from "./loadLibraries"; + +export class InteropNativeModule { + public static _SetCallbackDispatcher(dispatcher: (id: int32, args: Uint8Array, length: int32) => int32): void { throw "method not loaded" } + public static _CleanCallbackDispatcher(): void { throw "method not loaded" } + + public static _GetGroupedLog(index: int32): KPointer { throw "method not loaded" } + public static _StartGroupedLog(index: int32): void { throw "method not loaded" } + public static _StopGroupedLog(index: int32): void { throw "method not loaded" } + public static _AppendGroupedLog(index: int32, message: string): void { throw "method not loaded" } + public static _PrintGroupedLog(index: int32): void { throw "method not loaded" } + public static _GetStringFinalizer(): KPointer { throw "method not loaded" } + public static _IncrementNumber(value: number): number { throw "method not loaded" } + public static _InvokeFinalizer(ptr1: KPointer, ptr2: KPointer): void { throw "method not loaded" } + public static _GetPtrVectorElement(ptr1: KPointer, arg: int32): KPointer { throw "method not loaded" } + public static _StringLength(ptr1: KPointer): int32 { throw "method not loaded" } + public static _StringData(ptr1: KPointer, array: KUint8ArrayPtr, arrayLength: int32): void { throw "method not loaded" } + public static _StringMake(str1: KStringPtr): KPointer { throw "method not loaded" } + public static _GetPtrVectorSize(ptr1: KPointer): int32 { throw "method not loaded" } + public static _ManagedStringWrite(str1: string, array: Uint8Array, arrayLength: int32, arg: int32): int32 { throw "method not loaded" } + public static _NativeLog(str1: string): void { throw "method not loaded" } + public static _Utf8ToString(data: KSerializerBuffer, offset: int32, length: int32): string { throw "method not loaded" } + public static _StdStringToString(cstring: KPointer): string { throw "method not loaded" } + public static _CheckCallbackEvent(buffer: KSerializerBuffer, bufferLength: int32): int32 { throw "method not loaded" } + public static _HoldCallbackResource(resourceId: int32): void { throw "method not loaded" } + public static _ReleaseCallbackResource(resourceId: int32): void { throw "method not loaded" } + public static _CallCallback(apiKind: int32, callbackKind: int32, args: KSerializerBuffer, argsSize: int32): void { throw "method not loaded" } + public static _CallCallbackSync(apiKind: int32, callbackKind: int32, args: KSerializerBuffer, argsSize: int32): void { throw "method not loaded" } + public static _CallCallbackResourceHolder(holder: KPointer, resourceId: int32): void { throw "method not loaded" } + public static _CallCallbackResourceReleaser(releaser: KPointer, resourceId: int32): void { throw "method not loaded" } + public static _CallbackAwait(pipeline: KPointer): Object { throw "method not loaded" } + public static _UnblockCallbackWait(pipeline: KPointer): void { throw "method not loaded" } + public static _MaterializeBuffer(data: KPointer, length: bigint, resourceId: int32, hold: KPointer, release: KPointer): ArrayBuffer { throw "method not loaded" } + public static _GetNativeBufferPointer(data: ArrayBuffer): KPointer { throw "method not loaded" } + + public static _LoadVirtualMachine(arg0: int32, arg1: string, arg2: string, arg3: string): int32 { throw "method not loaded" } + public static _RunApplication(arg0: int32, arg1: int32): number { throw "method not loaded" } + public static _StartApplication(appUrl: string, appParams: string): KPointer { throw "method not loaded" } + public static _EmitEvent(eventType: int32, target: int32, arg0: int32, arg1: int32): string { throw "method not loaded" } + public static _CallForeignVM(foreignContext: KPointer, kind: int32, args: KSerializerBuffer, argsSize: int32): int32 { throw "method not loaded" } + public static _SetForeignVMContext(context: KPointer): void { throw "method not loaded" } + public static _Malloc(length: int64): KPointer { throw "method not loaded" } + public static _GetMallocFinalizer(): KPointer { throw "method not loaded" } + public static _ReadByte(data: KPointer, index: int32, length: bigint): int32 { throw "method not loaded" } + public static _WriteByte(data: KPointer, index: int32, length: bigint, value: int32): void { throw "method not loaded" } + public static _CopyArray(data: KPointer, length: int64, args: KUint8ArrayPtr): void { throw "method not loaded" } +} + +export function loadInteropNativeModule() { + loadNativeModuleLibrary("InteropNativeModule", InteropNativeModule) +} \ No newline at end of file diff --git a/koala_tools/interop/src/interop/InteropOps.ts b/koala_tools/interop/src/interop/InteropOps.ts new file mode 100644 index 0000000000000000000000000000000000000000..41c956408386bd50fb9c80a1fa2a6b5a7b9e2b16 --- /dev/null +++ b/koala_tools/interop/src/interop/InteropOps.ts @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2024 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 { int32 } from "@koalaui/common" +import { withStringResult } from "./Platform" +import { KInt, KStringPtr, KUint8ArrayPtr, pointer } from "./InteropTypes" + +export type CallbackType = (args: Uint8Array, length: int32) => int32 + +class CallbackRecord { + constructor( + public readonly callback: CallbackType, + public readonly autoDisposable: boolean + ) { } +} + +class CallbackRegistry { + + static INSTANCE = new CallbackRegistry() + + private callbacks = new Map() + private id = 1024 + + constructor() { + this.callbacks.set(0, new CallbackRecord( + (args: Uint8Array, length: int32): int32 => { + console.log(`Callback 0 called with args = ${args} and length = ${length}`) + throw new Error(`Null callback called`) + }, false) + ) + } + + wrap(callback: CallbackType, autoDisposable: boolean): int32 { + const id = this.id++ + this.callbacks.set(id, new CallbackRecord(callback, autoDisposable)) + return id + } + + wrapSystem(id: number, callback: CallbackType, autoDisposable: boolean): int32 { + this.callbacks.set(id, new CallbackRecord(callback, autoDisposable)) + return id + } + + call(id: int32, args: Uint8Array, length: int32): int32 { + const record = this.callbacks.get(id) + if (!record) { + console.log(`Callback ${id} is not known`) + // throw new Error(`Disposed or unwrapped callback called (id = ${id})`) + return 0; // Improve: + } + if (record.autoDisposable) { + this.dispose(id) + } + return record.callback(args, length) + } + + dispose(id: int32) { + this.callbacks.delete(id) + } +} + +export function wrapCallback(callback: CallbackType, autoDisposable: boolean = true): int32 { + return CallbackRegistry.INSTANCE.wrap(callback, autoDisposable) +} + +export function wrapSystemCallback(id:number, callback: CallbackType): int32 { + return CallbackRegistry.INSTANCE.wrapSystem(id, callback, false) +} + +export function disposeCallback(id: int32) { + CallbackRegistry.INSTANCE.dispose(id) +} + +export function callCallback(id: int32, args: Uint8Array, length: int32): int32 { + return CallbackRegistry.INSTANCE.call(id, args, length) +} diff --git a/koala_tools/interop/src/interop/InteropTypes.ts b/koala_tools/interop/src/interop/InteropTypes.ts new file mode 100644 index 0000000000000000000000000000000000000000..0aaa80bd75648b71c171e7a80491f48693c1e17c --- /dev/null +++ b/koala_tools/interop/src/interop/InteropTypes.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2024 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 { int32, int64, float32, float64 } from "@koalaui/common" + +export type KStringPtr = int32 | string | null +export type KStringArrayPtr = int32 | Uint8Array | null +export type KInt32ArrayPtr = int32 | Int32Array | null +export type KFloat32ArrayPtr = int32 | Float32Array | null +export type KUint8ArrayPtr = int32 | Uint8Array | null +export type KInt = int32 +export type KUInt = int32 +export type KLong = int64 +export type KFloat = float32 +export type KDouble = float64 +export type KBoolean = int32 +export type KPointer = number | bigint +export type pointer = KPointer +export type KNativePointer = KPointer +export type KInteropReturnBuffer = Uint8Array +export type KSerializerBuffer = KUint8ArrayPtr \ No newline at end of file diff --git a/koala_tools/interop/src/interop/MaterializedBase.ts b/koala_tools/interop/src/interop/MaterializedBase.ts new file mode 100644 index 0000000000000000000000000000000000000000..51135fbaa7beee1e31f48d30b9eebc69c5fa45eb --- /dev/null +++ b/koala_tools/interop/src/interop/MaterializedBase.ts @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2024 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 { Finalizable } from "./Finalizable" + +export interface MaterializedBase { + getPeer(): Finalizable | undefined +} diff --git a/koala_tools/interop/src/interop/NativeBuffer.ts b/koala_tools/interop/src/interop/NativeBuffer.ts new file mode 100644 index 0000000000000000000000000000000000000000..47ded574783d48a6b88b4f5552cde24903f75039 --- /dev/null +++ b/koala_tools/interop/src/interop/NativeBuffer.ts @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2024 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 { pointer } from './InteropTypes' +import { int32, int64 } from '@koalaui/common' +import { InteropNativeModule } from "./InteropNativeModule" +import { Finalizable } from './Finalizable' + +// stub wrapper for KInteropBuffer +// export type NativeBuffer = ArrayBuffer + +export class NativeBuffer { + public data: pointer + public length: int64 + protected finalizable: Finalizable + + constructor(length: int64) + constructor(data: pointer, length: int64, destroy: pointer) + constructor(dataOrLength: pointer | int64, length_?: int64, destroy_?: pointer) { + let data: pointer + let length: int64 + let destroy: pointer + if (length_ === undefined) { + length = dataOrLength as int64 + data = InteropNativeModule._Malloc(length) + destroy = InteropNativeModule._GetMallocFinalizer() + } else { + data = dataOrLength as pointer + length = length_ as int64 + destroy = destroy_ as pointer + } + this.data = data + this.length = length + this.finalizable = new Finalizable(data, destroy) + } + + public readByte(index: int64): int32 { + return InteropNativeModule._ReadByte(this.data, index, BigInt(this.length)) + } + + public writeByte(index: int64, value: int32): void { + InteropNativeModule._WriteByte(this.data, index, BigInt(this.length), value) + } +} \ No newline at end of file diff --git a/koala_tools/interop/src/interop/NativeString.ts b/koala_tools/interop/src/interop/NativeString.ts new file mode 100644 index 0000000000000000000000000000000000000000..3e7affc5638f3d9da1a4ccbe044c0b8482630d80 --- /dev/null +++ b/koala_tools/interop/src/interop/NativeString.ts @@ -0,0 +1,30 @@ +/* + * 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 { Finalizable } from "./Finalizable" +import { InteropNativeModule } from "./InteropNativeModule" +import { pointer } from "./InteropTypes" + +export class NativeString extends Finalizable { + constructor(ptr: pointer) { + super(ptr, InteropNativeModule._GetStringFinalizer()) + } + static Make(value: string): NativeString { + return new NativeString(InteropNativeModule._StringMake(value)) + } + toString(): string { + return InteropNativeModule._StdStringToString(this.ptr) + } +} diff --git a/koala_tools/interop/src/interop/Platform.ts b/koala_tools/interop/src/interop/Platform.ts new file mode 100644 index 0000000000000000000000000000000000000000..ff2f7fd66a8004605f1fa41209daddc118562666 --- /dev/null +++ b/koala_tools/interop/src/interop/Platform.ts @@ -0,0 +1,89 @@ +/* + * 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 { int32 } from "@koalaui/common" +import { isNullPtr, nullptr, Wrapper } from "./Wrapper" +import { decodeToString } from "#common/wrappers/arrays" +import { setCallbackRegistry } from "#common/wrappers/Callback" +import { KPointer } from "./InteropTypes" + +export abstract class NativeStringBase extends Wrapper { + constructor(ptr: KPointer) { + super(ptr) + } + + protected abstract bytesLength(): int32 + protected abstract getData(data: Uint8Array): void + + toString(): string { + let length = this.bytesLength() + let data = new Uint8Array(length) + this.getData(data) + return decodeToString(data) + } + + abstract close(): void +} + +export abstract class ArrayDecoder { + abstract getArraySize(blob: KPointer): int32 + abstract disposeArray(blob: KPointer): void + abstract getArrayElement(blob: KPointer, index: int32): T + + decode(blob: KPointer): Array { + const size = this.getArraySize(blob) + const result = new Array(size) + for (let index = 0; index < size; index++) { + result[index] = this.getArrayElement(blob, index) + } + this.disposeArray(blob) + return result + } +} + + +// Improve: the semicolons after methods in these interfaces are to +// workaround ArkTS compiler parser bug +export interface CallbackRegistry { + registerCallback(callback: any, obj: any): KPointer; +} + +export interface PlatformDefinedData { + nativeString(ptr: KPointer): NativeStringBase; + nativeStringArrayDecoder(): ArrayDecoder; + callbackRegistry(): CallbackRegistry | undefined; +} + +let platformData: PlatformDefinedData|undefined = undefined + +export function providePlatformDefinedData(platformDataParam: PlatformDefinedData) { + platformData = platformDataParam + let registry = platformDataParam.callbackRegistry() + if (registry) setCallbackRegistry(registry) +} + +export function withStringResult(ptr: KPointer): string|undefined { + if (isNullPtr(ptr)) return undefined + let managedString = platformData!.nativeString(ptr) + let result = managedString?.toString() + managedString?.close() + return result +} + +export function withStringArrayResult(ptr: KPointer): Array { + if (ptr == nullptr) return new Array() + let managedStringArray = platformData!.nativeStringArrayDecoder().decode(ptr) + return managedStringArray.map((nativeString:NativeStringBase) => nativeString.toString()) +} diff --git a/koala_tools/interop/src/interop/SerializerBase.ts b/koala_tools/interop/src/interop/SerializerBase.ts new file mode 100644 index 0000000000000000000000000000000000000000..aa80556045253908148675517fe4959a646b615c --- /dev/null +++ b/koala_tools/interop/src/interop/SerializerBase.ts @@ -0,0 +1,331 @@ +/* + * Copyright (c) 2024 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 { float32, float64, int32, int64 } from "@koalaui/common" +import { pointer, KPointer, KSerializerBuffer } from "./InteropTypes" +import { wrapCallback } from "./InteropOps" +import { InteropNativeModule } from "./InteropNativeModule" +import { ResourceHolder, ResourceId } from "../arkts/ResourceManager" +import { MaterializedBase } from "./MaterializedBase" +import { nullptr } from "./Wrapper" +import { NativeBuffer } from "./NativeBuffer" + +// imports required interfaces (now generation is disabled) +// import { Resource } from "@arkoala/arkui" +/** + * Value representing possible JS runtime object type. + * Must be synced with "enum RuntimeType" in C++. + */ +export enum RuntimeType { + UNEXPECTED = -1, + NUMBER = 1, + STRING = 2, + OBJECT = 3, + BOOLEAN = 4, + UNDEFINED = 5, + BIGINT = 6, + FUNCTION = 7, + SYMBOL = 8, + MATERIALIZED = 9, +} + +/** + * Value representing object type in serialized data. + * Must be synced with "enum Tags" in C++. + */ +export enum Tags { + UNDEFINED = 101, + INT32 = 102, + FLOAT32 = 103, + STRING = 104, + LENGTH = 105, + RESOURCE = 106, + OBJECT = 107, +} + +export function runtimeType(value: any): int32 { + let type = typeof value + if (type == "number") return RuntimeType.NUMBER + if (type == "string") return RuntimeType.STRING + if (type == "undefined") return RuntimeType.UNDEFINED + if (type == "object") return RuntimeType.OBJECT + if (type == "boolean") return RuntimeType.BOOLEAN + if (type == "bigint") return RuntimeType.BIGINT + if (type == "function") return RuntimeType.FUNCTION + if (type == "symbol") return RuntimeType.SYMBOL + + throw new Error(`bug: ${value} is ${type}`) +} + +// Poor man's instanceof, fails on subclasses +export function isInstanceOf(className: string, value: object | undefined): boolean { + return value?.constructor.name === className +} + +export function registerCallback(value: object|undefined): int32 { + return wrapCallback((args: Uint8Array, length: int32) => { + // Improve: deserialize the callback arguments and call the callback + return 42 + }) +} + +export function toPeerPtr(value: object): KPointer { + if (value.hasOwnProperty("peer")) + return unsafeCast(value).getPeer()?.ptr ?? nullptr + else + throw new Error("Value is not a MaterializedBase instance") +} + +export interface CallbackResource { + resourceId: int32 + hold: pointer + release: pointer +} + +/* Serialization extension point */ +export abstract class CustomSerializer { + constructor(protected supported: Array) {} + supports(kind: string): boolean { return this.supported.includes(kind) } + abstract serialize(serializer: SerializerBase, value: any, kind: string): void + next: CustomSerializer | undefined = undefined +} + +export class SerializerBase { + private position = 0 + private buffer: ArrayBuffer + private view: DataView + + private static pool: SerializerBase[] = [ + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + new SerializerBase(), + ] + private static poolTop = 0 + + static hold(): SerializerBase { + if (this.poolTop === this.pool.length) { + throw new Error("Pool empty! Release one of taken serializers") + } + return SerializerBase.pool[this.poolTop++] + } + + private static customSerializers: CustomSerializer | undefined = undefined + static registerCustomSerializer(serializer: CustomSerializer) { + if (SerializerBase.customSerializers == undefined) { + SerializerBase.customSerializers = serializer + } else { + let current = SerializerBase.customSerializers + while (current.next != undefined) { current = current.next } + current.next = serializer + } + } + constructor() { + this.buffer = new ArrayBuffer(96) + this.view = new DataView(this.buffer) + } + public release() { + this.releaseResources() + this.position = 0 + if (this !== SerializerBase.pool[SerializerBase.poolTop - 1]) { + throw new Error("Serializers should be release in LIFO order") + } + SerializerBase.poolTop -= 1; + } + asBuffer(): KSerializerBuffer { + return new Uint8Array(this.buffer) + } + length(): int32 { + return this.position + } + getByte(offset: int32): int32 { + return this.view.getUint8(offset) as int32 + } + toArray(): Uint8Array { + return new Uint8Array(this.buffer.slice(0, this.currentPosition())) + } + currentPosition(): int32 { return this.position } + + private checkCapacity(value: int32) { + if (value < 1) { + throw new Error(`${value} is less than 1`) + } + let buffSize = this.buffer.byteLength + if (this.position > buffSize - value) { + const minSize = this.position + value + const resizedSize = Math.max(minSize, Math.round(3 * buffSize / 2)) + let resizedBuffer = new ArrayBuffer(resizedSize) + // Improve: can we grow without new? + // Improve: check the status of ArrayBuffer.transfer function implementation in STS + new Uint8Array(resizedBuffer).set(new Uint8Array(this.buffer)) + this.buffer = resizedBuffer + this.view = new DataView(resizedBuffer) + } + } + private heldResources: ResourceId[] = [] + holdAndWriteCallback(callback: object, hold: KPointer = 0, release: KPointer = 0, call: KPointer = 0, callSync: KPointer = 0): ResourceId { + const resourceId = ResourceHolder.instance().registerAndHold(callback) + this.heldResources.push(resourceId) + this.writeInt32(resourceId) + this.writePointer(hold) + this.writePointer(release) + this.writePointer(call) + this.writePointer(callSync) + return resourceId + } + holdAndWriteCallbackForPromiseVoid(hold: KPointer = 0, release: KPointer = 0, call: KPointer = 0, callSync = 0): [Promise, ResourceId] { + let resourceId: ResourceId = 0 + const promise = new Promise((resolve, reject) => { + const callback = (err: string[]|undefined) => { + if (err !== undefined) + reject(err) + else + resolve() + } + resourceId = this.holdAndWriteCallback(callback, hold, release, call, callSync) + }) + return [promise, resourceId] + } + holdAndWriteCallbackForPromise(hold: KPointer = 0, release: KPointer = 0, call: KPointer = 0): [Promise, ResourceId] { + let resourceId: ResourceId = 0 + const promise = new Promise((resolve, reject) => { + const callback = (value: T|undefined, err: string[]|undefined) => { + if (err !== undefined) + reject(err) + else + resolve(value!) + } + resourceId = this.holdAndWriteCallback(callback, hold, release, call) + }) + return [promise, resourceId] + } + writeCallbackResource(resource: CallbackResource) { + this.writeInt32(resource.resourceId) + this.writePointer(resource.hold) + this.writePointer(resource.release) + } + holdAndWriteObject(obj:any, hold: KPointer = 0, release: KPointer = 0): ResourceId { + const resourceId = ResourceHolder.instance().registerAndHold(obj) + this.heldResources.push(resourceId) + this.writeInt32(resourceId) + this.writePointer(hold) + this.writePointer(release) + return resourceId + } + private releaseResources() { + for (const resourceId of this.heldResources) + InteropNativeModule._ReleaseCallbackResource(resourceId) + // Improve: think about effective array clearing/pushing + this.heldResources = [] + } + writeCustomObject(kind: string, value: any) { + let current = SerializerBase.customSerializers + while (current) { + if (current.supports(kind)) { + current.serialize(this, value, kind) + return + } + current = current.next + } + console.log(`Unsupported custom serialization for ${kind}, write undefined`) + this.writeInt8(Tags.UNDEFINED) + } + writeNumber(value: number|undefined) { + this.checkCapacity(5) + if (value == undefined) { + this.view.setInt8(this.position, Tags.UNDEFINED) + this.position++ + return + } + if (value == Math.round(value)) { + this.view.setInt8(this.position, Tags.INT32) + this.view.setInt32(this.position + 1, value, true) + this.position += 5 + return + } + this.view.setInt8(this.position, Tags.FLOAT32) + this.view.setFloat32(this.position + 1, value, true) + this.position += 5 + } + writeInt8(value: int32) { + this.checkCapacity(1) + this.view.setInt8(this.position, value) + this.position += 1 + } + writeInt32(value: int32) { + this.checkCapacity(4) + this.view.setInt32(this.position, value, true) + this.position += 4 + } + writeInt64(value: int64) { + this.checkCapacity(8) + this.view.setBigInt64(this.position, BigInt(value), true) + this.position += 8 + } + writePointer(value: pointer) { + this.checkCapacity(8) + this.view.setBigInt64(this.position, BigInt(value ?? 0), true) + this.position += 8 + } + writeFloat32(value: float32) { + this.checkCapacity(4) + this.view.setFloat32(this.position, value, true) + this.position += 4 + } + writeFloat64(value: float64) { + this.checkCapacity(8) + this.view.setFloat64(this.position, value, true) + this.position += 8 + } + writeBoolean(value: boolean|undefined) { + this.checkCapacity(1) + this.view.setInt8(this.position, value == undefined ? RuntimeType.UNDEFINED : +value) + this.position++ + } + writeFunction(value: object | undefined) { + this.writeInt32(registerCallback(value)) + } + writeString(value: string) { + this.checkCapacity(4 + value.length * 4) // length, data + let encodedLength = + InteropNativeModule._ManagedStringWrite(value, new Uint8Array(this.view.buffer, 0), this.view.buffer.byteLength, this.position + 4) + this.view.setInt32(this.position, encodedLength, true) + this.position += encodedLength + 4 + } + writeBuffer(buffer: ArrayBuffer) { + this.holdAndWriteObject(buffer) + const ptr = InteropNativeModule._GetNativeBufferPointer(buffer) + this.writePointer(ptr) + this.writeInt64(buffer.byteLength) + } +} + +class DateSerializer extends CustomSerializer { + constructor() { + super(["Date"]) + } + + serialize(serializer: SerializerBase, value: object, kind: string): void { + serializer.writeString((value as Date).toISOString()) + } +} +SerializerBase.registerCustomSerializer(new DateSerializer()) + +export function unsafeCast(value: unknown) { + return value as unknown as T +} diff --git a/koala_tools/interop/src/interop/Wrapper.ts b/koala_tools/interop/src/interop/Wrapper.ts new file mode 100644 index 0000000000000000000000000000000000000000..47da5d393a829537ec07e306933c50da80008800 --- /dev/null +++ b/koala_tools/interop/src/interop/Wrapper.ts @@ -0,0 +1,45 @@ +/* + * 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 { ptrToString, nullptr, isSamePtr } from "#common/wrappers/Wrapper" +import { className } from "@koalaui/common" +import { KPointer } from "./InteropTypes" + +export { isNullPtr, nullptr, ptrToBits, bitsToPtr, isSamePtr, ptrToString } from "#common/wrappers/Wrapper" + +/** + * An object holding reference to the native pointer. + */ +export class Wrapper { + ptr: KPointer + constructor(ptr: KPointer) { + if (ptr == null) + throw new Error(`Init <${className(this)}> with null native peer`) + this.ptr = ptr + } + toString(): string { + return `[native object <${className(this)}> at ${ptrToString(this.ptr)}]` + } +} + +export function getPtr(value: Wrapper|undefined): KPointer { + return value?.ptr ?? nullptr +} + +export function ptrEqual(a: Wrapper|undefined, b: Wrapper|undefined): boolean { + if (a === b) return true + if (a == undefined || b == undefined) return false + return isSamePtr(a.ptr, b.ptr) +} diff --git a/koala_tools/interop/src/interop/arrays.ts b/koala_tools/interop/src/interop/arrays.ts new file mode 100644 index 0000000000000000000000000000000000000000..f85319a27d772160266c7f42790a6a3e5d2ee4c3 --- /dev/null +++ b/koala_tools/interop/src/interop/arrays.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2022-2024 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 { int32 } from "@koalaui/common" + +export enum Access { + READ = 1, // 1 << 0, + WRITE = 2, // 1 << 1, + READWRITE = 3, // READ | WRITE +} +export function isRead(access: Access) { + return access & Access.READ +} +export function isWrite(access: Access) { + return access & Access.WRITE +} + +export type Exec = (pointer: P) => R +export type ExecWithLength = (pointer: P, length: int32) => R + +export type TypedArray = + Uint8Array + | Int8Array + | Uint16Array + | Int16Array + | Uint32Array + | Int32Array + | Float32Array + | Float64Array + +export type PtrArray = Uint32Array | BigUint64Array \ No newline at end of file diff --git a/koala_tools/interop/src/interop/buffer.ts b/koala_tools/interop/src/interop/buffer.ts new file mode 100644 index 0000000000000000000000000000000000000000..9163a99669b6935bf36ba4e3c424437d181776eb --- /dev/null +++ b/koala_tools/interop/src/interop/buffer.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2024 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 { int32 } from "@koalaui/common" + +// Improve: can be removed if passing ArrayBuffer type through interop is possible +export class KBuffer { + private readonly _buffer: Uint8Array + public get buffer(): ArrayBuffer { + return this._buffer + } + public get length(): int32 { + return this._buffer.length + } + + constructor(length: int32) { + this._buffer = new Uint8Array(length) + } + + set(index: int32, value: int32): void { + this._buffer[index] = value + } + + get(index: int32): int32 { + return this._buffer[index] + } +} \ No newline at end of file diff --git a/koala_tools/interop/src/interop/events.ts b/koala_tools/interop/src/interop/events.ts new file mode 100644 index 0000000000000000000000000000000000000000..7fb4ce1aec8b7282d70b031857d3ca9453694eba --- /dev/null +++ b/koala_tools/interop/src/interop/events.ts @@ -0,0 +1,78 @@ +import { int32 } from "@koalaui/common" +import { DeserializerBase } from "./DeserializerBase" +import { InteropNativeModule } from "./InteropNativeModule" +import { ResourceHolder } from "../arkts/ResourceManager" +import { wrapSystemCallback } from "./InteropOps" +import { KSerializerBuffer } from "./InteropTypes" + +const API_KIND_MAX = 100 +const apiEventHandlers: (EventHandler | undefined)[] = new Array(API_KIND_MAX).fill(undefined) +export type EventHandler = (deserializer: DeserializerBase) => void +export function registerApiEventHandler(apiKind: int32, handler: EventHandler) { + if (apiKind < 0 || apiKind > API_KIND_MAX) { + throw new Error(`Maximum api kind is ${API_KIND_MAX}, received ${apiKind}`) + } + if (apiEventHandlers[apiKind] !== undefined) { + throw new Error(`Callback caller for api kind ${apiKind} already was set`) + } + apiEventHandlers[apiKind] = handler +} +export function handleApiEvent(apiKind: int32, deserializer: DeserializerBase) { + if (apiKind < 0 || apiKind > API_KIND_MAX) { + throw new Error(`Maximum api kind is ${API_KIND_MAX}, received ${apiKind}`) + } + if (apiEventHandlers[apiKind] === undefined) { + throw new Error(`Callback caller for api kind ${apiKind} was not set`) + } + apiEventHandlers[apiKind]!(deserializer) +} +export function wrapSystemApiHandlerCallback() { + wrapSystemCallback(1, (buffer: KSerializerBuffer, len:int32) => { + const deserializer = new DeserializerBase(buffer, len) + const apiKind = deserializer.readInt32() + handleApiEvent(apiKind, deserializer) + return 0 + }) +} +export function checkEvents(): void { + while (checkSingleEvent()) {} +} + + +enum CallbackEventKind { + Event_CallCallback = 0, + Event_HoldManagedResource = 1, + Event_ReleaseManagedResource = 2, +} + +const bufferSize = 8 * 1024 +const buffer = new Uint8Array(bufferSize) +const deserializer = new DeserializerBase(buffer.buffer, bufferSize) +function checkSingleEvent(): boolean { + deserializer.resetCurrentPosition() + let result = InteropNativeModule._CheckCallbackEvent(buffer, bufferSize) + if (result == 0) + return false + + const eventKind = deserializer.readInt32() as CallbackEventKind + switch (eventKind) { + case CallbackEventKind.Event_CallCallback: { + const apiKind = deserializer.readInt32() + handleApiEvent(apiKind, deserializer) + return true; + } + case CallbackEventKind.Event_HoldManagedResource: { + const resourceId = deserializer.readInt32() + ResourceHolder.instance().hold(resourceId) + return true; + } + case CallbackEventKind.Event_ReleaseManagedResource: { + const resourceId = deserializer.readInt32() + ResourceHolder.instance().release(resourceId) + return true; + } + default: { + throw new Error(`Unknown callback event kind ${eventKind}`) + } + } +} \ No newline at end of file diff --git a/koala_tools/interop/src/interop/index.ts b/koala_tools/interop/src/interop/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..a59725dd9004ec3aca233c9b2ba788fa24dad25e --- /dev/null +++ b/koala_tools/interop/src/interop/index.ts @@ -0,0 +1,75 @@ +/* + * 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 { + withFloat32Array, + withFloat64Array, + withInt16Array, + withInt32Array, + withInt8Array, + withUint16Array, + withUint32Array, + withUint8Array, + wasmHeap as wasmHeapArrayBuffer +} from "#common/wrappers/arrays" + +export { registerCallback, setCallbackRegistry } from "#common/wrappers/Callback" + +export { Access, Exec } from "./arrays" +export { Finalizable, NativeThunk } from "./Finalizable" +export { nullable } from "./nullable" +export { getPtr, isNullPtr, nullptr, ptrEqual, Wrapper, ptrToBits, bitsToPtr } from "./Wrapper" + +export { + decodeToString, + encodeToData, + withString, + withStringArray, + withPtrArray, + fromPtrArray, + toPtrArray +} from "#common/wrappers/arrays" + +export const withFloatArray = withFloat32Array +export const withByteArray = withUint8Array +export const withIntArray = withInt32Array + +export const wasmHeap = wasmHeapArrayBuffer + +export { + withFloat32Array, + withFloat64Array, + withInt8Array, + withInt16Array, + withInt32Array, + withUint8Array, + withUint16Array, + withUint32Array, +} + +export * from "./Platform" +export * from "./InteropTypes" + +export * from "./InteropOps" +export * from "./NativeString" +export * from "./buffer" +export * from "../arkts/ResourceManager" +export * from "./NativeBuffer" +export { InteropNativeModule, loadInteropNativeModule } from "./InteropNativeModule" +export { SerializerBase, RuntimeType, Tags, runtimeType, CallbackResource, unsafeCast, isInstanceOf, toPeerPtr } from "./SerializerBase" +export { DeserializerBase } from "./DeserializerBase" +export * from "./events" +export { loadNativeModuleLibrary, loadNativeLibrary, registerNativeModuleLibraryName } from "./loadLibraries" +export * from "./MaterializedBase" diff --git a/koala_tools/interop/src/interop/java/CallbackRecord.java b/koala_tools/interop/src/interop/java/CallbackRecord.java new file mode 100644 index 0000000000000000000000000000000000000000..2292705a6c5707f76e068a8e26481f12eef2fb1d --- /dev/null +++ b/koala_tools/interop/src/interop/java/CallbackRecord.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 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. + */ +package org.koalaui.interop; + +class CallbackRecord { + public CallbackType callback; + public boolean autoDisposable; + + public CallbackRecord(CallbackType callback, boolean autoDisposable) { + this.callback = callback; + this.autoDisposable = autoDisposable; + } +} diff --git a/koala_tools/interop/src/interop/java/CallbackRegistry.java b/koala_tools/interop/src/interop/java/CallbackRegistry.java new file mode 100644 index 0000000000000000000000000000000000000000..2fb731539602a5fc07d25a2eaa72c73154e45fef --- /dev/null +++ b/koala_tools/interop/src/interop/java/CallbackRegistry.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2024 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. + */ +package org.koalaui.interop; + +import java.util.Arrays; +import java.util.HashMap; + +class CallbackRegistry { + + private static HashMap callbacks = new HashMap(); + private static Integer id = 0; + + static { + CallbackRegistry.callbacks.put(id, new CallbackRecord( + new CallbackType() { + @Override + public int apply(byte[] args, int length) { + System.out.printf("Callback 0 called with args = %s and length = %d\n", Arrays.toString(args), length); + throw new Error("Null callback called"); + } + }, false) + ); + CallbackRegistry.id++; + } + + private CallbackRegistry() { + + } + + public static Integer wrap(CallbackType callback) { + Integer callbackId = CallbackRegistry.id++; + CallbackRegistry.callbacks.put(callbackId, new CallbackRecord(callback, true)); + return callbackId; + } + + public static Integer wrap(CallbackType callback, boolean autoDisposable) { + Integer callbackId = CallbackRegistry.id++; + CallbackRegistry.callbacks.put(callbackId, new CallbackRecord(callback, autoDisposable)); + return callbackId; + } + + public static int call(Integer id, byte[] args, int length) { + if (!CallbackRegistry.callbacks.containsKey(id)) { + System.out.printf("Callback %d is not known\n", id); + throw new Error(String.format("Disposed or unwrapped callback called (id = %d)", id)); + } + CallbackRecord record = CallbackRegistry.callbacks.get(id); + if (record.autoDisposable) { + CallbackRegistry.dispose(id); + } + return record.callback.apply(args, length); + } + + public static void dispose(Integer id) { + CallbackRegistry.callbacks.remove(id); + } +} diff --git a/koala_tools/interop/src/interop/java/CallbackTests.java b/koala_tools/interop/src/interop/java/CallbackTests.java new file mode 100644 index 0000000000000000000000000000000000000000..22cf1fbe6c0fdae09969c9d3c315ed590bcbafe4 --- /dev/null +++ b/koala_tools/interop/src/interop/java/CallbackTests.java @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2024 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. + */ +package org.koalaui.interop; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.IntBuffer; +import java.util.function.Function; + +import org.koalaui.arkoala.NativeModule; + +public class CallbackTests { + // Improve: where tests will be located? + + public class TestUtils { + // Improve: where test utils will be located? + public static void assertEquals(String name, T expected, T actual) { + if (!expected.equals(actual)) { + System.out.printf("TEST %s FAIL:\n EXPECTED \"%s\"\n ACTUAL \"%s\"\n", name, expected.toString(), actual.toString()); + } else { + System.out.printf("TEST %s PASS\n", name); + } + } + + public static void assertThrows(String name, Function fn) { + boolean caught = false; + try { + fn.apply(null); + } catch (Throwable e) { + caught = true; + } + if (!caught) { + System.out.printf("TEST %s FAIL:\n No exception thrown\n", name); + } else { + System.out.printf("TEST %s PASS\n", name); + } + } + } + + public static void checkCallback() { + Integer id1 = CallbackRegistry.wrap(new CallbackType() { + @Override + public int apply(byte[] args, int length) { + return 2024; + } + }); + Integer id2 = CallbackRegistry.wrap(new CallbackType() { + @Override + public int apply(byte[] args, int length) { + return 2025; + } + }); + + TestUtils.assertEquals("Call callback 1", 2024, CallbackRegistry.call(id1, new byte[] {}, 0)); + TestUtils.assertEquals("Call callback 2", 2025, CallbackRegistry.call(id2, new byte[] {}, 0)); + TestUtils.assertThrows("Call disposed callback 1", new Function() { + @Override + public Integer apply(Void v) { + return CallbackRegistry.call(id1, new byte[] { }, 0); + } + }); + TestUtils.assertThrows("Call callback 0", new Function() { + @Override + public Integer apply(Void v) { + return CallbackRegistry.call(0, new byte[] { 2, 4, 6, 8 }, 4); + } + }); + } + + public static void checkNativeCallback() { + Integer id1 = CallbackRegistry.wrap(new CallbackType() { + @Override + public int apply(byte[] args, int length) { + return 123456; + } + }); + TestUtils.assertEquals("NativeCallback without args", 123456, NativeModule._TestCallIntNoArgs(id1)); + TestUtils.assertThrows("NativeCallback without args called again", new Function() { + @Override + public Integer apply(Void v) { + return CallbackRegistry.call(id1, new byte[] { }, 0); + } + }); + TestUtils.assertThrows("NativeCallback without args called again from native", new Function() { + @Override + public Integer apply(Void v) { + return NativeModule._TestCallIntNoArgs(id1); + } + }); + + Integer id2 = CallbackRegistry.wrap(new CallbackType() { + @Override + public int apply(byte[] args, int length) { + ByteBuffer buffer = ByteBuffer.wrap(args); + buffer.order(ByteOrder.LITTLE_ENDIAN); + IntBuffer intBuffer = buffer.asIntBuffer(); + int sum = 0; + for (int i = 0; i < length / 4; i++) { + sum += intBuffer.get(i); + } + return sum; + } + }); + int[] arr2 = new int[] { 100, 200, 300, -1000 }; + TestUtils.assertEquals("NativeCallback Int32Array sum", -400, NativeModule._TestCallIntIntArraySum(id2, arr2, arr2.length)); + + Integer id3 = CallbackRegistry.wrap(new CallbackType() { + @Override + public int apply(byte[] args, int length) { + ByteBuffer buffer = ByteBuffer.wrap(args); + buffer.order(ByteOrder.LITTLE_ENDIAN); + IntBuffer intBuffer = buffer.asIntBuffer(); + for (int i = 1; i < length / 4; i++) { + intBuffer.put(i, intBuffer.get(i) + intBuffer.get(i - 1)); + } + return 0; + } + }); + int[] arr3 = new int[] { 100, 200, 300, -1000 }; + NativeModule._TestCallVoidIntArrayPrefixSum(id3, arr3, arr3.length); + TestUtils.assertEquals("NativeCallback Int32Array PrefixSum [0]", 100, arr3[0]); + TestUtils.assertEquals("NativeCallback Int32Array PrefixSum [1]", 300, arr3[1]); + TestUtils.assertEquals("NativeCallback Int32Array PrefixSum [2]", 600, arr3[2]); + TestUtils.assertEquals("NativeCallback Int32Array PrefixSum [3]", -400, arr3[3]); + + long start = System.currentTimeMillis(); + Integer id4 = CallbackRegistry.wrap(new CallbackType() { + @Override + public int apply(byte[] args, int length) { + ByteBuffer buffer = ByteBuffer.wrap(args); + buffer.order(ByteOrder.LITTLE_ENDIAN); + IntBuffer intBuffer = buffer.asIntBuffer(); + intBuffer.put(1, intBuffer.get(1) + 1); + if (intBuffer.get(0) + intBuffer.get(1) < intBuffer.get(2)) { + return NativeModule._TestCallIntRecursiveCallback(id3 + 1, args, args.length); + } + return 1; + } + }, false); + TestUtils.assertEquals("NativeCallback prepare recursive callback test", id4, id3 + 1); + int depth = 500; + int count = 100; + for (int i = 0; i < count; i++) { + int length = 12; + byte[] args = new byte[length]; + IntBuffer args32 = ByteBuffer.wrap(args).order(ByteOrder.LITTLE_ENDIAN).asIntBuffer(); + args32.put(2, depth); + NativeModule._TestCallIntRecursiveCallback(id4, args, args.length); + if (i == 0) { + TestUtils.assertEquals("NativeCallback Recursive [0]", (depth + 1) / 2, args32.get(0)); + TestUtils.assertEquals("NativeCallback Recursive [1]", depth / 2, args32.get(1)); + } + } + long passed = System.currentTimeMillis() - start; + System.out.println("recursive native callback: " + String.valueOf(passed) + "ms for " + depth * count + " callbacks, " + Math.round((double)passed / (depth * count) * 1000000) + "ms per 1M callbacks"); + + Integer id5 = CallbackRegistry.wrap(new CallbackType() { + @Override + public int apply(byte[] args, int length) { + int sum = 0; + for (int i = 0; i < length; i++) { + sum += args[i]; + } + return sum; + } + }, false); + NativeModule._TestCallIntMemory(id5, 1000); + } +} diff --git a/koala_tools/interop/src/interop/java/CallbackType.java b/koala_tools/interop/src/interop/java/CallbackType.java new file mode 100644 index 0000000000000000000000000000000000000000..952cd3d399a7fddc441ca5bef9d755ee3231a24b --- /dev/null +++ b/koala_tools/interop/src/interop/java/CallbackType.java @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2024 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. + */ +package org.koalaui.interop; + +public interface CallbackType { + public int apply(byte[] args, int length); +} diff --git a/koala_tools/interop/src/interop/loadLibraries.ts b/koala_tools/interop/src/interop/loadLibraries.ts new file mode 100644 index 0000000000000000000000000000000000000000..a91b88cd34b5407c91d5370108e14a03de790cc6 --- /dev/null +++ b/koala_tools/interop/src/interop/loadLibraries.ts @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2024 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 * as os from "os" + +const nativeModuleLibraries: Map = new Map() + +export function loadNativeLibrary(name: string): Record { + const isHZVM = !!(globalThis as any).requireNapi + let nameWithoutSuffix = name.endsWith(".node") ? name.slice(0, name.length - 5) : name + let candidates: string[] = [ + name, + `${nameWithoutSuffix}.node`, + `${nameWithoutSuffix}_${os.arch()}.node`, + `${nameWithoutSuffix}_${os.platform()}_${os.arch()}.node`, + ] + const errors: { candidate: string, command: string, error: any }[] = [] + if (!isHZVM) + try { + candidates.push(eval(`require.resolve(${JSON.stringify((nameWithoutSuffix + ".node"))})`)) + } catch (e) { + errors.push({ candidate: `${nameWithoutSuffix}.node`, command: `resolve(...)`, error: e }) + } + + for (const candidate of candidates) { + try { + if (isHZVM) + return (globalThis as any).requireNapi(candidate, true) + else + return eval(`let exports = {}; process.dlopen({ exports }, ${JSON.stringify(candidate)}, 2); exports`) + } catch (e) { + errors.push({ candidate: candidate, command: `dlopen`, error: e }) + } + } + errors.forEach((e, i) => { + console.error(`Error ${i} of ${errors.length} command: ${e.command}, candidate: ${e.candidate}, message: ${e.error}`) + }) + throw new Error(`Failed to load native library ${name}. dlopen candidates: ${candidates.join(":")}`) +} + +export function registerNativeModuleLibraryName(nativeModule: string, libraryName: string) { + nativeModuleLibraries.set(nativeModule, libraryName) +} + +export function loadNativeModuleLibrary(moduleName: string, module?: object) { + if (!module) + throw new Error(" argument is required and optional only for compatibility with ArkTS") + const library = loadNativeLibrary(nativeModuleLibraries.get(moduleName) ?? moduleName) + if (!library || !library[moduleName]) { + console.error(`Failed to load library for module ${moduleName}`) + return + } + Object.assign(module, library[moduleName]) +} diff --git a/koala_tools/interop/src/interop/nullable.ts b/koala_tools/interop/src/interop/nullable.ts new file mode 100644 index 0000000000000000000000000000000000000000..1a1875e25662eecfade68bb221dccad907d45e36 --- /dev/null +++ b/koala_tools/interop/src/interop/nullable.ts @@ -0,0 +1,25 @@ +/* + * 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 { isNullPtr } from "./Wrapper" +import { KPointer } from "./InteropTypes" + +export function nullable(value: KPointer, body: (arg: KPointer) => T | undefined): T | undefined { + if (isNullPtr(value)) { + return undefined + } else { + return body(value) + } +} diff --git a/koala_tools/interop/src/napi/wrappers/Callback.ts b/koala_tools/interop/src/napi/wrappers/Callback.ts new file mode 100644 index 0000000000000000000000000000000000000000..5af4ae26bf1ad7d2f0e3d71003d08e9aac3a5077 --- /dev/null +++ b/koala_tools/interop/src/napi/wrappers/Callback.ts @@ -0,0 +1,27 @@ +/* + * 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 { KPointer } from "../../interop/InteropTypes" +import { CallbackRegistry } from "../../interop/Platform" + +export function registerCallback(callback: any, obj: any = null): KPointer { + return theRegistry!.registerCallback(callback, obj) +} + +let theRegistry: CallbackRegistry|undefined = undefined + +export function setCallbackRegistry(registry: CallbackRegistry) { + theRegistry = registry +} diff --git a/koala_tools/interop/src/napi/wrappers/Wrapper.ts b/koala_tools/interop/src/napi/wrappers/Wrapper.ts new file mode 100644 index 0000000000000000000000000000000000000000..b1e4383f43089fb2232e8a9bcf967d115b7c5513 --- /dev/null +++ b/koala_tools/interop/src/napi/wrappers/Wrapper.ts @@ -0,0 +1,46 @@ +/* + * 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 { int32 } from "@koalaui/common" +import { KPointer } from "../../interop/InteropTypes" + +export const nullptr = BigInt(0) + +export function isNullPtr(value: KPointer): boolean { + return value === nullptr +} + +export function ptrToString(ptr: KPointer) { + return `0x${ptr!.toString(16).padStart(8, "0")}` +} + +export function isSamePtr(a: KPointer, b: KPointer) { + return (a === b) +} + +// Improve: rethink me +export function ptrToBits(ptr: KPointer): Uint32Array | null { + let result = new Uint32Array(2) + let ptrBigInt = ptr as bigint + result[0] = Number(ptrBigInt & BigInt(0xFFFFFFFF)) + result[1] = Number((ptrBigInt >> BigInt(32)) & BigInt(0xFFFFFFFF)) + return result +} + +export function bitsToPtr(array: Int32Array, offset: int32): KPointer { + let ptrBigInt: bigint = BigInt(array[offset + 1]) & BigInt(0xFFFFFFFF) + ptrBigInt = (ptrBigInt << BigInt(32)) | (BigInt(array[offset]) & BigInt(0xFFFFFFFF)) + return ptrBigInt +} diff --git a/koala_tools/interop/src/napi/wrappers/arrays.ts b/koala_tools/interop/src/napi/wrappers/arrays.ts new file mode 100644 index 0000000000000000000000000000000000000000..25f8c560407486e475515baeb4936296d52a2182 --- /dev/null +++ b/koala_tools/interop/src/napi/wrappers/arrays.ts @@ -0,0 +1,111 @@ +/* + * 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 { CustomTextDecoder, CustomTextEncoder } from "@koalaui/common" +import { Access, Exec, ExecWithLength, PtrArray, TypedArray } from "../../interop/arrays" +import { nullptr } from "./Wrapper" +import { Wrapper } from "../../interop/Wrapper" +import { KPointer, KStringArrayPtr } from "../../interop" + +const encoder = new CustomTextEncoder() +const decoder = new CustomTextDecoder() + +export function decodeToString(array: Uint8Array): string { + return decoder.decode(array) +} + +export function encodeToData(string: string): Uint8Array { + return encoder.encode(string, false) +} + +export function withString(data: string | undefined, exec: Exec): R { + return exec(data === undefined ? null : data) +} + +export function withStringArray(strings: Array | undefined, exec: Exec): R { + if (strings === undefined || strings.length === 0) { + return exec(null) + } + + let array = encoder.encodeArray(strings) + return exec(array) +} + +function withArray( + data: C | undefined, + exec: ExecWithLength +): R { + return exec(data ?? null, data?.length ?? 0) +} + +export function withPtrArray(data: BigUint64Array, access: Access, exec: ExecWithLength) { + return exec(data ?? null, data?.length ?? 0) // Improve: rethink +} + +export function toPtrArray(data: Array | undefined): BigUint64Array { + if (data == undefined || data.length === 0) { + return new BigUint64Array(0) + } + const array = new BigUint64Array(data.length) + for (let i = 0; i < data.length; i++) { + let item = data[i] + array[i] = item != undefined ? item.ptr as bigint : nullptr + } + return array +} + +export function fromPtrArray(array: PtrArray, factory: (ptr: KPointer) => T) : Array { + if (array.length === 0) { + return new Array(0) + } + const result = new Array(array.length) + for (let i = 0; i < array.length; i++) { + let ptr = array[i] + if (ptr == nullptr) { + result[i] = undefined + } else { + result[i] = factory(ptr) + } + } + return result +} + +export function withUint8Array(data: Uint8Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, exec) +} +export function withInt8Array(data: Int8Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, exec) +} +export function withUint16Array(data: Uint16Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, exec) +} +export function withInt16Array(data: Int16Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, exec) +} +export function withUint32Array(data: Uint32Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, exec) +} +export function withInt32Array(data: Int32Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, exec) +} +export function withFloat32Array(data: Float32Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, exec) +} +export function withFloat64Array(data: Float64Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, exec) +} +export function wasmHeap(): ArrayBuffer { + throw new Error("Unused") +} \ No newline at end of file diff --git a/koala_tools/interop/src/wasm/wrappers/Callback.ts b/koala_tools/interop/src/wasm/wrappers/Callback.ts new file mode 100644 index 0000000000000000000000000000000000000000..abc939bcaf4f8548a8eca0ee7e35fd7389a203a0 --- /dev/null +++ b/koala_tools/interop/src/wasm/wrappers/Callback.ts @@ -0,0 +1,99 @@ +/* + * 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 { KPointer } from "../../interop/InteropTypes" +import { CallbackRegistry } from "../../interop/Platform" + +class CallbackInfo { + cb: any + recv: any + constructor(callback: any, obj: any = null) { + this.cb = callback + this.recv = obj + } +} + +const GLOBAL_SCOPE = new class CallbackScope { + static readonly CB_NULL = new CallbackInfo( + () => { throw new Error("attempted to call a callback at NULL") }, + null + ) + static readonly CB_UNDEFINED = new CallbackInfo( + () => { throw new Error("attempted to call an uninitialized callback") }, + null + ) + static readonly CB_NULL_ID = 0 + nextId: number + callbackMap: Map | null + + constructor() { + this.nextId = 1 + this.callbackMap = new Map() + this.callbackMap.set(CallbackScope.CB_NULL_ID, CallbackScope.CB_NULL) + } + + addCallback(cb: any, obj: any): number { + let id = this.nextId++ + this.callbackMap?.set(id, new CallbackInfo(cb, obj)) + return id + } + + getCallback(id: number): CallbackInfo { + return this.callbackMap?.get(id) || CallbackScope.CB_UNDEFINED + } + + deleteCallback(id: number): void { + if (id > CallbackScope.CB_NULL_ID) { + this.callbackMap?.delete(id) + } + } + + release(): void { + this.callbackMap = null + } +} + +function callCallback(callbackId: number): any { + let CallbackInfo = GLOBAL_SCOPE.getCallback(callbackId) + try { + let cb = CallbackInfo.cb + if (CallbackInfo.recv !== null) { + cb = cb.bind(CallbackInfo.recv) + } + return cb() + } catch (e) { + console.error(e) + } +} + +export function registerCallback(callback: any, obj: any = null): KPointer { + return GLOBAL_SCOPE.addCallback(callback, obj) +} + +function releaseCallback(callbackId: number): void { + return GLOBAL_SCOPE.deleteCallback(callbackId) +} + +declare namespace globalThis { + function callCallback(callbackId: number): any + function releaseCallback(callbackId: number): any +} + +globalThis.callCallback = callCallback +globalThis.releaseCallback = releaseCallback + +export function setCallbackRegistry(_ignoredRegistry: CallbackRegistry) { + // On WASM we don't need registry in current implementation. +} diff --git a/koala_tools/interop/src/wasm/wrappers/Wrapper.ts b/koala_tools/interop/src/wasm/wrappers/Wrapper.ts new file mode 100644 index 0000000000000000000000000000000000000000..8c0dc94f636766eeaad9573cfc07308e230ebd05 --- /dev/null +++ b/koala_tools/interop/src/wasm/wrappers/Wrapper.ts @@ -0,0 +1,44 @@ +/* + * 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 { int32 } from "@koalaui/common" +import { KPointer } from "../../interop/InteropTypes" + +export const nullptr: number = 0 + +export function isNullPtr(value: KPointer): boolean { + return (value == nullptr) +} + +export function ptrToString(ptr: KPointer) { + if (ptr === 0) return "0x0" + + const hex = (ptr as number).toString(16).padStart(8, "0") + return `0x${hex}` +} + +export function isSamePtr(a: KPointer, b: KPointer) { + return a === b +} + +export function ptrToBits(ptr: KPointer): Uint32Array { + let result = new Uint32Array(2) + result[0] = ptr as int32 + return result +} + +export function bitsToPtr(array: Int32Array, offset: int32): KPointer { + return array[offset] +} diff --git a/koala_tools/interop/src/wasm/wrappers/arrays.ts b/koala_tools/interop/src/wasm/wrappers/arrays.ts new file mode 100644 index 0000000000000000000000000000000000000000..7da912e7eaf30cad4bb84a8a52afa92bf6662303 --- /dev/null +++ b/koala_tools/interop/src/wasm/wrappers/arrays.ts @@ -0,0 +1,171 @@ +/* + * 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 { CustomTextEncoder, CustomTextDecoder, int32 } from "@koalaui/common" + +import { KPointer } from "../../interop/InteropTypes" +import { Wrapper } from "../../interop/Wrapper" +import { Access, isRead, isWrite, Exec, TypedArray, ExecWithLength } from "../../interop/arrays" + +const encoder = new CustomTextEncoder() +const decoder = new CustomTextDecoder() + +export function decodeToString(array: Uint8Array): string { + return decoder.decode(array) +} + +export function encodeToData(string: string): Uint8Array { + return encoder.encode(string, false) +} + +type Heap = { readonly buffer: ArrayBuffer } + +// Improve: actually memory allocation primitives are defined for a specific intance instance, +// refactor me +declare const _heaps: { + HEAP8(): Heap; + HEAP16(): Heap; + HEAP32(): Heap; + HEAPU8(): Heap; + HEAPU16(): Heap; + HEAPU32(): Heap; + HEAPF32(): Heap; + HEAPF64(): Heap; +} +declare function _malloc(size: number): number; +declare function _free(ptr: number): void; + +const nullptr: number = 0 + +// with string as array of utf8 data headed by length +export function withString(data: string | undefined, exec: Exec): R { + if (data === undefined) return exec(nullptr) + + let array = encoder.encode(data, true) + return withUint8Array(array, Access.READ, exec) +} + +export function withStringArray(strings: Array | undefined, exec: Exec): R { + if (strings === undefined || strings.length === 0) { + return exec(nullptr) + } + + let array = encoder.encodeArray(strings) + return withUint8Array(array, Access.READ, exec) +} + +function withArray( + data: C | undefined, + access: Access, + exec: ExecWithLength, + bytesPerElement: int32, + ctor: (ptr: number, length: number) => C +): R { + if (data === undefined || data.length === 0) { + return exec(nullptr, 0) + } + + let ptr = _malloc(data.length * bytesPerElement) + let wasmArray = ctor(ptr, data.length) + + if (isRead(access)) { + wasmArray.set(data) + } + + let result = exec(ptr, data.length) + + if (isWrite(access)) { + data.set(wasmArray) + } + + _free(ptr) + + return result +} + +export function withPtrArray(data: Uint32Array, access: Access, exec: ExecWithLength) { + return withArray(data as Uint32Array, access, exec, Uint32Array.BYTES_PER_ELEMENT, (ptr: number, length: number) => { + return new Uint32Array(_heaps.HEAPU8().buffer, ptr, length) + }) +} + +export function toPtrArray(data: Array | undefined): Uint32Array { + if (data === undefined || data.length === 0) { + return new Uint32Array(0) + } + const array = new Uint32Array(data.length) + for (let i = 0; i < data.length; i++) { + array[i] = data[i]?.ptr as number + } + return array +} + +export function fromPtrArray(array: Uint32Array, factory: (ptr: KPointer) => T) : Array { + const result = new Array(array.length) + for (let i = 0; i < array.length; i++) { + let v = array[i] + if (v == 0) { + result[i] = undefined + } else { + result[i] = factory(v) + } + } + return result +} + +export function withUint8Array(data: Uint8Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, access, exec, Uint8Array.BYTES_PER_ELEMENT, (ptr: number, length: number) => { + return new Uint8Array(_heaps.HEAPU8().buffer, ptr, length) + }) +} +export function withInt8Array(data: Int8Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, access, exec, Int8Array.BYTES_PER_ELEMENT, (ptr: number, length: number) => { + return new Int8Array(_heaps.HEAPU8().buffer, ptr, length) + }) +} +export function withUint16Array(data: Uint16Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, access, exec, Uint16Array.BYTES_PER_ELEMENT, (ptr: number, length: number) => { + return new Uint16Array(_heaps.HEAPU8().buffer, ptr, length) + }) +} +export function withInt16Array(data: Int16Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, access, exec, Int16Array.BYTES_PER_ELEMENT, (ptr: number, length: number) => { + return new Int16Array(_heaps.HEAPU8().buffer, ptr, length) + }) +} +export function withUint32Array(data: Uint32Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, access, exec, Uint32Array.BYTES_PER_ELEMENT, (ptr: number, length: number) => { + return new Uint32Array(_heaps.HEAPU8().buffer, ptr, length) + }) +} +export function withInt32Array(data: Int32Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, access, exec, Int32Array.BYTES_PER_ELEMENT, (ptr: number, length: number) => { + return new Int32Array(_heaps.HEAPU8().buffer, ptr, length) + }) +} +export function withFloat32Array(data: Float32Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, access, exec, Float32Array.BYTES_PER_ELEMENT, (ptr: number, length: number) => { + return new Float32Array(_heaps.HEAPU8().buffer, ptr, length) + }) +} +export function withFloat64Array(data: Float64Array | undefined, access: Access, exec: ExecWithLength) { + return withArray(data, access, exec, Float64Array.BYTES_PER_ELEMENT, (ptr: number, length: number) => { + return new Float64Array(_heaps.HEAPU8().buffer, ptr, length) + }) +} + +export function wasmHeap(): ArrayBuffer { + return _heaps.HEAP32().buffer +} diff --git a/koala_tools/interop/tsconfig.json b/koala_tools/interop/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..afe382db7f7d696313ad5fe54bbff58bc7f6f71a --- /dev/null +++ b/koala_tools/interop/tsconfig.json @@ -0,0 +1,30 @@ +{ + "compilerOptions": { + "target": "es2017", + "lib": ["ESNext", "ESNext.WeakRef"], + "moduleResolution": "node", + "composite": true, + "incremental": true, + "declarationMap": true, + "sourceMap": true, + "declaration": true, + "noEmitOnError": true, + "strict": true, + "skipLibCheck": true, + "removeComments": false, + "outDir": "build/lib", + "module": "CommonJS", // Improve: maybe migrate to ESM? + "rootDirs": ["src"], + "baseUrl": ".", + "types": ["node"], + "paths": { + "@koalaui/common": ["../incremental/common/src"], + "#common/wrappers/*": ["./src/napi/wrappers/*", "./src/wasm/wrappers/*"] + } + }, + "include": ["src/interop/**/*", "src/napi/**/*", "src/wasm/**/*", "src/arkts/ResourceManager.ts"], + "references": [ + { "path": "../incremental/compat" }, + { "path": "../incremental/common" } + ] +} diff --git a/koala_tools/interop/ui2abcconfig.json b/koala_tools/interop/ui2abcconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..68085b0e5019f82fd95f7aebd18de264fbbebb45 --- /dev/null +++ b/koala_tools/interop/ui2abcconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "package": "@koalaui/interop", + "outDir": "./build/abc", + "baseUrl": "./src/arkts", + "paths": { + "@koalaui/compat": ["../../../incremental/compat/src/arkts"], + "@koalaui/common": ["../../../incremental/common/src"] + } + }, + "include": ["./src/arkts/*.ts"] +} diff --git a/koala_tools/ui2abc/BUILD.gn b/koala_tools/ui2abc/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..90f7f90f517c4a9cd80650201c26466a8354fd28 --- /dev/null +++ b/koala_tools/ui2abc/BUILD.gn @@ -0,0 +1,93 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//build/config/components/ets_frontend/ets2abc_config.gni") +import("//foundation/arkui/ace_engine/frameworks/bridge/arkts_frontend/koala_mirror/gn/npm_util.gni") + +koala_root = ".." + +node_version = "v16.20.2" +host_arch = "${host_os}-${host_cpu}" + +libarkts_root = "./libarkts" +build_root = "//build" + +npm_cmd("fast_arktsc_build") { + outputs = [ + "$target_out_dir/fast_arktsc_build" + ] + deps = [ + ":ui2abc_install_all(${host_toolchain})" + ] + project_path = rebase_path("./fast-arktsc") + run_tasks = [ "compile" ] +} + +if (current_toolchain == host_toolchain) { + npm_install("ui2abc_install") { + outputs = [ + "$target_out_dir/ui2abc_install" + ] + project_path = rebase_path(".") + } +} + +npm_cmd("ui2abc_build") { + outputs = [ + "$target_out_dir/MemoTransformer.js" + ] + + deps = [ + ":fast_arktsc_build", + "$libarkts_root:es2panda" + ] + + project_path = rebase_path(".") + run_tasks = [ "build:plugins" ] +} + +action("ui2abc_panda_sdk") { + script = "gn/command/gen_sdk.py" + + outputs = [ + "$target_out_dir/panda-sdk" + ] + + external_deps = [ets2abc_build_deps] + external_deps += [static_linker_build_deps] + external_deps += [ "ets_frontend:libes2panda_public(${host_toolchain})" ] + + args = [ + "--config", rebase_path("gn/sdk_config.json"), + "--src", rebase_path("//"), + "--dist", rebase_path("./build/sdk"), + "--out-root", rebase_path(root_out_dir), + "--current-os", current_os, + "--current-cpu", current_cpu + ] +} + +group("ui2abc_install_all") { + deps = [ + ":ui2abc_install(${host_toolchain})", + "$koala_root/incremental:incremental_install(${host_toolchain})", + "$koala_root/interop:interop_install(${host_toolchain})" + ] +} + +group("ui2abc") { + deps = [ + ":ui2abc_build" + ] +} \ No newline at end of file diff --git a/koala_tools/ui2abc/annotate/.gitignore b/koala_tools/ui2abc/annotate/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7951405f85a569efbacc12fccfee529ef1866602 --- /dev/null +++ b/koala_tools/ui2abc/annotate/.gitignore @@ -0,0 +1 @@ +lib \ No newline at end of file diff --git a/koala_tools/ui2abc/annotate/package.json b/koala_tools/ui2abc/annotate/package.json new file mode 100644 index 0000000000000000000000000000000000000000..26d94bb371f5d4f5939525b2258fa745f8401a9c --- /dev/null +++ b/koala_tools/ui2abc/annotate/package.json @@ -0,0 +1,18 @@ +{ + "name": "@koalaui/annotate", + "version": "1.5.13+devel", + "description": "", + "main": "lib/annotate.js", + "bin": "lib/annotate.js", + "scripts": { + "clean": "rimraf out lib", + "compile": "tsc -p ." + }, + "keywords": [], + "dependencies": { + "minimatch": "10.0.1" + }, + "devDependencies": { + "rimraf": "^6.0.1" + } +} diff --git a/koala_tools/ui2abc/annotate/src/annotate.ts b/koala_tools/ui2abc/annotate/src/annotate.ts new file mode 100644 index 0000000000000000000000000000000000000000..88d2258de67d31b81b25cacd1cf25a382ca2d5c3 --- /dev/null +++ b/koala_tools/ui2abc/annotate/src/annotate.ts @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as fs from 'fs' +import * as path from 'path' +import { minimatch } from 'minimatch' + +class Config { + inputDir: string = "./src" + outputDir: string = "./ets" + include: string[] = [ "./src/**/*" ] + exclude: string[] = [] + fileExtension?: string +} + +const memoImport = "@koalaui/runtime/annotations" + +export function main(options: Config) { + console.log(options) + + const readdirSyncRecursive: (dir: string) => string[] = (dir: string) => + fs.readdirSync(dir).reduce((files: string[], file: string) => { + const name = path.join(dir, file) + return fs.lstatSync(name).isDirectory() ? [...files, ...readdirSyncRecursive(name)] : [...files, name] + }, []) + + + const files = readdirSyncRecursive(options.inputDir) + .map(it => path.relative(options.inputDir, it)) + + fs.mkdirSync(options.outputDir, { recursive: true }) + + const include = options.include.map(it => path.resolve(it)) + const exclude = options.exclude.map(it => path.resolve(it)) + + files.forEach(it => { + const inputFile = path.join(options.inputDir, it) + let outputFile = path.join(options.outputDir, it) + if (options.fileExtension) { + let { dir, name, ext } = path.parse(outputFile) + if (ext) { + outputFile = path.join(dir, name + options.fileExtension) + } + } + if (include.some(value => minimatch(path.resolve(inputFile), value)) + && !exclude.some(value => minimatch(path.resolve(inputFile), value)) + ) { + const text = fs.readFileSync(inputFile, 'utf8').toString() + const newText = convertMemo(text, memoImport) + if (fs.existsSync(outputFile)) { + // This is not to update already annotated files + if (newText == fs.readFileSync(outputFile, 'utf8').toString()) { + return + } + } + console.log(inputFile, " -> ", outputFile) + fs.mkdirSync(path.dirname(outputFile), { recursive: true }) + fs.writeFileSync(outputFile, newText, 'utf8') + } + }) +} + +function convertMemo(text: string, memoImport: string): string { + const result = text + .replaceAll(/\/\*\* @memo \*\//g, "@memo") + .replaceAll(/\/\*\* @memo:intrinsic \*\//g, "@memo_intrinsic") + .replaceAll(/\/\*\* @memo:stable \*\//g, "@memo_stable") + .replaceAll(/\/\*\* @memo:entry \*\//g, "@memo_entry") + .replaceAll(/\/\*\* @skip:memo \*\//g, "@memo_skip") + if (result == text) { + return result + } + return `import { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "${memoImport}"\n` + result +} + +if (process.argv.length == 3) { + const configPath = path.resolve(process.argv[2]) + const config = JSON.parse(fs.readFileSync(configPath, 'utf8')) + main({ ...(new Config()), ...config }) +} else { + main(new Config()) +} diff --git a/koala_tools/ui2abc/annotate/test/test.ts b/koala_tools/ui2abc/annotate/test/test.ts new file mode 100644 index 0000000000000000000000000000000000000000..abe6d446c15c03b5d0f7782c6e6eb7f241a29b82 --- /dev/null +++ b/koala_tools/ui2abc/annotate/test/test.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** @memo */ diff --git a/koala_tools/ui2abc/annotate/tsconfig.json b/koala_tools/ui2abc/annotate/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..3de03062e66b16503a1ca8639501e3de5ecae3da --- /dev/null +++ b/koala_tools/ui2abc/annotate/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "esnext", + "lib": ["esnext"], + "module": "CommonJS", + "moduleResolution": "node", + "sourceMap": true, + "noEmitOnError": true, + "strict": true, + "removeComments": false, + "outDir": "lib", + "rootDir": "src" + }, + "include": ["./src"] +} diff --git a/koala_tools/ui2abc/fast-arktsc/.gitignore b/koala_tools/ui2abc/fast-arktsc/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..7951405f85a569efbacc12fccfee529ef1866602 --- /dev/null +++ b/koala_tools/ui2abc/fast-arktsc/.gitignore @@ -0,0 +1 @@ +lib \ No newline at end of file diff --git a/koala_tools/ui2abc/fast-arktsc/index.js b/koala_tools/ui2abc/fast-arktsc/index.js new file mode 100755 index 0000000000000000000000000000000000000000..2fe2b948b55b083fbd252005422005856ec252d0 --- /dev/null +++ b/koala_tools/ui2abc/fast-arktsc/index.js @@ -0,0 +1,18 @@ +#!/usr/bin/env node + +/* + * Copyright (c) 2024 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. + */ + +module.exports = require("./lib") diff --git a/koala_tools/ui2abc/fast-arktsc/package.json b/koala_tools/ui2abc/fast-arktsc/package.json new file mode 100644 index 0000000000000000000000000000000000000000..bce8f1dfd97916258a0903b692a1ae69ec2c34c9 --- /dev/null +++ b/koala_tools/ui2abc/fast-arktsc/package.json @@ -0,0 +1,25 @@ +{ + "name": "@koalaui/fast-arktsc", + "version": "1.7.9+devel", + "description": "", + "main": "./index.js", + "bin": "./index.js", + "scripts": { + "clean": "rimraf out lib", + "compile": "WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.node.js", + "compile:release": "WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.node.js" + }, + "keywords": [], + "dependencies": { + "commander": "^10.0.0", + "minimatch": "10.0.1" + }, + "devDependencies": { + "@types/node": "^18.0.0", + "typescript": "^4.9.5", + "webpack": "5.95.0", + "copy-webpack-plugin": "12.0.2", + "webpack-cli": "5.1.4", + "rimraf": "^6.0.1" + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/fast-arktsc/src/main.ts b/koala_tools/ui2abc/fast-arktsc/src/main.ts new file mode 100644 index 0000000000000000000000000000000000000000..1d5881dce90ebf9d72d641f1fa95455e6c8b65b5 --- /dev/null +++ b/koala_tools/ui2abc/fast-arktsc/src/main.ts @@ -0,0 +1,237 @@ +/* + * Copyright (c) 2024 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 { program } from "commander" +import * as fs from "fs" +import * as path from "path" +import * as child_process from "child_process" +import { minimatch } from 'minimatch' +import { resolveConfig, section, log, relativeOrDot, getConfigFullDirname } from "./resolve-config" + +const readdirSyncRecursive: (dir: string) => string[] = (dir: string) => + fs.readdirSync(dir).reduce((files: string[], file: string) => { + const name = path.join(dir, file) + return fs.lstatSync(name).isDirectory() ? [...files, ...readdirSyncRecursive(name)] : [...files, name] + }, []) + +export const options = program + .option('--config ', 'Path to configuration file') + .option('--compiler ', 'Path to compiler') + .option('--compiler-flags ', 'Flags to compiler') + .option('--link-name ', 'Path to final linked file', "all") + + .option('--group-by ', 'Group files by groups before passing them to compiler') + .option('--simultaneous', 'Use simultaneous compilation') + + .option('--output-dir ', 'Path to output dir (only used by AOT compilation)') + .option('--aot-libs ', 'Comma-separated AOT libraries to include') + .option('--only-aot ', 'AOT an .abc taking --aot-libs into account') + .option('--aot-target ', 'Compilation target for AOT') + + .parse() + .opts() + +if (options.onlyAot) + mainAot(path.resolve(options.onlyAot)) +else + main(options.config, options.linkName) + + + +function findMatching(base: string, include: string[], exclude: string[]): string[] { + return readdirSyncRecursive(base) + .map(it => path.resolve(it)) + .filter(it => include.some(value => minimatch(it, path.join(base, value), {matchBase: true}))) + .filter(it => !exclude.some(value => minimatch(it, path.join(base, value), {matchBase: true}))) +} + +function getFileGroup( + files: string[], + groupBy: number, + fileIndex: number +) { + const firstId = fileIndex - fileIndex % groupBy + const selectedFiles = files.slice(firstId, firstId + groupBy) + return selectedFiles +} + +function getFileGroupAsString( + files: string[], + groupBy: number, + fileIndex: number, + separator: string, + prefix: string, +) { + return `${prefix}${getFileGroup(files, groupBy, fileIndex).join(separator)}` +} + +function produceNinjafile( + compiler: string, + files: string[], + config: string, + linkPath: string, +): string { + // We have no Panda SDK for macOS. + const tools_prefix = process.platform == "darwin" ? "echo " : "" + let result: string[] = [] + let basename = path.basename(compiler) + let linker = compiler.replace(basename, 'arklink') + + const passFlags = [ + options.simultaneous ? '--simultaneous' : '', + ].filter(it => it != '').join(' ') + + let linker_prefix = ` +rule arkts_linker + command = ${tools_prefix}${linker} --output $out -- @$out.rsp + rspfile = $out.rsp + rspfile_content = $in_newline + description = "Linking ARKTS $out" +` + + let compiler_prefix = ` +rule arkts_compiler + command = ${tools_prefix}${compiler} ${options.compilerFlags ?? ''} --ets-module --arktsconfig ${path.resolve(config)} --output $out ${passFlags} @$out.rsp + rspfile = $out.rsp + rspfile_content = $in + description = "Compiling ARKTS $out" +` + + const groupBy = Number(options.groupBy ?? (options.simultaneous ? files.length : 1)) + const groupOutputs: string[] = [] + const oneGroup = groupBy >= files.length + + let index = 0 + for (var i = 0; i < files.length; i += groupBy) { + const output = oneGroup ? linkPath : `${linkPath}_${index}.abc` + groupOutputs.push(output) + + result.push( +` +build ${output}: arkts_compiler ${getFileGroupAsString(files, groupBy, i, ' ', '')} +` + + ) + ++index + } + + if (!oneGroup) { + result.push(`build ${linkPath}: arkts_linker ${groupOutputs.join(' ')}\n`) + result.push(`build link: phony ${linkPath}\n`) + result.push(`build all: phony link\n`) + } else { + result.push(`build all: phony ${linkPath}\n`) + } + result.push("default all\n") + + return compiler_prefix + '\n' + linker_prefix + '\n' + result.join('') +} + +function main(configPath: string, linkName: string) { + const config = JSON.parse(fs.readFileSync(configPath, 'utf8')) + const baseDir = path.resolve(path.dirname(configPath)) + const include = (config.include as string[]).map(it => it.replace('\\.', '.')) + const exclude = config.exclude ? (config.exclude as string[]).map(it => it.replace('\\.', '.')) : [] + const outDir = path.resolve(getConfigFullDirname(), config.compilerOptions?.outDir ?? ".") + const baseUrl = path.resolve(getConfigFullDirname(), config.compilerOptions?.baseUrl ?? ".") + + fs.mkdirSync(outDir, { recursive: true }) + const [firstConfigPath, intermediateOutDirs] = resolveConfig(configPath, options.restartStages) + const linkPath = path.resolve(process.cwd(), linkName) + log(`computed location of linked .abc: ${linkPath}`) + + const files = findMatching(baseDir, include, exclude) + if (files.length == 0) { + throw new Error(`No files matching include "${include.join(",")}" exclude "${exclude.join(",")}"`) + } + + let ninja = produceNinjafile(path.resolve(options.compiler), files, firstConfigPath, linkPath) + fs.writeFileSync(`${outDir}/build.ninja`, ninja) +} + + +// Improve: move all AOT stuff away from here +function archDir(): string { + const arch = process.arch + let sdkArch = ""; + switch (arch) { + case "x64": + sdkArch = "" + break + case "arm64": + sdkArch = "arm64" + break + default: throw new Error(`Unexpected arch: ${arch}`) + + } + const platform = process.platform + let sdkPlatform = "" + switch (platform) { + case "linux": sdkPlatform = "linux" + break + case "win32": sdkPlatform = "windows" + break + case "darwin": sdkPlatform = "macos" + break + default: throw new Error(`Unsupported platform ${platform}`) + } + const suffix = "host_tools" + return [sdkPlatform, sdkArch, suffix].filter(it => it != "").join("_") +} + +function mainAot(abc: string) { + let sdk = options.sdk ?? path.resolve(path.join(__dirname, '..', '..', '..', 'incremental', 'tools', 'panda', 'node_modules', '@panda', 'sdk')) + let aot = path.join(sdk, archDir(), 'bin', 'ark_aot') + let stdlib = path.resolve(path.join(sdk, "ets", "etsstdlib.abc")) + const aotLibs = abc.indexOf("etsstdlib") == -1 ? [stdlib] : [] + if (options.aotLibs) aotLibs.push(... options.aotLibs.split(",")) + let args: string[] = [] + if (process.platform == "darwin") { + // No tools on macOS, just echo + args.push(aot) + aot = "echo" + } + let dir = options.outputDir ?? path.dirname(abc) + let result = path.join(dir, path.basename(abc).replace('.abc', '.an')) + args.push(... options.aotTarget ? [`--compiler-cross-arch=${options.aotTarget}`] : []) + args.push(... [ + `--load-runtimes=ets`, + `--boot-panda-files=${aotLibs.map(it => path.resolve(it)).concat(abc).join(':')}`, + `--paoc-panda-files=${abc}`, + `--paoc-output=${result}` + ]) + console.log(`AOT compile ${abc} to ${result}...`) + console.log(`Launch ${aot} ${args.join(" ")}`) + const child = child_process.spawn(aot, args) + child.stdout.on('data', (data) => { + process.stdout.write(data); + }) + child.stderr.on('data', (data) => { + process.stderr.write(data); + }) + child.on('close', (code) => { + if (code != 0) + console.log(`Command ${aot} ${args.join(" ")} failed with return code ${code}`) + else + console.log(`Produced AOT file ${result}: ${Math.round(fs.statSync(result).size / 1024 / 1024)}M`) + process.exit(code!) + }) + child.on('exit', (code, signal) => { + if (signal) { + console.log(`Received signal: ${signal} from '${aot} ${args.join(' ')}'`) + process.exit(1) + } + }) +} diff --git a/koala_tools/ui2abc/fast-arktsc/src/resolve-config.ts b/koala_tools/ui2abc/fast-arktsc/src/resolve-config.ts new file mode 100644 index 0000000000000000000000000000000000000000..e7d3e29010b38d4e40b23f876f7768ae419caea1 --- /dev/null +++ b/koala_tools/ui2abc/fast-arktsc/src/resolve-config.ts @@ -0,0 +1,257 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as fs from "node:fs" +import * as path from "node:path" +import { options } from "./main" + +export const SPLITTER = "=".repeat(80) +export const BANNER = "[fast-arktsc]" +export const PLUGIN_DEPENDENCIES = "dependencies" +export const PLUGIN_NAME = "name" +export const LAST_STATE = "_proceed_to_binary" +export const indexVariants = [".ts", ".ets", ".d.ts", ".d.ets"] + +export function relativeOrDot(from: string, to: string) { + const result = path.relative(from, to) + if (result == "") { + return "." + } + return result +} + +export function log(text: string) { + console.log(`${BANNER} ${text}`) +} + +export function error(text: string, exitCode: number = 1): never { + console.log(`${BANNER} ${text}`) + process.exit(exitCode) +} + +export function section() { + log(SPLITTER) +} + +export function getConfigFullPath() { + return path.resolve(process.cwd(), options.config) +} + +export function getConfigFullDirname() { + return path.dirname(getConfigFullPath()) +} + +function filterPathSectionToMap(from: string, name: string, object: any): Map { + return new Map( + Object.entries(object).map(([k, v]: [string, unknown]) => { + if (typeof v == "string") { + return [k, path.resolve(from, v)] + } + if (Array.isArray(v)) { + return [k, path.resolve(from, v[0])] + } + error(`unexpected value of ${name}.${k}: ${v}`) + }) + ) +} + +function getDependencyConfigs(from: string, dependencies: Map): Map { + return new Map( + Array.from(dependencies).map(([k, v]: [string, string]) => { + const location = path.resolve(from, v) + if (!fs.existsSync(location) || !fs.statSync(location).isFile()) { + error(`no config found at ${location} (for package ${k})`) + } + return [k, JSON.parse(fs.readFileSync(location, 'utf-8'))] + }) + ) +} + +function resolvePath(name: string, dependency?: string, config?: any) { + const plugins = config?.compilerOptions?.plugins + if (!plugins || !dependency) { + return undefined + } + const pluginsArray = Array.from(plugins) as any[] + for (var i = 0; i < pluginsArray.length; i++) { + if (`${pluginsArray[i].name}-${pluginsArray[i].state}` == name) { + if (i == 0) { + return undefined + } + return path.resolve(path.dirname(dependency), config.compilerOptions.outDir ?? ".", `${pluginsArray[i - 1].name}-${pluginsArray[i - 1].state}` ) + } + } + if (name == LAST_STATE) { + return path.resolve(path.dirname(dependency), config.compilerOptions.outDir ?? ".", `${pluginsArray[pluginsArray.length - 1].name}-${pluginsArray[pluginsArray.length - 1].state}` ) + } + return undefined +} + +function resolvePaths(name: string, paths: Map, dependencies: Map, dependencyConfigs: Map) { + return new Map( + Array.from(paths).map(([k, v]: [string, string]) => { + return [k, resolvePath(name, dependencies.get(k), dependencyConfigs.get(k)) ?? v] + }) + ) +} + +/** + * Checks that compilation with the given ui2abcconfig is possible and creates temporary arktsconfigs + * + * @param configPath path to ui2abc configuration file + * @returns path to first es2panda configuration file and intermediate build directories + */ +export function resolveConfig(configPath: string, restartStates: boolean): [string, string[]] { + if (restartStates) section() + + const config = JSON.parse(fs.readFileSync(configPath, 'utf8')) + const compilerOptions = config.compilerOptions ?? { } + const configDirname = getConfigFullDirname() + const baseUrl = path.resolve(getConfigFullDirname(), compilerOptions?.baseUrl ?? ".") + const outDir = path.resolve(getConfigFullDirname(), compilerOptions?.outDir ?? ".") + const packageRoot = path.resolve(configDirname, baseUrl) + const paths = filterPathSectionToMap(packageRoot, "paths", compilerOptions.paths ?? { }) + const pluginNames = (compilerOptions.plugins ?? []).map((plugin: any) => `${plugin.name}-${plugin.state}`) + const dependencies = filterPathSectionToMap(configDirname, PLUGIN_DEPENDENCIES, config[PLUGIN_DEPENDENCIES] ?? { }) + const dependencyConfigs = getDependencyConfigs(configDirname, dependencies) + + const states = restartStates ? pluginNames.length + 1 : 1 // the last state is a binary generation + if (restartStates) log(`states: ${states}`) + + const computedPlugins = Array.from(compilerOptions.plugins ?? []).map((it: any, i) => { + if (!it.transform) { + error(`no transform specified for plugin ${i}`) + } + if (it.transform.startsWith(`.`)) { + return { + ...it, + transform: path.join(relativeOrDot(outDir, getConfigFullDirname()), it.transform), + } + } + return it + }) + + const outDirs = [] + + for (var i = 0; i < states; i++) { + const name = i == pluginNames.length ? LAST_STATE : pluginNames[i] + if (restartStates) log(` state #${i + 1}: ${name}`) + const resolvedPaths = resolvePaths(name, paths, dependencies, dependencyConfigs) + if (restartStates) log(` paths:`) + for (const [k, v] of resolvedPaths) { + const res = relativeOrDot(packageRoot, v) + if (restartStates) log(` ${k}: ${k.endsWith('*') && !res.endsWith('*') ? `${res}/*` : res}`) + } + + for (const [k, v] of resolvedPaths) { + let ext = path.extname(v) + let isResolvedToFile = indexVariants.includes(ext) + if (isResolvedToFile) { + try { + isResolvedToFile = fs.statSync(v).isFile() + } catch (_e) { + isResolvedToFile = false + } + } + if (!isResolvedToFile && + (k.startsWith('@') || k.startsWith('#')) && + !v.endsWith('*') && + !indexVariants.some(value => fs.existsSync(path.join(v, `index${value}`))) && + !indexVariants.some(value => fs.existsSync(`${v}${value}`)) + ) { + console.warn(`Warning: File ${v}.[ts|ets|d.ts|d.ets] or ${v}/index.[ts|ets|d.ts|d.ets] does not exists`) + } + } + + const newBaseUrl = i == 0 ? relativeOrDot(outDir, baseUrl) : `./${pluginNames[i - 1]}` + const pathsInConfig = Array.from(resolvedPaths).flatMap(([k, v]) => { + if (!path.relative(baseUrl, v).startsWith('..')) { + const res = relativeOrDot(path.resolve(baseUrl), v) + return [[k, [k.endsWith('*') && !res.endsWith('*') ? `${res}/*` : res]]] + } + const from = path.resolve(outDir ?? `.`, newBaseUrl) + const res = relativeOrDot(from, v) + if (k.endsWith('*') && res.endsWith('*')) { + const replaceTrailStar = (str: string, replaceStr: string = '') => { + if (str.length == 0 || str.charAt(str.length - 1) !== '*') + return str + return str.slice(0, -1) + replaceStr + } + const rmLeadSlash = (str: string) => { + if (str.startsWith("/")) + str = str.length > 1 ? str.substring(1) : "" + return str + } + const pattern = path.resolve(from, replaceTrailStar(res)) + const parent = path.parse(pattern).dir + + const ret: [string, string[]][] = [] + const traverseDir = (dir: string, filter: (file: string) => boolean, apply: (file: string) => void) => { + const dirents = fs.readdirSync(dir, { withFileTypes: true }) + for (const entry of dirents) { + const fullPath = path.join(dir, entry.name) + if (entry.isDirectory()) + traverseDir(fullPath, filter, apply) + else if (filter(fullPath)) + apply(fullPath) + } + } + traverseDir(parent, file => file.endsWith(".d.ets") && file.startsWith(pattern), file => { + let resolvedStar = rmLeadSlash(file.substring(pattern.length)) + let resolvedK = replaceTrailStar(k, resolvedStar) + resolvedK = resolvedK.substring(0, resolvedK.length - ".d.ets".length) + const resolvedV = replaceTrailStar(res, resolvedStar) + ret.push([resolvedK, [resolvedV]]) + }) + return ret + } + return [[k, [k.endsWith('*') && !res.endsWith('*') ? `${res}/*` : res]]] + }) + + const arktsconfig = { + compilerOptions: { + package: compilerOptions.package ?? `.`, + outDir: `.`, + baseUrl: newBaseUrl, + paths: Object.fromEntries(pathsInConfig), + plugins: i == 0 ? computedPlugins : [] // es2panda.js will only use check plugins from the first config + }, + include: config.include ? Array.from(config.include as string[]).map((it) => { + return path.join(path.relative(outDir ?? `.`, configDirname), it) + }) : [] + } + + if (config.exclude) { // compiler might crash is exclude section is [] + (arktsconfig as any).exclude = config.exclude ? Array.from(config.exclude as string[]).map((it) => { + return path.join(path.relative(outDir, configDirname), it) + }) : [] + } + + const emitPath = path.resolve(outDir ?? `.`, `arktsconfig-${name}.json`) + log(`config emitted to ${emitPath}`) + fs.mkdirSync(path.dirname(emitPath), { recursive: true }) + fs.writeFileSync(emitPath, JSON.stringify(arktsconfig, null, 2)) + + const intermediateOutDir = path.resolve(getConfigFullDirname(), outDir ?? `.`, name == LAST_STATE ? `.` : name) + fs.mkdirSync(intermediateOutDir, { recursive: true }) + outDirs.push(intermediateOutDir) + } + + return [ + path.resolve(getConfigFullDirname(), outDir ?? `.`, `arktsconfig-${pluginNames.length == 0 ? LAST_STATE : pluginNames[0]}.json`), + outDirs + ] +} + diff --git a/koala_tools/ui2abc/fast-arktsc/tsconfig.json b/koala_tools/ui2abc/fast-arktsc/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..f42a8d80b8bacc162410c66b63ca8deaa92b6b65 --- /dev/null +++ b/koala_tools/ui2abc/fast-arktsc/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "es2021", + "module": "CommonJS", + "moduleResolution": "node", + "sourceMap": true, + "noEmitOnError": true, + "strict": true, + "removeComments": false, + "outDir": "lib", + "rootDir": "src" + } +} diff --git a/koala_tools/ui2abc/fast-arktsc/webpack.config.node.js b/koala_tools/ui2abc/fast-arktsc/webpack.config.node.js new file mode 100644 index 0000000000000000000000000000000000000000..7b21707cadacde9c62394e8ba637e89ca8f239cc --- /dev/null +++ b/koala_tools/ui2abc/fast-arktsc/webpack.config.node.js @@ -0,0 +1,61 @@ +/* + * 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. + */ + +const path = require("path") +var webpack = require("webpack"); + +const minimize = !process.env.WEBPACK_NO_MINIMIZE + +/** @returns {import("webpack").WebpackOptionsNormalized} */ +const makeConfig = ({ os, arch, tsconfig }) => ({ + target: "node", + entry: `./src/main.ts`, + output: { + filename: `index.js`, + path: path.resolve(__dirname, `lib`), + libraryTarget: "commonjs2", + }, + resolve: { + extensions: [".ts", ".node", "..."] + }, + plugins: [ + new webpack.BannerPlugin({ banner: "#!/usr/bin/env node", raw: true }) + ], + module: { + rules: [ + { + test: /\.ts$/, + loader: "ts-loader", + }, + ] + }, + + mode: minimize ? "production" : "development", + devtool: minimize ? false : "inline-source-map" +}) + +module.exports = env => { + const oses = { + 'win32': 'windows', + 'darwin': 'macos', + } + + const os = env.os || oses[process.platform] || process.platform + const arch = (env.arch || process.arch) + + const tsconfig = env.tsconfig || "" + + return makeConfig({os, arch, tsconfig}) +} diff --git a/koala_tools/ui2abc/gn/command/copy_libs.py b/koala_tools/ui2abc/gn/command/copy_libs.py new file mode 100755 index 0000000000000000000000000000000000000000..4d89c8ae693a7cb0fd077fb8fdc2a3fdb2a7180c --- /dev/null +++ b/koala_tools/ui2abc/gn/command/copy_libs.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import argparse +import os +import shutil +import subprocess +import sys + + +def copy_files(source_path, dest_path, is_file=False, throw_if_error=True): + if not os.path.exists(source_path): + if throw_if_error: + raise Exception(f"The path '{source_path}' does not exist.") + else: + print(f"The path '{source_path}' does not exist.") + return + + try: + if is_file: + os.makedirs(os.path.dirname(dest_path), exist_ok=True) + shutil.copy(source_path, dest_path) + else: + shutil.copytree(source_path, dest_path, dirs_exist_ok=True, + symlinks=True) + except Exception as err: + raise Exception("Copy files failed. Error: " + str(err)) from err + + +def run_cmd(cmd, execution_path=None): + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, + stdin=subprocess.PIPE, + stderr=subprocess.PIPE, + cwd=execution_path) + stdout, stderr = proc.communicate(timeout=1000) + if proc.returncode != 0: + raise Exception(stderr.decode()) + + + +def copy_output(options): + run_cmd(['rm', '-rf', options.output_path]) + copy_files(os.path.join(options.source_path, 'lib'), + os.path.join(options.output_path, 'lib')) + + copy_files(os.path.join(options.source_path, 'build/native'), + os.path.join(options.output_path, 'build/native'), False, False) + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument('--source_path', help='path to build system source') + parser.add_argument('--output_path', help='path to output') + parser.add_argument('--root_out_dir', help='path to root out') + + options = parser.parse_args() + return options + + +def main(): + options = parse_args() + copy_output(options) + + +if __name__ == '__main__': + sys.exit(main()) \ No newline at end of file diff --git a/koala_tools/ui2abc/gn/command/gen_sdk.py b/koala_tools/ui2abc/gn/command/gen_sdk.py new file mode 100755 index 0000000000000000000000000000000000000000..f9bb97ea23a044fa88d0540bf98f23e02d1c05fb --- /dev/null +++ b/koala_tools/ui2abc/gn/command/gen_sdk.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +import os +import shutil +import json +import argparse + +def load_config(config_file): + """Load the configuration file.""" + with open(config_file, 'r') as f: + config = json.load(f) + return config + +def get_compiler_type(os, cpu): + if (os == 'mingw' and cpu == 'x86_64'): + return 'mingw_x86_64' + return 'clang_x64' + +def replace_out_root(value, out_root, compiler_type): + """Replace $out_root in the string with the actual value.""" + return value.replace("$out_root", out_root).replace("$compiler_type", compiler_type) + +def validate_out_root(out_root, compiler_type): + head_out_root, tail_out_root = os.path.split(out_root) + if (tail_out_root == compiler_type): + return head_out_root + return out_root + + +def copy_files(config, src_base, dist_base, out_root, compiler_type, substitutions): + """Copy files or directories based on the configuration.""" + for mapping in config['file_mappings']: + # Replace $out_root + source = replace_out_root(mapping['source'], out_root, compiler_type) + destination = replace_out_root(mapping['destination'], out_root, compiler_type) + + if substitutions: + for key, val in substitutions.items(): + source = source.replace(key, val) + destination = destination.replace(key, val) + + # Build full paths + source = os.path.join(src_base, source) + destination = os.path.join(dist_base, destination) + + if not os.path.exists(source): + print(f"Source path does not exist: {source}") + continue + + # Create the destination directory if it doesn't exist + dest_dir = os.path.dirname(destination) if os.path.isfile(source) else destination + os.makedirs(dest_dir, exist_ok=True) + + # If it's a file, copy the file + if os.path.isfile(source): + try: + shutil.copy2(source, destination) + print(f"File copied: {source} -> {destination}") + except Exception as e: + print(f"Failed to copy file: {source} -> {destination}, error: {e}") + # If it's a directory, recursively copy the directory + elif os.path.isdir(source): + try: + shutil.copytree(source, destination, dirs_exist_ok=True) + print(f"Directory copied: {source} -> {destination}") + except Exception as e: + print(f"Failed to copy directory: {source} -> {destination}, error: {e}") + +def main(): + # Parse command-line arguments + parser = argparse.ArgumentParser(description="Copy files or directories.") + parser.add_argument("--config", required=True, help="Path to the configuration file.") + parser.add_argument("--src", required=True, help="Base source path.") + parser.add_argument("--dist", required=True, help="Base destination path.") + parser.add_argument("--out-root", required=True, help="Relative out directory to src, used to replace $out_root.") + parser.add_argument('--current-os', required=True, help='current OS') + parser.add_argument('--current-cpu', required=True, help='current CPU') + args = parser.parse_args() + + print(f"gen_sdk: current-cpu={args.current_cpu} current-os={args.current_os} out-root={args.out_root}") + + # Load the configuration + config = load_config(args.config) + + compiler_type = get_compiler_type(args.current_os, args.current_cpu) + + out_root = validate_out_root(args.out_root, compiler_type) + + substitutions = config.get('substitutions') + + if substitutions: + substitutions = substitutions.get(args.current_os) + if not substitutions: + raise Exception(f'Substitutions not found for current_os "{args.current_os}".') + + # Copy files or directories + copy_files(config, args.src, args.dist, out_root, compiler_type, substitutions) + + # Create package.json to pass SDK validation + content = """{ + "name": "@panda/sdk", + "version": "1.0.0" +}""" + with open(os.path.join(args.dist, "package.json"), "w") as file: + file.write(content) + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/koala_tools/ui2abc/gn/sdk_config.json b/koala_tools/ui2abc/gn/sdk_config.json new file mode 100644 index 0000000000000000000000000000000000000000..8630b8b937c310fbf74eb80f9ac1c9f0ca29fcc3 --- /dev/null +++ b/koala_tools/ui2abc/gn/sdk_config.json @@ -0,0 +1,59 @@ +{ + + "substitutions": { + "linux": + { + "$host_tools": "linux_host_tools", + "$.exe": "", + "$.lib": ".so" + }, + "mingw": + { + "$host_tools": "windows_host_tools", + "$.exe": ".exe", + "$.lib": ".dll" + } + }, + "file_mappings": [ + { + "source": "$out_root/$compiler_type/arkcompiler/ets_frontend/es2panda$.exe", + "destination": "$host_tools/bin/es2panda$.exe" + }, + { + "source": "$out_root/$compiler_type/arkcompiler/ets_frontend/libes2panda_public$.lib", + "destination": "$host_tools/lib/libes2panda-public$.lib" + }, + { + "source": "$out_root/$compiler_type/arkcompiler/runtime_core/ark_link$.exe", + "destination": "$host_tools/bin/ark_link$.exe" + }, + { + "source": "$out_root/$compiler_type/arkcompiler/runtime_core/libarktsbase$.lib", + "destination": "$host_tools/lib/libarktsbase$.lib" + }, + { + "source": "arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat", + "destination": "ets/stdlib/escompat" + }, + { + "source": "arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std", + "destination": "ets/stdlib/std" + }, + { + "source": "arkcompiler/ets_frontend/ets2panda/public/es2panda_lib.h", + "destination": "$host_tools/include/tools/es2panda/public/es2panda_lib.h" + }, + { + "source": "$out_root/$compiler_type/gen/arkcompiler/ets_frontend/ets2panda/generated/es2panda_lib", + "destination": "$host_tools/include/tools/es2panda/generated/es2panda_lib" + }, + { + "source": "$out_root/$compiler_type/gen/arkcompiler/ets_frontend/ets2panda/generated/es2panda_lib", + "destination": "ohos_arm64/include/tools/es2panda/generated/es2panda_lib" + }, + { + "source": "$out_root/$compiler_type/gen/arkcompiler/runtime_core/static_core/plugins/ets/etsstdlib.abc", + "destination": "ets/etsstdlib.abc" + } + ] +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/.mocharc.json b/koala_tools/ui2abc/libarkts/.mocharc.json new file mode 100644 index 0000000000000000000000000000000000000000..35222a70dbc455d94ac0d57251be08cf39638af2 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/.mocharc.json @@ -0,0 +1,11 @@ +{ + "ui": "tdd", + "spec": "./test/arkts-api/**/*.test.ts", + "extension": [ + "ts" + ], + "require": [ + "../../incremental/test-utils/scripts/register" + ], + "timeout": 20000 +} diff --git a/koala_tools/ui2abc/libarkts/BUILD.gn b/koala_tools/ui2abc/libarkts/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..8caa9faf9332b50c8d4b9cf5f626f545df77a6f0 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/BUILD.gn @@ -0,0 +1,279 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//foundation/arkui/ace_engine/frameworks/bridge/arkts_frontend/koala_mirror/gn/npm_util.gni") + +koala_root = "../.." +libarkts_root = "." +ui2abc_root = ".." +interop_root = "$koala_root/interop" + +node_modules_dir = "../node_modules" + +node_version = "v16.20.2" +host_arch = "${host_os}-${host_cpu}" + +shared_library("es2panda_lib") { + external_deps = [ "ets_frontend:ets2panda" ] + + sources = [ + "$libarkts_root/native/src/common.cc", + "$libarkts_root/native/src/bridges.cc", + "$libarkts_root/native/src/generated/bridges.cc", + + "$interop_root/src/cpp/napi/convertors-napi.cc", + "$interop_root/src/cpp/callback-resource.cc", + "$interop_root/src/cpp/interop-logging.cc", + "$interop_root/src/cpp/common-interop.cc" + ] + + include_dirs = [ + "$ui2abc_root/build/sdk/linux_host_tools/include/tools/es2panda/public", + "$ui2abc_root/build/sdk/linux_host_tools/include/tools/es2panda", + + "$libarkts_root/native/src", + + "$koala_root/interop/src/cpp", + "$koala_root/interop/src/cpp/napi", + "$koala_root/interop/src/cpp/types", + + "$node_modules_dir/node-api-headers/include", + "$node_modules_dir/node-addon-api", + + # "//arkcompiler/ets_frontend/ets2panda/public/", + # rebase_path("$root_gen_dir/arkcompiler/ets_frontend/ets2panda/"), + ] + + defines = [ + "KOALA_INTEROP_MODULE=NativeModule", + "INTEROP_LIBRARY_NAME=es2panda", + "KOALA_USE_NODE_VM", + "KOALA_NAPI" + ] + + deps = [ + "$ui2abc_root:ui2abc_install(${host_toolchain})", + ":regenerate(${host_toolchain})" + ] + + configs -= [ "//build/config/compiler:compiler" ] + + if (is_mac) { + cflags_cc = [ + "-std=c++17", + "-Wall", + "-Werror", + "-Wno-unused-variable", + "-fPIC", + ] + + ldflags = [ + "-fPIC", + "-Wl,-undefined,dynamic_lookup", + "-fuse-ld=lld", + "-Wl,--icf=all", + "-Wl,--color-diagnostics", + "-m64" + ] + defines += [ "KOALA_MACOS" ] + output_extension = "node" + } + + if (is_linux) { + cflags_cc = [ + "-std=c++17", + "-Wall", + "-Werror", + "-Wno-unused-command-line-argument", + "-Wno-unused-variable", + "-fPIC", + ] + + ldflags = [ + "-Wl,--allow-shlib-undefined", + "-Wl,--fatal-warnings", + "-Wl,--build-id=md5", + "-fPIC", + "-Wl,-z,noexecstack", + "-Wl,-z,now", + "-Wl,-z,relro", + + # "-Wl,-z,defs", # must no use this option + "-Wl,--as-needed", + "-fuse-ld=lld", + "-Wl,--icf=all", + "-Wl,--color-diagnostics", + "-m64", + ] + defines += [ "KOALA_LINUX" ] + output_extension = "node" + } else if (current_os == "mingw") { + cflags_cc = [ + "-std=c++17", + "-Wall", + "-Werror", + "-Wno-unused-variable", + "-Wno-unused-command-line-argument", + "-fPIC", + "-Wno-error=deprecated-copy", + "-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang", + "-ftrivial-auto-var-init=zero", + "-fcolor-diagnostics", + "-fmerge-all-constants", + "-Xclang", + "-mllvm", + "-Xclang", + "-instcombine-lower-dbg-declare=0", + "-no-canonical-prefixes", + "-fuse-ld=lld", + "-fno-stack-protector", + "-fno-strict-aliasing", + "-Wno-builtin-macro-redefined", + "-fms-extensions", + "-static", + "-rtlib=compiler-rt", + "-stdlib=libc++", + "-lunwind", + "-lpthread", + "-Qunused-arguments", + "-target", + "x86_64-pc-windows-gnu", + "-D__CUSTOM_SECURITY_LIBRARY", + ] + + ldflags = [ + "-Wl,--fatal-warnings", + "-fPIC", + "-Wl,--as-needed", + "-fuse-ld=lld", + "-Wl,--icf=all", + "-m64", + "-static", + "-rtlib=compiler-rt", + "-stdlib=libc++", + "-std=c++17", + "-lunwind", + "-lpthread", + "-Qunused-arguments", + "-target", + "x86_64-pc-windows-gnu", + ] + output_extension = "dll" + defines += [ "KOALA_WINDOWS" ] + sources += [ "../../interop/src/cpp/napi/win-dynamic-node.cc" ] + } +} + +action("es2panda_lib_copy") { + script = "gn/command/copy.py" + outputs = [ + "$target_out_dir/es2panda.node" + ] + if (build_ohos_sdk) { + deps = [ + ":es2panda_lib" + ] + } else { + deps = [ + ":es2panda_lib(${host_toolchain})" + ] + } + args = [ + "--from-path", rebase_path(root_out_dir), + "--to-path", rebase_path("."), + "--current-os", current_os, + "--current-cpu", current_cpu + ] +} + +if (current_toolchain == host_toolchain) { + npm_cmd("regenerate") { + assert(current_toolchain == host_toolchain, "must be executed with host_toolchain") + outputs = [ + "$target_out_dir/regenerate" + ] + deps = [ + "$ui2abc_root:ui2abc_install_all(${host_toolchain})", + "$ui2abc_root:ui2abc_panda_sdk" + ] + project_path = rebase_path(".") + run_tasks = [ "regenerate" ] + } +} + +if (current_toolchain == host_toolchain) { + npm_install("libarkts_install") { + outputs = [ + "$target_out_dir/libarkts_install" + ] + deps = [ + "$ui2abc_root:ui2abc_install(${host_toolchain})" + ] + project_path = rebase_path(".") + } +} + +action("libarkts_sdk_copy") { + script = "../gn/command/copy_libs.py" + args = [ + "--source_path", rebase_path(get_path_info(".", "abspath")), + "--output_path", rebase_path("$target_gen_dir"), + "--root_out_dir", rebase_path(root_out_dir), + ] + outputs = [ "$target_gen_dir" ] + deps = [ + "$ui2abc_root:ui2abc" + ] +} + +# Use from OHOS-SDK build (//build/ohos/sdk/ohos_sdk_description_std.json) + +ohos_copy("libarkts-sdk") { + deps = [ + ":libarkts_sdk_copy" + ] + sources = [ rebase_path("$target_gen_dir") ] + outputs = [ target_out_dir + "/$target_name" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" + subsystem_name = "arkui" + part_name = "ace_engine" +} + +# for //developtools/ace_ets2bundle + +npm_cmd("libarkts_compile") { + deps = [ + ":regenerate(${host_toolchain})" + ] + outputs = [ + "$target_out_dir/libarkts.js" + ] + project_path = rebase_path(".") + run_tasks = [ "compile:koala:interop", "compile:js" ] +} + +group("es2panda") { + deps = [ + ":es2panda_lib_copy", + ":libarkts_compile(${host_toolchain})" + ] +} + +group("libarkts") { + deps = [ + ":es2panda_lib", + ":libarkts_compile(${host_toolchain})" + ] +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/arktsconfig-direct.json b/koala_tools/ui2abc/libarkts/arktsconfig-direct.json new file mode 100644 index 0000000000000000000000000000000000000000..c97e444a7ff927fceeb4e4ac31a05a0cd4cfe973 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/arktsconfig-direct.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "outDir": "./build/abc", + "baseUrl": ".", + "paths": { + "@koalaui/compat": [ "../../incremental/compat/src/arkts" ], + "#platform": [ "../../incremental/compat/src/arkts" ], + "@koalaui/common": [ "../../incremental/common/src" ], + "@koalaui/runtime": [ "../../incremental/runtime/ets" ], + "@koalaui/runtime/annotations": [ "../../incremental/runtime/annotations" ] + }, + "plugins": [ + { + "transform": "../memo-plugin", + "state": "checked", + "name": "memo" + } + ] + } +} diff --git a/koala_tools/ui2abc/libarkts/arktsconfig.json b/koala_tools/ui2abc/libarkts/arktsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..3ece19cfd09431daf8d0f38608dd54b419b04b58 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/arktsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "package": "test", + "outDir": "./build/abc", + "baseUrl": ".", + "plugins": [ + { + "transform": "./lib/plugins/printer-plugin.js", + "state": "parsed", + "name": "printer" + }, + { + "transform": "./lib/plugins/printer-plugin.js", + "state": "checked", + "name": "printer" + }, + { + "transform": "./lib/plugins/printer-plugin.js", + "state": "checked", + "name": "printer2" + } + ] + }, + "include": ["./plugins/input/main.ets", "./plugins/input/library.ets"] +} diff --git a/koala_tools/ui2abc/libarkts/generator/options.json5 b/koala_tools/ui2abc/libarkts/generator/options.json5 new file mode 100644 index 0000000000000000000000000000000000000000..e8c2170976343b7789979863180ff8df8da1a5a0 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/generator/options.json5 @@ -0,0 +1,543 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "irHack": [ + "AnnotationUsage", + "ETSFunctionType", + "ETSUnionType", + "ETSNullType", + "ETSUndefinedType", + ], + "ignore": { + "full": [ + "es2panda_Config", + "es2panda_ExternalSource", + "es2panda_OverloadInfo", + "es2panda_GlobalContext", + + // Duplicates of types in ir namespace + // They will be removed in the fututre. + 'es2panda_Signature', + 'es2panda_CheckerContext', + 'es2panda_Type', + 'es2panda_TypeRelation', + 'es2panda_GlobalTypesHolder', + 'es2panda_Variable', + 'es2panda_Scope', + 'es2panda_Path', + 'es2panda_ResolveResult', + 'es2panda_RecordTable', + 'es2panda_BoundContext', + 'es2panda_ImportPathManager', + 'es2panda_Options', + 'es2panda_AstNode', + 'es2panda_Program', + 'es2panda_ArkTsConfig', + 'es2panda_FunctionSignature', + + 'NodeTransformer', + 'NodeTraverser', + 'AstNodeForEachFunction', + 'ClassBuilder', + 'ClassInitializerBuilder', + 'MethodBuilder', + 'NodePredicate', + 'PropertyProcessor', + 'PropertyTraverser', + + 'checker.*', + 'varbinder.*', + 'parser.*', + 'util.*', + 'gen.*', + 'es2panda.*', + 'ast_verifier.*', + + 'parser.Program!', + 'es2panda.ArkTsConfig!', + // Do not support node type + //'varbinder.FunctionDecl!', + //'varbinder.InterfaceDecl!', + // MemberExpression has checker.ETSFunctionType ExtensionAccessorTypeConst(es2panda_Context context); + //'checker.ETSFunctionType!', + //'ir.ETSFunctionType', + + 'ir.Annotated', + 'ir.AnnotationAllowed', + 'ir.Typed', + 'ir.VectorIterationGuard', + + 'VoidPtr', + ], + "partial": [ + { + interface: "es2panda_Impl", + methods: [ + "LogSyntaxError", "LogWarning", "LogTypeError", // wrong idl + "DestroyContext", // cleanup arena (Improve: move this cleanup to another method) + ], + }, + { + interface: "MethodDefinition", + methods: [ + "GetOverloadInfo", // return type is wrong + ] + }, + { + interface: "AnnotationDeclaration", + methods: [ + "PropertiesPtrConst" // interfaces create-to-param matching + ] + }, + { + interface: "NumberLiteral", + methods: [ + "SetInt", + "SetLong", + "SetDouble", + "SetFloat" + ] + }, + { + interface: "AnnotationUsage", + methods: [ + "PropertiesPtrConst" // interfaces create-to-param matching + ] + }, + { + interface: "TSInterfaceBody", + methods: [ + "BodyPtr" // interfaces create-to-param matching + ] + }, + { + interface: "Signature", + methods: [ + "ProtectionFlagConst" // u8 + ] + }, + { + interface: "ETSReExportDeclaration", + methods: [ + "Create", // sequence + "Update", // sequence + "GetUserPathsConst" // sequence + ] + }, + { + interface: "CharLiteral", + methods: [ + "Create1", // KShort, + "Update1", // KShort + "CharConst", // KShort + ] + }, + { + interface: "ForUpdateStatement", + methods: [ + "Update" // forbidden naming + ] + }, + { + interface: "CallExpression", + methods: [ + "Update" // differs from handwritten + ] + }, + { + interface: "TryStatement", + methods: [ + "AddFinalizerInsertion" // idl missing const + ] + }, + { + interface: "MemberExpression", + methods: [ + "SetExtensionAccessorType" // ETSFunction type ambiguity + ] + }, + { + interface: "ArkTsConfig", + methods: [ + "EntriesConst", + "FilesConst", + "Parse", + ] + }, + ] + }, + nonNullable: [ + { + name: "ScriptFunction", + methods: [ + { + name: "SetIdent", + types: ["id"] + } + ] + }, + { + name: "ArrowFunctionExpression", + methods: [ + { + name: "FunctionConst", + types: ["returnType"] + } + ] + }, + { + name : "FunctionDeclaration", + methods: [ + { + name: "FunctionConst", + types: ["returnType"] + } + ] + }, + { + name: "CallExpression", + methods: [ + { + name: "CalleeConst", + types: ["returnType"] + } + ] + }, + { + name : "ExpressionStatement", + methods: [ + { + name: "GetExpressionConst", + types: ["returnType"] + } + ] + }, + { + name: "IfStatement", + methods: [ + { + name: "TestConst", + types: ["returnType"] + }, + { + name: "ConsequentConst", + types: ["returnType"] + } + ] + }, + { + name: "MemberExpression", + methods: [ + { + name: "ObjectConst", + types: ["returnType"] + }, + { + name: "PropertyConst", + types: ["returnType"] + } + ] + }, + { + name: "ETSParameterExpression", + methods: [ + { + name: "IdentConst", + types: ["returnType"] + } + ] + }, + { + name: "VariableDeclarator", + methods: [ + { + name: "IdConst", + types: ["returnType"] + } + ] + }, + { + name: "ClassElement", + methods: [ + { + name: "IdConst", + types: ["returnType"] + } + ] + }, + { + name: "MethodDefinition", + methods: [ + { + name: "FunctionConst", + types: ["returnType"] + }, + ] + }, + { + name: "ETSFunctionType", + methods: [ + { + name: "ReturnTypeConst", + types: ["returnType"] + } + ] + }, + { + name: "TSTypeAliasDeclaration", + methods: [ + { + name: "TypeAnnotationConst", + types: ["returnType"] + } + ] + }, + { + name: "Program", + methods: [ + { + name: "Ast", + types: ["returnType"] + } + ] + }, + { + name: "ClassDeclaration", + methods: [ + { + name: "Definition", + types: ["returnType"] + } + ] + }, + ], + fragments: [ + { + interface: "MethodDefinition", + methods: [ + { + name: "setChildrenParentPtr", + definition: "extension_MethodDefinitionSetChildrenParentPtr", + }, + { + name: "onUpdate", + definition: "extension_MethodDefinitionOnUpdate", + }, + ] + }, + { + interface: "ETSModule", + methods: [ + { + name: "getNamespaceFlag", + definition: "extension_ETSModuleGetNamespaceFlag", + } + ] + }, + { + interface: "ScriptFunction", + methods: [ + { + name: "getSignaturePointer", + definition: "extension_ScriptFunctionGetSignaturePointer", + }, + { + name: "setSignaturePointer", + definition: "extension_ScriptFunctionSetSignaturePointer", + }, + { + name: "getPreferredReturnTypePointer", + definition: "extension_ScriptFunctionGetPreferredReturnTypePointer", + }, + { + name: "setPreferredReturnTypePointer", + definition: "extension_ScriptFunctionSetPreferredReturnTypePointer", + }, + ] + }, + { + interface: "ClassDefinition", + methods: [ + { + name: "setBody", + definition: "extension_ClassDefinitionSetBody", + }, + ] + }, + { + interface: "Expression", + methods: [ + { + name: "getPreferredTypePointer", + definition: "extension_ExpressionGetPreferredTypePointer", + }, + { + name: "setPreferredTypePointer", + definition: "extension_ExpressionSetPreferredTypePointer", + }, + ] + }, + { + interface: "Program", + methods: [ + { + name: "getExternalSources", + definition: "extension_ProgramGetExternalSources", + }, + ], + }, + { + interface: "es2panda_SourcePosition", + methods: [ + { + name: "getLine", + definition: "extension_SourcePositionGetLine", + }, + { + name: "getCol", + definition: "extension_SourcePositionGetCol", + }, + { + name: "toString", + definition: "extension_SourcePositionToString", + }, + ], + }, + { + interface: "NumberLiteral", + methods: [ + { + name: "value", + definition: "extension_NumberLiteralValue", + }, + ], + }, + ], + parameters: [ + { + interface: "ArrowFunctionExpression", + parameters: [ + { + name: "annotations", + }, + ], + }, + { + interface: "CallExpression", + parameters: [ + { + name: "trailingBlock", + }, + ], + }, + { + interface: "ClassDeclaration", + parameters: [ + { + name: "modifierFlags", + }, + ], + }, + { + interface: "ClassDefinition", + parameters: [ + { + name: "annotations", + }, + ], + }, + { + interface: "ClassProperty", + parameters: [ + { + name: "annotations", + }, + ], + }, + { + interface: "ETSFunctionType", + parameters: [ + { + name: "annotations", + }, + ], + }, + { + interface: "ETSParameterExpression", + parameters: [ + { + name: "annotations", + }, + ], + }, + { + interface: "ETSUnionType", + parameters: [ + { + name: "annotations", + }, + ], + }, + { + interface: "MethodDefinition", + parameters: [ + { + name: "overloads", + }, + ], + }, + { + interface: "ScriptFunction", + parameters: [ + { + name: "ident", + setter: "setIdent", + getter: "id", + }, + { + name: "annotations", + }, + ], + }, + { + interface: "TSInterfaceDeclaration", + parameters: [ + { + name: "modifierFlags", + }, + ], + }, + { + interface: "TSTypeAliasDeclaration", + parameters: [ + { + name: "annotations", + }, + { + name: "modifierFlags", + }, + ], + }, + { + interface: "VariableDeclaration", + parameters: [ + { + name: "annotations", + }, + ], + }, + ], +} diff --git a/koala_tools/ui2abc/libarkts/gn/command/copy.py b/koala_tools/ui2abc/libarkts/gn/command/copy.py new file mode 100755 index 0000000000000000000000000000000000000000..9b360ab835b81842b52348aa4dc8c50a15f29d14 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/gn/command/copy.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import argparse +import os +import shutil +import subprocess +import sys + +def get_compiler_name(os, cpu): + if (os == 'mingw' and cpu == 'x86_64'): + return 'mingw_x86_64' + return 'clang_x64' + +def library_ext(os, cpu): + if (os == 'mingw' and cpu == 'x86_64'): + return 'dll' + return 'node' + +def copy_files(source_path, dest_path, is_file=False): + try: + if is_file: + os.makedirs(os.path.dirname(dest_path), exist_ok=True) + shutil.copy(source_path, dest_path) + else: + shutil.copytree(source_path, dest_path, dirs_exist_ok=True, + symlinks=True) + except Exception as err: + raise Exception("Copy files failed. Error: " + str(err)) from err + + +def run_cmd(cmd, execution_path=None): + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, + stdin=subprocess.PIPE, + stderr=subprocess.PIPE, + cwd=execution_path) + stdout, stderr = proc.communicate(timeout=1000) + if proc.returncode != 0: + raise Exception(stdout.decode() + stderr.decode()) + + + +def copy_output(options): + + compiler = get_compiler_name(options.current_os, options.current_cpu) + library_extention = library_ext(options.current_os, options.current_cpu) + + from_path = options.from_path + to_path = options.to_path + + head_dir, tail_dir = os.path.split(from_path) + if (tail_dir == compiler): + from_path = head_dir + + + copy_files(os.path.join(from_path, f'{compiler}/libes2panda_lib.{library_extention}'), + os.path.join(to_path, 'build/native/build/es2panda.node'), True) + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument('--from-path', help='path to output') + parser.add_argument('--to-path', help='path to root out') + parser.add_argument('--current-os', help='current OS') + parser.add_argument('--current-cpu', help='current CPU') + + options = parser.parse_args() + return options + + +def main(): + options = parse_args() + copy_output(options) + + +if __name__ == '__main__': + sys.exit(main()) \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/native/meson.build b/koala_tools/ui2abc/libarkts/native/meson.build new file mode 100644 index 0000000000000000000000000000000000000000..f71b55ef82d59c8cfef448984472b4434fe35550 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/native/meson.build @@ -0,0 +1,127 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +project( + 'es2panda_interop', + 'cpp', + version: '1.0', + default_options: [ + 'cpp_std=c++17', + 'buildtype=release', + ], +) +is_cross = get_option('cross_compile') + +sources = [ + './src/common.cc', + './src/bridges.cc', + './src/generated/bridges.cc', + get_option('interop_src_dir') / 'common-interop.cc', + get_option('interop_src_dir') / 'callback-resource.cc', + get_option('interop_src_dir') / 'interop-logging.cc', + get_option('interop_src_dir') / 'napi' / 'convertors-napi.cc', +] + +cflags = [ + '-DKOALA_INTEROP_MODULE=NativeModule', + '-DINTEROP_LIBRARY_NAME=' + get_option('lib_name'), + '-DKOALA_USE_NODE_VM', + '-DKOALA_NAPI', +] + +if (host_machine.system() == 'windows') + cflags += ['-DKOALA_WINDOWS'] + # apply node.exe symbol loading hook + sources += [ + get_option('interop_src_dir') / 'napi/win-dynamic-node.cc' + ] +else + cflags += ['-DKOALA_LINUX'] +endif + +arch = target_machine.cpu() + +oses = { 'darwin': 'macos' } # rename meson default names to convenient ones +archs = { 'x86_64': 'x64', 'aarch64': 'arm64', 'armv7-a': 'arm32', 'wasm32': 'wasm' } + +os = target_machine.system() +os = oses.get(os, os) +arch = target_machine.cpu() +arch = archs.get(arch, arch) + +cflags_cross = [] +cflags_host = [] +suffix_host = '_' + os + '_' + arch +suffix_cross = '' + +if get_option('cross_compile') +if arch == 'arm64' +cflags_cross = ['--target=x86_64-linux-gnu'] +suffix_cross = '_' + os + '_x64' +endif +if arch == 'x64' +cflags_cross = ['--target=aarch64-linux-gnu'] +suffix_cross = '_' + os + '_arm64' +endif +endif + +shared_library( + get_option('lib_name') + suffix_host, + sources, + override_options: [ + 'b_lundef=false', + ], + install: true, + name_prefix: '', + name_suffix: 'node', + include_directories: [ + './src/', + get_option('panda_sdk_dir') / 'ohos_arm64/include/tools/es2panda/public', + get_option('panda_sdk_dir') / 'ohos_arm64/include/tools/es2panda', + get_option('interop_src_dir'), + get_option('interop_src_dir') / 'types', + get_option('interop_src_dir') / 'napi', + get_option('node_modules_dir') / 'node-api-headers/include', + get_option('node_modules_dir') / 'node-addon-api', + ], + cpp_args: cflags + cflags_host, + link_args: [cflags_host], + dependencies: [] +) + +if is_cross + # sudo apt install g++-aarch64-linux-gnu binutils-aarch64-linux-gnu + shared_library( + get_option('lib_name') + suffix_cross, + sources, + override_options: [ + 'b_lundef=false', + ], + install: true, + name_prefix: '', + name_suffix: 'node', + include_directories: [ + './src/', + get_option('panda_sdk_dir') / 'ohos_arm64/include/tools/es2panda/public', + get_option('panda_sdk_dir') / 'ohos_arm64/include/tools/es2panda', + get_option('interop_src_dir'), + get_option('interop_src_dir') / 'types', + get_option('interop_src_dir') / 'napi', + get_option('node_modules_dir') / 'node-api-headers/include', + get_option('node_modules_dir') / 'node-addon-api', + ], + cpp_args: cflags + cflags_cross, + link_args: [cflags_cross], + dependencies: [] + ) +endif \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/native/meson_options.txt b/koala_tools/ui2abc/libarkts/native/meson_options.txt new file mode 100644 index 0000000000000000000000000000000000000000..a59bde5ec5ec79c49d5033c733eb3cf5acbd70e1 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/native/meson_options.txt @@ -0,0 +1,43 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +option( + 'node_modules_dir', + type : 'string', + value : '../../node_modules/', + description : 'path to node_modules' +) +option( + 'interop_src_dir', + type : 'string', + value : '../../../interop/src/cpp/', + description : 'path to koala interop cpp files' +) +option( + 'panda_sdk_dir', + type : 'string', + value : '../../../incremental/tools/panda/node_modules/@panda/sdk/', + description : 'path to panda sdk' +) +option( + 'lib_name', + type : 'string', + value : 'es2panda', + description : 'name of shared library' +) +option( + 'cross_compile', + type : 'boolean', + value : false, + description : 'whether to build binaries for all architectures or just for current' +) \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/native/mingw.cross b/koala_tools/ui2abc/libarkts/native/mingw.cross new file mode 100644 index 0000000000000000000000000000000000000000..61007dbc506ba1fdfdd2805b666f92c2fed071f4 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/native/mingw.cross @@ -0,0 +1,27 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[binaries] +c = 'x86_64-w64-mingw32-gcc' +cpp = 'x86_64-w64-mingw32-g++' +ar = 'x86_64-w64-mingw32-ar' +windres = 'x86_64-w64-mingw32-windres' +strip = 'x86_64-w64-mingw32-strip' +exe_wrapper = 'wine64' + +[host_machine] +system = 'windows' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' + diff --git a/koala_tools/ui2abc/libarkts/native/src/bridges.cc b/koala_tools/ui2abc/libarkts/native/src/bridges.cc new file mode 100644 index 0000000000000000000000000000000000000000..e3b1d2f91c33dc8511ff29511c41f5fb4f2c0b6a --- /dev/null +++ b/koala_tools/ui2abc/libarkts/native/src/bridges.cc @@ -0,0 +1,543 @@ +/* + * 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. + */ + +#include "common.h" + +#include +#include +#include + +KNativePointer impl_AstNodeRebind(KNativePointer contextPtr, KNativePointer nodePtr) +{ + auto context = reinterpret_cast(contextPtr); + auto node = reinterpret_cast(nodePtr); + GetImpl()->AstNodeRebind(context, node); + return nullptr; +} +KOALA_INTEROP_2(AstNodeRebind, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_AnnotationAllowedAnnotations(KNativePointer contextPtr, KNativePointer nodePtr, KNativePointer returnLen) +{ + auto context = reinterpret_cast(contextPtr); + auto node = reinterpret_cast(nodePtr); + std::size_t params_len = 0; + auto annotations = GetImpl()->AnnotationAllowedAnnotations(context, node, ¶ms_len); + return StageArena::cloneVector(annotations, params_len); +} +KOALA_INTEROP_3(AnnotationAllowedAnnotations, KNativePointer, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_AnnotationAllowedAnnotationsConst(KNativePointer contextPtr, KNativePointer nodePtr, KNativePointer returnLen) +{ + auto context = reinterpret_cast(contextPtr); + auto node = reinterpret_cast(nodePtr); + std::size_t params_len = 0; + auto annotations = GetImpl()->AnnotationAllowedAnnotationsConst(context, node, ¶ms_len); + return StageArena::cloneVector(annotations, params_len); +} +KOALA_INTEROP_3(AnnotationAllowedAnnotationsConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_VariableDeclaration(KNativePointer contextPtr, KNativePointer variablePtr) +{ + auto context = reinterpret_cast(contextPtr); + auto variable = reinterpret_cast(variablePtr); + + return GetImpl()->VariableDeclaration(context, variable); +} +KOALA_INTEROP_2(VariableDeclaration, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_DeclNode(KNativePointer contextPtr, KNativePointer declPtr) +{ + auto context = reinterpret_cast(contextPtr); + auto decl = reinterpret_cast(declPtr); + + return GetImpl()->DeclNode(context, decl); +} +KOALA_INTEROP_2(DeclNode, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_ScopeSetParent(KNativePointer contextPtr, KNativePointer nodePtr, KNativePointer parentPtr) +{ + auto context = reinterpret_cast(contextPtr); + auto node = reinterpret_cast(nodePtr); + auto parent = reinterpret_cast(parentPtr); + GetImpl()->ScopeSetParent(context, node, parent); + return node; +} +KOALA_INTEROP_3(ScopeSetParent, KNativePointer, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_ETSParserCreateExpression(KNativePointer contextPtr, KStringPtr& sourceCodePtr, KInt flagsT) +{ + auto context = reinterpret_cast(contextPtr); + auto flags = static_cast(flagsT); + + return GetImpl()->ETSParserCreateExpression(context, getStringCopy(sourceCodePtr), flags); +} +KOALA_INTEROP_3(ETSParserCreateExpression, KNativePointer, KNativePointer, KStringPtr, KInt) + +KNativePointer impl_CreateContextFromString(KNativePointer configPtr, KStringPtr& sourcePtr, KStringPtr& filenamePtr) +{ + auto config = reinterpret_cast(configPtr); + return GetImpl()->CreateContextFromString(config, sourcePtr.data(), filenamePtr.data()); +} +KOALA_INTEROP_3(CreateContextFromString, KNativePointer, KNativePointer, KStringPtr, KStringPtr) + +KNativePointer impl_CreateContextFromFile(KNativePointer configPtr, KStringPtr& filenamePtr) +{ + auto config = reinterpret_cast(configPtr); + return GetImpl()->CreateContextFromFile(config, getStringCopy(filenamePtr)); +} +KOALA_INTEROP_2(CreateContextFromFile, KNativePointer, KNativePointer, KStringPtr) + +KNativePointer impl_SignatureFunction(KNativePointer context, KNativePointer classInstance) +{ + const auto _context = reinterpret_cast(context); + const auto _classInstance = reinterpret_cast(classInstance); + const auto result = GetImpl()->SignatureFunction(_context, _classInstance); + return result; +} +KOALA_INTEROP_2(SignatureFunction, KNativePointer, KNativePointer, KNativePointer) + +static KNativePointer impl_ProgramExternalSources(KNativePointer contextPtr, KNativePointer instancePtr) +{ + auto context = reinterpret_cast(contextPtr); + auto&& instance = reinterpret_cast(instancePtr); + std::size_t source_len = 0; + auto external_sources = GetImpl()->ProgramExternalSources(context, instance, &source_len); + return StageArena::cloneVector(external_sources, source_len); +} +KOALA_INTEROP_2(ProgramExternalSources, KNativePointer, KNativePointer, KNativePointer); + +static KNativePointer impl_ProgramDirectExternalSources(KNativePointer contextPtr, KNativePointer instancePtr) +{ + auto context = reinterpret_cast(contextPtr); + auto&& instance = reinterpret_cast(instancePtr); + std::size_t sourceLen = 0; + auto externalSources = GetImpl()->ProgramDirectExternalSources(context, instance, &sourceLen); + return new std::vector(externalSources, externalSources + sourceLen); +} +KOALA_INTEROP_2(ProgramDirectExternalSources, KNativePointer, KNativePointer, KNativePointer); + +static KNativePointer impl_ProgramSourceFilePath(KNativePointer contextPtr, KNativePointer instancePtr) +{ + auto context = reinterpret_cast(contextPtr); + auto&& instance = reinterpret_cast(instancePtr); + auto&& result = GetImpl()->ProgramSourceFilePathConst(context, instance); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramSourceFilePath, KNativePointer, KNativePointer, KNativePointer); + +static KNativePointer impl_ExternalSourceName(KNativePointer instance) +{ + auto&& _instance_ = reinterpret_cast(instance); + auto&& result = GetImpl()->ExternalSourceName(_instance_); + return StageArena::strdup(result); +} +KOALA_INTEROP_1(ExternalSourceName, KNativePointer, KNativePointer); + +static KNativePointer impl_ExternalSourcePrograms(KNativePointer instance) +{ + auto&& _instance_ = reinterpret_cast(instance); + std::size_t program_len = 0; + auto programs = GetImpl()->ExternalSourcePrograms(_instance_, &program_len); + return StageArena::cloneVector(programs, program_len); +} +KOALA_INTEROP_1(ExternalSourcePrograms, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParserBuildImportDeclaration(KNativePointer context, KInt importKinds, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KNativePointer source, KNativePointer program, KInt importFlag) +{ + const auto _context = reinterpret_cast(context); + const auto _kinds = static_cast(importKinds); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + const auto _source = reinterpret_cast(source); + const auto _program = reinterpret_cast(program); + const auto _importFlag = static_cast(importFlag); + + return GetImpl()->ETSParserBuildImportDeclaration(_context, _kinds, _specifiers, _specifiersSequenceLength, _source, _program, _importFlag); +} +KOALA_INTEROP_7(ETSParserBuildImportDeclaration, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KNativePointer, KNativePointer, KInt) + +KNativePointer impl_ETSParserGetImportPathManager(KNativePointer contextPtr) +{ + auto context = reinterpret_cast(contextPtr); + return GetImpl()->ETSParserGetImportPathManager(context); +} +KOALA_INTEROP_1(ETSParserGetImportPathManager, KNativePointer, KNativePointer); + +KInt impl_SourcePositionCol(KNativePointer context, KNativePointer instance) +{ + auto&& _context_ = reinterpret_cast(context); + auto&& _instance_ = reinterpret_cast(instance); + return GetImpl()->SourcePositionCol(_context_, _instance_); +} +KOALA_INTEROP_2(SourcePositionCol, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_ConfigGetOptions(KNativePointer config) +{ + const auto _config = reinterpret_cast(config); + auto result = GetImpl()->ConfigGetOptions(_config); + return (void*)result; +} +KOALA_INTEROP_1(ConfigGetOptions, KNativePointer, KNativePointer) + +KNativePointer impl_OptionsArkTsConfig(KNativePointer context, KNativePointer options) +{ + const auto _context = reinterpret_cast(context); + const auto _options = reinterpret_cast(options); + auto result = GetImpl()->OptionsUtilArkTSConfigConst(_context, _options); + return (void*)result; +} +KOALA_INTEROP_2(OptionsArkTsConfig, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_CreateCacheContextFromFile(KNativePointer configPtr, KStringPtr& source_file_namePtr, KNativePointer globalContextPtr, KBoolean isExternal) { + auto config = reinterpret_cast(configPtr); + auto globalContext = reinterpret_cast(globalContextPtr); + return GetImpl()->CreateCacheContextFromFile(config, getStringCopy(source_file_namePtr), globalContext, isExternal); +} +KOALA_INTEROP_4(CreateCacheContextFromFile, KNativePointer, KNativePointer, KStringPtr, KNativePointer, KBoolean) + +KNativePointer impl_CreateGlobalContext(KNativePointer configPtr, KStringArray externalFileListPtr, KUInt fileNum, KBoolean LspUsage) { + auto config = reinterpret_cast(configPtr); + const int headerLen = 4; + const char** files = StageArena::allocArray(fileNum); + uint8_t* filesPtr = (uint8_t*)externalFileListPtr; + std::size_t position = headerLen; + std::size_t strLen; + for (std::size_t i = 0; i < static_cast(fileNum); ++i) { + strLen = unpackUInt(filesPtr + position); + position += headerLen; + files[i] = StageArena::strdup(std::string(reinterpret_cast(filesPtr + position), strLen).c_str()); + position += strLen; + } + return GetImpl()->CreateGlobalContext(config, files, fileNum, LspUsage); +} +KOALA_INTEROP_4(CreateGlobalContext, KNativePointer, KNativePointer, KStringArray, KUInt, KBoolean) + +void impl_DestroyGlobalContext(KNativePointer globalContextPtr) { + auto globalContext = reinterpret_cast(globalContextPtr); + GetImpl()->DestroyGlobalContext(globalContext); +} +KOALA_INTEROP_V1(DestroyGlobalContext, KNativePointer) + +// All these "Checker_" bridges are related to checker namespace in es2panda, so work with them carefully +// Checker.Type does reset on recheck, so modifying them makes no sence +// It seems that compiler does not provide API to convert Checker.Type to ir.Type +KNativePointer impl_Checker_CreateOpaqueTypeNode(KNativePointer context, KNativePointer type) +{ + auto _context = reinterpret_cast(context); + auto _type = reinterpret_cast(type); + return GetImpl()->CreateOpaqueTypeNode(_context, _type); +} +KOALA_INTEROP_2(Checker_CreateOpaqueTypeNode, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_Checker_ScriptFunctionSignature(KNativePointer context, KNativePointer node) +{ + auto _context = reinterpret_cast(context); + auto _node = reinterpret_cast(node); + return GetImpl()->ScriptFunctionSignature(_context, _node); +} +KOALA_INTEROP_2(Checker_ScriptFunctionSignature, KNativePointer, KNativePointer, KNativePointer) + +void impl_Checker_ScriptFunctionSetSignature(KNativePointer context, KNativePointer node, KNativePointer signature) +{ + auto _context = reinterpret_cast(context); + auto _node = reinterpret_cast(node); + auto _signature = reinterpret_cast(signature); + GetImpl()->ScriptFunctionSetSignature(_context, _node, _signature); + return; +} +KOALA_INTEROP_V3(Checker_ScriptFunctionSetSignature, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_Checker_SignatureReturnType(KNativePointer context, KNativePointer signature) +{ + auto _context = reinterpret_cast(context); + auto _signature = reinterpret_cast(signature); + return GetImpl()->SignatureReturnType(_context, _signature); +} +KOALA_INTEROP_2(Checker_SignatureReturnType, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_Checker_ScriptFunctionGetPreferredReturnType(KNativePointer context, KNativePointer node) +{ + auto _context = reinterpret_cast(context); + auto _node = reinterpret_cast(node); + return GetImpl()->ScriptFunctionGetPreferredReturnType(_context, _node); +} +KOALA_INTEROP_2(Checker_ScriptFunctionGetPreferredReturnType, KNativePointer, KNativePointer, KNativePointer) + +void impl_Checker_ScriptFunctionSetPreferredReturnType(KNativePointer context, KNativePointer node, KNativePointer type) +{ + auto _context = reinterpret_cast(context); + auto _node = reinterpret_cast(node); + auto _type = reinterpret_cast(type); + GetImpl()->ScriptFunctionSetPreferredReturnType(_context, _node, _type); + return; +} +KOALA_INTEROP_V3(Checker_ScriptFunctionSetPreferredReturnType, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_Checker_ExpressionGetPreferredType(KNativePointer context, KNativePointer node) +{ + auto _context = reinterpret_cast(context); + auto _node = reinterpret_cast(node); + return GetImpl()->ExpressionPreferredTypeConst(_context, _node); +} +KOALA_INTEROP_2(Checker_ExpressionGetPreferredType, KNativePointer, KNativePointer, KNativePointer) + +void impl_Checker_ExpressionSetPreferredType(KNativePointer context, KNativePointer node, KNativePointer type) +{ + auto _context = reinterpret_cast(context); + auto _node = reinterpret_cast(node); + auto _type = reinterpret_cast(type); + GetImpl()->ExpressionSetPreferredType(_context, _node, _type); + return; +} +KOALA_INTEROP_V3(Checker_ExpressionSetPreferredType, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_Checker_TypeToString(KNativePointer context, KNativePointer type) +{ + auto _context = reinterpret_cast(context); + auto _type = reinterpret_cast(type); + auto result = GetImpl()->TypeToStringConst(_context, _type); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(Checker_TypeToString, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_Checker_TypeClone(KNativePointer context, KNativePointer type) +{ + auto _context = reinterpret_cast(context); + auto _type = reinterpret_cast(type); + return GetImpl()->TypeClone(_context, _type); +} +KOALA_INTEROP_2(Checker_TypeClone, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_Checker_TypeNodeGetType(KNativePointer context, KNativePointer astNode) +{ + auto _context = reinterpret_cast(context); + auto _astNode = reinterpret_cast(astNode); + return GetImpl()->TypeNodeGetType(_context, _astNode); +} +KOALA_INTEROP_2(Checker_TypeNodeGetType, KNativePointer, KNativePointer, KNativePointer) + +// From koala-wrapper +// Improve: check if some code should be generated + +std::set globalStructInfo; +#ifdef _GLIBCXX_HAS_GTHREADS +std::mutex g_structMutex; +#endif + +void impl_InsertGlobalStructInfo(KNativePointer contextPtr, KStringPtr& instancePtr) +{ +#ifdef _GLIBCXX_HAS_GTHREADS + std::lock_guard lock(g_structMutex); +#endif + globalStructInfo.insert(getStringCopy(instancePtr)); + return; +} +KOALA_INTEROP_V2(InsertGlobalStructInfo, KNativePointer, KStringPtr); + +KBoolean impl_HasGlobalStructInfo(KNativePointer contextPtr, KStringPtr& instancePtr) +{ +#ifdef _GLIBCXX_HAS_GTHREADS + std::lock_guard lock(g_structMutex); +#endif + return globalStructInfo.count(getStringCopy(instancePtr)); +} +KOALA_INTEROP_2(HasGlobalStructInfo, KBoolean, KNativePointer, KStringPtr); + +KNativePointer impl_ClassVariableDeclaration(KNativePointer context, KNativePointer classInstance) +{ + const auto _context = reinterpret_cast(context); + const auto _classInstance = reinterpret_cast(classInstance); + auto _typedTsType = GetImpl()->TypedTsType(_context, _classInstance); + if (_typedTsType == nullptr) { + return nullptr; + } + const auto _instanceType = reinterpret_cast(_typedTsType); + auto _typeVar = GetImpl()->TypeVariable(_context, _instanceType); + if (_typeVar == nullptr) { + return nullptr; + } + const auto result = reinterpret_cast(GetImpl()->VariableDeclaration(_context, _typeVar)); + const auto declNode = GetImpl()->DeclNode(_context, result); + return declNode; +} +KOALA_INTEROP_2(ClassVariableDeclaration, KNativePointer, KNativePointer, KNativePointer) + +KNativePointer impl_TSInterfaceBodyBodyPtr(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceBodyBodyPtr(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSInterfaceBodyBodyPtr, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationDeclarationPropertiesPtrConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationDeclarationPropertiesPtrConst(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationDeclarationPropertiesPtrConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParserGetGlobalProgramAbsName(KNativePointer contextPtr) +{ + auto context = reinterpret_cast(contextPtr); + auto result = GetImpl()->ETSParserGetGlobalProgramAbsName(context); + return new std::string(result); +} +KOALA_INTEROP_1(ETSParserGetGlobalProgramAbsName, KNativePointer, KNativePointer) + +KNativePointer impl_CreateDiagnosticKind(KNativePointer context, KStringPtr& message, KInt type) +{ + const auto _context = reinterpret_cast(context); + const auto _message = getStringCopy(message); + const auto _type = static_cast(type); + return const_cast(GetImpl()->CreateDiagnosticKind(_context, _message, _type)); +} +KOALA_INTEROP_3(CreateDiagnosticKind, KNativePointer, KNativePointer, KStringPtr, KInt) + +KNativePointer impl_CreateDiagnosticInfo(KNativePointer context, KNativePointer kind, KStringArray argsPtr, + KInt argc, KNativePointer pos) +{ + const auto _context = reinterpret_cast(context); + const auto _kind = reinterpret_cast(kind); + const auto _pos = reinterpret_cast(pos); + const std::size_t headerLen = 4; + const char** _args = new const char*[argc]; + std::size_t position = headerLen; + std::size_t strLen; + for (std::size_t i = 0; i < static_cast(argc); ++i) { + strLen = unpackUInt(argsPtr + position); + position += headerLen; + _args[i] = strdup(std::string(reinterpret_cast(argsPtr + position), strLen).c_str()); + position += strLen; + } + return GetImpl()->CreateDiagnosticInfo(_context, _kind, _args, argc, _pos); +} +KOALA_INTEROP_5(CreateDiagnosticInfo, KNativePointer, KNativePointer, KNativePointer, + KStringArray, KInt, KNativePointer) + +KNativePointer impl_CreateSuggestionInfo(KNativePointer context, KNativePointer kind, KStringArray argsPtr, + KInt argc, KStringPtr& substitutionCode, KStringPtr& title, KNativePointer range) +{ + const auto _context = reinterpret_cast(context); + const auto _kind = reinterpret_cast(kind); + const auto _title = getStringCopy(title); + const auto _range = reinterpret_cast(range); + const std::size_t headerLen = 4; + const char** _args = new const char*[argc]; + std::size_t position = headerLen; + std::size_t strLen; + for (std::size_t i = 0; i < static_cast(argc); ++i) { + strLen = unpackUInt(argsPtr + position); + position += headerLen; + _args[i] = strdup(std::string(reinterpret_cast(argsPtr + position), strLen).c_str()); + position += strLen; + } + const auto _substitutionCode = getStringCopy(substitutionCode); + return GetImpl()->CreateSuggestionInfo(_context, _kind, _args, argc, _substitutionCode, _title, _range); +} +KOALA_INTEROP_7(CreateSuggestionInfo, KNativePointer, KNativePointer, KNativePointer, KStringArray, KInt, + KStringPtr, KStringPtr, KNativePointer) + +void impl_LogDiagnostic(KNativePointer context, KNativePointer kind, KStringArray argvPtr, + KInt argc, KNativePointer pos) +{ + auto&& _context_ = reinterpret_cast(context); + auto&& _kind_ = reinterpret_cast(kind); + auto&& _pos_ = reinterpret_cast(pos); + const std::size_t headerLen = 4; + const char** argv = new const char*[argc]; + std::size_t position = headerLen; + std::size_t strLen; + for (std::size_t i = 0; i < static_cast(argc); ++i) { + strLen = unpackUInt(argvPtr + position); + position += headerLen; + argv[i] = strdup(std::string(reinterpret_cast(argvPtr + position), strLen).c_str()); + position += strLen; + } + GetImpl()->LogDiagnostic(_context_, _kind_, argv, argc, _pos_); +} +KOALA_INTEROP_V5(LogDiagnostic, KNativePointer, KNativePointer, KStringArray, KInt, KNativePointer) + +KNativePointer impl_AnnotationUsageIrPropertiesPtrConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationUsageIrPropertiesPtrConst(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationUsageIrPropertiesPtrConst, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_GenerateTsDeclarationsFromContext(KNativePointer contextPtr, KStringPtr &outputDeclEts, KStringPtr &outputEts, + KBoolean exportAll, KBoolean isolated, KStringPtr &recordFile) +{ + auto context = reinterpret_cast(contextPtr); + return GetImpl()->GenerateTsDeclarationsFromContext(context, outputDeclEts.data(), outputEts.data(), exportAll, isolated, recordFile.data() ); +} +KOALA_INTEROP_6(GenerateTsDeclarationsFromContext, KInt, KNativePointer, KStringPtr, KStringPtr, KBoolean, KBoolean, KStringPtr) + +// Improve: simplify +KNativePointer impl_CreateContextGenerateAbcForExternalSourceFiles( + KNativePointer configPtr, KInt fileNamesCount, KStringArray fileNames) +{ + auto config = reinterpret_cast(configPtr); + const std::size_t headerLen = 4; + const char **argv = + new const char *[static_cast(fileNamesCount)]; + std::size_t position = headerLen; + std::size_t strLen; + for (std::size_t i = 0; i < static_cast(fileNamesCount); ++i) { + strLen = unpackUInt(fileNames + position); + position += headerLen; + argv[i] = strdup( + std::string(reinterpret_cast(fileNames + position), + strLen) + .c_str()); + position += strLen; + } + return GetImpl()->CreateContextGenerateAbcForExternalSourceFiles( + config, fileNamesCount, argv); +} +KOALA_INTEROP_3(CreateContextGenerateAbcForExternalSourceFiles, KNativePointer, KNativePointer, KInt, KStringArray) + +KInt impl_GetCompilationMode(KNativePointer configPtr) +{ + auto _config = reinterpret_cast(configPtr); + auto _options = const_cast(GetImpl()->ConfigGetOptions(_config)); + return GetImpl()->OptionsUtilGetCompilationModeConst(nullptr, _options); +} +KOALA_INTEROP_1(GetCompilationMode, KInt, KNativePointer); + +KNativePointer impl_CreateTypeNodeFromTsType(KNativePointer context, KNativePointer nodePtr) +{ + const auto _context = reinterpret_cast(context); + const auto _nodePtr = reinterpret_cast(nodePtr); + auto _tsType = GetImpl()->TypedTsType(_context, _nodePtr); + if (_tsType == nullptr) { + _tsType = GetImpl()->ExpressionTsType(_context, _nodePtr); + } + if (_tsType == nullptr) { + return nullptr; + } + const auto _nodeTsType = reinterpret_cast(_tsType); + auto _typeAnnotation = GetImpl()->CreateOpaqueTypeNode(_context, _nodeTsType); + return _typeAnnotation; +} +KOALA_INTEROP_2(CreateTypeNodeFromTsType, KNativePointer, KNativePointer, KNativePointer); \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/native/src/common.cc b/koala_tools/ui2abc/libarkts/native/src/common.cc new file mode 100644 index 0000000000000000000000000000000000000000..6fea396a6952a7ea16624af4dde451f438b2b94b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/native/src/common.cc @@ -0,0 +1,433 @@ +/* + * 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. + */ + +#include +#include +#include "interop-types.h" + +using std::string, std::cout, std::endl, std::vector; + +es2panda_Impl *es2pandaImplementation = nullptr; +static thread_local StageArena currentArena; + +StageArena* StageArena::instance() +{ + return ¤tArena; +} + +void StageArena::add(void* pointer) +{ + if (pointer) + allocated.push_back(pointer); +} + +void StageArena::cleanup() +{ + if (totalSize > 0 && false) + printf("cleanup %d objects %d bytes\n", (int)allocated.size(), (int)totalSize); + for (auto it : allocated) { + free(it); + } + totalSize = 0; + allocated.clear(); +} + +StageArena::StageArena() +{ + totalSize = 0; +} + +StageArena::~StageArena() +{ + cleanup(); +} + +char* StageArena::strdup(const char* string) +{ + auto* arena = StageArena::instance(); + auto size = strlen(string) + 1; + char* memory = (char*)arena->alloc(size); + interop_memcpy(memory, size, string, size); + return memory; +} + +void* StageArena::alloc(size_t size) +{ + void* result = malloc(size); + if (!result) { + INTEROP_FATAL("Cannot allocate memory"); + } + totalSize += size; + add(result); + return result; +} + +#ifdef KOALA_WINDOWS + #include + #define PLUGIN_DIR "windows_host_tools" + #define LIB_PREFIX "lib" + #define LIB_SUFFIX ".dll" +#endif + +#if defined(KOALA_LINUX) || defined(KOALA_MACOS) + #include + + #ifdef __x86_64__ + #define PLUGIN_DIR "linux_host_tools" + #else + #define PLUGIN_DIR "linux_arm64_host_tools" + #endif + + #define LIB_PREFIX "lib" + #define LIB_SUFFIX ".so" +#endif + +const char* DEFAULT_SDK_PATH = "../../../incremental/tools/panda/node_modules/@panda/sdk" ; +const char* NAME = LIB_PREFIX "es2panda-public" LIB_SUFFIX; + +const char* LIB_ES2PANDA_PUBLIC = LIB_PREFIX "es2panda_public" LIB_SUFFIX; +const char* IS_UI_FLAG = "IS_UI_FLAG"; +const char* NOT_UI_FLAG = "NOT_UI_FLAG"; +const string MODULE_SUFFIX = ".d.ets"; +const string ARKUI = "arkui"; + +#ifdef KOALA_WINDOWS + const char *SEPARATOR = "\\"; +#else + const char *SEPARATOR = "/"; +#endif +const char *LIB_DIR = "lib"; + +static std::string ES2PANDA_LIB_PATH = ""; + +std::string joinPath(vector &paths) +{ + std::string res; + for (std::size_t i = 0; i < paths.size(); ++i) { + if (i == 0) { + res = paths[i]; + } else { + res += SEPARATOR + paths[i]; + } + } + return res; +} + +void impl_SetUpSoPath(KStringPtr &soPath) +{ + ES2PANDA_LIB_PATH = std::string(soPath.c_str()); +} +KOALA_INTEROP_V1(SetUpSoPath, KStringPtr); + +// Improve: simplify this +void* FindLibrary() { + void *res = nullptr; + std::vector pathArray; + + // find by SetUpSoPath + if (!ES2PANDA_LIB_PATH.empty()) { + pathArray = {ES2PANDA_LIB_PATH, LIB_DIR, LIB_ES2PANDA_PUBLIC}; + res = loadLibrary(joinPath(pathArray)); + if (res) { + return res; + } + } + + // find by set PANDA_SDK_PATH + char* envValue = getenv("PANDA_SDK_PATH"); + if (envValue) { + pathArray = {envValue, PLUGIN_DIR, LIB_DIR, NAME}; + res = loadLibrary(joinPath(pathArray)); + if (res) { + return res; + } + } + + // find by set LD_LIBRARY_PATH + pathArray = {LIB_ES2PANDA_PUBLIC}; + res = loadLibrary(joinPath(pathArray)); + if (res) { + return res; + } + + // find by DEFAULT_SDK_PATH + pathArray = {DEFAULT_SDK_PATH, PLUGIN_DIR, LIB_DIR, NAME}; + res = loadLibrary(joinPath(pathArray)); + if (res) { + return res; + } + + return nullptr; +} + +es2panda_Impl *GetImplSlow() +{ + if (es2pandaImplementation) { + return es2pandaImplementation; + } + auto library = FindLibrary(); + if (!library) { + printf("No library (es2panda_lib.cc)"); + abort(); + } + auto symbol = findSymbol(library, "es2panda_GetImpl"); + if (!symbol) { + printf("no entry point"); + abort(); + } + es2pandaImplementation = reinterpret_cast(symbol)(ES2PANDA_LIB_VERSION); + return es2pandaImplementation; +} + +string getString(KStringPtr ptr) +{ + return ptr.data(); +} + +char* getStringCopy(KStringPtr& ptr) +{ + return StageArena::strdup(ptr.c_str() ? ptr.c_str() : ""); +} + +KNativePointer impl_CreateConfig(KInt argc, KStringArray argvPtr) { + const std::size_t headerLen = 4; + + const char** argv = StageArena::allocArray(argc); + std::size_t position = headerLen; + std::size_t strLen; + for (std::size_t i = 0; i < static_cast(argc); ++i) { + strLen = unpackUInt(argvPtr + position); + position += headerLen; + argv[i] = StageArena::strdup(std::string(reinterpret_cast(argvPtr + position), strLen).c_str()); + position += strLen; + } + return GetImpl()->CreateConfig(argc, argv); +} +KOALA_INTEROP_2(CreateConfig, KNativePointer, KInt, KStringArray) + +KNativePointer impl_DestroyConfig(KNativePointer configPtr) { + auto config = reinterpret_cast(configPtr); + GetImpl()->DestroyConfig(config); + return nullptr; +} +KOALA_INTEROP_1(DestroyConfig, KNativePointer, KNativePointer) + +void impl_DestroyContext(KNativePointer contextPtr) { + auto context = reinterpret_cast(contextPtr); + GetImpl()->DestroyContext(context); + StageArena::instance()->cleanup(); +} +KOALA_INTEROP_V1(DestroyContext, KNativePointer) + +KNativePointer impl_UpdateCallExpression( + KNativePointer contextPtr, + KNativePointer nodePtr, + KNativePointer calleePtr, + KNativePointerArray argumentsPtr, + KInt argumentsLen, + KNativePointer typeParamsPtr, + KBoolean optionalT, + KBoolean trailingCommaT +) { + auto node = reinterpret_cast(nodePtr); + auto context = reinterpret_cast(contextPtr); + auto callee = reinterpret_cast(calleePtr); + auto arguments = reinterpret_cast(argumentsPtr); + auto typeParams = reinterpret_cast(typeParamsPtr); + auto optional = static_cast(optionalT); + auto trailingComma = static_cast(trailingCommaT); + + auto nn = GetImpl()->CreateCallExpression( + context, callee, arguments, argumentsLen, typeParams, optional, trailingComma + ); + GetImpl()->AstNodeSetOriginalNode(context, nn, node); + return nn; +} +KOALA_INTEROP_8(UpdateCallExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KInt, KNativePointer, KBoolean, KBoolean) + +KInt impl_IdentifierIdentifierFlags(KNativePointer contextPtr, KNativePointer nodePtr) { + auto context = reinterpret_cast(contextPtr); + auto node = reinterpret_cast(nodePtr); + + return + (GetImpl()->IdentifierIsOptionalConst(context, node) ? (1 << 0) : 0) | + (GetImpl()->IdentifierIsReferenceConst(context, node) ? (1 << 1) : 0) | + (GetImpl()->IdentifierIsTdzConst(context, node) ? (1 << 2) : 0); +} +KOALA_INTEROP_2(IdentifierIdentifierFlags, KInt, KNativePointer, KNativePointer) + +void impl_ClassDefinitionSetBody(KNativePointer context, KNativePointer receiver, KNativePointerArray body, KUInt bodyLength) { + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _body = reinterpret_cast(body); + const auto _bodyLength = static_cast(bodyLength); + GetImpl()->ClassDefinitionClearBody(_context, _receiver); + for (size_t i = 0; i < _bodyLength; i++) { + GetImpl()->ClassDefinitionEmplaceBody(_context, _receiver, _body[i]); + } +} +KOALA_INTEROP_V4(ClassDefinitionSetBody, KNativePointer, KNativePointer, KNativePointerArray, KUInt) + +/* +Improve: NOT FROM API (shouldn't be there) +----------------------------------------------------------------------------------------------------------------------------- +*/ + +es2panda_AstNode * cachedParentNode; +es2panda_Context * cachedContext; + +static void changeParent(es2panda_AstNode *child) +{ + GetImpl()->AstNodeSetParent(cachedContext, child, cachedParentNode); +} + +static void SetRightParent(es2panda_AstNode *node, void *arg) +{ + es2panda_Context *ctx = static_cast(arg); + cachedContext = ctx; + cachedParentNode = node; + + GetImpl()->AstNodeIterateConst(ctx, node, changeParent); +} + +KNativePointer impl_AstNodeUpdateAll(KNativePointer contextPtr, KNativePointer programPtr) { + auto context = reinterpret_cast(contextPtr); + auto program = reinterpret_cast(programPtr); + + GetImpl()->AstNodeForEach(program, SetRightParent, context); + return program; +} +KOALA_INTEROP_2(AstNodeUpdateAll, KNativePointer, KNativePointer, KNativePointer) + +void impl_AstNodeSetChildrenParentPtr(KNativePointer contextPtr, KNativePointer nodePtr) { + auto context = reinterpret_cast(contextPtr); + auto node = reinterpret_cast(nodePtr); + cachedParentNode = node; + + GetImpl()->AstNodeIterateConst(context, node, changeParent); +} +KOALA_INTEROP_V2(AstNodeSetChildrenParentPtr, KNativePointer, KNativePointer) + +void impl_AstNodeOnUpdate(KNativePointer context, KNativePointer newNode, KNativePointer replacedNode) { + auto _context = reinterpret_cast(context); + auto _newNode = reinterpret_cast(newNode); + auto _replacedNode = reinterpret_cast(replacedNode); + + // Assign original + auto _original = GetImpl()->AstNodeOriginalNodeConst(_context, _replacedNode); + if (!_original) { + _original = _replacedNode; + } + GetImpl()->AstNodeSetOriginalNode(_context, _newNode, _original); + + // Assign new node parent + auto _parent = GetImpl()->AstNodeParent(_context, _replacedNode); + if (_parent) { + GetImpl()->AstNodeSetParent(_context, _newNode, _parent); + } + + // Redirect children parent pointer to this node + impl_AstNodeSetChildrenParentPtr(context, newNode); +} +KOALA_INTEROP_V3(AstNodeOnUpdate, KNativePointer, KNativePointer, KNativePointer) + +std::vector cachedChildren; + +static void visitChild(es2panda_AstNode *node) +{ + cachedChildren.emplace_back(node); +} + +KNativePointer impl_AstNodeChildren( + KNativePointer contextPtr, + KNativePointer nodePtr +) { + auto context = reinterpret_cast(contextPtr); + auto node = reinterpret_cast(nodePtr); + cachedContext = context; + cachedChildren.clear(); + + GetImpl()->AstNodeIterateConst(context, node, visitChild); + return StageArena::clone(cachedChildren); +} +KOALA_INTEROP_2(AstNodeChildren, KNativePointer, KNativePointer, KNativePointer) + +/* +----------------------------------------------------------------------------------------------------------------------------- +*/ + +// From koala-wrapper +// Improve: check if some code should be generated + +void impl_MemInitialize() +{ + GetImpl()->MemInitialize(); +} +KOALA_INTEROP_V0(MemInitialize) + +void impl_MemFinalize() +{ + GetImpl()->MemFinalize(); +} +KOALA_INTEROP_V0(MemFinalize) + +static bool isUIHeaderFile(es2panda_Context* context, es2panda_Program* program) +{ + auto result = GetImpl()->ProgramFileNameWithExtensionConst(context, program); + string fileNameWithExtension(result); + result = GetImpl()->ProgramModuleNameConst(context, program); + string moduleName(result); + + return fileNameWithExtension.length() >= MODULE_SUFFIX.length() + && fileNameWithExtension.substr(fileNameWithExtension.length() - MODULE_SUFFIX.length()) == MODULE_SUFFIX + && moduleName.find(ARKUI) != std::string::npos; +} + +KBoolean impl_ProgramCanSkipPhases(KNativePointer context, KNativePointer program) +{ + KStringPtr isUiFlag(IS_UI_FLAG); + KStringPtr notUiFlag(NOT_UI_FLAG); + const auto _context = reinterpret_cast(context); + const auto _program = reinterpret_cast(program); + if (isUIHeaderFile(_context, _program)) { + return false; + } + std::size_t sourceLen; + const auto externalSources = reinterpret_cast + (GetImpl()->ProgramExternalSources(_context, _program, &sourceLen)); + for (std::size_t i = 0; i < sourceLen; ++i) { + std::size_t programLen; + auto programs = GetImpl()->ExternalSourcePrograms(externalSources[i], &programLen); + for (std::size_t j = 0; j < programLen; ++j) { + if (isUIHeaderFile(_context, programs[j])) { + return false; + } + } + } + return true; +} +KOALA_INTEROP_2(ProgramCanSkipPhases, KBoolean, KNativePointer, KNativePointer) + +KNativePointer impl_AstNodeProgram(KNativePointer contextPtr, KNativePointer instancePtr) +{ + auto _context = reinterpret_cast(contextPtr); + auto _receiver = reinterpret_cast(instancePtr); + + if (GetImpl()->AstNodeIsProgramConst(_context, _receiver)) { + return GetImpl()->ETSModuleProgram(_context, _receiver); + } + return impl_AstNodeProgram(_context, GetImpl()->AstNodeParent(_context, _receiver)); +} +KOALA_INTEROP_2(AstNodeProgram, KNativePointer, KNativePointer, KNativePointer) diff --git a/koala_tools/ui2abc/libarkts/native/src/common.h b/koala_tools/ui2abc/libarkts/native/src/common.h new file mode 100644 index 0000000000000000000000000000000000000000..0ee7cd1d7646c9b8d7f30dd3f69d1c9f0899a951 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/native/src/common.h @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef COMMON_H +#define COMMON_H + +/* + * 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. + */ + +#include "dynamic-loader.h" +#include "es2panda_lib.h" +#include "common-interop.h" +#include "stdexcept" +#include "interop-utils.h" +#include +#include +#include + +using std::string, std::cout, std::endl, std::vector; + +extern es2panda_Impl *es2pandaImplementation; + +es2panda_Impl *GetImplSlow(); +inline es2panda_Impl *GetImpl() { + if (es2pandaImplementation) { + return es2pandaImplementation; + } + return GetImplSlow(); +} + +string getString(KStringPtr ptr); + +char* getStringCopy(KStringPtr& ptr); + +inline KUInt unpackUInt(const KByte* bytes) +{ + const KUInt BYTE_0 = 0; + const KUInt BYTE_1 = 1; + const KUInt BYTE_2 = 2; + const KUInt BYTE_3 = 3; + + const KUInt BYTE_1_SHIFT = 8; + const KUInt BYTE_2_SHIFT = 16; + const KUInt BYTE_3_SHIFT = 24; + return ( + bytes[BYTE_0] + | (bytes[BYTE_1] << BYTE_1_SHIFT) + | (bytes[BYTE_2] << BYTE_2_SHIFT) + | (bytes[BYTE_3] << BYTE_3_SHIFT) + ); +} + +es2panda_ContextState intToState(KInt state); + +class StageArena { + std::vector allocated; + size_t totalSize; + public: + StageArena(); + ~StageArena(); + static StageArena* instance(); + template + static T* alloc() + { + auto* arena = StageArena::instance(); + void* memory = arena->alloc(sizeof(T)); + return new (memory) T(); + } + template + static T* alloc(T1 arg1) + { + auto* arena = StageArena::instance(); + void* memory = arena->alloc(sizeof(T)); + return new (memory) T(std::forward(arg1)); + } + template + static T* alloc(T1 arg1, T2 arg2) + { + auto* arena = StageArena::instance(); + void* memory = arena->alloc(sizeof(T)); + return new (memory) T(arg1, arg2); + } + template + static T* allocArray(size_t count) + { + auto* arena = StageArena::instance(); + // align? + void* memory = arena->alloc(sizeof(T) * count); + return new (memory) T(); + } + template + static T* clone(const T& arg) + { + auto* arena = StageArena::instance(); + void* memory = arena->alloc(sizeof(T)); + return new (memory) T(arg); + } + template + static std::vector* cloneVector(const T* arg, size_t count) + { + return alloc, const T*, const T*>(arg, arg + count); + } + void* alloc(size_t size); + static char* strdup(const char* original); + void add(void* pointer); + void cleanup(); +}; + +#endif // COMMON_H \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/native/src/generated/bridges.cc b/koala_tools/ui2abc/libarkts/native/src/generated/bridges.cc new file mode 100644 index 0000000000000000000000000000000000000000..b2e702b1ee6960a9c4d32848b01380f45eb84368 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/native/src/generated/bridges.cc @@ -0,0 +1,16373 @@ +/* + * 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. + */ + +#include + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen v2.1.10-arktscgen-2. DO NOT EDIT MANUALLY! + * es2panda ffeffdaea78faa7141933ce1df0d0f279ddfe5a3(2025-08-21) sdk v1.5.0-dev.42554 + */ + +KNativePointer impl_GetAllErrorMessages(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->GetAllErrorMessages(_context); + return StageArena::strdup(result); +} +KOALA_INTEROP_1(GetAllErrorMessages, KNativePointer, KNativePointer); + +KNativePointer impl_ProceedToState(KNativePointer context, KInt state) +{ + const auto _context = reinterpret_cast(context); + const auto _state = static_cast(state); + auto result = GetImpl()->ProceedToState(_context, _state); + return result; +} +KOALA_INTEROP_2(ProceedToState, KNativePointer, KNativePointer, KInt); + +KInt impl_ContextState(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->ContextState(_context); + return result; +} +KOALA_INTEROP_1(ContextState, KInt, KNativePointer); + +KNativePointer impl_ContextErrorMessage(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->ContextErrorMessage(_context); + return StageArena::strdup(result); +} +KOALA_INTEROP_1(ContextErrorMessage, KNativePointer, KNativePointer); + +KNativePointer impl_ContextProgram(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->ContextProgram(_context); + return result; +} +KOALA_INTEROP_1(ContextProgram, KNativePointer, KNativePointer); + +KNativePointer impl_CreateSourcePosition(KNativePointer context, KUInt index, KUInt line) +{ + const auto _context = reinterpret_cast(context); + const auto _index = static_cast(index); + const auto _line = static_cast(line); + auto result = GetImpl()->CreateSourcePosition(_context, _index, _line); + return result; +} +KOALA_INTEROP_3(CreateSourcePosition, KNativePointer, KNativePointer, KUInt, KUInt); + +KNativePointer impl_CreateSourceRange(KNativePointer context, KNativePointer start, KNativePointer end) +{ + const auto _context = reinterpret_cast(context); + const auto _start = reinterpret_cast(start); + const auto _end = reinterpret_cast(end); + auto result = GetImpl()->CreateSourceRange(_context, _start, _end); + return result; +} +KOALA_INTEROP_3(CreateSourceRange, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KUInt impl_SourcePositionIndex(KNativePointer context, KNativePointer position) +{ + const auto _context = reinterpret_cast(context); + const auto _position = reinterpret_cast(position); + auto result = GetImpl()->SourcePositionIndex(_context, _position); + return result; +} +KOALA_INTEROP_2(SourcePositionIndex, KUInt, KNativePointer, KNativePointer); + +KUInt impl_SourcePositionLine(KNativePointer context, KNativePointer position) +{ + const auto _context = reinterpret_cast(context); + const auto _position = reinterpret_cast(position); + auto result = GetImpl()->SourcePositionLine(_context, _position); + return result; +} +KOALA_INTEROP_2(SourcePositionLine, KUInt, KNativePointer, KNativePointer); + +KNativePointer impl_SourceRangeStart(KNativePointer context, KNativePointer range) +{ + const auto _context = reinterpret_cast(context); + const auto _range = reinterpret_cast(range); + auto result = GetImpl()->SourceRangeStart(_context, _range); + return result; +} +KOALA_INTEROP_2(SourceRangeStart, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_SourceRangeEnd(KNativePointer context, KNativePointer range) +{ + const auto _context = reinterpret_cast(context); + const auto _range = reinterpret_cast(range); + auto result = GetImpl()->SourceRangeEnd(_context, _range); + return result; +} +KOALA_INTEROP_2(SourceRangeEnd, KNativePointer, KNativePointer, KNativePointer); + +void impl_LogDiagnosticWithSuggestion(KNativePointer context, KNativePointer diagnosticInfo, KNativePointer suggestionInfo) +{ + const auto _context = reinterpret_cast(context); + const auto _diagnosticInfo = reinterpret_cast(diagnosticInfo); + const auto _suggestionInfo = reinterpret_cast(suggestionInfo); + GetImpl()->LogDiagnosticWithSuggestion(_context, _diagnosticInfo, _suggestionInfo); + return ; +} +KOALA_INTEROP_V3(LogDiagnosticWithSuggestion, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_IsAnyError(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->IsAnyError(_context); + return result; +} +KOALA_INTEROP_1(IsAnyError, KBoolean, KNativePointer); + +void impl_AstNodeRecheck(KNativePointer context, KNativePointer node) +{ + const auto _context = reinterpret_cast(context); + const auto _node = reinterpret_cast(node); + GetImpl()->AstNodeRecheck(_context, _node); + return ; +} +KOALA_INTEROP_V2(AstNodeRecheck, KNativePointer, KNativePointer); + +KInt impl_Es2pandaEnumFromString(KNativePointer context, KStringPtr& str) +{ + const auto _context = reinterpret_cast(context); + const auto _str = getStringCopy(str); + auto result = GetImpl()->Es2pandaEnumFromString(_context, _str); + return result; +} +KOALA_INTEROP_2(Es2pandaEnumFromString, KInt, KNativePointer, KStringPtr); + +KNativePointer impl_Es2pandaEnumToString(KNativePointer context, KInt id) +{ + const auto _context = reinterpret_cast(context); + const auto _id = static_cast(id); + auto result = GetImpl()->Es2pandaEnumToString(_context, _id); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(Es2pandaEnumToString, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_DeclarationFromIdentifier(KNativePointer context, KNativePointer node) +{ + const auto _context = reinterpret_cast(context); + const auto _node = reinterpret_cast(node); + auto result = GetImpl()->DeclarationFromIdentifier(_context, _node); + return result; +} +KOALA_INTEROP_2(DeclarationFromIdentifier, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_IsImportTypeKind(KNativePointer context, KNativePointer node) +{ + const auto _context = reinterpret_cast(context); + const auto _node = reinterpret_cast(node); + auto result = GetImpl()->IsImportTypeKind(_context, _node); + return result; +} +KOALA_INTEROP_2(IsImportTypeKind, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_JsdocStringFromDeclaration(KNativePointer context, KNativePointer node) +{ + const auto _context = reinterpret_cast(context); + const auto _node = reinterpret_cast(node); + auto result = GetImpl()->JsdocStringFromDeclaration(_context, _node); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(JsdocStringFromDeclaration, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_GetLicenseFromRootNode(KNativePointer context, KNativePointer node) +{ + const auto _context = reinterpret_cast(context); + const auto _node = reinterpret_cast(node); + auto result = GetImpl()->GetLicenseFromRootNode(_context, _node); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(GetLicenseFromRootNode, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FirstDeclarationByNameFromNode(KNativePointer context, KNativePointer node, KStringPtr& name) +{ + const auto _context = reinterpret_cast(context); + const auto _node = reinterpret_cast(node); + const auto _name = getStringCopy(name); + auto result = GetImpl()->FirstDeclarationByNameFromNode(_context, _node, _name); + return result; +} +KOALA_INTEROP_3(FirstDeclarationByNameFromNode, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_FirstDeclarationByNameFromProgram(KNativePointer context, KNativePointer program, KStringPtr& name) +{ + const auto _context = reinterpret_cast(context); + const auto _program = reinterpret_cast(program); + const auto _name = getStringCopy(name); + auto result = GetImpl()->FirstDeclarationByNameFromProgram(_context, _program, _name); + return result; +} +KOALA_INTEROP_3(FirstDeclarationByNameFromProgram, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_AllDeclarationsByNameFromNode(KNativePointer context, KNativePointer node, KStringPtr& name) +{ + const auto _context = reinterpret_cast(context); + const auto _node = reinterpret_cast(node); + const auto _name = getStringCopy(name); + std::size_t length; + auto result = GetImpl()->AllDeclarationsByNameFromNode(_context, _node, _name, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_3(AllDeclarationsByNameFromNode, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_AllDeclarationsByNameFromProgram(KNativePointer context, KNativePointer program, KStringPtr& name) +{ + const auto _context = reinterpret_cast(context); + const auto _program = reinterpret_cast(program); + const auto _name = getStringCopy(name); + std::size_t length; + auto result = GetImpl()->AllDeclarationsByNameFromProgram(_context, _program, _name, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_3(AllDeclarationsByNameFromProgram, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + +void impl_InsertETSImportDeclarationAndParse(KNativePointer context, KNativePointer program, KNativePointer node) +{ + const auto _context = reinterpret_cast(context); + const auto _program = reinterpret_cast(program); + const auto _node = reinterpret_cast(node); + GetImpl()->InsertETSImportDeclarationAndParse(_context, _program, _node); + return ; +} +KOALA_INTEROP_V3(InsertETSImportDeclarationAndParse, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_GenerateStaticDeclarationsFromContext(KNativePointer context, KStringPtr& outputPath) +{ + const auto _context = reinterpret_cast(context); + const auto _outputPath = getStringCopy(outputPath); + auto result = GetImpl()->GenerateStaticDeclarationsFromContext(_context, _outputPath); + return result; +} +KOALA_INTEROP_2(GenerateStaticDeclarationsFromContext, KInt, KNativePointer, KStringPtr); + +KBoolean impl_IsExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsExpression, KBoolean, KNativePointer); + +KBoolean impl_IsStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsStatement, KBoolean, KNativePointer); + +KBoolean impl_IsArrowFunctionExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsArrowFunctionExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsArrowFunctionExpression, KBoolean, KNativePointer); + +KBoolean impl_IsAnnotationDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsAnnotationDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsAnnotationDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsAnnotationUsage(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsAnnotationUsage(_ast); + return result; +} +KOALA_INTEROP_1(IsAnnotationUsage, KBoolean, KNativePointer); + +KBoolean impl_IsAssertStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsAssertStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsAssertStatement, KBoolean, KNativePointer); + +KBoolean impl_IsAwaitExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsAwaitExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsAwaitExpression, KBoolean, KNativePointer); + +KBoolean impl_IsBigIntLiteral(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsBigIntLiteral(_ast); + return result; +} +KOALA_INTEROP_1(IsBigIntLiteral, KBoolean, KNativePointer); + +KBoolean impl_IsBinaryExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsBinaryExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsBinaryExpression, KBoolean, KNativePointer); + +KBoolean impl_IsBlockStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsBlockStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsBlockStatement, KBoolean, KNativePointer); + +KBoolean impl_IsBooleanLiteral(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsBooleanLiteral(_ast); + return result; +} +KOALA_INTEROP_1(IsBooleanLiteral, KBoolean, KNativePointer); + +KBoolean impl_IsBreakStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsBreakStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsBreakStatement, KBoolean, KNativePointer); + +KBoolean impl_IsCallExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsCallExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsCallExpression, KBoolean, KNativePointer); + +KBoolean impl_IsCatchClause(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsCatchClause(_ast); + return result; +} +KOALA_INTEROP_1(IsCatchClause, KBoolean, KNativePointer); + +KBoolean impl_IsChainExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsChainExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsChainExpression, KBoolean, KNativePointer); + +KBoolean impl_IsCharLiteral(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsCharLiteral(_ast); + return result; +} +KOALA_INTEROP_1(IsCharLiteral, KBoolean, KNativePointer); + +KBoolean impl_IsClassDefinition(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsClassDefinition(_ast); + return result; +} +KOALA_INTEROP_1(IsClassDefinition, KBoolean, KNativePointer); + +KBoolean impl_IsClassDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsClassDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsClassDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsClassExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsClassExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsClassExpression, KBoolean, KNativePointer); + +KBoolean impl_IsClassProperty(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsClassProperty(_ast); + return result; +} +KOALA_INTEROP_1(IsClassProperty, KBoolean, KNativePointer); + +KBoolean impl_IsClassStaticBlock(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsClassStaticBlock(_ast); + return result; +} +KOALA_INTEROP_1(IsClassStaticBlock, KBoolean, KNativePointer); + +KBoolean impl_IsConditionalExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsConditionalExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsConditionalExpression, KBoolean, KNativePointer); + +KBoolean impl_IsContinueStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsContinueStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsContinueStatement, KBoolean, KNativePointer); + +KBoolean impl_IsDebuggerStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsDebuggerStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsDebuggerStatement, KBoolean, KNativePointer); + +KBoolean impl_IsDecorator(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsDecorator(_ast); + return result; +} +KOALA_INTEROP_1(IsDecorator, KBoolean, KNativePointer); + +KBoolean impl_IsDirectEvalExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsDirectEvalExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsDirectEvalExpression, KBoolean, KNativePointer); + +KBoolean impl_IsDoWhileStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsDoWhileStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsDoWhileStatement, KBoolean, KNativePointer); + +KBoolean impl_IsEmptyStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsEmptyStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsEmptyStatement, KBoolean, KNativePointer); + +KBoolean impl_IsExportAllDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsExportAllDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsExportAllDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsExportDefaultDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsExportDefaultDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsExportDefaultDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsExportNamedDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsExportNamedDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsExportNamedDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsExportSpecifier(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsExportSpecifier(_ast); + return result; +} +KOALA_INTEROP_1(IsExportSpecifier, KBoolean, KNativePointer); + +KBoolean impl_IsExpressionStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsExpressionStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsExpressionStatement, KBoolean, KNativePointer); + +KBoolean impl_IsForInStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsForInStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsForInStatement, KBoolean, KNativePointer); + +KBoolean impl_IsForOfStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsForOfStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsForOfStatement, KBoolean, KNativePointer); + +KBoolean impl_IsForUpdateStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsForUpdateStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsForUpdateStatement, KBoolean, KNativePointer); + +KBoolean impl_IsFunctionDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsFunctionDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsFunctionDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsFunctionExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsFunctionExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsFunctionExpression, KBoolean, KNativePointer); + +KBoolean impl_IsIdentifier(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsIdentifier(_ast); + return result; +} +KOALA_INTEROP_1(IsIdentifier, KBoolean, KNativePointer); + +KBoolean impl_IsDummyNode(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsDummyNode(_ast); + return result; +} +KOALA_INTEROP_1(IsDummyNode, KBoolean, KNativePointer); + +KBoolean impl_IsIfStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsIfStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsIfStatement, KBoolean, KNativePointer); + +KBoolean impl_IsImportDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsImportDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsImportDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsImportExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsImportExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsImportExpression, KBoolean, KNativePointer); + +KBoolean impl_IsImportDefaultSpecifier(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsImportDefaultSpecifier(_ast); + return result; +} +KOALA_INTEROP_1(IsImportDefaultSpecifier, KBoolean, KNativePointer); + +KBoolean impl_IsImportNamespaceSpecifier(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsImportNamespaceSpecifier(_ast); + return result; +} +KOALA_INTEROP_1(IsImportNamespaceSpecifier, KBoolean, KNativePointer); + +KBoolean impl_IsImportSpecifier(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsImportSpecifier(_ast); + return result; +} +KOALA_INTEROP_1(IsImportSpecifier, KBoolean, KNativePointer); + +KBoolean impl_IsLabelledStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsLabelledStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsLabelledStatement, KBoolean, KNativePointer); + +KBoolean impl_IsMemberExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsMemberExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsMemberExpression, KBoolean, KNativePointer); + +KBoolean impl_IsMetaProperty(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsMetaProperty(_ast); + return result; +} +KOALA_INTEROP_1(IsMetaProperty, KBoolean, KNativePointer); + +KBoolean impl_IsMethodDefinition(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsMethodDefinition(_ast); + return result; +} +KOALA_INTEROP_1(IsMethodDefinition, KBoolean, KNativePointer); + +KBoolean impl_IsNamedType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsNamedType(_ast); + return result; +} +KOALA_INTEROP_1(IsNamedType, KBoolean, KNativePointer); + +KBoolean impl_IsNewExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsNewExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsNewExpression, KBoolean, KNativePointer); + +KBoolean impl_IsNullLiteral(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsNullLiteral(_ast); + return result; +} +KOALA_INTEROP_1(IsNullLiteral, KBoolean, KNativePointer); + +KBoolean impl_IsUndefinedLiteral(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsUndefinedLiteral(_ast); + return result; +} +KOALA_INTEROP_1(IsUndefinedLiteral, KBoolean, KNativePointer); + +KBoolean impl_IsNumberLiteral(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsNumberLiteral(_ast); + return result; +} +KOALA_INTEROP_1(IsNumberLiteral, KBoolean, KNativePointer); + +KBoolean impl_IsOmittedExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsOmittedExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsOmittedExpression, KBoolean, KNativePointer); + +KBoolean impl_IsOverloadDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsOverloadDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsOverloadDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsPrefixAssertionExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsPrefixAssertionExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsPrefixAssertionExpression, KBoolean, KNativePointer); + +KBoolean impl_IsProperty(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsProperty(_ast); + return result; +} +KOALA_INTEROP_1(IsProperty, KBoolean, KNativePointer); + +KBoolean impl_IsRegExpLiteral(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsRegExpLiteral(_ast); + return result; +} +KOALA_INTEROP_1(IsRegExpLiteral, KBoolean, KNativePointer); + +KBoolean impl_IsETSReExportDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSReExportDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsETSReExportDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsReturnStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsReturnStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsReturnStatement, KBoolean, KNativePointer); + +KBoolean impl_IsScriptFunction(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsScriptFunction(_ast); + return result; +} +KOALA_INTEROP_1(IsScriptFunction, KBoolean, KNativePointer); + +KBoolean impl_IsSequenceExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsSequenceExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsSequenceExpression, KBoolean, KNativePointer); + +KBoolean impl_IsStringLiteral(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsStringLiteral(_ast); + return result; +} +KOALA_INTEROP_1(IsStringLiteral, KBoolean, KNativePointer); + +KBoolean impl_IsETSNonNullishTypeNode(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSNonNullishTypeNode(_ast); + return result; +} +KOALA_INTEROP_1(IsETSNonNullishTypeNode, KBoolean, KNativePointer); + +KBoolean impl_IsETSNullType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSNullType(_ast); + return result; +} +KOALA_INTEROP_1(IsETSNullType, KBoolean, KNativePointer); + +KBoolean impl_IsETSUndefinedType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSUndefinedType(_ast); + return result; +} +KOALA_INTEROP_1(IsETSUndefinedType, KBoolean, KNativePointer); + +KBoolean impl_IsETSNeverType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSNeverType(_ast); + return result; +} +KOALA_INTEROP_1(IsETSNeverType, KBoolean, KNativePointer); + +KBoolean impl_IsETSStringLiteralType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSStringLiteralType(_ast); + return result; +} +KOALA_INTEROP_1(IsETSStringLiteralType, KBoolean, KNativePointer); + +KBoolean impl_IsETSIntrinsicNode(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSIntrinsicNode(_ast); + return result; +} +KOALA_INTEROP_1(IsETSIntrinsicNode, KBoolean, KNativePointer); + +KBoolean impl_IsETSFunctionType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSFunctionType(_ast); + return result; +} +KOALA_INTEROP_1(IsETSFunctionType, KBoolean, KNativePointer); + +KBoolean impl_IsETSWildcardType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSWildcardType(_ast); + return result; +} +KOALA_INTEROP_1(IsETSWildcardType, KBoolean, KNativePointer); + +KBoolean impl_IsETSPrimitiveType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSPrimitiveType(_ast); + return result; +} +KOALA_INTEROP_1(IsETSPrimitiveType, KBoolean, KNativePointer); + +KBoolean impl_IsETSPackageDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSPackageDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsETSPackageDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsETSClassLiteral(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSClassLiteral(_ast); + return result; +} +KOALA_INTEROP_1(IsETSClassLiteral, KBoolean, KNativePointer); + +KBoolean impl_IsETSTypeReference(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSTypeReference(_ast); + return result; +} +KOALA_INTEROP_1(IsETSTypeReference, KBoolean, KNativePointer); + +KBoolean impl_IsETSTypeReferencePart(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSTypeReferencePart(_ast); + return result; +} +KOALA_INTEROP_1(IsETSTypeReferencePart, KBoolean, KNativePointer); + +KBoolean impl_IsETSUnionType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSUnionType(_ast); + return result; +} +KOALA_INTEROP_1(IsETSUnionType, KBoolean, KNativePointer); + +KBoolean impl_IsETSKeyofType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSKeyofType(_ast); + return result; +} +KOALA_INTEROP_1(IsETSKeyofType, KBoolean, KNativePointer); + +KBoolean impl_IsETSNewArrayInstanceExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSNewArrayInstanceExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsETSNewArrayInstanceExpression, KBoolean, KNativePointer); + +KBoolean impl_IsETSNewMultiDimArrayInstanceExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSNewMultiDimArrayInstanceExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsETSNewMultiDimArrayInstanceExpression, KBoolean, KNativePointer); + +KBoolean impl_IsETSNewClassInstanceExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSNewClassInstanceExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsETSNewClassInstanceExpression, KBoolean, KNativePointer); + +KBoolean impl_IsETSImportDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSImportDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsETSImportDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsETSParameterExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSParameterExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsETSParameterExpression, KBoolean, KNativePointer); + +KBoolean impl_IsETSTuple(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSTuple(_ast); + return result; +} +KOALA_INTEROP_1(IsETSTuple, KBoolean, KNativePointer); + +KBoolean impl_IsETSModule(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSModule(_ast); + return result; +} +KOALA_INTEROP_1(IsETSModule, KBoolean, KNativePointer); + +KBoolean impl_IsSuperExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsSuperExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsSuperExpression, KBoolean, KNativePointer); + +KBoolean impl_IsETSStructDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsETSStructDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsETSStructDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsSwitchCaseStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsSwitchCaseStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsSwitchCaseStatement, KBoolean, KNativePointer); + +KBoolean impl_IsSwitchStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsSwitchStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsSwitchStatement, KBoolean, KNativePointer); + +KBoolean impl_IsTSEnumDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSEnumDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsTSEnumDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsTSEnumMember(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSEnumMember(_ast); + return result; +} +KOALA_INTEROP_1(IsTSEnumMember, KBoolean, KNativePointer); + +KBoolean impl_IsTSExternalModuleReference(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSExternalModuleReference(_ast); + return result; +} +KOALA_INTEROP_1(IsTSExternalModuleReference, KBoolean, KNativePointer); + +KBoolean impl_IsTSNumberKeyword(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSNumberKeyword(_ast); + return result; +} +KOALA_INTEROP_1(IsTSNumberKeyword, KBoolean, KNativePointer); + +KBoolean impl_IsTSAnyKeyword(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSAnyKeyword(_ast); + return result; +} +KOALA_INTEROP_1(IsTSAnyKeyword, KBoolean, KNativePointer); + +KBoolean impl_IsTSStringKeyword(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSStringKeyword(_ast); + return result; +} +KOALA_INTEROP_1(IsTSStringKeyword, KBoolean, KNativePointer); + +KBoolean impl_IsTSBooleanKeyword(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSBooleanKeyword(_ast); + return result; +} +KOALA_INTEROP_1(IsTSBooleanKeyword, KBoolean, KNativePointer); + +KBoolean impl_IsTSVoidKeyword(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSVoidKeyword(_ast); + return result; +} +KOALA_INTEROP_1(IsTSVoidKeyword, KBoolean, KNativePointer); + +KBoolean impl_IsTSUndefinedKeyword(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSUndefinedKeyword(_ast); + return result; +} +KOALA_INTEROP_1(IsTSUndefinedKeyword, KBoolean, KNativePointer); + +KBoolean impl_IsTSUnknownKeyword(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSUnknownKeyword(_ast); + return result; +} +KOALA_INTEROP_1(IsTSUnknownKeyword, KBoolean, KNativePointer); + +KBoolean impl_IsTSObjectKeyword(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSObjectKeyword(_ast); + return result; +} +KOALA_INTEROP_1(IsTSObjectKeyword, KBoolean, KNativePointer); + +KBoolean impl_IsTSBigintKeyword(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSBigintKeyword(_ast); + return result; +} +KOALA_INTEROP_1(IsTSBigintKeyword, KBoolean, KNativePointer); + +KBoolean impl_IsTSNeverKeyword(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSNeverKeyword(_ast); + return result; +} +KOALA_INTEROP_1(IsTSNeverKeyword, KBoolean, KNativePointer); + +KBoolean impl_IsTSNonNullExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSNonNullExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsTSNonNullExpression, KBoolean, KNativePointer); + +KBoolean impl_IsTSNullKeyword(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSNullKeyword(_ast); + return result; +} +KOALA_INTEROP_1(IsTSNullKeyword, KBoolean, KNativePointer); + +KBoolean impl_IsTSArrayType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSArrayType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSArrayType, KBoolean, KNativePointer); + +KBoolean impl_IsTSUnionType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSUnionType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSUnionType, KBoolean, KNativePointer); + +KBoolean impl_IsTSTypeLiteral(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSTypeLiteral(_ast); + return result; +} +KOALA_INTEROP_1(IsTSTypeLiteral, KBoolean, KNativePointer); + +KBoolean impl_IsTSPropertySignature(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSPropertySignature(_ast); + return result; +} +KOALA_INTEROP_1(IsTSPropertySignature, KBoolean, KNativePointer); + +KBoolean impl_IsTSMethodSignature(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSMethodSignature(_ast); + return result; +} +KOALA_INTEROP_1(IsTSMethodSignature, KBoolean, KNativePointer); + +KBoolean impl_IsTSSignatureDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSSignatureDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsTSSignatureDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsTSParenthesizedType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSParenthesizedType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSParenthesizedType, KBoolean, KNativePointer); + +KBoolean impl_IsTSLiteralType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSLiteralType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSLiteralType, KBoolean, KNativePointer); + +KBoolean impl_IsTSInferType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSInferType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSInferType, KBoolean, KNativePointer); + +KBoolean impl_IsTSConditionalType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSConditionalType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSConditionalType, KBoolean, KNativePointer); + +KBoolean impl_IsTSImportType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSImportType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSImportType, KBoolean, KNativePointer); + +KBoolean impl_IsTSIntersectionType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSIntersectionType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSIntersectionType, KBoolean, KNativePointer); + +KBoolean impl_IsTSMappedType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSMappedType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSMappedType, KBoolean, KNativePointer); + +KBoolean impl_IsTSModuleBlock(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSModuleBlock(_ast); + return result; +} +KOALA_INTEROP_1(IsTSModuleBlock, KBoolean, KNativePointer); + +KBoolean impl_IsTSThisType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSThisType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSThisType, KBoolean, KNativePointer); + +KBoolean impl_IsTSTypeOperator(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSTypeOperator(_ast); + return result; +} +KOALA_INTEROP_1(IsTSTypeOperator, KBoolean, KNativePointer); + +KBoolean impl_IsTSTypeParameter(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSTypeParameter(_ast); + return result; +} +KOALA_INTEROP_1(IsTSTypeParameter, KBoolean, KNativePointer); + +KBoolean impl_IsTSTypeParameterDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSTypeParameterDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsTSTypeParameterDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsTSTypeParameterInstantiation(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSTypeParameterInstantiation(_ast); + return result; +} +KOALA_INTEROP_1(IsTSTypeParameterInstantiation, KBoolean, KNativePointer); + +KBoolean impl_IsTSTypePredicate(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSTypePredicate(_ast); + return result; +} +KOALA_INTEROP_1(IsTSTypePredicate, KBoolean, KNativePointer); + +KBoolean impl_IsTSParameterProperty(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSParameterProperty(_ast); + return result; +} +KOALA_INTEROP_1(IsTSParameterProperty, KBoolean, KNativePointer); + +KBoolean impl_IsTSModuleDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSModuleDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsTSModuleDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsTSImportEqualsDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSImportEqualsDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsTSImportEqualsDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsTSFunctionType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSFunctionType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSFunctionType, KBoolean, KNativePointer); + +KBoolean impl_IsTSConstructorType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSConstructorType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSConstructorType, KBoolean, KNativePointer); + +KBoolean impl_IsTSTypeAliasDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSTypeAliasDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsTSTypeAliasDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsTSTypeReference(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSTypeReference(_ast); + return result; +} +KOALA_INTEROP_1(IsTSTypeReference, KBoolean, KNativePointer); + +KBoolean impl_IsTSQualifiedName(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSQualifiedName(_ast); + return result; +} +KOALA_INTEROP_1(IsTSQualifiedName, KBoolean, KNativePointer); + +KBoolean impl_IsTSIndexedAccessType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSIndexedAccessType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSIndexedAccessType, KBoolean, KNativePointer); + +KBoolean impl_IsTSInterfaceDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSInterfaceDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsTSInterfaceDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsTSInterfaceBody(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSInterfaceBody(_ast); + return result; +} +KOALA_INTEROP_1(IsTSInterfaceBody, KBoolean, KNativePointer); + +KBoolean impl_IsTSInterfaceHeritage(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSInterfaceHeritage(_ast); + return result; +} +KOALA_INTEROP_1(IsTSInterfaceHeritage, KBoolean, KNativePointer); + +KBoolean impl_IsTSTupleType(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSTupleType(_ast); + return result; +} +KOALA_INTEROP_1(IsTSTupleType, KBoolean, KNativePointer); + +KBoolean impl_IsTSNamedTupleMember(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSNamedTupleMember(_ast); + return result; +} +KOALA_INTEROP_1(IsTSNamedTupleMember, KBoolean, KNativePointer); + +KBoolean impl_IsTSIndexSignature(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSIndexSignature(_ast); + return result; +} +KOALA_INTEROP_1(IsTSIndexSignature, KBoolean, KNativePointer); + +KBoolean impl_IsTSTypeQuery(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSTypeQuery(_ast); + return result; +} +KOALA_INTEROP_1(IsTSTypeQuery, KBoolean, KNativePointer); + +KBoolean impl_IsTSAsExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSAsExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsTSAsExpression, KBoolean, KNativePointer); + +KBoolean impl_IsTSClassImplements(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSClassImplements(_ast); + return result; +} +KOALA_INTEROP_1(IsTSClassImplements, KBoolean, KNativePointer); + +KBoolean impl_IsTSTypeAssertion(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTSTypeAssertion(_ast); + return result; +} +KOALA_INTEROP_1(IsTSTypeAssertion, KBoolean, KNativePointer); + +KBoolean impl_IsTaggedTemplateExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTaggedTemplateExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsTaggedTemplateExpression, KBoolean, KNativePointer); + +KBoolean impl_IsTemplateElement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTemplateElement(_ast); + return result; +} +KOALA_INTEROP_1(IsTemplateElement, KBoolean, KNativePointer); + +KBoolean impl_IsTemplateLiteral(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTemplateLiteral(_ast); + return result; +} +KOALA_INTEROP_1(IsTemplateLiteral, KBoolean, KNativePointer); + +KBoolean impl_IsThisExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsThisExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsThisExpression, KBoolean, KNativePointer); + +KBoolean impl_IsTypeofExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTypeofExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsTypeofExpression, KBoolean, KNativePointer); + +KBoolean impl_IsThrowStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsThrowStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsThrowStatement, KBoolean, KNativePointer); + +KBoolean impl_IsTryStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsTryStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsTryStatement, KBoolean, KNativePointer); + +KBoolean impl_IsUnaryExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsUnaryExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsUnaryExpression, KBoolean, KNativePointer); + +KBoolean impl_IsUpdateExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsUpdateExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsUpdateExpression, KBoolean, KNativePointer); + +KBoolean impl_IsVariableDeclaration(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsVariableDeclaration(_ast); + return result; +} +KOALA_INTEROP_1(IsVariableDeclaration, KBoolean, KNativePointer); + +KBoolean impl_IsVariableDeclarator(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsVariableDeclarator(_ast); + return result; +} +KOALA_INTEROP_1(IsVariableDeclarator, KBoolean, KNativePointer); + +KBoolean impl_IsWhileStatement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsWhileStatement(_ast); + return result; +} +KOALA_INTEROP_1(IsWhileStatement, KBoolean, KNativePointer); + +KBoolean impl_IsYieldExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsYieldExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsYieldExpression, KBoolean, KNativePointer); + +KBoolean impl_IsOpaqueTypeNode(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsOpaqueTypeNode(_ast); + return result; +} +KOALA_INTEROP_1(IsOpaqueTypeNode, KBoolean, KNativePointer); + +KBoolean impl_IsBlockExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsBlockExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsBlockExpression, KBoolean, KNativePointer); + +KBoolean impl_IsBrokenTypeNode(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsBrokenTypeNode(_ast); + return result; +} +KOALA_INTEROP_1(IsBrokenTypeNode, KBoolean, KNativePointer); + +KBoolean impl_IsArrayExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsArrayExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsArrayExpression, KBoolean, KNativePointer); + +KBoolean impl_IsArrayPattern(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsArrayPattern(_ast); + return result; +} +KOALA_INTEROP_1(IsArrayPattern, KBoolean, KNativePointer); + +KBoolean impl_IsAssignmentExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsAssignmentExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsAssignmentExpression, KBoolean, KNativePointer); + +KBoolean impl_IsAssignmentPattern(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsAssignmentPattern(_ast); + return result; +} +KOALA_INTEROP_1(IsAssignmentPattern, KBoolean, KNativePointer); + +KBoolean impl_IsObjectExpression(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsObjectExpression(_ast); + return result; +} +KOALA_INTEROP_1(IsObjectExpression, KBoolean, KNativePointer); + +KBoolean impl_IsObjectPattern(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsObjectPattern(_ast); + return result; +} +KOALA_INTEROP_1(IsObjectPattern, KBoolean, KNativePointer); + +KBoolean impl_IsSpreadElement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsSpreadElement(_ast); + return result; +} +KOALA_INTEROP_1(IsSpreadElement, KBoolean, KNativePointer); + +KBoolean impl_IsRestElement(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->IsRestElement(_ast); + return result; +} +KOALA_INTEROP_1(IsRestElement, KBoolean, KNativePointer); + +KNativePointer impl_AstNodeName(KNativePointer ast) +{ + const auto _ast = reinterpret_cast(ast); + auto result = GetImpl()->AstNodeName(_ast); + return StageArena::strdup(result); +} +KOALA_INTEROP_1(AstNodeName, KNativePointer, KNativePointer); + +KNativePointer impl_CreateNumberLiteral(KNativePointer context, KInt value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = static_cast(value); + auto result = GetImpl()->CreateNumberLiteral(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateNumberLiteral, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_CreateNumberLiteral1(KNativePointer context, KLong value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = static_cast(value); + auto result = GetImpl()->CreateNumberLiteral1(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateNumberLiteral1, KNativePointer, KNativePointer, KLong); + +KNativePointer impl_CreateNumberLiteral2(KNativePointer context, KDouble value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = static_cast(value); + auto result = GetImpl()->CreateNumberLiteral2(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateNumberLiteral2, KNativePointer, KNativePointer, KDouble); + +KNativePointer impl_CreateNumberLiteral3(KNativePointer context, KFloat value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = static_cast(value); + auto result = GetImpl()->CreateNumberLiteral3(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateNumberLiteral3, KNativePointer, KNativePointer, KFloat); + +KNativePointer impl_UpdateNumberLiteral(KNativePointer context, KNativePointer original, KInt value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = static_cast(value); + auto result = GetImpl()->UpdateNumberLiteral(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateNumberLiteral, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateNumberLiteral1(KNativePointer context, KNativePointer original, KLong value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = static_cast(value); + auto result = GetImpl()->UpdateNumberLiteral1(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateNumberLiteral1, KNativePointer, KNativePointer, KNativePointer, KLong); + +KNativePointer impl_UpdateNumberLiteral2(KNativePointer context, KNativePointer original, KDouble value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = static_cast(value); + auto result = GetImpl()->UpdateNumberLiteral2(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateNumberLiteral2, KNativePointer, KNativePointer, KNativePointer, KDouble); + +KNativePointer impl_UpdateNumberLiteral3(KNativePointer context, KNativePointer original, KFloat value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = static_cast(value); + auto result = GetImpl()->UpdateNumberLiteral3(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateNumberLiteral3, KNativePointer, KNativePointer, KNativePointer, KFloat); + +KNativePointer impl_NumberLiteralStrConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->NumberLiteralStrConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(NumberLiteralStrConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateLabelledStatement(KNativePointer context, KNativePointer ident, KNativePointer body) +{ + const auto _context = reinterpret_cast(context); + const auto _ident = reinterpret_cast(ident); + const auto _body = reinterpret_cast(body); + auto result = GetImpl()->CreateLabelledStatement(_context, _ident, _body); + return result; +} +KOALA_INTEROP_3(CreateLabelledStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateLabelledStatement(KNativePointer context, KNativePointer original, KNativePointer ident, KNativePointer body) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _ident = reinterpret_cast(ident); + const auto _body = reinterpret_cast(body); + auto result = GetImpl()->UpdateLabelledStatement(_context, _original, _ident, _body); + return result; +} +KOALA_INTEROP_4(UpdateLabelledStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_LabelledStatementBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->LabelledStatementBody(_context, _receiver); + return result; +} +KOALA_INTEROP_2(LabelledStatementBody, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_LabelledStatementBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->LabelledStatementBodyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(LabelledStatementBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_LabelledStatementIdentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->LabelledStatementIdentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(LabelledStatementIdentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_LabelledStatementIdent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->LabelledStatementIdent(_context, _receiver); + return result; +} +KOALA_INTEROP_2(LabelledStatementIdent, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_LabelledStatementGetReferencedStatementConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->LabelledStatementGetReferencedStatementConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(LabelledStatementGetReferencedStatementConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateThrowStatement(KNativePointer context, KNativePointer argument) +{ + const auto _context = reinterpret_cast(context); + const auto _argument = reinterpret_cast(argument); + auto result = GetImpl()->CreateThrowStatement(_context, _argument); + return result; +} +KOALA_INTEROP_2(CreateThrowStatement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateThrowStatement(KNativePointer context, KNativePointer original, KNativePointer argument) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _argument = reinterpret_cast(argument); + auto result = GetImpl()->UpdateThrowStatement(_context, _original, _argument); + return result; +} +KOALA_INTEROP_3(UpdateThrowStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ThrowStatementArgumentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ThrowStatementArgumentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ThrowStatementArgumentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateClassProperty(KNativePointer context, KNativePointer key, KNativePointer value, KNativePointer typeAnnotation, KInt modifiers, KBoolean isComputed) +{ + const auto _context = reinterpret_cast(context); + const auto _key = reinterpret_cast(key); + const auto _value = reinterpret_cast(value); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _modifiers = static_cast(modifiers); + const auto _isComputed = static_cast(isComputed); + auto result = GetImpl()->CreateClassProperty(_context, _key, _value, _typeAnnotation, _modifiers, _isComputed); + return result; +} +KOALA_INTEROP_6(CreateClassProperty, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt, KBoolean); + +KNativePointer impl_UpdateClassProperty(KNativePointer context, KNativePointer original, KNativePointer key, KNativePointer value, KNativePointer typeAnnotation, KInt modifiers, KBoolean isComputed) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _key = reinterpret_cast(key); + const auto _value = reinterpret_cast(value); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _modifiers = static_cast(modifiers); + const auto _isComputed = static_cast(isComputed); + auto result = GetImpl()->UpdateClassProperty(_context, _original, _key, _value, _typeAnnotation, _modifiers, _isComputed); + return result; +} +KOALA_INTEROP_7(UpdateClassProperty, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt, KBoolean); + +KBoolean impl_ClassPropertyIsDefaultAccessModifierConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassPropertyIsDefaultAccessModifierConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassPropertyIsDefaultAccessModifierConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ClassPropertySetDefaultAccessModifier(KNativePointer context, KNativePointer receiver, KBoolean isDefault) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isDefault = static_cast(isDefault); + GetImpl()->ClassPropertySetDefaultAccessModifier(_context, _receiver, _isDefault); + return ; +} +KOALA_INTEROP_V3(ClassPropertySetDefaultAccessModifier, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_ClassPropertyTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassPropertyTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassPropertyTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassPropertySetTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + GetImpl()->ClassPropertySetTypeAnnotation(_context, _receiver, _typeAnnotation); + return ; +} +KOALA_INTEROP_V3(ClassPropertySetTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ClassPropertyNeedInitInStaticBlockConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassPropertyNeedInitInStaticBlockConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassPropertyNeedInitInStaticBlockConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ClassPropertySetNeedInitInStaticBlock(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassPropertySetNeedInitInStaticBlock(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassPropertySetNeedInitInStaticBlock, KNativePointer, KNativePointer); + +KBoolean impl_ClassPropertyIsImmediateInitConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassPropertyIsImmediateInitConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassPropertyIsImmediateInitConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ClassPropertySetIsImmediateInit(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassPropertySetIsImmediateInit(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassPropertySetIsImmediateInit, KNativePointer, KNativePointer); + +KBoolean impl_ClassPropertyHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassPropertyHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassPropertyHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ClassPropertyEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ClassPropertyEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ClassPropertyEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassPropertyClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassPropertyClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassPropertyClearAnnotations, KNativePointer, KNativePointer); + +void impl_ClassPropertyDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->ClassPropertyDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(ClassPropertyDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassPropertyAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassPropertyAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassPropertyAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassPropertyAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassPropertyAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassPropertyAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassPropertyAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassPropertyAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassPropertyAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassPropertySetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ClassPropertySetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ClassPropertySetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ClassPropertySetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ClassPropertySetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ClassPropertySetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateTSVoidKeyword(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSVoidKeyword(_context); + return result; +} +KOALA_INTEROP_1(CreateTSVoidKeyword, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSVoidKeyword(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSVoidKeyword(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSVoidKeyword, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSFunctionType(KNativePointer context, KNativePointer signature, KInt funcFlags) +{ + const auto _context = reinterpret_cast(context); + const auto _signature = reinterpret_cast(signature); + const auto _funcFlags = static_cast(funcFlags); + auto result = GetImpl()->CreateETSFunctionTypeIr(_context, _signature, _funcFlags); + return result; +} +KOALA_INTEROP_3(CreateETSFunctionType, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateETSFunctionType(KNativePointer context, KNativePointer original, KNativePointer signature, KInt funcFlags) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _signature = reinterpret_cast(signature); + const auto _funcFlags = static_cast(funcFlags); + auto result = GetImpl()->UpdateETSFunctionTypeIr(_context, _original, _signature, _funcFlags); + return result; +} +KOALA_INTEROP_4(UpdateETSFunctionType, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_ETSFunctionTypeTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSFunctionTypeIrTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSFunctionTypeTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSFunctionTypeTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSFunctionTypeIrTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSFunctionTypeTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSFunctionTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSFunctionTypeIrParamsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSFunctionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSFunctionTypeSetParams(KNativePointer context, KNativePointer receiver, KNativePointerArray paramsList, KUInt paramsListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _paramsList = reinterpret_cast(paramsList); + const auto _paramsListSequenceLength = static_cast(paramsListSequenceLength); + GetImpl()->ETSFunctionTypeIrSetParams(_context, _receiver, _paramsList, _paramsListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ETSFunctionTypeSetParams, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_ETSFunctionTypeReturnTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSFunctionTypeIrReturnTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSFunctionTypeReturnTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSFunctionTypeReturnType(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSFunctionTypeIrReturnType(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSFunctionTypeReturnType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSFunctionTypeFunctionalInterface(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSFunctionTypeIrFunctionalInterface(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSFunctionTypeFunctionalInterface, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSFunctionTypeFunctionalInterfaceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSFunctionTypeIrFunctionalInterfaceConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSFunctionTypeFunctionalInterfaceConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSFunctionTypeSetFunctionalInterface(KNativePointer context, KNativePointer receiver, KNativePointer functionalInterface) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _functionalInterface = reinterpret_cast(functionalInterface); + GetImpl()->ETSFunctionTypeIrSetFunctionalInterface(_context, _receiver, _functionalInterface); + return ; +} +KOALA_INTEROP_V3(ETSFunctionTypeSetFunctionalInterface, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_ETSFunctionTypeFlags(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSFunctionTypeIrFlags(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSFunctionTypeFlags, KInt, KNativePointer, KNativePointer); + +KInt impl_ETSFunctionTypeFlagsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSFunctionTypeIrFlagsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSFunctionTypeFlagsConst, KInt, KNativePointer, KNativePointer); + +KBoolean impl_ETSFunctionTypeIsExtensionFunctionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSFunctionTypeIrIsExtensionFunctionConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSFunctionTypeIsExtensionFunctionConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSTypeOperator(KNativePointer context, KNativePointer type, KInt operatorType) +{ + const auto _context = reinterpret_cast(context); + const auto _type = reinterpret_cast(type); + const auto _operatorType = static_cast(operatorType); + auto result = GetImpl()->CreateTSTypeOperator(_context, _type, _operatorType); + return result; +} +KOALA_INTEROP_3(CreateTSTypeOperator, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateTSTypeOperator(KNativePointer context, KNativePointer original, KNativePointer type, KInt operatorType) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _type = reinterpret_cast(type); + const auto _operatorType = static_cast(operatorType); + auto result = GetImpl()->UpdateTSTypeOperator(_context, _original, _type, _operatorType); + return result; +} +KOALA_INTEROP_4(UpdateTSTypeOperator, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_TSTypeOperatorTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeOperatorTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeOperatorTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSTypeOperatorIsReadonlyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeOperatorIsReadonlyConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSTypeOperatorIsReadonlyConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_TSTypeOperatorIsKeyofConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeOperatorIsKeyofConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSTypeOperatorIsKeyofConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_TSTypeOperatorIsUniqueConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeOperatorIsUniqueConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSTypeOperatorIsUniqueConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateIfStatement(KNativePointer context, KNativePointer test, KNativePointer consequent, KNativePointer alternate) +{ + const auto _context = reinterpret_cast(context); + const auto _test = reinterpret_cast(test); + const auto _consequent = reinterpret_cast(consequent); + const auto _alternate = reinterpret_cast(alternate); + auto result = GetImpl()->CreateIfStatement(_context, _test, _consequent, _alternate); + return result; +} +KOALA_INTEROP_4(CreateIfStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateIfStatement(KNativePointer context, KNativePointer original, KNativePointer test, KNativePointer consequent, KNativePointer alternate) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _test = reinterpret_cast(test); + const auto _consequent = reinterpret_cast(consequent); + const auto _alternate = reinterpret_cast(alternate); + auto result = GetImpl()->UpdateIfStatement(_context, _original, _test, _consequent, _alternate); + return result; +} +KOALA_INTEROP_5(UpdateIfStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_IfStatementTestConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IfStatementTestConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(IfStatementTestConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_IfStatementTest(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IfStatementTest(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IfStatementTest, KNativePointer, KNativePointer, KNativePointer); + +void impl_IfStatementSetTest(KNativePointer context, KNativePointer receiver, KNativePointer test) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _test = reinterpret_cast(test); + GetImpl()->IfStatementSetTest(_context, _receiver, _test); + return ; +} +KOALA_INTEROP_V3(IfStatementSetTest, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_IfStatementConsequentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IfStatementConsequentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(IfStatementConsequentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_IfStatementConsequent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IfStatementConsequent(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IfStatementConsequent, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_IfStatementAlternate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IfStatementAlternate(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IfStatementAlternate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_IfStatementAlternateConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IfStatementAlternateConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(IfStatementAlternateConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_IfStatementSetAlternate(KNativePointer context, KNativePointer receiver, KNativePointer alternate) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _alternate = reinterpret_cast(alternate); + GetImpl()->IfStatementSetAlternate(_context, _receiver, _alternate); + return ; +} +KOALA_INTEROP_V3(IfStatementSetAlternate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSConstructorType(KNativePointer context, KNativePointer signature, KBoolean abstract) +{ + const auto _context = reinterpret_cast(context); + const auto _signature = reinterpret_cast(signature); + const auto _abstract = static_cast(abstract); + auto result = GetImpl()->CreateTSConstructorType(_context, _signature, _abstract); + return result; +} +KOALA_INTEROP_3(CreateTSConstructorType, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateTSConstructorType(KNativePointer context, KNativePointer original, KNativePointer signature, KBoolean abstract) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _signature = reinterpret_cast(signature); + const auto _abstract = static_cast(abstract); + auto result = GetImpl()->UpdateTSConstructorType(_context, _original, _signature, _abstract); + return result; +} +KOALA_INTEROP_4(UpdateTSConstructorType, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_TSConstructorTypeTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSConstructorTypeTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSConstructorTypeTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSConstructorTypeTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSConstructorTypeTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSConstructorTypeTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSConstructorTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSConstructorTypeParamsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSConstructorTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSConstructorTypeReturnTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSConstructorTypeReturnTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSConstructorTypeReturnTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSConstructorTypeReturnType(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSConstructorTypeReturnType(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSConstructorTypeReturnType, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSConstructorTypeAbstractConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSConstructorTypeAbstractConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSConstructorTypeAbstractConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateDecorator(KNativePointer context, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->CreateDecorator(_context, _expr); + return result; +} +KOALA_INTEROP_2(CreateDecorator, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateDecorator(KNativePointer context, KNativePointer original, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->UpdateDecorator(_context, _original, _expr); + return result; +} +KOALA_INTEROP_3(UpdateDecorator, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_DecoratorExprConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->DecoratorExprConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(DecoratorExprConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSEnumDeclaration(KNativePointer context, KNativePointer key, KNativePointerArray members, KUInt membersSequenceLength, KBoolean isConst, KBoolean isStatic, KBoolean isDeclare) +{ + const auto _context = reinterpret_cast(context); + const auto _key = reinterpret_cast(key); + const auto _members = reinterpret_cast(members); + const auto _membersSequenceLength = static_cast(membersSequenceLength); + const auto _isConst = static_cast(isConst); + const auto _isStatic = static_cast(isStatic); + const auto _isDeclare = static_cast(isDeclare); + auto result = GetImpl()->CreateTSEnumDeclaration(_context, _key, _members, _membersSequenceLength, _isConst, _isStatic, _isDeclare); + return result; +} +KOALA_INTEROP_7(CreateTSEnumDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KBoolean, KBoolean, KBoolean); + +KNativePointer impl_UpdateTSEnumDeclaration(KNativePointer context, KNativePointer original, KNativePointer key, KNativePointerArray members, KUInt membersSequenceLength, KBoolean isConst, KBoolean isStatic, KBoolean isDeclare) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _key = reinterpret_cast(key); + const auto _members = reinterpret_cast(members); + const auto _membersSequenceLength = static_cast(membersSequenceLength); + const auto _isConst = static_cast(isConst); + const auto _isStatic = static_cast(isStatic); + const auto _isDeclare = static_cast(isDeclare); + auto result = GetImpl()->UpdateTSEnumDeclaration(_context, _original, _key, _members, _membersSequenceLength, _isConst, _isStatic, _isDeclare); + return result; +} +KOALA_INTEROP_8(UpdateTSEnumDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KBoolean, KBoolean, KBoolean); + +KNativePointer impl_CreateTSEnumDeclaration1(KNativePointer context, KNativePointer key, KNativePointerArray members, KUInt membersSequenceLength, KBoolean isConst, KBoolean isStatic, KBoolean isDeclare, KNativePointer typeNode) +{ + const auto _context = reinterpret_cast(context); + const auto _key = reinterpret_cast(key); + const auto _members = reinterpret_cast(members); + const auto _membersSequenceLength = static_cast(membersSequenceLength); + const auto _isConst = static_cast(isConst); + const auto _isStatic = static_cast(isStatic); + const auto _isDeclare = static_cast(isDeclare); + const auto _typeNode = reinterpret_cast(typeNode); + auto result = GetImpl()->CreateTSEnumDeclaration1(_context, _key, _members, _membersSequenceLength, _isConst, _isStatic, _isDeclare, _typeNode); + return result; +} +KOALA_INTEROP_8(CreateTSEnumDeclaration1, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KBoolean, KBoolean, KBoolean, KNativePointer); + +KNativePointer impl_UpdateTSEnumDeclaration1(KNativePointer context, KNativePointer original, KNativePointer key, KNativePointerArray members, KUInt membersSequenceLength, KBoolean isConst, KBoolean isStatic, KBoolean isDeclare, KNativePointer typeNode) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _key = reinterpret_cast(key); + const auto _members = reinterpret_cast(members); + const auto _membersSequenceLength = static_cast(membersSequenceLength); + const auto _isConst = static_cast(isConst); + const auto _isStatic = static_cast(isStatic); + const auto _isDeclare = static_cast(isDeclare); + const auto _typeNode = reinterpret_cast(typeNode); + auto result = GetImpl()->UpdateTSEnumDeclaration1(_context, _original, _key, _members, _membersSequenceLength, _isConst, _isStatic, _isDeclare, _typeNode); + return result; +} +KOALA_INTEROP_9(UpdateTSEnumDeclaration1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KBoolean, KBoolean, KBoolean, KNativePointer); + +KNativePointer impl_TSEnumDeclarationKeyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumDeclarationKeyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSEnumDeclarationKeyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSEnumDeclarationTypeNodes(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumDeclarationTypeNodes(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSEnumDeclarationTypeNodes, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSEnumDeclarationKey(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumDeclarationKey(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSEnumDeclarationKey, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSEnumDeclarationMembersConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSEnumDeclarationMembersConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSEnumDeclarationMembersConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSEnumDeclarationInternalNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumDeclarationInternalNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(TSEnumDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSEnumDeclarationSetInternalName(KNativePointer context, KNativePointer receiver, KStringPtr& internalName) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _internalName = getStringCopy(internalName); + GetImpl()->TSEnumDeclarationSetInternalName(_context, _receiver, _internalName); + return ; +} +KOALA_INTEROP_V3(TSEnumDeclarationSetInternalName, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_TSEnumDeclarationBoxedClassConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumDeclarationBoxedClassConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSEnumDeclarationBoxedClassConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSEnumDeclarationSetBoxedClass(KNativePointer context, KNativePointer receiver, KNativePointer boxedClass) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _boxedClass = reinterpret_cast(boxedClass); + GetImpl()->TSEnumDeclarationSetBoxedClass(_context, _receiver, _boxedClass); + return ; +} +KOALA_INTEROP_V3(TSEnumDeclarationSetBoxedClass, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSEnumDeclarationIsConstConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumDeclarationIsConstConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSEnumDeclarationIsConstConst, KBoolean, KNativePointer, KNativePointer); + +void impl_TSEnumDeclarationEmplaceMembers(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->TSEnumDeclarationEmplaceMembers(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(TSEnumDeclarationEmplaceMembers, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSEnumDeclarationClearMembers(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSEnumDeclarationClearMembers(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSEnumDeclarationClearMembers, KNativePointer, KNativePointer); + +void impl_TSEnumDeclarationSetValueMembers(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->TSEnumDeclarationSetValueMembers(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(TSEnumDeclarationSetValueMembers, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_TSEnumDeclarationMembersForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSEnumDeclarationMembersForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSEnumDeclarationMembersForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSNeverKeyword(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSNeverKeyword(_context); + return result; +} +KOALA_INTEROP_1(CreateTSNeverKeyword, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSNeverKeyword(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSNeverKeyword(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSNeverKeyword, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateImportDefaultSpecifier(KNativePointer context, KNativePointer local) +{ + const auto _context = reinterpret_cast(context); + const auto _local = reinterpret_cast(local); + auto result = GetImpl()->CreateImportDefaultSpecifier(_context, _local); + return result; +} +KOALA_INTEROP_2(CreateImportDefaultSpecifier, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateImportDefaultSpecifier(KNativePointer context, KNativePointer original, KNativePointer local) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _local = reinterpret_cast(local); + auto result = GetImpl()->UpdateImportDefaultSpecifier(_context, _original, _local); + return result; +} +KOALA_INTEROP_3(UpdateImportDefaultSpecifier, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportDefaultSpecifierLocalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportDefaultSpecifierLocalConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ImportDefaultSpecifierLocalConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportDefaultSpecifierLocal(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportDefaultSpecifierLocal(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ImportDefaultSpecifierLocal, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateObjectExpression(KNativePointer context, KInt nodeType, KNativePointerArray properties, KUInt propertiesSequenceLength, KBoolean trailingComma) +{ + const auto _context = reinterpret_cast(context); + const auto _nodeType = static_cast(nodeType); + const auto _properties = reinterpret_cast(properties); + const auto _propertiesSequenceLength = static_cast(propertiesSequenceLength); + const auto _trailingComma = static_cast(trailingComma); + auto result = GetImpl()->CreateObjectExpression(_context, _nodeType, _properties, _propertiesSequenceLength, _trailingComma); + return result; +} +KOALA_INTEROP_5(CreateObjectExpression, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KBoolean); + +KNativePointer impl_UpdateObjectExpression(KNativePointer context, KNativePointer original, KInt nodeType, KNativePointerArray properties, KUInt propertiesSequenceLength, KBoolean trailingComma) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _nodeType = static_cast(nodeType); + const auto _properties = reinterpret_cast(properties); + const auto _propertiesSequenceLength = static_cast(propertiesSequenceLength); + const auto _trailingComma = static_cast(trailingComma); + auto result = GetImpl()->UpdateObjectExpression(_context, _original, _nodeType, _properties, _propertiesSequenceLength, _trailingComma); + return result; +} +KOALA_INTEROP_6(UpdateObjectExpression, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KBoolean); + +KNativePointer impl_ObjectExpressionPropertiesConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ObjectExpressionPropertiesConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ObjectExpressionPropertiesConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ObjectExpressionIsDeclarationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ObjectExpressionIsDeclarationConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ObjectExpressionIsDeclarationConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ObjectExpressionIsOptionalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ObjectExpressionIsOptionalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ObjectExpressionIsOptionalConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_ObjectExpressionValidateExpression(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ObjectExpressionValidateExpression(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ObjectExpressionValidateExpression, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ObjectExpressionConvertibleToObjectPattern(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ObjectExpressionConvertibleToObjectPattern(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ObjectExpressionConvertibleToObjectPattern, KBoolean, KNativePointer, KNativePointer); + +void impl_ObjectExpressionSetDeclaration(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ObjectExpressionSetDeclaration(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ObjectExpressionSetDeclaration, KNativePointer, KNativePointer); + +void impl_ObjectExpressionSetOptional(KNativePointer context, KNativePointer receiver, KBoolean optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _optional_arg = static_cast(optional_arg); + GetImpl()->ObjectExpressionSetOptional(_context, _receiver, _optional_arg); + return ; +} +KOALA_INTEROP_V3(ObjectExpressionSetOptional, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_ObjectExpressionTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ObjectExpressionTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ObjectExpressionTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ObjectExpressionSetTsTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + GetImpl()->ObjectExpressionSetTsTypeAnnotation(_context, _receiver, _typeAnnotation); + return ; +} +KOALA_INTEROP_V3(ObjectExpressionSetTsTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateImportSpecifier(KNativePointer context, KNativePointer imported, KNativePointer local) +{ + const auto _context = reinterpret_cast(context); + const auto _imported = reinterpret_cast(imported); + const auto _local = reinterpret_cast(local); + auto result = GetImpl()->CreateImportSpecifier(_context, _imported, _local); + return result; +} +KOALA_INTEROP_3(CreateImportSpecifier, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateImportSpecifier(KNativePointer context, KNativePointer original, KNativePointer imported, KNativePointer local) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _imported = reinterpret_cast(imported); + const auto _local = reinterpret_cast(local); + auto result = GetImpl()->UpdateImportSpecifier(_context, _original, _imported, _local); + return result; +} +KOALA_INTEROP_4(UpdateImportSpecifier, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportSpecifierImported(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportSpecifierImported(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ImportSpecifierImported, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportSpecifierImportedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportSpecifierImportedConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ImportSpecifierImportedConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportSpecifierLocal(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportSpecifierLocal(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ImportSpecifierLocal, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportSpecifierLocalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportSpecifierLocalConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ImportSpecifierLocalConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ImportSpecifierIsRemovableConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportSpecifierIsRemovableConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ImportSpecifierIsRemovableConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ImportSpecifierSetRemovable(KNativePointer context, KNativePointer receiver, KBoolean isRemovable) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isRemovable = static_cast(isRemovable); + GetImpl()->ImportSpecifierSetRemovable(_context, _receiver, _isRemovable); + return ; +} +KOALA_INTEROP_V3(ImportSpecifierSetRemovable, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_CreateConditionalExpression(KNativePointer context, KNativePointer test, KNativePointer consequent, KNativePointer alternate) +{ + const auto _context = reinterpret_cast(context); + const auto _test = reinterpret_cast(test); + const auto _consequent = reinterpret_cast(consequent); + const auto _alternate = reinterpret_cast(alternate); + auto result = GetImpl()->CreateConditionalExpression(_context, _test, _consequent, _alternate); + return result; +} +KOALA_INTEROP_4(CreateConditionalExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateConditionalExpression(KNativePointer context, KNativePointer original, KNativePointer test, KNativePointer consequent, KNativePointer alternate) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _test = reinterpret_cast(test); + const auto _consequent = reinterpret_cast(consequent); + const auto _alternate = reinterpret_cast(alternate); + auto result = GetImpl()->UpdateConditionalExpression(_context, _original, _test, _consequent, _alternate); + return result; +} +KOALA_INTEROP_5(UpdateConditionalExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ConditionalExpressionTestConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ConditionalExpressionTestConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ConditionalExpressionTestConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ConditionalExpressionTest(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ConditionalExpressionTest(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ConditionalExpressionTest, KNativePointer, KNativePointer, KNativePointer); + +void impl_ConditionalExpressionSetTest(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->ConditionalExpressionSetTest(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(ConditionalExpressionSetTest, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ConditionalExpressionConsequentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ConditionalExpressionConsequentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ConditionalExpressionConsequentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ConditionalExpressionConsequent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ConditionalExpressionConsequent(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ConditionalExpressionConsequent, KNativePointer, KNativePointer, KNativePointer); + +void impl_ConditionalExpressionSetConsequent(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->ConditionalExpressionSetConsequent(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(ConditionalExpressionSetConsequent, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ConditionalExpressionAlternateConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ConditionalExpressionAlternateConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ConditionalExpressionAlternateConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ConditionalExpressionAlternate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ConditionalExpressionAlternate(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ConditionalExpressionAlternate, KNativePointer, KNativePointer, KNativePointer); + +void impl_ConditionalExpressionSetAlternate(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->ConditionalExpressionSetAlternate(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(ConditionalExpressionSetAlternate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateCallExpression(KNativePointer context, KNativePointer callee, KNativePointerArray _arguments, KUInt _argumentsSequenceLength, KNativePointer typeParams, KBoolean optional_arg, KBoolean trailingComma) +{ + const auto _context = reinterpret_cast(context); + const auto _callee = reinterpret_cast(callee); + const auto __arguments = reinterpret_cast(_arguments); + const auto __argumentsSequenceLength = static_cast(_argumentsSequenceLength); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _optional_arg = static_cast(optional_arg); + const auto _trailingComma = static_cast(trailingComma); + auto result = GetImpl()->CreateCallExpression(_context, _callee, __arguments, __argumentsSequenceLength, _typeParams, _optional_arg, _trailingComma); + return result; +} +KOALA_INTEROP_7(CreateCallExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KBoolean, KBoolean); + +KNativePointer impl_CreateCallExpression1(KNativePointer context, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->CreateCallExpression1(_context, _other); + return result; +} +KOALA_INTEROP_2(CreateCallExpression1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateCallExpression1(KNativePointer context, KNativePointer original, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->UpdateCallExpression1(_context, _original, _other); + return result; +} +KOALA_INTEROP_3(UpdateCallExpression1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CallExpressionCalleeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionCalleeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(CallExpressionCalleeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CallExpressionCallee(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionCallee(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CallExpressionCallee, KNativePointer, KNativePointer, KNativePointer); + +void impl_CallExpressionSetCallee(KNativePointer context, KNativePointer receiver, KNativePointer callee) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _callee = reinterpret_cast(callee); + GetImpl()->CallExpressionSetCallee(_context, _receiver, _callee); + return ; +} +KOALA_INTEROP_V3(CallExpressionSetCallee, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CallExpressionTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(CallExpressionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CallExpressionTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CallExpressionTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CallExpressionArgumentsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->CallExpressionArgumentsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(CallExpressionArgumentsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CallExpressionArguments(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->CallExpressionArguments(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(CallExpressionArguments, KNativePointer, KNativePointer, KNativePointer); + +void impl_CallExpressionSetArguments(KNativePointer context, KNativePointer receiver, KNativePointerArray argumentsList, KUInt argumentsListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _argumentsList = reinterpret_cast(argumentsList); + const auto _argumentsListSequenceLength = static_cast(argumentsListSequenceLength); + GetImpl()->CallExpressionSetArguments(_context, _receiver, _argumentsList, _argumentsListSequenceLength); + return ; +} +KOALA_INTEROP_V4(CallExpressionSetArguments, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KBoolean impl_CallExpressionHasTrailingCommaConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionHasTrailingCommaConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CallExpressionHasTrailingCommaConst, KBoolean, KNativePointer, KNativePointer); + +void impl_CallExpressionSetTypeParams(KNativePointer context, KNativePointer receiver, KNativePointer typeParams) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeParams = reinterpret_cast(typeParams); + GetImpl()->CallExpressionSetTypeParams(_context, _receiver, _typeParams); + return ; +} +KOALA_INTEROP_V3(CallExpressionSetTypeParams, KNativePointer, KNativePointer, KNativePointer); + +void impl_CallExpressionSetTrailingBlock(KNativePointer context, KNativePointer receiver, KNativePointer block) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _block = reinterpret_cast(block); + GetImpl()->CallExpressionSetTrailingBlock(_context, _receiver, _block); + return ; +} +KOALA_INTEROP_V3(CallExpressionSetTrailingBlock, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_CallExpressionIsExtensionAccessorCall(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionIsExtensionAccessorCall(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CallExpressionIsExtensionAccessorCall, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CallExpressionTrailingBlockConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionTrailingBlockConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(CallExpressionTrailingBlockConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_CallExpressionSetIsTrailingBlockInNewLine(KNativePointer context, KNativePointer receiver, KBoolean isNewLine) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isNewLine = static_cast(isNewLine); + GetImpl()->CallExpressionSetIsTrailingBlockInNewLine(_context, _receiver, _isNewLine); + return ; +} +KOALA_INTEROP_V3(CallExpressionSetIsTrailingBlockInNewLine, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_CallExpressionIsTrailingBlockInNewLineConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionIsTrailingBlockInNewLineConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CallExpressionIsTrailingBlockInNewLineConst, KBoolean, KNativePointer, KNativePointer); + +void impl_CallExpressionSetIsTrailingCall(KNativePointer context, KNativePointer receiver, KBoolean isTrailingCall) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isTrailingCall = static_cast(isTrailingCall); + GetImpl()->CallExpressionSetIsTrailingCall(_context, _receiver, _isTrailingCall); + return ; +} +KOALA_INTEROP_V3(CallExpressionSetIsTrailingCall, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_CallExpressionIsTrailingCallConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionIsTrailingCallConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CallExpressionIsTrailingCallConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_CallExpressionIsETSConstructorCallConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionIsETSConstructorCallConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CallExpressionIsETSConstructorCallConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_CallExpressionIsDynamicCallConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CallExpressionIsDynamicCallConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CallExpressionIsDynamicCallConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateBigIntLiteral(KNativePointer context, KStringPtr& src) +{ + const auto _context = reinterpret_cast(context); + const auto _src = getStringCopy(src); + auto result = GetImpl()->CreateBigIntLiteral(_context, _src); + return result; +} +KOALA_INTEROP_2(CreateBigIntLiteral, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_UpdateBigIntLiteral(KNativePointer context, KNativePointer original, KStringPtr& src) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _src = getStringCopy(src); + auto result = GetImpl()->UpdateBigIntLiteral(_context, _original, _src); + return result; +} +KOALA_INTEROP_3(UpdateBigIntLiteral, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_BigIntLiteralStrConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BigIntLiteralStrConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(BigIntLiteralStrConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassElementId(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassElementId(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassElementId, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassElementIdConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassElementIdConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassElementIdConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassElementKey(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassElementKey(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassElementKey, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassElementKeyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassElementKeyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassElementKeyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassElementValue(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassElementValue(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassElementValue, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassElementSetValue(KNativePointer context, KNativePointer receiver, KNativePointer value) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _value = reinterpret_cast(value); + GetImpl()->ClassElementSetValue(_context, _receiver, _value); + return ; +} +KOALA_INTEROP_V3(ClassElementSetValue, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassElementValueConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassElementValueConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassElementValueConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassElementOriginEnumMemberConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassElementOriginEnumMemberConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassElementOriginEnumMemberConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassElementSetOrigEnumMember(KNativePointer context, KNativePointer receiver, KNativePointer enumMember) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _enumMember = reinterpret_cast(enumMember); + GetImpl()->ClassElementSetOrigEnumMember(_context, _receiver, _enumMember); + return ; +} +KOALA_INTEROP_V3(ClassElementSetOrigEnumMember, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ClassElementIsPrivateElementConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassElementIsPrivateElementConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassElementIsPrivateElementConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassElementIsComputedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassElementIsComputedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassElementIsComputedConst, KBoolean, KNativePointer, KNativePointer); + +KInt impl_ClassElementToPrivateFieldKindConst(KNativePointer context, KNativePointer receiver, KBoolean isStatic) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isStatic = static_cast(isStatic); + auto result = GetImpl()->ClassElementToPrivateFieldKindConst(_context, _receiver, _isStatic); + return result; +} +KOALA_INTEROP_3(ClassElementToPrivateFieldKindConst, KInt, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_CreateTSImportType(KNativePointer context, KNativePointer param, KNativePointer typeParams, KNativePointer qualifier, KBoolean isTypeof) +{ + const auto _context = reinterpret_cast(context); + const auto _param = reinterpret_cast(param); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _qualifier = reinterpret_cast(qualifier); + const auto _isTypeof = static_cast(isTypeof); + auto result = GetImpl()->CreateTSImportType(_context, _param, _typeParams, _qualifier, _isTypeof); + return result; +} +KOALA_INTEROP_5(CreateTSImportType, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateTSImportType(KNativePointer context, KNativePointer original, KNativePointer param, KNativePointer typeParams, KNativePointer qualifier, KBoolean isTypeof) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _param = reinterpret_cast(param); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _qualifier = reinterpret_cast(qualifier); + const auto _isTypeof = static_cast(isTypeof); + auto result = GetImpl()->UpdateTSImportType(_context, _original, _param, _typeParams, _qualifier, _isTypeof); + return result; +} +KOALA_INTEROP_6(UpdateTSImportType, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_TSImportTypeParamConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSImportTypeParamConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSImportTypeParamConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSImportTypeTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSImportTypeTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSImportTypeTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSImportTypeQualifierConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSImportTypeQualifierConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSImportTypeQualifierConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSImportTypeIsTypeofConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSImportTypeIsTypeofConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSImportTypeIsTypeofConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTaggedTemplateExpression(KNativePointer context, KNativePointer tag, KNativePointer quasi, KNativePointer typeParams) +{ + const auto _context = reinterpret_cast(context); + const auto _tag = reinterpret_cast(tag); + const auto _quasi = reinterpret_cast(quasi); + const auto _typeParams = reinterpret_cast(typeParams); + auto result = GetImpl()->CreateTaggedTemplateExpression(_context, _tag, _quasi, _typeParams); + return result; +} +KOALA_INTEROP_4(CreateTaggedTemplateExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTaggedTemplateExpression(KNativePointer context, KNativePointer original, KNativePointer tag, KNativePointer quasi, KNativePointer typeParams) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _tag = reinterpret_cast(tag); + const auto _quasi = reinterpret_cast(quasi); + const auto _typeParams = reinterpret_cast(typeParams); + auto result = GetImpl()->UpdateTaggedTemplateExpression(_context, _original, _tag, _quasi, _typeParams); + return result; +} +KOALA_INTEROP_5(UpdateTaggedTemplateExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TaggedTemplateExpressionTagConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TaggedTemplateExpressionTagConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TaggedTemplateExpressionTagConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TaggedTemplateExpressionQuasiConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TaggedTemplateExpressionQuasiConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TaggedTemplateExpressionQuasiConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TaggedTemplateExpressionTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TaggedTemplateExpressionTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TaggedTemplateExpressionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateFunctionDeclaration(KNativePointer context, KNativePointer func, KNativePointerArray annotations, KUInt annotationsSequenceLength, KBoolean isAnonymous) +{ + const auto _context = reinterpret_cast(context); + const auto _func = reinterpret_cast(func); + const auto _annotations = reinterpret_cast(annotations); + const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); + const auto _isAnonymous = static_cast(isAnonymous); + auto result = GetImpl()->CreateFunctionDeclaration(_context, _func, _annotations, _annotationsSequenceLength, _isAnonymous); + return result; +} +KOALA_INTEROP_5(CreateFunctionDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KBoolean); + +KNativePointer impl_UpdateFunctionDeclaration(KNativePointer context, KNativePointer original, KNativePointer func, KNativePointerArray annotations, KUInt annotationsSequenceLength, KBoolean isAnonymous) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _func = reinterpret_cast(func); + const auto _annotations = reinterpret_cast(annotations); + const auto _annotationsSequenceLength = static_cast(annotationsSequenceLength); + const auto _isAnonymous = static_cast(isAnonymous); + auto result = GetImpl()->UpdateFunctionDeclaration(_context, _original, _func, _annotations, _annotationsSequenceLength, _isAnonymous); + return result; +} +KOALA_INTEROP_6(UpdateFunctionDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KBoolean); + +KNativePointer impl_CreateFunctionDeclaration1(KNativePointer context, KNativePointer func, KBoolean isAnonymous) +{ + const auto _context = reinterpret_cast(context); + const auto _func = reinterpret_cast(func); + const auto _isAnonymous = static_cast(isAnonymous); + auto result = GetImpl()->CreateFunctionDeclaration1(_context, _func, _isAnonymous); + return result; +} +KOALA_INTEROP_3(CreateFunctionDeclaration1, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateFunctionDeclaration1(KNativePointer context, KNativePointer original, KNativePointer func, KBoolean isAnonymous) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _func = reinterpret_cast(func); + const auto _isAnonymous = static_cast(isAnonymous); + auto result = GetImpl()->UpdateFunctionDeclaration1(_context, _original, _func, _isAnonymous); + return result; +} +KOALA_INTEROP_4(UpdateFunctionDeclaration1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_FunctionDeclarationFunction(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionDeclarationFunction(_context, _receiver); + return result; +} +KOALA_INTEROP_2(FunctionDeclarationFunction, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_FunctionDeclarationIsAnonymousConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionDeclarationIsAnonymousConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(FunctionDeclarationIsAnonymousConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionDeclarationFunctionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionDeclarationFunctionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(FunctionDeclarationFunctionConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_FunctionDeclarationHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionDeclarationHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(FunctionDeclarationHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_FunctionDeclarationEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->FunctionDeclarationEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(FunctionDeclarationEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_FunctionDeclarationClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->FunctionDeclarationClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(FunctionDeclarationClearAnnotations, KNativePointer, KNativePointer); + +void impl_FunctionDeclarationDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->FunctionDeclarationDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(FunctionDeclarationDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionDeclarationAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->FunctionDeclarationAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(FunctionDeclarationAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionDeclarationAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->FunctionDeclarationAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(FunctionDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionDeclarationAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->FunctionDeclarationAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(FunctionDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_FunctionDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->FunctionDeclarationSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(FunctionDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_FunctionDeclarationSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->FunctionDeclarationSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(FunctionDeclarationSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateETSTypeReference(KNativePointer context, KNativePointer part) +{ + const auto _context = reinterpret_cast(context); + const auto _part = reinterpret_cast(part); + auto result = GetImpl()->CreateETSTypeReference(_context, _part); + return result; +} +KOALA_INTEROP_2(CreateETSTypeReference, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSTypeReference(KNativePointer context, KNativePointer original, KNativePointer part) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _part = reinterpret_cast(part); + auto result = GetImpl()->UpdateETSTypeReference(_context, _original, _part); + return result; +} +KOALA_INTEROP_3(UpdateETSTypeReference, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTypeReferencePart(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferencePart(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSTypeReferencePart, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTypeReferencePartConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferencePartConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSTypeReferencePartConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTypeReferenceBaseNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferenceBaseNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSTypeReferenceBaseNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSTypeReference(KNativePointer context, KNativePointer typeName, KNativePointer typeParams) +{ + const auto _context = reinterpret_cast(context); + const auto _typeName = reinterpret_cast(typeName); + const auto _typeParams = reinterpret_cast(typeParams); + auto result = GetImpl()->CreateTSTypeReference(_context, _typeName, _typeParams); + return result; +} +KOALA_INTEROP_3(CreateTSTypeReference, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSTypeReference(KNativePointer context, KNativePointer original, KNativePointer typeName, KNativePointer typeParams) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _typeName = reinterpret_cast(typeName); + const auto _typeParams = reinterpret_cast(typeParams); + auto result = GetImpl()->UpdateTSTypeReference(_context, _original, _typeName, _typeParams); + return result; +} +KOALA_INTEROP_4(UpdateTSTypeReference, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeReferenceTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeReferenceTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeReferenceTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeReferenceTypeNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeReferenceTypeNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeReferenceTypeNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeReferenceBaseNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeReferenceBaseNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeReferenceBaseNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateNamedType(KNativePointer context, KNativePointer name) +{ + const auto _context = reinterpret_cast(context); + const auto _name = reinterpret_cast(name); + auto result = GetImpl()->CreateNamedType(_context, _name); + return result; +} +KOALA_INTEROP_2(CreateNamedType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateNamedType(KNativePointer context, KNativePointer original, KNativePointer name) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _name = reinterpret_cast(name); + auto result = GetImpl()->UpdateNamedType(_context, _original, _name); + return result; +} +KOALA_INTEROP_3(UpdateNamedType, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_NamedTypeNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->NamedTypeNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(NamedTypeNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_NamedTypeTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->NamedTypeTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(NamedTypeTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_NamedTypeIsNullableConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->NamedTypeIsNullableConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(NamedTypeIsNullableConst, KBoolean, KNativePointer, KNativePointer); + +void impl_NamedTypeSetNullable(KNativePointer context, KNativePointer receiver, KBoolean nullable) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _nullable = static_cast(nullable); + GetImpl()->NamedTypeSetNullable(_context, _receiver, _nullable); + return ; +} +KOALA_INTEROP_V3(NamedTypeSetNullable, KNativePointer, KNativePointer, KBoolean); + +void impl_NamedTypeSetNext(KNativePointer context, KNativePointer receiver, KNativePointer next) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _next = reinterpret_cast(next); + GetImpl()->NamedTypeSetNext(_context, _receiver, _next); + return ; +} +KOALA_INTEROP_V3(NamedTypeSetNext, KNativePointer, KNativePointer, KNativePointer); + +void impl_NamedTypeSetTypeParams(KNativePointer context, KNativePointer receiver, KNativePointer typeParams) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeParams = reinterpret_cast(typeParams); + GetImpl()->NamedTypeSetTypeParams(_context, _receiver, _typeParams); + return ; +} +KOALA_INTEROP_V3(NamedTypeSetTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSFunctionType(KNativePointer context, KNativePointer signature) +{ + const auto _context = reinterpret_cast(context); + const auto _signature = reinterpret_cast(signature); + auto result = GetImpl()->CreateTSFunctionType(_context, _signature); + return result; +} +KOALA_INTEROP_2(CreateTSFunctionType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSFunctionType(KNativePointer context, KNativePointer original, KNativePointer signature) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _signature = reinterpret_cast(signature); + auto result = GetImpl()->UpdateTSFunctionType(_context, _original, _signature); + return result; +} +KOALA_INTEROP_3(UpdateTSFunctionType, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSFunctionTypeTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSFunctionTypeTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSFunctionTypeTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSFunctionTypeTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSFunctionTypeTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSFunctionTypeTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSFunctionTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSFunctionTypeParamsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSFunctionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSFunctionTypeReturnTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSFunctionTypeReturnTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSFunctionTypeReturnTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSFunctionTypeReturnType(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSFunctionTypeReturnType(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSFunctionTypeReturnType, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSFunctionTypeSetNullable(KNativePointer context, KNativePointer receiver, KBoolean nullable) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _nullable = static_cast(nullable); + GetImpl()->TSFunctionTypeSetNullable(_context, _receiver, _nullable); + return ; +} +KOALA_INTEROP_V3(TSFunctionTypeSetNullable, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_CreateTemplateElement(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTemplateElement(_context); + return result; +} +KOALA_INTEROP_1(CreateTemplateElement, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTemplateElement(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTemplateElement(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTemplateElement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTemplateElement1(KNativePointer context, KStringPtr& raw, KStringPtr& cooked) +{ + const auto _context = reinterpret_cast(context); + const auto _raw = getStringCopy(raw); + const auto _cooked = getStringCopy(cooked); + auto result = GetImpl()->CreateTemplateElement1(_context, _raw, _cooked); + return result; +} +KOALA_INTEROP_3(CreateTemplateElement1, KNativePointer, KNativePointer, KStringPtr, KStringPtr); + +KNativePointer impl_UpdateTemplateElement1(KNativePointer context, KNativePointer original, KStringPtr& raw, KStringPtr& cooked) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _raw = getStringCopy(raw); + const auto _cooked = getStringCopy(cooked); + auto result = GetImpl()->UpdateTemplateElement1(_context, _original, _raw, _cooked); + return result; +} +KOALA_INTEROP_4(UpdateTemplateElement1, KNativePointer, KNativePointer, KNativePointer, KStringPtr, KStringPtr); + +KNativePointer impl_TemplateElementRawConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TemplateElementRawConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(TemplateElementRawConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TemplateElementCookedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TemplateElementCookedConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(TemplateElementCookedConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSInterfaceDeclaration(KNativePointer context, KNativePointerArray _extends, KUInt _extendsSequenceLength, KNativePointer id, KNativePointer typeParams, KNativePointer body, KBoolean isStatic, KBoolean isExternal) +{ + const auto _context = reinterpret_cast(context); + const auto __extends = reinterpret_cast(_extends); + const auto __extendsSequenceLength = static_cast(_extendsSequenceLength); + const auto _id = reinterpret_cast(id); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _body = reinterpret_cast(body); + const auto _isStatic = static_cast(isStatic); + const auto _isExternal = static_cast(isExternal); + auto result = GetImpl()->CreateTSInterfaceDeclaration(_context, __extends, __extendsSequenceLength, _id, _typeParams, _body, _isStatic, _isExternal); + return result; +} +KOALA_INTEROP_8(CreateTSInterfaceDeclaration, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KNativePointer, KNativePointer, KBoolean, KBoolean); + +KNativePointer impl_UpdateTSInterfaceDeclaration(KNativePointer context, KNativePointer original, KNativePointerArray _extends, KUInt _extendsSequenceLength, KNativePointer id, KNativePointer typeParams, KNativePointer body, KBoolean isStatic, KBoolean isExternal) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto __extends = reinterpret_cast(_extends); + const auto __extendsSequenceLength = static_cast(_extendsSequenceLength); + const auto _id = reinterpret_cast(id); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _body = reinterpret_cast(body); + const auto _isStatic = static_cast(isStatic); + const auto _isExternal = static_cast(isExternal); + auto result = GetImpl()->UpdateTSInterfaceDeclaration(_context, _original, __extends, __extendsSequenceLength, _id, _typeParams, _body, _isStatic, _isExternal); + return result; +} +KOALA_INTEROP_9(UpdateTSInterfaceDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KNativePointer, KNativePointer, KBoolean, KBoolean); + +KNativePointer impl_TSInterfaceDeclarationBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationBody(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSInterfaceDeclarationBody, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationBodyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSInterfaceDeclarationBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationId(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationId(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSInterfaceDeclarationId, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationIdConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationIdConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSInterfaceDeclarationIdConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationInternalNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationInternalNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(TSInterfaceDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSInterfaceDeclarationSetInternalName(KNativePointer context, KNativePointer receiver, KStringPtr& internalName) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _internalName = getStringCopy(internalName); + GetImpl()->TSInterfaceDeclarationSetInternalName(_context, _receiver, _internalName); + return ; +} +KOALA_INTEROP_V3(TSInterfaceDeclarationSetInternalName, KNativePointer, KNativePointer, KStringPtr); + +KBoolean impl_TSInterfaceDeclarationIsStaticConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationIsStaticConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSInterfaceDeclarationIsStaticConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_TSInterfaceDeclarationIsFromExternalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationIsFromExternalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSInterfaceDeclarationIsFromExternalConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSInterfaceDeclarationTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSInterfaceDeclarationTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationExtends(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceDeclarationExtends(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSInterfaceDeclarationExtends, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationExtendsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceDeclarationExtendsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSInterfaceDeclarationExtendsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationExtendsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceDeclarationExtendsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSInterfaceDeclarationExtendsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationGetAnonClass(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationGetAnonClass(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSInterfaceDeclarationGetAnonClass, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationGetAnonClassConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationGetAnonClassConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSInterfaceDeclarationGetAnonClassConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSInterfaceDeclarationSetAnonClass(KNativePointer context, KNativePointer receiver, KNativePointer anonClass) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _anonClass = reinterpret_cast(anonClass); + GetImpl()->TSInterfaceDeclarationSetAnonClass(_context, _receiver, _anonClass); + return ; +} +KOALA_INTEROP_V3(TSInterfaceDeclarationSetAnonClass, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSInterfaceDeclarationEmplaceExtends(KNativePointer context, KNativePointer receiver, KNativePointer _extends) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto __extends = reinterpret_cast(_extends); + GetImpl()->TSInterfaceDeclarationEmplaceExtends(_context, _receiver, __extends); + return ; +} +KOALA_INTEROP_V3(TSInterfaceDeclarationEmplaceExtends, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSInterfaceDeclarationClearExtends(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSInterfaceDeclarationClearExtends(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSInterfaceDeclarationClearExtends, KNativePointer, KNativePointer); + +void impl_TSInterfaceDeclarationSetValueExtends(KNativePointer context, KNativePointer receiver, KNativePointer _extends, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto __extends = reinterpret_cast(_extends); + const auto _index = static_cast(index); + GetImpl()->TSInterfaceDeclarationSetValueExtends(_context, _receiver, __extends, _index); + return ; +} +KOALA_INTEROP_V4(TSInterfaceDeclarationSetValueExtends, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KBoolean impl_TSInterfaceDeclarationHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceDeclarationHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSInterfaceDeclarationHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_TSInterfaceDeclarationEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->TSInterfaceDeclarationEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(TSInterfaceDeclarationEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSInterfaceDeclarationClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSInterfaceDeclarationClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSInterfaceDeclarationClearAnnotations, KNativePointer, KNativePointer); + +void impl_TSInterfaceDeclarationDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->TSInterfaceDeclarationDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(TSInterfaceDeclarationDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceDeclarationAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSInterfaceDeclarationAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceDeclarationAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSInterfaceDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceDeclarationAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceDeclarationAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSInterfaceDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSInterfaceDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TSInterfaceDeclarationSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TSInterfaceDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_TSInterfaceDeclarationSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TSInterfaceDeclarationSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TSInterfaceDeclarationSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateVariableDeclaration(KNativePointer context, KInt kind, KNativePointerArray declarators, KUInt declaratorsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _kind = static_cast(kind); + const auto _declarators = reinterpret_cast(declarators); + const auto _declaratorsSequenceLength = static_cast(declaratorsSequenceLength); + auto result = GetImpl()->CreateVariableDeclaration(_context, _kind, _declarators, _declaratorsSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateVariableDeclaration, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateVariableDeclaration(KNativePointer context, KNativePointer original, KInt kind, KNativePointerArray declarators, KUInt declaratorsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _kind = static_cast(kind); + const auto _declarators = reinterpret_cast(declarators); + const auto _declaratorsSequenceLength = static_cast(declaratorsSequenceLength); + auto result = GetImpl()->UpdateVariableDeclaration(_context, _original, _kind, _declarators, _declaratorsSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateVariableDeclaration, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt); + +KNativePointer impl_VariableDeclarationDeclaratorsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationDeclaratorsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(VariableDeclarationDeclaratorsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationDeclarators(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationDeclarators(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(VariableDeclarationDeclarators, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationDeclaratorsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationDeclaratorsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(VariableDeclarationDeclaratorsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_VariableDeclarationKindConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->VariableDeclarationKindConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(VariableDeclarationKindConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationGetDeclaratorByNameConst(KNativePointer context, KNativePointer receiver, KStringPtr& name) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _name = getStringCopy(name); + auto result = GetImpl()->VariableDeclarationGetDeclaratorByNameConst(_context, _receiver, _name); + return (void*)result; +} +KOALA_INTEROP_3(VariableDeclarationGetDeclaratorByNameConst, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + +KBoolean impl_VariableDeclarationHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->VariableDeclarationHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(VariableDeclarationHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_VariableDeclarationEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->VariableDeclarationEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(VariableDeclarationEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_VariableDeclarationClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->VariableDeclarationClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(VariableDeclarationClearAnnotations, KNativePointer, KNativePointer); + +void impl_VariableDeclarationDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->VariableDeclarationDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(VariableDeclarationDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(VariableDeclarationAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(VariableDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclarationAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->VariableDeclarationAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(VariableDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_VariableDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->VariableDeclarationSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(VariableDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_VariableDeclarationSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->VariableDeclarationSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(VariableDeclarationSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateUndefinedLiteral(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateUndefinedLiteral(_context); + return result; +} +KOALA_INTEROP_1(CreateUndefinedLiteral, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateUndefinedLiteral(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateUndefinedLiteral(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateUndefinedLiteral, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateMemberExpression(KNativePointer context, KNativePointer object_arg, KNativePointer property, KInt kind, KBoolean computed, KBoolean optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _object_arg = reinterpret_cast(object_arg); + const auto _property = reinterpret_cast(property); + const auto _kind = static_cast(kind); + const auto _computed = static_cast(computed); + const auto _optional_arg = static_cast(optional_arg); + auto result = GetImpl()->CreateMemberExpression(_context, _object_arg, _property, _kind, _computed, _optional_arg); + return result; +} +KOALA_INTEROP_6(CreateMemberExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt, KBoolean, KBoolean); + +KNativePointer impl_UpdateMemberExpression(KNativePointer context, KNativePointer original, KNativePointer object_arg, KNativePointer property, KInt kind, KBoolean computed, KBoolean optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _object_arg = reinterpret_cast(object_arg); + const auto _property = reinterpret_cast(property); + const auto _kind = static_cast(kind); + const auto _computed = static_cast(computed); + const auto _optional_arg = static_cast(optional_arg); + auto result = GetImpl()->UpdateMemberExpression(_context, _original, _object_arg, _property, _kind, _computed, _optional_arg); + return result; +} +KOALA_INTEROP_7(UpdateMemberExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt, KBoolean, KBoolean); + +KNativePointer impl_MemberExpressionObject(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MemberExpressionObject(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MemberExpressionObject, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_MemberExpressionObjectConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MemberExpressionObjectConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(MemberExpressionObjectConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_MemberExpressionSetObject(KNativePointer context, KNativePointer receiver, KNativePointer object_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _object_arg = reinterpret_cast(object_arg); + GetImpl()->MemberExpressionSetObject(_context, _receiver, _object_arg); + return ; +} +KOALA_INTEROP_V3(MemberExpressionSetObject, KNativePointer, KNativePointer, KNativePointer); + +void impl_MemberExpressionSetProperty(KNativePointer context, KNativePointer receiver, KNativePointer prop) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _prop = reinterpret_cast(prop); + GetImpl()->MemberExpressionSetProperty(_context, _receiver, _prop); + return ; +} +KOALA_INTEROP_V3(MemberExpressionSetProperty, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_MemberExpressionProperty(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MemberExpressionProperty(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MemberExpressionProperty, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_MemberExpressionPropertyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MemberExpressionPropertyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(MemberExpressionPropertyConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_MemberExpressionIsComputedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MemberExpressionIsComputedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MemberExpressionIsComputedConst, KBoolean, KNativePointer, KNativePointer); + +KInt impl_MemberExpressionKindConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MemberExpressionKindConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MemberExpressionKindConst, KInt, KNativePointer, KNativePointer); + +void impl_MemberExpressionAddMemberKind(KNativePointer context, KNativePointer receiver, KInt kind) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _kind = static_cast(kind); + GetImpl()->MemberExpressionAddMemberKind(_context, _receiver, _kind); + return ; +} +KOALA_INTEROP_V3(MemberExpressionAddMemberKind, KNativePointer, KNativePointer, KInt); + +KBoolean impl_MemberExpressionHasMemberKindConst(KNativePointer context, KNativePointer receiver, KInt kind) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _kind = static_cast(kind); + auto result = GetImpl()->MemberExpressionHasMemberKindConst(_context, _receiver, _kind); + return result; +} +KOALA_INTEROP_3(MemberExpressionHasMemberKindConst, KBoolean, KNativePointer, KNativePointer, KInt); + +void impl_MemberExpressionRemoveMemberKind(KNativePointer context, KNativePointer receiver, KInt kind) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _kind = static_cast(kind); + GetImpl()->MemberExpressionRemoveMemberKind(_context, _receiver, _kind); + return ; +} +KOALA_INTEROP_V3(MemberExpressionRemoveMemberKind, KNativePointer, KNativePointer, KInt); + +KBoolean impl_MemberExpressionIsIgnoreBoxConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MemberExpressionIsIgnoreBoxConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MemberExpressionIsIgnoreBoxConst, KBoolean, KNativePointer, KNativePointer); + +void impl_MemberExpressionSetIgnoreBox(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->MemberExpressionSetIgnoreBox(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(MemberExpressionSetIgnoreBox, KNativePointer, KNativePointer); + +KBoolean impl_MemberExpressionIsPrivateReferenceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MemberExpressionIsPrivateReferenceConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MemberExpressionIsPrivateReferenceConst, KBoolean, KNativePointer, KNativePointer); + +void impl_MemberExpressionCompileToRegConst(KNativePointer context, KNativePointer receiver, KNativePointer pg, KNativePointer objReg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _pg = reinterpret_cast(pg); + const auto _objReg = reinterpret_cast(objReg); + GetImpl()->MemberExpressionCompileToRegConst(_context, _receiver, _pg, _objReg); + return ; +} +KOALA_INTEROP_V4(MemberExpressionCompileToRegConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +void impl_MemberExpressionCompileToRegsConst(KNativePointer context, KNativePointer receiver, KNativePointer pg, KNativePointer object_arg, KNativePointer property) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _pg = reinterpret_cast(pg); + const auto _object_arg = reinterpret_cast(object_arg); + const auto _property = reinterpret_cast(property); + GetImpl()->MemberExpressionCompileToRegsConst(_context, _receiver, _pg, _object_arg, _property); + return ; +} +KOALA_INTEROP_V5(MemberExpressionCompileToRegsConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSClassImplements(KNativePointer context, KNativePointer expression, KNativePointer typeParameters) +{ + const auto _context = reinterpret_cast(context); + const auto _expression = reinterpret_cast(expression); + const auto _typeParameters = reinterpret_cast(typeParameters); + auto result = GetImpl()->CreateTSClassImplements(_context, _expression, _typeParameters); + return result; +} +KOALA_INTEROP_3(CreateTSClassImplements, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSClassImplements(KNativePointer context, KNativePointer original, KNativePointer expression, KNativePointer typeParameters) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expression = reinterpret_cast(expression); + const auto _typeParameters = reinterpret_cast(typeParameters); + auto result = GetImpl()->UpdateTSClassImplements(_context, _original, _expression, _typeParameters); + return result; +} +KOALA_INTEROP_4(UpdateTSClassImplements, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSClassImplements1(KNativePointer context, KNativePointer expression) +{ + const auto _context = reinterpret_cast(context); + const auto _expression = reinterpret_cast(expression); + auto result = GetImpl()->CreateTSClassImplements1(_context, _expression); + return result; +} +KOALA_INTEROP_2(CreateTSClassImplements1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSClassImplements1(KNativePointer context, KNativePointer original, KNativePointer expression) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expression = reinterpret_cast(expression); + auto result = GetImpl()->UpdateTSClassImplements1(_context, _original, _expression); + return result; +} +KOALA_INTEROP_3(UpdateTSClassImplements1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSClassImplementsExpr(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSClassImplementsExpr(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSClassImplementsExpr, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSClassImplementsExprConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSClassImplementsExprConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSClassImplementsExprConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSClassImplementsTypeParametersConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSClassImplementsTypeParametersConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSClassImplementsTypeParametersConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSObjectKeyword(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSObjectKeyword(_context); + return result; +} +KOALA_INTEROP_1(CreateTSObjectKeyword, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSObjectKeyword(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSObjectKeyword(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSObjectKeyword, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSUnionType(KNativePointer context, KNativePointerArray types, KUInt typesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _types = reinterpret_cast(types); + const auto _typesSequenceLength = static_cast(typesSequenceLength); + auto result = GetImpl()->CreateETSUnionTypeIr(_context, _types, _typesSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateETSUnionType, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateETSUnionType(KNativePointer context, KNativePointer original, KNativePointerArray types, KUInt typesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _types = reinterpret_cast(types); + const auto _typesSequenceLength = static_cast(typesSequenceLength); + auto result = GetImpl()->UpdateETSUnionTypeIr(_context, _original, _types, _typesSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateETSUnionType, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_ETSUnionTypeTypesConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSUnionTypeIrTypesConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSUnionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSUnionTypeSetValueTypesConst(KNativePointer context, KNativePointer receiver, KNativePointer type, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _type = reinterpret_cast(type); + const auto _index = static_cast(index); + GetImpl()->ETSUnionTypeIrSetValueTypesConst(_context, _receiver, _type, _index); + return ; +} +KOALA_INTEROP_V4(ETSUnionTypeSetValueTypesConst, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_CreateETSKeyofType(KNativePointer context, KNativePointer type) +{ + const auto _context = reinterpret_cast(context); + const auto _type = reinterpret_cast(type); + auto result = GetImpl()->CreateETSKeyofType(_context, _type); + return result; +} +KOALA_INTEROP_2(CreateETSKeyofType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSKeyofType(KNativePointer context, KNativePointer original, KNativePointer type) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _type = reinterpret_cast(type); + auto result = GetImpl()->UpdateETSKeyofType(_context, _original, _type); + return result; +} +KOALA_INTEROP_3(UpdateETSKeyofType, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSKeyofTypeGetTypeRefConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSKeyofTypeGetTypeRefConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSKeyofTypeGetTypeRefConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSPropertySignature(KNativePointer context, KNativePointer key, KNativePointer typeAnnotation, KBoolean computed, KBoolean optional_arg, KBoolean readonly_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _key = reinterpret_cast(key); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _computed = static_cast(computed); + const auto _optional_arg = static_cast(optional_arg); + const auto _readonly_arg = static_cast(readonly_arg); + auto result = GetImpl()->CreateTSPropertySignature(_context, _key, _typeAnnotation, _computed, _optional_arg, _readonly_arg); + return result; +} +KOALA_INTEROP_6(CreateTSPropertySignature, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean, KBoolean, KBoolean); + +KNativePointer impl_UpdateTSPropertySignature(KNativePointer context, KNativePointer original, KNativePointer key, KNativePointer typeAnnotation, KBoolean computed, KBoolean optional_arg, KBoolean readonly_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _key = reinterpret_cast(key); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _computed = static_cast(computed); + const auto _optional_arg = static_cast(optional_arg); + const auto _readonly_arg = static_cast(readonly_arg); + auto result = GetImpl()->UpdateTSPropertySignature(_context, _original, _key, _typeAnnotation, _computed, _optional_arg, _readonly_arg); + return result; +} +KOALA_INTEROP_7(UpdateTSPropertySignature, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean, KBoolean, KBoolean); + +KNativePointer impl_TSPropertySignatureKeyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSPropertySignatureKeyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSPropertySignatureKeyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSPropertySignatureKey(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSPropertySignatureKey(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSPropertySignatureKey, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSPropertySignatureComputedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSPropertySignatureComputedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSPropertySignatureComputedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_TSPropertySignatureOptionalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSPropertySignatureOptionalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSPropertySignatureOptionalConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_TSPropertySignatureReadonlyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSPropertySignatureReadonlyConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSPropertySignatureReadonlyConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_TSPropertySignatureTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSPropertySignatureTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSPropertySignatureTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSPropertySignatureSetTsTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + GetImpl()->TSPropertySignatureSetTsTypeAnnotation(_context, _receiver, _typeAnnotation); + return ; +} +KOALA_INTEROP_V3(TSPropertySignatureSetTsTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSConditionalType(KNativePointer context, KNativePointer checkType, KNativePointer extendsType, KNativePointer trueType, KNativePointer falseType) +{ + const auto _context = reinterpret_cast(context); + const auto _checkType = reinterpret_cast(checkType); + const auto _extendsType = reinterpret_cast(extendsType); + const auto _trueType = reinterpret_cast(trueType); + const auto _falseType = reinterpret_cast(falseType); + auto result = GetImpl()->CreateTSConditionalType(_context, _checkType, _extendsType, _trueType, _falseType); + return result; +} +KOALA_INTEROP_5(CreateTSConditionalType, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSConditionalType(KNativePointer context, KNativePointer original, KNativePointer checkType, KNativePointer extendsType, KNativePointer trueType, KNativePointer falseType) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _checkType = reinterpret_cast(checkType); + const auto _extendsType = reinterpret_cast(extendsType); + const auto _trueType = reinterpret_cast(trueType); + const auto _falseType = reinterpret_cast(falseType); + auto result = GetImpl()->UpdateTSConditionalType(_context, _original, _checkType, _extendsType, _trueType, _falseType); + return result; +} +KOALA_INTEROP_6(UpdateTSConditionalType, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSConditionalTypeCheckTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSConditionalTypeCheckTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSConditionalTypeCheckTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSConditionalTypeExtendsTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSConditionalTypeExtendsTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSConditionalTypeExtendsTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSConditionalTypeTrueTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSConditionalTypeTrueTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSConditionalTypeTrueTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSConditionalTypeFalseTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSConditionalTypeFalseTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSConditionalTypeFalseTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSLiteralType(KNativePointer context, KNativePointer literal) +{ + const auto _context = reinterpret_cast(context); + const auto _literal = reinterpret_cast(literal); + auto result = GetImpl()->CreateTSLiteralType(_context, _literal); + return result; +} +KOALA_INTEROP_2(CreateTSLiteralType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSLiteralType(KNativePointer context, KNativePointer original, KNativePointer literal) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _literal = reinterpret_cast(literal); + auto result = GetImpl()->UpdateTSLiteralType(_context, _original, _literal); + return result; +} +KOALA_INTEROP_3(UpdateTSLiteralType, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSLiteralTypeLiteralConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSLiteralTypeLiteralConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSLiteralTypeLiteralConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSTypeAliasDeclaration(KNativePointer context, KNativePointer id, KNativePointer typeParams, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _id = reinterpret_cast(id); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + auto result = GetImpl()->CreateTSTypeAliasDeclaration(_context, _id, _typeParams, _typeAnnotation); + return result; +} +KOALA_INTEROP_4(CreateTSTypeAliasDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSTypeAliasDeclaration(KNativePointer context, KNativePointer original, KNativePointer id, KNativePointer typeParams, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _id = reinterpret_cast(id); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + auto result = GetImpl()->UpdateTSTypeAliasDeclaration(_context, _original, _id, _typeParams, _typeAnnotation); + return result; +} +KOALA_INTEROP_5(UpdateTSTypeAliasDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSTypeAliasDeclaration1(KNativePointer context, KNativePointer id) +{ + const auto _context = reinterpret_cast(context); + const auto _id = reinterpret_cast(id); + auto result = GetImpl()->CreateTSTypeAliasDeclaration1(_context, _id); + return result; +} +KOALA_INTEROP_2(CreateTSTypeAliasDeclaration1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSTypeAliasDeclaration1(KNativePointer context, KNativePointer original, KNativePointer id) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _id = reinterpret_cast(id); + auto result = GetImpl()->UpdateTSTypeAliasDeclaration1(_context, _original, _id); + return result; +} +KOALA_INTEROP_3(UpdateTSTypeAliasDeclaration1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeAliasDeclarationId(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeAliasDeclarationId(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSTypeAliasDeclarationId, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeAliasDeclarationIdConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeAliasDeclarationIdConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeAliasDeclarationIdConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeAliasDeclarationTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeAliasDeclarationTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeAliasDeclarationTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationSetTypeParameters(KNativePointer context, KNativePointer receiver, KNativePointer typeParams) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeParams = reinterpret_cast(typeParams); + GetImpl()->TSTypeAliasDeclarationSetTypeParameters(_context, _receiver, _typeParams); + return ; +} +KOALA_INTEROP_V3(TSTypeAliasDeclarationSetTypeParameters, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationClearTypeParamterTypes(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSTypeAliasDeclarationClearTypeParamterTypes(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSTypeAliasDeclarationClearTypeParamterTypes, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeAliasDeclarationTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeAliasDeclarationTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeAliasDeclarationTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationSetTsTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + GetImpl()->TSTypeAliasDeclarationSetTsTypeAnnotation(_context, _receiver, _typeAnnotation); + return ; +} +KOALA_INTEROP_V3(TSTypeAliasDeclarationSetTsTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSTypeAliasDeclarationHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeAliasDeclarationHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSTypeAliasDeclarationHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->TSTypeAliasDeclarationEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(TSTypeAliasDeclarationEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSTypeAliasDeclarationClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSTypeAliasDeclarationClearAnnotations, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->TSTypeAliasDeclarationDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(TSTypeAliasDeclarationDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeAliasDeclarationAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeAliasDeclarationAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeAliasDeclarationAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeAliasDeclarationAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeAliasDeclarationAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeAliasDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeAliasDeclarationAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeAliasDeclarationAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeAliasDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeAliasDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TSTypeAliasDeclarationSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TSTypeAliasDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_TSTypeAliasDeclarationSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TSTypeAliasDeclarationSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TSTypeAliasDeclarationSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateDebuggerStatement(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateDebuggerStatement(_context); + return result; +} +KOALA_INTEROP_1(CreateDebuggerStatement, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateDebuggerStatement(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateDebuggerStatement(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateDebuggerStatement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateReturnStatement(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateReturnStatement(_context); + return result; +} +KOALA_INTEROP_1(CreateReturnStatement, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateReturnStatement(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateReturnStatement(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateReturnStatement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateReturnStatement1(KNativePointer context, KNativePointer argument) +{ + const auto _context = reinterpret_cast(context); + const auto _argument = reinterpret_cast(argument); + auto result = GetImpl()->CreateReturnStatement1(_context, _argument); + return result; +} +KOALA_INTEROP_2(CreateReturnStatement1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateReturnStatement1(KNativePointer context, KNativePointer original, KNativePointer argument) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _argument = reinterpret_cast(argument); + auto result = GetImpl()->UpdateReturnStatement1(_context, _original, _argument); + return result; +} +KOALA_INTEROP_3(UpdateReturnStatement1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ReturnStatementArgument(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ReturnStatementArgument(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ReturnStatementArgument, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ReturnStatementArgumentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ReturnStatementArgumentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ReturnStatementArgumentConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ReturnStatementSetArgument(KNativePointer context, KNativePointer receiver, KNativePointer arg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _arg = reinterpret_cast(arg); + GetImpl()->ReturnStatementSetArgument(_context, _receiver, _arg); + return ; +} +KOALA_INTEROP_V3(ReturnStatementSetArgument, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ReturnStatementIsAsyncImplReturnConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ReturnStatementIsAsyncImplReturnConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ReturnStatementIsAsyncImplReturnConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateExportDefaultDeclaration(KNativePointer context, KNativePointer decl, KBoolean exportEquals) +{ + const auto _context = reinterpret_cast(context); + const auto _decl = reinterpret_cast(decl); + const auto _exportEquals = static_cast(exportEquals); + auto result = GetImpl()->CreateExportDefaultDeclaration(_context, _decl, _exportEquals); + return result; +} +KOALA_INTEROP_3(CreateExportDefaultDeclaration, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateExportDefaultDeclaration(KNativePointer context, KNativePointer original, KNativePointer decl, KBoolean exportEquals) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _decl = reinterpret_cast(decl); + const auto _exportEquals = static_cast(exportEquals); + auto result = GetImpl()->UpdateExportDefaultDeclaration(_context, _original, _decl, _exportEquals); + return result; +} +KOALA_INTEROP_4(UpdateExportDefaultDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_ExportDefaultDeclarationDecl(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportDefaultDeclarationDecl(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExportDefaultDeclarationDecl, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExportDefaultDeclarationDeclConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportDefaultDeclarationDeclConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExportDefaultDeclarationDeclConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ExportDefaultDeclarationIsExportEqualsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportDefaultDeclarationIsExportEqualsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExportDefaultDeclarationIsExportEqualsConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateScriptFunction(KNativePointer context, KNativePointer databody, KNativePointer datasignature, KInt datafuncFlags, KInt dataflags) +{ + const auto _context = reinterpret_cast(context); + const auto _databody = reinterpret_cast(databody); + const auto _datasignature = reinterpret_cast(datasignature); + const auto _datafuncFlags = static_cast(datafuncFlags); + const auto _dataflags = static_cast(dataflags); + auto result = GetImpl()->CreateScriptFunction(_context, _databody, _datasignature, _datafuncFlags, _dataflags); + return result; +} +KOALA_INTEROP_5(CreateScriptFunction, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt, KInt); + +KNativePointer impl_UpdateScriptFunction(KNativePointer context, KNativePointer original, KNativePointer databody, KNativePointer datasignature, KInt datafuncFlags, KInt dataflags) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _databody = reinterpret_cast(databody); + const auto _datasignature = reinterpret_cast(datasignature); + const auto _datafuncFlags = static_cast(datafuncFlags); + const auto _dataflags = static_cast(dataflags); + auto result = GetImpl()->UpdateScriptFunction(_context, _original, _databody, _datasignature, _datafuncFlags, _dataflags); + return result; +} +KOALA_INTEROP_6(UpdateScriptFunction, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt, KInt); + +KNativePointer impl_ScriptFunctionIdConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIdConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ScriptFunctionIdConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionId(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionId(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionId, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ScriptFunctionParamsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ScriptFunctionParams(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionReturnStatementsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ScriptFunctionReturnStatementsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionReturnStatementsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionReturnStatements(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ScriptFunctionReturnStatements(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionReturnStatements, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionReturnStatementsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ScriptFunctionReturnStatementsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionReturnStatementsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ScriptFunctionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionBodyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ScriptFunctionBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionBody(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionBody, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionAddReturnStatement(KNativePointer context, KNativePointer receiver, KNativePointer returnStatement) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _returnStatement = reinterpret_cast(returnStatement); + GetImpl()->ScriptFunctionAddReturnStatement(_context, _receiver, _returnStatement); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionAddReturnStatement, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionSetBody(KNativePointer context, KNativePointer receiver, KNativePointer body) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _body = reinterpret_cast(body); + GetImpl()->ScriptFunctionSetBody(_context, _receiver, _body); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionSetBody, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionReturnTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionReturnTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ScriptFunctionReturnTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionReturnTypeAnnotation(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionReturnTypeAnnotation(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionReturnTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionSetReturnTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer node) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _node = reinterpret_cast(node); + GetImpl()->ScriptFunctionSetReturnTypeAnnotation(_context, _receiver, _node); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionSetReturnTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsEntryPointConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsEntryPointConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsEntryPointConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsGeneratorConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsGeneratorConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsGeneratorConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsAsyncFuncConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsAsyncFuncConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsAsyncFuncConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsAsyncImplFuncConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsAsyncImplFuncConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsAsyncImplFuncConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsArrowConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsArrowConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsArrowConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsOverloadConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsOverloadConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsOverloadConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsExternalOverloadConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsExternalOverloadConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsExternalOverloadConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsConstructorConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsConstructorConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsConstructorConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsGetterConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsGetterConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsGetterConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsSetterConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsSetterConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsSetterConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsExtensionAccessorConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsExtensionAccessorConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsExtensionAccessorConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsMethodConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsMethodConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsProxyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsProxyConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsProxyConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsStaticBlockConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsStaticBlockConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsStaticBlockConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsEnumConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsEnumConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsEnumConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsHiddenConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsHiddenConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsHiddenConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsExternalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsExternalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsExternalConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsImplicitSuperCallNeededConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsImplicitSuperCallNeededConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsImplicitSuperCallNeededConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionHasBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionHasBodyConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionHasBodyConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionHasRestParameterConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionHasRestParameterConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionHasRestParameterConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionHasReturnStatementConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionHasReturnStatementConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionHasReturnStatementConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionHasThrowStatementConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionHasThrowStatementConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionHasThrowStatementConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsTrailingLambdaConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsTrailingLambdaConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsTrailingLambdaConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsSyntheticConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsSyntheticConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsSyntheticConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsDynamicConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsDynamicConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsDynamicConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionIsExtensionMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionIsExtensionMethodConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionIsExtensionMethodConst, KBoolean, KNativePointer, KNativePointer); + +KInt impl_ScriptFunctionFlagsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionFlagsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionFlagsConst, KInt, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionHasReceiverConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionHasReceiverConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionHasReceiverConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ScriptFunctionSetIdent(KNativePointer context, KNativePointer receiver, KNativePointer id) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _id = reinterpret_cast(id); + GetImpl()->ScriptFunctionSetIdent(_context, _receiver, _id); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionSetIdent, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionAddFlag(KNativePointer context, KNativePointer receiver, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _flags = static_cast(flags); + GetImpl()->ScriptFunctionAddFlag(_context, _receiver, _flags); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionAddFlag, KNativePointer, KNativePointer, KInt); + +void impl_ScriptFunctionClearFlag(KNativePointer context, KNativePointer receiver, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _flags = static_cast(flags); + GetImpl()->ScriptFunctionClearFlag(_context, _receiver, _flags); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionClearFlag, KNativePointer, KNativePointer, KInt); + +KUInt impl_ScriptFunctionFormalParamsLengthConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionFormalParamsLengthConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionFormalParamsLengthConst, KUInt, KNativePointer, KNativePointer); + +void impl_ScriptFunctionSetAsyncPairMethod(KNativePointer context, KNativePointer receiver, KNativePointer asyncPairFunction) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _asyncPairFunction = reinterpret_cast(asyncPairFunction); + GetImpl()->ScriptFunctionSetAsyncPairMethod(_context, _receiver, _asyncPairFunction); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionSetAsyncPairMethod, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionAsyncPairMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionAsyncPairMethodConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ScriptFunctionAsyncPairMethodConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionAsyncPairMethod(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionAsyncPairMethod(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionAsyncPairMethod, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionEmplaceReturnStatements(KNativePointer context, KNativePointer receiver, KNativePointer returnStatements) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _returnStatements = reinterpret_cast(returnStatements); + GetImpl()->ScriptFunctionEmplaceReturnStatements(_context, _receiver, _returnStatements); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionEmplaceReturnStatements, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionClearReturnStatements(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ScriptFunctionClearReturnStatements(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ScriptFunctionClearReturnStatements, KNativePointer, KNativePointer); + +void impl_ScriptFunctionSetValueReturnStatements(KNativePointer context, KNativePointer receiver, KNativePointer returnStatements, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _returnStatements = reinterpret_cast(returnStatements); + const auto _index = static_cast(index); + GetImpl()->ScriptFunctionSetValueReturnStatements(_context, _receiver, _returnStatements, _index); + return ; +} +KOALA_INTEROP_V4(ScriptFunctionSetValueReturnStatements, KNativePointer, KNativePointer, KNativePointer, KUInt); + +void impl_ScriptFunctionEmplaceParams(KNativePointer context, KNativePointer receiver, KNativePointer params) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _params = reinterpret_cast(params); + GetImpl()->ScriptFunctionEmplaceParams(_context, _receiver, _params); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionEmplaceParams, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionSetParams(KNativePointer context, KNativePointer receiver, KNativePointerArray paramsList, KUInt paramsListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _paramsList = reinterpret_cast(paramsList); + const auto _paramsListSequenceLength = static_cast(paramsListSequenceLength); + GetImpl()->ScriptFunctionSetParams(_context, _receiver, _paramsList, _paramsListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ScriptFunctionSetParams, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ScriptFunctionClearParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ScriptFunctionClearParams(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ScriptFunctionClearParams, KNativePointer, KNativePointer); + +void impl_ScriptFunctionSetValueParams(KNativePointer context, KNativePointer receiver, KNativePointer params, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _params = reinterpret_cast(params); + const auto _index = static_cast(index); + GetImpl()->ScriptFunctionSetValueParams(_context, _receiver, _params, _index); + return ; +} +KOALA_INTEROP_V4(ScriptFunctionSetValueParams, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ScriptFunctionParamsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ScriptFunctionParamsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionParamsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ScriptFunctionHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ScriptFunctionHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ScriptFunctionHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ScriptFunctionEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ScriptFunctionEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ScriptFunctionClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ScriptFunctionClearAnnotations, KNativePointer, KNativePointer); + +void impl_ScriptFunctionDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->ScriptFunctionDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(ScriptFunctionDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ScriptFunctionAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ScriptFunctionAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ScriptFunctionAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ScriptFunctionAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ScriptFunctionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ScriptFunctionSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ScriptFunctionSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ScriptFunctionSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ScriptFunctionSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ScriptFunctionSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ScriptFunctionSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateClassDefinition(KNativePointer context, KNativePointer ident, KNativePointer typeParams, KNativePointer superTypeParams, KNativePointerArray _implements, KUInt _implementsSequenceLength, KNativePointer ctor, KNativePointer superClass, KNativePointerArray body, KUInt bodySequenceLength, KInt modifiers, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _ident = reinterpret_cast(ident); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _superTypeParams = reinterpret_cast(superTypeParams); + const auto __implements = reinterpret_cast(_implements); + const auto __implementsSequenceLength = static_cast(_implementsSequenceLength); + const auto _ctor = reinterpret_cast(ctor); + const auto _superClass = reinterpret_cast(superClass); + const auto _body = reinterpret_cast(body); + const auto _bodySequenceLength = static_cast(bodySequenceLength); + const auto _modifiers = static_cast(modifiers); + const auto _flags = static_cast(flags); + auto result = GetImpl()->CreateClassDefinition(_context, _ident, _typeParams, _superTypeParams, __implements, __implementsSequenceLength, _ctor, _superClass, _body, _bodySequenceLength, _modifiers, _flags); + return result; +} +KOALA_INTEROP_12(CreateClassDefinition, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt, KInt); + +KNativePointer impl_UpdateClassDefinition(KNativePointer context, KNativePointer original, KNativePointer ident, KNativePointer typeParams, KNativePointer superTypeParams, KNativePointerArray _implements, KUInt _implementsSequenceLength, KNativePointer ctor, KNativePointer superClass, KNativePointerArray body, KUInt bodySequenceLength, KInt modifiers, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _ident = reinterpret_cast(ident); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _superTypeParams = reinterpret_cast(superTypeParams); + const auto __implements = reinterpret_cast(_implements); + const auto __implementsSequenceLength = static_cast(_implementsSequenceLength); + const auto _ctor = reinterpret_cast(ctor); + const auto _superClass = reinterpret_cast(superClass); + const auto _body = reinterpret_cast(body); + const auto _bodySequenceLength = static_cast(bodySequenceLength); + const auto _modifiers = static_cast(modifiers); + const auto _flags = static_cast(flags); + auto result = GetImpl()->UpdateClassDefinition(_context, _original, _ident, _typeParams, _superTypeParams, __implements, __implementsSequenceLength, _ctor, _superClass, _body, _bodySequenceLength, _modifiers, _flags); + return result; +} +KOALA_INTEROP_13(UpdateClassDefinition, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt, KInt); + +KNativePointer impl_CreateClassDefinition1(KNativePointer context, KNativePointer ident, KNativePointerArray body, KUInt bodySequenceLength, KInt modifiers, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _ident = reinterpret_cast(ident); + const auto _body = reinterpret_cast(body); + const auto _bodySequenceLength = static_cast(bodySequenceLength); + const auto _modifiers = static_cast(modifiers); + const auto _flags = static_cast(flags); + auto result = GetImpl()->CreateClassDefinition1(_context, _ident, _body, _bodySequenceLength, _modifiers, _flags); + return result; +} +KOALA_INTEROP_6(CreateClassDefinition1, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt, KInt); + +KNativePointer impl_UpdateClassDefinition1(KNativePointer context, KNativePointer original, KNativePointer ident, KNativePointerArray body, KUInt bodySequenceLength, KInt modifiers, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _ident = reinterpret_cast(ident); + const auto _body = reinterpret_cast(body); + const auto _bodySequenceLength = static_cast(bodySequenceLength); + const auto _modifiers = static_cast(modifiers); + const auto _flags = static_cast(flags); + auto result = GetImpl()->UpdateClassDefinition1(_context, _original, _ident, _body, _bodySequenceLength, _modifiers, _flags); + return result; +} +KOALA_INTEROP_7(UpdateClassDefinition1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt, KInt); + +KNativePointer impl_CreateClassDefinition2(KNativePointer context, KNativePointer ident, KInt modifiers, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _ident = reinterpret_cast(ident); + const auto _modifiers = static_cast(modifiers); + const auto _flags = static_cast(flags); + auto result = GetImpl()->CreateClassDefinition2(_context, _ident, _modifiers, _flags); + return result; +} +KOALA_INTEROP_4(CreateClassDefinition2, KNativePointer, KNativePointer, KNativePointer, KInt, KInt); + +KNativePointer impl_UpdateClassDefinition2(KNativePointer context, KNativePointer original, KNativePointer ident, KInt modifiers, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _ident = reinterpret_cast(ident); + const auto _modifiers = static_cast(modifiers); + const auto _flags = static_cast(flags); + auto result = GetImpl()->UpdateClassDefinition2(_context, _original, _ident, _modifiers, _flags); + return result; +} +KOALA_INTEROP_5(UpdateClassDefinition2, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt, KInt); + +KNativePointer impl_ClassDefinitionIdentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIdentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassDefinitionIdentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionIdent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIdent(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIdent, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetIdent(KNativePointer context, KNativePointer receiver, KNativePointer ident) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _ident = reinterpret_cast(ident); + GetImpl()->ClassDefinitionSetIdent(_context, _receiver, _ident); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetIdent, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionInternalNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionInternalNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ClassDefinitionInternalNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionSuper(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionSuper(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionSuper, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionSuperConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionSuperConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassDefinitionSuperConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetSuper(KNativePointer context, KNativePointer receiver, KNativePointer superClass) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _superClass = reinterpret_cast(superClass); + GetImpl()->ClassDefinitionSetSuper(_context, _receiver, _superClass); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetSuper, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsGlobalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsGlobalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsGlobalConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsLocalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsLocalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsLocalConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsExternConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsExternConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsExternConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsFromExternalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsFromExternalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsFromExternalConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsInnerConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsInnerConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsInnerConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsGlobalInitializedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsGlobalInitializedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsGlobalInitializedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsClassDefinitionCheckedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsClassDefinitionCheckedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsClassDefinitionCheckedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsAnonymousConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsAnonymousConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsAnonymousConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsIntEnumTransformedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsIntEnumTransformedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsIntEnumTransformedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsStringEnumTransformedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsStringEnumTransformedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsStringEnumTransformedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsEnumTransformedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsEnumTransformedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsEnumTransformedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsNamespaceTransformedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsNamespaceTransformedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsNamespaceTransformedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsLazyImportObjectClassConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsLazyImportObjectClassConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsLazyImportObjectClassConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsFromStructConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsFromStructConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsFromStructConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsInitInCctorConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsInitInCctorConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsInitInCctorConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionIsModuleConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionIsModuleConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionIsModuleConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetGlobalInitialized(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionSetGlobalInitialized(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionSetGlobalInitialized, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetInnerModifier(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionSetInnerModifier(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionSetInnerModifier, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetClassDefinitionChecked(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionSetClassDefinitionChecked(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionSetClassDefinitionChecked, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetAnonymousModifier(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionSetAnonymousModifier(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionSetAnonymousModifier, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetNamespaceTransformed(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionSetNamespaceTransformed(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionSetNamespaceTransformed, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetLazyImportObjectClass(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionSetLazyImportObjectClass(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionSetLazyImportObjectClass, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetFromStructModifier(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionSetFromStructModifier(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionSetFromStructModifier, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetInitInCctor(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionSetInitInCctor(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionSetInitInCctor, KNativePointer, KNativePointer); + +KInt impl_ClassDefinitionModifiersConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionModifiersConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionModifiersConst, KInt, KNativePointer, KNativePointer); + +void impl_ClassDefinitionAddProperties(KNativePointer context, KNativePointer receiver, KNativePointerArray body, KUInt bodySequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _body = reinterpret_cast(body); + const auto _bodySequenceLength = static_cast(bodySequenceLength); + GetImpl()->ClassDefinitionAddProperties(_context, _receiver, _body, _bodySequenceLength); + return ; +} +KOALA_INTEROP_V4(ClassDefinitionAddProperties, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_ClassDefinitionBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionBodyConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDefinitionBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionCtor(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionCtor(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionCtor, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionImplementsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionImplementsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDefinitionImplementsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassDefinitionTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionSuperTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionSuperTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassDefinitionSuperTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionSuperTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionSuperTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionSuperTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_ClassDefinitionLocalTypeCounter(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionLocalTypeCounter(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionLocalTypeCounter, KInt, KNativePointer, KNativePointer); + +KInt impl_ClassDefinitionLocalIndexConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionLocalIndexConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionLocalIndexConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionFunctionalReferenceReferencedMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionFunctionalReferenceReferencedMethodConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassDefinitionFunctionalReferenceReferencedMethodConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetFunctionalReferenceReferencedMethod(KNativePointer context, KNativePointer receiver, KNativePointer functionalReferenceReferencedMethod) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _functionalReferenceReferencedMethod = reinterpret_cast(functionalReferenceReferencedMethod); + GetImpl()->ClassDefinitionSetFunctionalReferenceReferencedMethod(_context, _receiver, _functionalReferenceReferencedMethod); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetFunctionalReferenceReferencedMethod, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionLocalPrefixConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionLocalPrefixConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ClassDefinitionLocalPrefixConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionOrigEnumDeclConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionOrigEnumDeclConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassDefinitionOrigEnumDeclConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionGetAnonClass(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionGetAnonClass(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionGetAnonClass, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionCtorConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionCtorConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassDefinitionCtorConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionHasPrivateMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionHasPrivateMethodConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionHasPrivateMethodConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionHasNativeMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionHasNativeMethodConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionHasNativeMethodConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionHasComputedInstanceFieldConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionHasComputedInstanceFieldConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionHasComputedInstanceFieldConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ClassDefinitionHasMatchingPrivateKeyConst(KNativePointer context, KNativePointer receiver, KStringPtr& name) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _name = getStringCopy(name); + auto result = GetImpl()->ClassDefinitionHasMatchingPrivateKeyConst(_context, _receiver, _name); + return result; +} +KOALA_INTEROP_3(ClassDefinitionHasMatchingPrivateKeyConst, KBoolean, KNativePointer, KNativePointer, KStringPtr); + +void impl_ClassDefinitionAddToExportedClasses(KNativePointer context, KNativePointer receiver, KNativePointer cls) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _cls = reinterpret_cast(cls); + GetImpl()->ClassDefinitionAddToExportedClasses(_context, _receiver, _cls); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionAddToExportedClasses, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetModifiers(KNativePointer context, KNativePointer receiver, KInt modifiers) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _modifiers = static_cast(modifiers); + GetImpl()->ClassDefinitionSetModifiers(_context, _receiver, _modifiers); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetModifiers, KNativePointer, KNativePointer, KInt); + +void impl_ClassDefinitionEmplaceBody(KNativePointer context, KNativePointer receiver, KNativePointer body) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _body = reinterpret_cast(body); + GetImpl()->ClassDefinitionEmplaceBody(_context, _receiver, _body); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionEmplaceBody, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionClearBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionClearBody(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionClearBody, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetValueBody(KNativePointer context, KNativePointer receiver, KNativePointer body, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _body = reinterpret_cast(body); + const auto _index = static_cast(index); + GetImpl()->ClassDefinitionSetValueBody(_context, _receiver, _body, _index); + return ; +} +KOALA_INTEROP_V4(ClassDefinitionSetValueBody, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ClassDefinitionBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionBody(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDefinitionBody, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionBodyForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionBodyForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDefinitionBodyForUpdate, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionEmplaceImplements(KNativePointer context, KNativePointer receiver, KNativePointer _implements) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto __implements = reinterpret_cast(_implements); + GetImpl()->ClassDefinitionEmplaceImplements(_context, _receiver, __implements); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionEmplaceImplements, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionClearImplements(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionClearImplements(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionClearImplements, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetValueImplements(KNativePointer context, KNativePointer receiver, KNativePointer _implements, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto __implements = reinterpret_cast(_implements); + const auto _index = static_cast(index); + GetImpl()->ClassDefinitionSetValueImplements(_context, _receiver, __implements, _index); + return ; +} +KOALA_INTEROP_V4(ClassDefinitionSetValueImplements, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ClassDefinitionImplements(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionImplements(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDefinitionImplements, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionImplementsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionImplementsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDefinitionImplementsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetCtor(KNativePointer context, KNativePointer receiver, KNativePointer ctor) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _ctor = reinterpret_cast(ctor); + GetImpl()->ClassDefinitionSetCtor(_context, _receiver, _ctor); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetCtor, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetTypeParams(KNativePointer context, KNativePointer receiver, KNativePointer typeParams) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeParams = reinterpret_cast(typeParams); + GetImpl()->ClassDefinitionSetTypeParams(_context, _receiver, _typeParams); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetTypeParams, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetOrigEnumDecl(KNativePointer context, KNativePointer receiver, KNativePointer origEnumDecl) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _origEnumDecl = reinterpret_cast(origEnumDecl); + GetImpl()->ClassDefinitionSetOrigEnumDecl(_context, _receiver, _origEnumDecl); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetOrigEnumDecl, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetAnonClass(KNativePointer context, KNativePointer receiver, KNativePointer anonClass) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _anonClass = reinterpret_cast(anonClass); + GetImpl()->ClassDefinitionSetAnonClass(_context, _receiver, _anonClass); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetAnonClass, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetInternalName(KNativePointer context, KNativePointer receiver, KStringPtr& internalName) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _internalName = getStringCopy(internalName); + GetImpl()->ClassDefinitionSetInternalName(_context, _receiver, _internalName); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionSetInternalName, KNativePointer, KNativePointer, KStringPtr); + +KBoolean impl_ClassDefinitionHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDefinitionHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDefinitionHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ClassDefinitionEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ClassDefinitionEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ClassDefinitionClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ClassDefinitionClearAnnotations, KNativePointer, KNativePointer); + +void impl_ClassDefinitionDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->ClassDefinitionDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(ClassDefinitionDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDefinitionAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDefinitionAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDefinitionAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ClassDefinitionAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ClassDefinitionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDefinitionSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ClassDefinitionSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ClassDefinitionSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ClassDefinitionSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ClassDefinitionSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ClassDefinitionSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateArrayExpression(KNativePointer context, KNativePointerArray elements, KUInt elementsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _elements = reinterpret_cast(elements); + const auto _elementsSequenceLength = static_cast(elementsSequenceLength); + auto result = GetImpl()->CreateArrayExpression(_context, _elements, _elementsSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateArrayExpression, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateArrayExpression(KNativePointer context, KNativePointer original, KNativePointerArray elements, KUInt elementsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _elements = reinterpret_cast(elements); + const auto _elementsSequenceLength = static_cast(elementsSequenceLength); + auto result = GetImpl()->UpdateArrayExpression(_context, _original, _elements, _elementsSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateArrayExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateArrayExpression1(KNativePointer context, KInt nodeType, KNativePointerArray elements, KUInt elementsSequenceLength, KBoolean trailingComma) +{ + const auto _context = reinterpret_cast(context); + const auto _nodeType = static_cast(nodeType); + const auto _elements = reinterpret_cast(elements); + const auto _elementsSequenceLength = static_cast(elementsSequenceLength); + const auto _trailingComma = static_cast(trailingComma); + auto result = GetImpl()->CreateArrayExpression1(_context, _nodeType, _elements, _elementsSequenceLength, _trailingComma); + return result; +} +KOALA_INTEROP_5(CreateArrayExpression1, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KBoolean); + +KNativePointer impl_UpdateArrayExpression1(KNativePointer context, KNativePointer original, KInt nodeType, KNativePointerArray elements, KUInt elementsSequenceLength, KBoolean trailingComma) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _nodeType = static_cast(nodeType); + const auto _elements = reinterpret_cast(elements); + const auto _elementsSequenceLength = static_cast(elementsSequenceLength); + const auto _trailingComma = static_cast(trailingComma); + auto result = GetImpl()->UpdateArrayExpression1(_context, _original, _nodeType, _elements, _elementsSequenceLength, _trailingComma); + return result; +} +KOALA_INTEROP_6(UpdateArrayExpression1, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt, KBoolean); + +KNativePointer impl_ArrayExpressionGetElementNodeAtIdxConst(KNativePointer context, KNativePointer receiver, KUInt idx) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _idx = static_cast(idx); + auto result = GetImpl()->ArrayExpressionGetElementNodeAtIdxConst(_context, _receiver, _idx); + return (void*)result; +} +KOALA_INTEROP_3(ArrayExpressionGetElementNodeAtIdxConst, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ArrayExpressionElementsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ArrayExpressionElementsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ArrayExpressionElementsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ArrayExpressionElements(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ArrayExpressionElements(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ArrayExpressionElements, KNativePointer, KNativePointer, KNativePointer); + +void impl_ArrayExpressionSetElements(KNativePointer context, KNativePointer receiver, KNativePointerArray elements, KUInt elementsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _elements = reinterpret_cast(elements); + const auto _elementsSequenceLength = static_cast(elementsSequenceLength); + GetImpl()->ArrayExpressionSetElements(_context, _receiver, _elements, _elementsSequenceLength); + return ; +} +KOALA_INTEROP_V4(ArrayExpressionSetElements, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KBoolean impl_ArrayExpressionIsDeclarationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArrayExpressionIsDeclarationConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ArrayExpressionIsDeclarationConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ArrayExpressionIsOptionalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArrayExpressionIsOptionalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ArrayExpressionIsOptionalConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ArrayExpressionSetDeclaration(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ArrayExpressionSetDeclaration(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ArrayExpressionSetDeclaration, KNativePointer, KNativePointer); + +void impl_ArrayExpressionSetOptional(KNativePointer context, KNativePointer receiver, KBoolean optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _optional_arg = static_cast(optional_arg); + GetImpl()->ArrayExpressionSetOptional(_context, _receiver, _optional_arg); + return ; +} +KOALA_INTEROP_V3(ArrayExpressionSetOptional, KNativePointer, KNativePointer, KBoolean); + +void impl_ArrayExpressionClearPreferredType(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ArrayExpressionClearPreferredType(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ArrayExpressionClearPreferredType, KNativePointer, KNativePointer); + +KBoolean impl_ArrayExpressionConvertibleToArrayPattern(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArrayExpressionConvertibleToArrayPattern(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ArrayExpressionConvertibleToArrayPattern, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_ArrayExpressionValidateExpression(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArrayExpressionValidateExpression(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ArrayExpressionValidateExpression, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ArrayExpressionTrySetPreferredTypeForNestedArrayExprConst(KNativePointer context, KNativePointer receiver, KNativePointer nestedArrayExpr, KUInt idx) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _nestedArrayExpr = reinterpret_cast(nestedArrayExpr); + const auto _idx = static_cast(idx); + auto result = GetImpl()->ArrayExpressionTrySetPreferredTypeForNestedArrayExprConst(_context, _receiver, _nestedArrayExpr, _idx); + return result; +} +KOALA_INTEROP_4(ArrayExpressionTrySetPreferredTypeForNestedArrayExprConst, KBoolean, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ArrayExpressionTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArrayExpressionTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ArrayExpressionTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ArrayExpressionSetTsTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + GetImpl()->ArrayExpressionSetTsTypeAnnotation(_context, _receiver, _typeAnnotation); + return ; +} +KOALA_INTEROP_V3(ArrayExpressionSetTsTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSInterfaceBody(KNativePointer context, KNativePointerArray body, KUInt bodySequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _body = reinterpret_cast(body); + const auto _bodySequenceLength = static_cast(bodySequenceLength); + auto result = GetImpl()->CreateTSInterfaceBody(_context, _body, _bodySequenceLength); + return result; +} +KOALA_INTEROP_3(CreateTSInterfaceBody, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateTSInterfaceBody(KNativePointer context, KNativePointer original, KNativePointerArray body, KUInt bodySequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _body = reinterpret_cast(body); + const auto _bodySequenceLength = static_cast(bodySequenceLength); + auto result = GetImpl()->UpdateTSInterfaceBody(_context, _original, _body, _bodySequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateTSInterfaceBody, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_TSInterfaceBodyBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceBodyBody(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSInterfaceBodyBody, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceBodyBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSInterfaceBodyBodyConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSInterfaceBodyBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSTypeQuery(KNativePointer context, KNativePointer exprName) +{ + const auto _context = reinterpret_cast(context); + const auto _exprName = reinterpret_cast(exprName); + auto result = GetImpl()->CreateTSTypeQuery(_context, _exprName); + return result; +} +KOALA_INTEROP_2(CreateTSTypeQuery, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSTypeQuery(KNativePointer context, KNativePointer original, KNativePointer exprName) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _exprName = reinterpret_cast(exprName); + auto result = GetImpl()->UpdateTSTypeQuery(_context, _original, _exprName); + return result; +} +KOALA_INTEROP_3(UpdateTSTypeQuery, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeQueryExprNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeQueryExprNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeQueryExprNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSBigintKeyword(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSBigintKeyword(_context); + return result; +} +KOALA_INTEROP_1(CreateTSBigintKeyword, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSBigintKeyword(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSBigintKeyword(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSBigintKeyword, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateProperty(KNativePointer context, KNativePointer key, KNativePointer value) +{ + const auto _context = reinterpret_cast(context); + const auto _key = reinterpret_cast(key); + const auto _value = reinterpret_cast(value); + auto result = GetImpl()->CreateProperty(_context, _key, _value); + return result; +} +KOALA_INTEROP_3(CreateProperty, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateProperty(KNativePointer context, KNativePointer original, KNativePointer key, KNativePointer value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _key = reinterpret_cast(key); + const auto _value = reinterpret_cast(value); + auto result = GetImpl()->UpdateProperty(_context, _original, _key, _value); + return result; +} +KOALA_INTEROP_4(UpdateProperty, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateProperty1(KNativePointer context, KInt kind, KNativePointer key, KNativePointer value, KBoolean isMethod, KBoolean isComputed) +{ + const auto _context = reinterpret_cast(context); + const auto _kind = static_cast(kind); + const auto _key = reinterpret_cast(key); + const auto _value = reinterpret_cast(value); + const auto _isMethod = static_cast(isMethod); + const auto _isComputed = static_cast(isComputed); + auto result = GetImpl()->CreateProperty1(_context, _kind, _key, _value, _isMethod, _isComputed); + return result; +} +KOALA_INTEROP_6(CreateProperty1, KNativePointer, KNativePointer, KInt, KNativePointer, KNativePointer, KBoolean, KBoolean); + +KNativePointer impl_UpdateProperty1(KNativePointer context, KNativePointer original, KInt kind, KNativePointer key, KNativePointer value, KBoolean isMethod, KBoolean isComputed) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _kind = static_cast(kind); + const auto _key = reinterpret_cast(key); + const auto _value = reinterpret_cast(value); + const auto _isMethod = static_cast(isMethod); + const auto _isComputed = static_cast(isComputed); + auto result = GetImpl()->UpdateProperty1(_context, _original, _kind, _key, _value, _isMethod, _isComputed); + return result; +} +KOALA_INTEROP_7(UpdateProperty1, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointer, KNativePointer, KBoolean, KBoolean); + +KNativePointer impl_PropertyKey(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PropertyKey(_context, _receiver); + return result; +} +KOALA_INTEROP_2(PropertyKey, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_PropertyKeyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PropertyKeyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(PropertyKeyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_PropertyValueConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PropertyValueConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(PropertyValueConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_PropertyValue(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PropertyValue(_context, _receiver); + return result; +} +KOALA_INTEROP_2(PropertyValue, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_PropertyKindConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PropertyKindConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(PropertyKindConst, KInt, KNativePointer, KNativePointer); + +KBoolean impl_PropertyIsMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PropertyIsMethodConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(PropertyIsMethodConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_PropertyIsShorthandConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PropertyIsShorthandConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(PropertyIsShorthandConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_PropertyIsComputedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PropertyIsComputedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(PropertyIsComputedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_PropertyIsAccessorConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PropertyIsAccessorConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(PropertyIsAccessorConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_PropertyIsAccessorKind(KNativePointer context, KNativePointer receiver, KInt kind) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _kind = static_cast(kind); + auto result = GetImpl()->PropertyIsAccessorKind(_context, _receiver, _kind); + return result; +} +KOALA_INTEROP_3(PropertyIsAccessorKind, KBoolean, KNativePointer, KNativePointer, KInt); + +KBoolean impl_PropertyConvertibleToPatternProperty(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PropertyConvertibleToPatternProperty(_context, _receiver); + return result; +} +KOALA_INTEROP_2(PropertyConvertibleToPatternProperty, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_PropertyValidateExpression(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PropertyValidateExpression(_context, _receiver); + return result; +} +KOALA_INTEROP_2(PropertyValidateExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateVariableDeclarator(KNativePointer context, KInt flag, KNativePointer ident) +{ + const auto _context = reinterpret_cast(context); + const auto _flag = static_cast(flag); + const auto _ident = reinterpret_cast(ident); + auto result = GetImpl()->CreateVariableDeclarator(_context, _flag, _ident); + return result; +} +KOALA_INTEROP_3(CreateVariableDeclarator, KNativePointer, KNativePointer, KInt, KNativePointer); + +KNativePointer impl_UpdateVariableDeclarator(KNativePointer context, KNativePointer original, KInt flag, KNativePointer ident) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _flag = static_cast(flag); + const auto _ident = reinterpret_cast(ident); + auto result = GetImpl()->UpdateVariableDeclarator(_context, _original, _flag, _ident); + return result; +} +KOALA_INTEROP_4(UpdateVariableDeclarator, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointer); + +KNativePointer impl_CreateVariableDeclarator1(KNativePointer context, KInt flag, KNativePointer ident, KNativePointer init) +{ + const auto _context = reinterpret_cast(context); + const auto _flag = static_cast(flag); + const auto _ident = reinterpret_cast(ident); + const auto _init = reinterpret_cast(init); + auto result = GetImpl()->CreateVariableDeclarator1(_context, _flag, _ident, _init); + return result; +} +KOALA_INTEROP_4(CreateVariableDeclarator1, KNativePointer, KNativePointer, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateVariableDeclarator1(KNativePointer context, KNativePointer original, KInt flag, KNativePointer ident, KNativePointer init) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _flag = static_cast(flag); + const auto _ident = reinterpret_cast(ident); + const auto _init = reinterpret_cast(init); + auto result = GetImpl()->UpdateVariableDeclarator1(_context, _original, _flag, _ident, _init); + return result; +} +KOALA_INTEROP_5(UpdateVariableDeclarator1, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclaratorInit(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->VariableDeclaratorInit(_context, _receiver); + return result; +} +KOALA_INTEROP_2(VariableDeclaratorInit, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclaratorInitConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->VariableDeclaratorInitConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(VariableDeclaratorInitConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_VariableDeclaratorSetInit(KNativePointer context, KNativePointer receiver, KNativePointer init) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _init = reinterpret_cast(init); + GetImpl()->VariableDeclaratorSetInit(_context, _receiver, _init); + return ; +} +KOALA_INTEROP_V3(VariableDeclaratorSetInit, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclaratorId(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->VariableDeclaratorId(_context, _receiver); + return result; +} +KOALA_INTEROP_2(VariableDeclaratorId, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_VariableDeclaratorIdConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->VariableDeclaratorIdConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(VariableDeclaratorIdConst, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_VariableDeclaratorFlag(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->VariableDeclaratorFlag(_context, _receiver); + return result; +} +KOALA_INTEROP_2(VariableDeclaratorFlag, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_CreateStringLiteral(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateStringLiteral(_context); + return result; +} +KOALA_INTEROP_1(CreateStringLiteral, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateStringLiteral(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateStringLiteral(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateStringLiteral, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateStringLiteral1(KNativePointer context, KStringPtr& str) +{ + const auto _context = reinterpret_cast(context); + const auto _str = getStringCopy(str); + auto result = GetImpl()->CreateStringLiteral1(_context, _str); + return result; +} +KOALA_INTEROP_2(CreateStringLiteral1, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_UpdateStringLiteral1(KNativePointer context, KNativePointer original, KStringPtr& str) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _str = getStringCopy(str); + auto result = GetImpl()->UpdateStringLiteral1(_context, _original, _str); + return result; +} +KOALA_INTEROP_3(UpdateStringLiteral1, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_StringLiteralStrConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->StringLiteralStrConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(StringLiteralStrConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSTypeAssertion(KNativePointer context, KNativePointer typeAnnotation, KNativePointer expression) +{ + const auto _context = reinterpret_cast(context); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _expression = reinterpret_cast(expression); + auto result = GetImpl()->CreateTSTypeAssertion(_context, _typeAnnotation, _expression); + return result; +} +KOALA_INTEROP_3(CreateTSTypeAssertion, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSTypeAssertion(KNativePointer context, KNativePointer original, KNativePointer typeAnnotation, KNativePointer expression) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _expression = reinterpret_cast(expression); + auto result = GetImpl()->UpdateTSTypeAssertion(_context, _original, _typeAnnotation, _expression); + return result; +} +KOALA_INTEROP_4(UpdateTSTypeAssertion, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeAssertionGetExpressionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeAssertionGetExpressionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeAssertionGetExpressionConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeAssertionTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeAssertionTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeAssertionTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeAssertionSetTsTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + GetImpl()->TSTypeAssertionSetTsTypeAnnotation(_context, _receiver, _typeAnnotation); + return ; +} +KOALA_INTEROP_V3(TSTypeAssertionSetTsTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSExternalModuleReference(KNativePointer context, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->CreateTSExternalModuleReference(_context, _expr); + return result; +} +KOALA_INTEROP_2(CreateTSExternalModuleReference, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSExternalModuleReference(KNativePointer context, KNativePointer original, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->UpdateTSExternalModuleReference(_context, _original, _expr); + return result; +} +KOALA_INTEROP_3(UpdateTSExternalModuleReference, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSExternalModuleReferenceExprConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSExternalModuleReferenceExprConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSExternalModuleReferenceExprConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSUndefinedKeyword(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSUndefinedKeyword(_context); + return result; +} +KOALA_INTEROP_1(CreateTSUndefinedKeyword, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSUndefinedKeyword(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSUndefinedKeyword(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSUndefinedKeyword, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSTuple(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateETSTuple(_context); + return result; +} +KOALA_INTEROP_1(CreateETSTuple, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSTuple(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateETSTuple(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateETSTuple, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSTuple1(KNativePointer context, KUInt size) +{ + const auto _context = reinterpret_cast(context); + const auto _size = static_cast(size); + auto result = GetImpl()->CreateETSTuple1(_context, _size); + return result; +} +KOALA_INTEROP_2(CreateETSTuple1, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_UpdateETSTuple1(KNativePointer context, KNativePointer original, KUInt size) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _size = static_cast(size); + auto result = GetImpl()->UpdateETSTuple1(_context, _original, _size); + return result; +} +KOALA_INTEROP_3(UpdateETSTuple1, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_CreateETSTuple2(KNativePointer context, KNativePointerArray typeList, KUInt typeListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _typeList = reinterpret_cast(typeList); + const auto _typeListSequenceLength = static_cast(typeListSequenceLength); + auto result = GetImpl()->CreateETSTuple2(_context, _typeList, _typeListSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateETSTuple2, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateETSTuple2(KNativePointer context, KNativePointer original, KNativePointerArray typeList, KUInt typeListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _typeList = reinterpret_cast(typeList); + const auto _typeListSequenceLength = static_cast(typeListSequenceLength); + auto result = GetImpl()->UpdateETSTuple2(_context, _original, _typeList, _typeListSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateETSTuple2, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KUInt impl_ETSTupleGetTupleSizeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTupleGetTupleSizeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSTupleGetTupleSizeConst, KUInt, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTupleGetTupleTypeAnnotationsList(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSTupleGetTupleTypeAnnotationsList(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSTupleGetTupleTypeAnnotationsList, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTupleGetTupleTypeAnnotationsListConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSTupleGetTupleTypeAnnotationsListConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSTupleGetTupleTypeAnnotationsListConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSTupleSetTypeAnnotationsList(KNativePointer context, KNativePointer receiver, KNativePointerArray typeNodeList, KUInt typeNodeListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeNodeList = reinterpret_cast(typeNodeList); + const auto _typeNodeListSequenceLength = static_cast(typeNodeListSequenceLength); + GetImpl()->ETSTupleSetTypeAnnotationsList(_context, _receiver, _typeNodeList, _typeNodeListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ETSTupleSetTypeAnnotationsList, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateETSStringLiteralType(KNativePointer context, KStringPtr& value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = getStringCopy(value); + auto result = GetImpl()->CreateETSStringLiteralType(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateETSStringLiteralType, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_UpdateETSStringLiteralType(KNativePointer context, KNativePointer original, KStringPtr& value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = getStringCopy(value); + auto result = GetImpl()->UpdateETSStringLiteralType(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateETSStringLiteralType, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_CreateTryStatement(KNativePointer context, KNativePointer block, KNativePointerArray catchClauses, KUInt catchClausesSequenceLength, KNativePointer finalizer, KNativePointerArray finalizerInsertionsLabelPair, KUInt finalizerInsertionsLabelPairSequenceLength, KNativePointerArray finalizerInsertionsStatement, KUInt finalizerInsertionsStatementSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _block = reinterpret_cast(block); + const auto _catchClauses = reinterpret_cast(catchClauses); + const auto _catchClausesSequenceLength = static_cast(catchClausesSequenceLength); + const auto _finalizer = reinterpret_cast(finalizer); + const auto _finalizerInsertionsLabelPair = reinterpret_cast(finalizerInsertionsLabelPair); + const auto _finalizerInsertionsLabelPairSequenceLength = static_cast(finalizerInsertionsLabelPairSequenceLength); + const auto _finalizerInsertionsStatement = reinterpret_cast(finalizerInsertionsStatement); + const auto _finalizerInsertionsStatementSequenceLength = static_cast(finalizerInsertionsStatementSequenceLength); + auto result = GetImpl()->CreateTryStatement(_context, _block, _catchClauses, _catchClausesSequenceLength, _finalizer, _finalizerInsertionsLabelPair, _finalizerInsertionsLabelPairSequenceLength, _finalizerInsertionsStatement, _finalizerInsertionsStatementSequenceLength); + return result; +} +KOALA_INTEROP_9(CreateTryStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KNativePointerArray, KUInt, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateTryStatement(KNativePointer context, KNativePointer original, KNativePointer block, KNativePointerArray catchClauses, KUInt catchClausesSequenceLength, KNativePointer finalizer, KNativePointerArray finalizerInsertionsLabelPair, KUInt finalizerInsertionsLabelPairSequenceLength, KNativePointerArray finalizerInsertionsStatement, KUInt finalizerInsertionsStatementSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _block = reinterpret_cast(block); + const auto _catchClauses = reinterpret_cast(catchClauses); + const auto _catchClausesSequenceLength = static_cast(catchClausesSequenceLength); + const auto _finalizer = reinterpret_cast(finalizer); + const auto _finalizerInsertionsLabelPair = reinterpret_cast(finalizerInsertionsLabelPair); + const auto _finalizerInsertionsLabelPairSequenceLength = static_cast(finalizerInsertionsLabelPairSequenceLength); + const auto _finalizerInsertionsStatement = reinterpret_cast(finalizerInsertionsStatement); + const auto _finalizerInsertionsStatementSequenceLength = static_cast(finalizerInsertionsStatementSequenceLength); + auto result = GetImpl()->UpdateTryStatement(_context, _original, _block, _catchClauses, _catchClausesSequenceLength, _finalizer, _finalizerInsertionsLabelPair, _finalizerInsertionsLabelPairSequenceLength, _finalizerInsertionsStatement, _finalizerInsertionsStatementSequenceLength); + return result; +} +KOALA_INTEROP_10(UpdateTryStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KNativePointerArray, KUInt, KNativePointerArray, KUInt); + +KNativePointer impl_CreateTryStatement1(KNativePointer context, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->CreateTryStatement1(_context, _other); + return result; +} +KOALA_INTEROP_2(CreateTryStatement1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTryStatement1(KNativePointer context, KNativePointer original, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->UpdateTryStatement1(_context, _original, _other); + return result; +} +KOALA_INTEROP_3(UpdateTryStatement1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TryStatementFinallyBlockConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TryStatementFinallyBlockConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TryStatementFinallyBlockConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TryStatementBlockConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TryStatementBlockConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TryStatementBlockConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TryStatementHasFinalizerConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TryStatementHasFinalizerConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TryStatementHasFinalizerConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_TryStatementHasDefaultCatchClauseConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TryStatementHasDefaultCatchClauseConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TryStatementHasDefaultCatchClauseConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_TryStatementCatchClausesConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TryStatementCatchClausesConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TryStatementCatchClausesConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TryStatementFinallyCanCompleteNormallyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TryStatementFinallyCanCompleteNormallyConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TryStatementFinallyCanCompleteNormallyConst, KBoolean, KNativePointer, KNativePointer); + +void impl_TryStatementSetFinallyCanCompleteNormally(KNativePointer context, KNativePointer receiver, KBoolean finallyCanCompleteNormally) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _finallyCanCompleteNormally = static_cast(finallyCanCompleteNormally); + GetImpl()->TryStatementSetFinallyCanCompleteNormally(_context, _receiver, _finallyCanCompleteNormally); + return ; +} +KOALA_INTEROP_V3(TryStatementSetFinallyCanCompleteNormally, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_AstNodeIsProgramConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsProgramConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsProgramConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsStatementConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsStatementConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsStatementConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsExpressionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsExpressionConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsExpressionConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsTypedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsTypedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsTypedConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeAsTyped(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeAsTyped(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeAsTyped, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeAsTypedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeAsTypedConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeAsTypedConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsBrokenStatementConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsBrokenStatementConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsBrokenStatementConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeAsExpression(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeAsExpression(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeAsExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeAsExpressionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeAsExpressionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeAsExpressionConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeAsStatement(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeAsStatement(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeAsStatement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeAsStatementConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeAsStatementConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeAsStatementConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeSetRange(KNativePointer context, KNativePointer receiver, KNativePointer loc) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _loc = reinterpret_cast(loc); + GetImpl()->AstNodeSetRange(_context, _receiver, _loc); + return ; +} +KOALA_INTEROP_V3(AstNodeSetRange, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeSetProgram(KNativePointer context, KNativePointer receiver, KNativePointer program) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _program = reinterpret_cast(program); + GetImpl()->AstNodeSetProgram(_context, _receiver, _program); + return ; +} +KOALA_INTEROP_V3(AstNodeSetProgram, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeSetStart(KNativePointer context, KNativePointer receiver, KNativePointer start) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _start = reinterpret_cast(start); + GetImpl()->AstNodeSetStart(_context, _receiver, _start); + return ; +} +KOALA_INTEROP_V3(AstNodeSetStart, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeSetEnd(KNativePointer context, KNativePointer receiver, KNativePointer end) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _end = reinterpret_cast(end); + GetImpl()->AstNodeSetEnd(_context, _receiver, _end); + return ; +} +KOALA_INTEROP_V3(AstNodeSetEnd, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeProgramConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeProgramConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeProgramConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeStartConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeStartConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeStartConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeEndConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeEndConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeEndConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeRangeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeRangeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeRangeConst, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_AstNodeTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeTypeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeTypeConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeParent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeParent(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeParent, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeParentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeParentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeParentConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeSetParent(KNativePointer context, KNativePointer receiver, KNativePointer parent) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _parent = reinterpret_cast(parent); + GetImpl()->AstNodeSetParent(_context, _receiver, _parent); + return ; +} +KOALA_INTEROP_V3(AstNodeSetParent, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeDecoratorsPtrConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AstNodeDecoratorsPtrConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AstNodeDecoratorsPtrConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeAddDecorators(KNativePointer context, KNativePointer receiver, KNativePointerArray decorators, KUInt decoratorsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _decorators = reinterpret_cast(decorators); + const auto _decoratorsSequenceLength = static_cast(decoratorsSequenceLength); + GetImpl()->AstNodeAddDecorators(_context, _receiver, _decorators, _decoratorsSequenceLength); + return ; +} +KOALA_INTEROP_V4(AstNodeAddDecorators, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KBoolean impl_AstNodeCanHaveDecoratorConst(KNativePointer context, KNativePointer receiver, KBoolean inTs) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _inTs = static_cast(inTs); + auto result = GetImpl()->AstNodeCanHaveDecoratorConst(_context, _receiver, _inTs); + return result; +} +KOALA_INTEROP_3(AstNodeCanHaveDecoratorConst, KBoolean, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_AstNodeIsReadonlyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsReadonlyConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsReadonlyConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsReadonlyTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsReadonlyTypeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsReadonlyTypeConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsOptionalDeclarationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsOptionalDeclarationConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsOptionalDeclarationConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsDefiniteConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsDefiniteConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsDefiniteConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsConstructorConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsConstructorConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsConstructorConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsOverrideConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsOverrideConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsOverrideConst, KBoolean, KNativePointer, KNativePointer); + +void impl_AstNodeSetOverride(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AstNodeSetOverride(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AstNodeSetOverride, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsAsyncConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsAsyncConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsAsyncConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsSynchronizedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsSynchronizedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsSynchronizedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsNativeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsNativeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsNativeConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsConstConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsConstConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsConstConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsStaticConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsStaticConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsStaticConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsFinalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsFinalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsFinalConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsAbstractConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsAbstractConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsAbstractConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsPublicConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsPublicConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsPublicConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsProtectedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsProtectedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsProtectedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsPrivateConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsPrivateConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsPrivateConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsInternalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsInternalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsInternalConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsExportedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsExportedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsExportedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsDefaultExportedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsDefaultExportedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsDefaultExportedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsExportedTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsExportedTypeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsExportedTypeConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsDeclareConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsDeclareConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsDeclareConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsInConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsInConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsInConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsOutConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsOutConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsOutConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsSetterConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsSetterConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsSetterConst, KBoolean, KNativePointer, KNativePointer); + +void impl_AstNodeAddModifier(KNativePointer context, KNativePointer receiver, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _flags = static_cast(flags); + GetImpl()->AstNodeAddModifier(_context, _receiver, _flags); + return ; +} +KOALA_INTEROP_V3(AstNodeAddModifier, KNativePointer, KNativePointer, KInt); + +void impl_AstNodeClearModifier(KNativePointer context, KNativePointer receiver, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _flags = static_cast(flags); + GetImpl()->AstNodeClearModifier(_context, _receiver, _flags); + return ; +} +KOALA_INTEROP_V3(AstNodeClearModifier, KNativePointer, KNativePointer, KInt); + +KInt impl_AstNodeModifiers(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeModifiers(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeModifiers, KInt, KNativePointer, KNativePointer); + +KInt impl_AstNodeModifiersConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeModifiersConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeModifiersConst, KInt, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeHasExportAliasConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeHasExportAliasConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeHasExportAliasConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeAsClassElement(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeAsClassElement(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeAsClassElement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeAsClassElementConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeAsClassElementConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeAsClassElementConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsScopeBearerConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsScopeBearerConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsScopeBearerConst, KBoolean, KNativePointer, KNativePointer); + +void impl_AstNodeClearScope(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AstNodeClearScope(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AstNodeClearScope, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeGetTopStatement(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeGetTopStatement(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeGetTopStatement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeGetTopStatementConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeGetTopStatementConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeGetTopStatementConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeClone(KNativePointer context, KNativePointer receiver, KNativePointer parent) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _parent = reinterpret_cast(parent); + auto result = GetImpl()->AstNodeClone(_context, _receiver, _parent); + return result; +} +KOALA_INTEROP_3(AstNodeClone, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeDumpJSONConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeDumpJSONConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(AstNodeDumpJSONConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeDumpEtsSrcConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeDumpEtsSrcConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(AstNodeDumpEtsSrcConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeDumpDeclConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeDumpDeclConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(AstNodeDumpDeclConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeDumpConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->AstNodeDumpConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(AstNodeDumpConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeDumpConst1(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->AstNodeDumpConst1(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(AstNodeDumpConst1, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeCompileConst(KNativePointer context, KNativePointer receiver, KNativePointer pg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _pg = reinterpret_cast(pg); + GetImpl()->AstNodeCompileConst(_context, _receiver, _pg); + return ; +} +KOALA_INTEROP_V3(AstNodeCompileConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeCompileConst1(KNativePointer context, KNativePointer receiver, KNativePointer etsg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _etsg = reinterpret_cast(etsg); + GetImpl()->AstNodeCompileConst1(_context, _receiver, _etsg); + return ; +} +KOALA_INTEROP_V3(AstNodeCompileConst1, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeSetTransformedNode(KNativePointer context, KNativePointer receiver, KStringPtr& transformationName, KNativePointer transformedNode) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _transformationName = getStringCopy(transformationName); + const auto _transformedNode = reinterpret_cast(transformedNode); + GetImpl()->AstNodeSetTransformedNode(_context, _receiver, _transformationName, _transformedNode); + return ; +} +KOALA_INTEROP_V4(AstNodeSetTransformedNode, KNativePointer, KNativePointer, KStringPtr, KNativePointer); + +void impl_AstNodeAccept(KNativePointer context, KNativePointer receiver, KNativePointer v) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _v = reinterpret_cast(v); + GetImpl()->AstNodeAccept(_context, _receiver, _v); + return ; +} +KOALA_INTEROP_V3(AstNodeAccept, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeSetOriginalNode(KNativePointer context, KNativePointer receiver, KNativePointer originalNode) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _originalNode = reinterpret_cast(originalNode); + GetImpl()->AstNodeSetOriginalNode(_context, _receiver, _originalNode); + return ; +} +KOALA_INTEROP_V3(AstNodeSetOriginalNode, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeOriginalNodeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeOriginalNodeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeOriginalNodeConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeCleanUp(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AstNodeCleanUp(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AstNodeCleanUp, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeShallowClone(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeShallowClone(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeShallowClone, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_AstNodeIsValidInCurrentPhaseConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeIsValidInCurrentPhaseConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AstNodeIsValidInCurrentPhaseConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeGetHistoryNodeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeGetHistoryNodeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeGetHistoryNodeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AstNodeGetOrCreateHistoryNodeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstNodeGetOrCreateHistoryNodeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AstNodeGetOrCreateHistoryNodeConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AstNodeCleanCheckInformation(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AstNodeCleanCheckInformation(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AstNodeCleanCheckInformation, KNativePointer, KNativePointer); + +KNativePointer impl_CreateUnaryExpression(KNativePointer context, KNativePointer argument, KInt unaryOperator) +{ + const auto _context = reinterpret_cast(context); + const auto _argument = reinterpret_cast(argument); + const auto _unaryOperator = static_cast(unaryOperator); + auto result = GetImpl()->CreateUnaryExpression(_context, _argument, _unaryOperator); + return result; +} +KOALA_INTEROP_3(CreateUnaryExpression, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateUnaryExpression(KNativePointer context, KNativePointer original, KNativePointer argument, KInt unaryOperator) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _argument = reinterpret_cast(argument); + const auto _unaryOperator = static_cast(unaryOperator); + auto result = GetImpl()->UpdateUnaryExpression(_context, _original, _argument, _unaryOperator); + return result; +} +KOALA_INTEROP_4(UpdateUnaryExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); + +KInt impl_UnaryExpressionOperatorTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->UnaryExpressionOperatorTypeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(UnaryExpressionOperatorTypeConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_UnaryExpressionArgument(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->UnaryExpressionArgument(_context, _receiver); + return result; +} +KOALA_INTEROP_2(UnaryExpressionArgument, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UnaryExpressionArgumentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->UnaryExpressionArgumentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(UnaryExpressionArgumentConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_UnaryExpressionSetArgument(KNativePointer context, KNativePointer receiver, KNativePointer arg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _arg = reinterpret_cast(arg); + GetImpl()->UnaryExpressionSetArgument(_context, _receiver, _arg); + return ; +} +KOALA_INTEROP_V3(UnaryExpressionSetArgument, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateForInStatement(KNativePointer context, KNativePointer left, KNativePointer right, KNativePointer body) +{ + const auto _context = reinterpret_cast(context); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + const auto _body = reinterpret_cast(body); + auto result = GetImpl()->CreateForInStatement(_context, _left, _right, _body); + return result; +} +KOALA_INTEROP_4(CreateForInStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateForInStatement(KNativePointer context, KNativePointer original, KNativePointer left, KNativePointer right, KNativePointer body) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + const auto _body = reinterpret_cast(body); + auto result = GetImpl()->UpdateForInStatement(_context, _original, _left, _right, _body); + return result; +} +KOALA_INTEROP_5(UpdateForInStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForInStatementLeft(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForInStatementLeft(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ForInStatementLeft, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForInStatementLeftConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForInStatementLeftConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ForInStatementLeftConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForInStatementRight(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForInStatementRight(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ForInStatementRight, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForInStatementRightConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForInStatementRightConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ForInStatementRightConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForInStatementBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForInStatementBody(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ForInStatementBody, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForInStatementBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForInStatementBodyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ForInStatementBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateThisExpression(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateThisExpression(_context); + return result; +} +KOALA_INTEROP_1(CreateThisExpression, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateThisExpression(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateThisExpression(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateThisExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSMethodSignature(KNativePointer context, KNativePointer key, KNativePointer signature, KBoolean computed, KBoolean optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _key = reinterpret_cast(key); + const auto _signature = reinterpret_cast(signature); + const auto _computed = static_cast(computed); + const auto _optional_arg = static_cast(optional_arg); + auto result = GetImpl()->CreateTSMethodSignature(_context, _key, _signature, _computed, _optional_arg); + return result; +} +KOALA_INTEROP_5(CreateTSMethodSignature, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean, KBoolean); + +KNativePointer impl_UpdateTSMethodSignature(KNativePointer context, KNativePointer original, KNativePointer key, KNativePointer signature, KBoolean computed, KBoolean optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _key = reinterpret_cast(key); + const auto _signature = reinterpret_cast(signature); + const auto _computed = static_cast(computed); + const auto _optional_arg = static_cast(optional_arg); + auto result = GetImpl()->UpdateTSMethodSignature(_context, _original, _key, _signature, _computed, _optional_arg); + return result; +} +KOALA_INTEROP_6(UpdateTSMethodSignature, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean, KBoolean); + +KNativePointer impl_TSMethodSignatureKeyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMethodSignatureKeyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSMethodSignatureKeyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSMethodSignatureKey(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMethodSignatureKey(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSMethodSignatureKey, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSMethodSignatureTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMethodSignatureTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSMethodSignatureTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSMethodSignatureTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMethodSignatureTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSMethodSignatureTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSMethodSignatureParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSMethodSignatureParamsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSMethodSignatureParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSMethodSignatureReturnTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMethodSignatureReturnTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSMethodSignatureReturnTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSMethodSignatureReturnTypeAnnotation(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMethodSignatureReturnTypeAnnotation(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSMethodSignatureReturnTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSMethodSignatureComputedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMethodSignatureComputedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSMethodSignatureComputedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_TSMethodSignatureOptionalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMethodSignatureOptionalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSMethodSignatureOptionalConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateBinaryExpression(KNativePointer context, KNativePointer left, KNativePointer right, KInt operatorType) +{ + const auto _context = reinterpret_cast(context); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + const auto _operatorType = static_cast(operatorType); + auto result = GetImpl()->CreateBinaryExpression(_context, _left, _right, _operatorType); + return result; +} +KOALA_INTEROP_4(CreateBinaryExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateBinaryExpression(KNativePointer context, KNativePointer original, KNativePointer left, KNativePointer right, KInt operatorType) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + const auto _operatorType = static_cast(operatorType); + auto result = GetImpl()->UpdateBinaryExpression(_context, _original, _left, _right, _operatorType); + return result; +} +KOALA_INTEROP_5(UpdateBinaryExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_BinaryExpressionLeftConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BinaryExpressionLeftConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(BinaryExpressionLeftConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BinaryExpressionLeft(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BinaryExpressionLeft(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BinaryExpressionLeft, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BinaryExpressionRightConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BinaryExpressionRightConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(BinaryExpressionRightConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BinaryExpressionRight(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BinaryExpressionRight(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BinaryExpressionRight, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BinaryExpressionResultConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BinaryExpressionResultConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(BinaryExpressionResultConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BinaryExpressionResult(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BinaryExpressionResult(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BinaryExpressionResult, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_BinaryExpressionOperatorTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BinaryExpressionOperatorTypeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BinaryExpressionOperatorTypeConst, KInt, KNativePointer, KNativePointer); + +KBoolean impl_BinaryExpressionIsLogicalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BinaryExpressionIsLogicalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BinaryExpressionIsLogicalConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_BinaryExpressionIsLogicalExtendedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BinaryExpressionIsLogicalExtendedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BinaryExpressionIsLogicalExtendedConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_BinaryExpressionIsBitwiseConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BinaryExpressionIsBitwiseConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BinaryExpressionIsBitwiseConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_BinaryExpressionIsArithmeticConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BinaryExpressionIsArithmeticConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BinaryExpressionIsArithmeticConst, KBoolean, KNativePointer, KNativePointer); + +void impl_BinaryExpressionSetLeft(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->BinaryExpressionSetLeft(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(BinaryExpressionSetLeft, KNativePointer, KNativePointer, KNativePointer); + +void impl_BinaryExpressionSetRight(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->BinaryExpressionSetRight(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(BinaryExpressionSetRight, KNativePointer, KNativePointer, KNativePointer); + +void impl_BinaryExpressionSetResult(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->BinaryExpressionSetResult(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(BinaryExpressionSetResult, KNativePointer, KNativePointer, KNativePointer); + +void impl_BinaryExpressionSetOperator(KNativePointer context, KNativePointer receiver, KInt operatorType) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _operatorType = static_cast(operatorType); + GetImpl()->BinaryExpressionSetOperator(_context, _receiver, _operatorType); + return ; +} +KOALA_INTEROP_V3(BinaryExpressionSetOperator, KNativePointer, KNativePointer, KInt); + +void impl_BinaryExpressionCompileOperandsConst(KNativePointer context, KNativePointer receiver, KNativePointer etsg, KNativePointer lhs) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _etsg = reinterpret_cast(etsg); + const auto _lhs = reinterpret_cast(lhs); + GetImpl()->BinaryExpressionCompileOperandsConst(_context, _receiver, _etsg, _lhs); + return ; +} +KOALA_INTEROP_V4(BinaryExpressionCompileOperandsConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateSuperExpression(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateSuperExpression(_context); + return result; +} +KOALA_INTEROP_1(CreateSuperExpression, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateSuperExpression(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateSuperExpression(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateSuperExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateAssertStatement(KNativePointer context, KNativePointer test, KNativePointer second) +{ + const auto _context = reinterpret_cast(context); + const auto _test = reinterpret_cast(test); + const auto _second = reinterpret_cast(second); + auto result = GetImpl()->CreateAssertStatement(_context, _test, _second); + return result; +} +KOALA_INTEROP_3(CreateAssertStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateAssertStatement(KNativePointer context, KNativePointer original, KNativePointer test, KNativePointer second) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _test = reinterpret_cast(test); + const auto _second = reinterpret_cast(second); + auto result = GetImpl()->UpdateAssertStatement(_context, _original, _test, _second); + return result; +} +KOALA_INTEROP_4(UpdateAssertStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AssertStatementTestConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssertStatementTestConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AssertStatementTestConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AssertStatementTest(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssertStatementTest(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AssertStatementTest, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AssertStatementSecondConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssertStatementSecondConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AssertStatementSecondConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSStringKeyword(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSStringKeyword(_context); + return result; +} +KOALA_INTEROP_1(CreateTSStringKeyword, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSStringKeyword(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSStringKeyword(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSStringKeyword, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateAssignmentExpression(KNativePointer context, KNativePointer left, KNativePointer right, KInt assignmentOperator) +{ + const auto _context = reinterpret_cast(context); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + const auto _assignmentOperator = static_cast(assignmentOperator); + auto result = GetImpl()->CreateAssignmentExpression(_context, _left, _right, _assignmentOperator); + return result; +} +KOALA_INTEROP_4(CreateAssignmentExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateAssignmentExpression(KNativePointer context, KNativePointer original, KNativePointer left, KNativePointer right, KInt assignmentOperator) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + const auto _assignmentOperator = static_cast(assignmentOperator); + auto result = GetImpl()->UpdateAssignmentExpression(_context, _original, _left, _right, _assignmentOperator); + return result; +} +KOALA_INTEROP_5(UpdateAssignmentExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_CreateAssignmentExpression1(KNativePointer context, KInt type, KNativePointer left, KNativePointer right, KInt assignmentOperator) +{ + const auto _context = reinterpret_cast(context); + const auto _type = static_cast(type); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + const auto _assignmentOperator = static_cast(assignmentOperator); + auto result = GetImpl()->CreateAssignmentExpression1(_context, _type, _left, _right, _assignmentOperator); + return result; +} +KOALA_INTEROP_5(CreateAssignmentExpression1, KNativePointer, KNativePointer, KInt, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateAssignmentExpression1(KNativePointer context, KNativePointer original, KInt type, KNativePointer left, KNativePointer right, KInt assignmentOperator) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _type = static_cast(type); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + const auto _assignmentOperator = static_cast(assignmentOperator); + auto result = GetImpl()->UpdateAssignmentExpression1(_context, _original, _type, _left, _right, _assignmentOperator); + return result; +} +KOALA_INTEROP_6(UpdateAssignmentExpression1, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_AssignmentExpressionLeftConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssignmentExpressionLeftConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AssignmentExpressionLeftConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AssignmentExpressionLeft(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssignmentExpressionLeft(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AssignmentExpressionLeft, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AssignmentExpressionRight(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssignmentExpressionRight(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AssignmentExpressionRight, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AssignmentExpressionRightConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssignmentExpressionRightConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AssignmentExpressionRightConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AssignmentExpressionSetRight(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->AssignmentExpressionSetRight(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(AssignmentExpressionSetRight, KNativePointer, KNativePointer, KNativePointer); + +void impl_AssignmentExpressionSetLeft(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->AssignmentExpressionSetLeft(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(AssignmentExpressionSetLeft, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AssignmentExpressionResultConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssignmentExpressionResultConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AssignmentExpressionResultConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AssignmentExpressionResult(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssignmentExpressionResult(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AssignmentExpressionResult, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_AssignmentExpressionOperatorTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssignmentExpressionOperatorTypeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AssignmentExpressionOperatorTypeConst, KInt, KNativePointer, KNativePointer); + +KInt impl_AssignmentExpressionSetOperatorType(KNativePointer context, KNativePointer receiver, KInt tokenType) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _tokenType = static_cast(tokenType); + auto result = GetImpl()->AssignmentExpressionSetOperatorType(_context, _receiver, _tokenType); + return result; +} +KOALA_INTEROP_3(AssignmentExpressionSetOperatorType, KInt, KNativePointer, KNativePointer, KInt); + +void impl_AssignmentExpressionSetResult(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->AssignmentExpressionSetResult(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(AssignmentExpressionSetResult, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_AssignmentExpressionIsLogicalExtendedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssignmentExpressionIsLogicalExtendedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AssignmentExpressionIsLogicalExtendedConst, KBoolean, KNativePointer, KNativePointer); + +void impl_AssignmentExpressionSetIgnoreConstAssign(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AssignmentExpressionSetIgnoreConstAssign(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AssignmentExpressionSetIgnoreConstAssign, KNativePointer, KNativePointer); + +KBoolean impl_AssignmentExpressionIsIgnoreConstAssignConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssignmentExpressionIsIgnoreConstAssignConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AssignmentExpressionIsIgnoreConstAssignConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AssignmentExpressionConvertibleToAssignmentPatternLeft(KNativePointer context, KNativePointer receiver, KBoolean mustBePattern) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _mustBePattern = static_cast(mustBePattern); + auto result = GetImpl()->AssignmentExpressionConvertibleToAssignmentPatternLeft(_context, _receiver, _mustBePattern); + return result; +} +KOALA_INTEROP_3(AssignmentExpressionConvertibleToAssignmentPatternLeft, KBoolean, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_AssignmentExpressionConvertibleToAssignmentPatternRight(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AssignmentExpressionConvertibleToAssignmentPatternRight(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AssignmentExpressionConvertibleToAssignmentPatternRight, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AssignmentExpressionConvertibleToAssignmentPattern(KNativePointer context, KNativePointer receiver, KBoolean mustBePattern) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _mustBePattern = static_cast(mustBePattern); + auto result = GetImpl()->AssignmentExpressionConvertibleToAssignmentPattern(_context, _receiver, _mustBePattern); + return result; +} +KOALA_INTEROP_3(AssignmentExpressionConvertibleToAssignmentPattern, KBoolean, KNativePointer, KNativePointer, KBoolean); + +void impl_AssignmentExpressionCompilePatternConst(KNativePointer context, KNativePointer receiver, KNativePointer pg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _pg = reinterpret_cast(pg); + GetImpl()->AssignmentExpressionCompilePatternConst(_context, _receiver, _pg); + return ; +} +KOALA_INTEROP_V3(AssignmentExpressionCompilePatternConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateExpressionStatement(KNativePointer context, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->CreateExpressionStatement(_context, _expr); + return result; +} +KOALA_INTEROP_2(CreateExpressionStatement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateExpressionStatement(KNativePointer context, KNativePointer original, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->UpdateExpressionStatement(_context, _original, _expr); + return result; +} +KOALA_INTEROP_3(UpdateExpressionStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExpressionStatementGetExpressionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionStatementGetExpressionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExpressionStatementGetExpressionConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExpressionStatementGetExpression(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionStatementGetExpression(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExpressionStatementGetExpression, KNativePointer, KNativePointer, KNativePointer); + +void impl_ExpressionStatementSetExpression(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->ExpressionStatementSetExpression(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(ExpressionStatementSetExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSModule(KNativePointer context, KNativePointerArray statementList, KUInt statementListSequenceLength, KNativePointer ident, KInt flag, KNativePointer program) +{ + const auto _context = reinterpret_cast(context); + const auto _statementList = reinterpret_cast(statementList); + const auto _statementListSequenceLength = static_cast(statementListSequenceLength); + const auto _ident = reinterpret_cast(ident); + const auto _flag = static_cast(flag); + const auto _program = reinterpret_cast(program); + auto result = GetImpl()->CreateETSModule(_context, _statementList, _statementListSequenceLength, _ident, _flag, _program); + return result; +} +KOALA_INTEROP_6(CreateETSModule, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KInt, KNativePointer); + +KNativePointer impl_UpdateETSModule(KNativePointer context, KNativePointer original, KNativePointerArray statementList, KUInt statementListSequenceLength, KNativePointer ident, KInt flag, KNativePointer program) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _statementList = reinterpret_cast(statementList); + const auto _statementListSequenceLength = static_cast(statementListSequenceLength); + const auto _ident = reinterpret_cast(ident); + const auto _flag = static_cast(flag); + const auto _program = reinterpret_cast(program); + auto result = GetImpl()->UpdateETSModule(_context, _original, _statementList, _statementListSequenceLength, _ident, _flag, _program); + return result; +} +KOALA_INTEROP_7(UpdateETSModule, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KInt, KNativePointer); + +KNativePointer impl_ETSModuleIdent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleIdent(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSModuleIdent, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSModuleIdentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleIdentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSModuleIdentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSModuleProgram(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleProgram(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSModuleProgram, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSModuleGlobalClassConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleGlobalClassConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSModuleGlobalClassConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSModuleGlobalClass(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleGlobalClass(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSModuleGlobalClass, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSModuleSetGlobalClass(KNativePointer context, KNativePointer receiver, KNativePointer globalClass) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _globalClass = reinterpret_cast(globalClass); + GetImpl()->ETSModuleSetGlobalClass(_context, _receiver, _globalClass); + return ; +} +KOALA_INTEROP_V3(ETSModuleSetGlobalClass, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ETSModuleIsETSScriptConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleIsETSScriptConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSModuleIsETSScriptConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ETSModuleIsNamespaceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleIsNamespaceConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSModuleIsNamespaceConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ETSModuleIsNamespaceChainLastNodeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleIsNamespaceChainLastNodeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSModuleIsNamespaceChainLastNodeConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ETSModuleSetNamespaceChainLastNode(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ETSModuleSetNamespaceChainLastNode(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ETSModuleSetNamespaceChainLastNode, KNativePointer, KNativePointer); + +KNativePointer impl_ETSModuleProgramConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleProgramConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSModuleProgramConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ETSModuleHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSModuleHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSModuleHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ETSModuleEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ETSModuleEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ETSModuleEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSModuleClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ETSModuleClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ETSModuleClearAnnotations, KNativePointer, KNativePointer); + +void impl_ETSModuleDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->ETSModuleDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(ETSModuleDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSModuleAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSModuleAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSModuleAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSModuleAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSModuleAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSModuleAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSModuleAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSModuleAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSModuleAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSModuleSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ETSModuleSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ETSModuleSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ETSModuleSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ETSModuleSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ETSModuleSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateMetaProperty(KNativePointer context, KInt kind) +{ + const auto _context = reinterpret_cast(context); + const auto _kind = static_cast(kind); + auto result = GetImpl()->CreateMetaProperty(_context, _kind); + return result; +} +KOALA_INTEROP_2(CreateMetaProperty, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateMetaProperty(KNativePointer context, KNativePointer original, KInt kind) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _kind = static_cast(kind); + auto result = GetImpl()->UpdateMetaProperty(_context, _original, _kind); + return result; +} +KOALA_INTEROP_3(UpdateMetaProperty, KNativePointer, KNativePointer, KNativePointer, KInt); + +KInt impl_MetaPropertyKindConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MetaPropertyKindConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MetaPropertyKindConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSArrayType(KNativePointer context, KNativePointer elementType) +{ + const auto _context = reinterpret_cast(context); + const auto _elementType = reinterpret_cast(elementType); + auto result = GetImpl()->CreateTSArrayType(_context, _elementType); + return result; +} +KOALA_INTEROP_2(CreateTSArrayType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSArrayType(KNativePointer context, KNativePointer original, KNativePointer elementType) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _elementType = reinterpret_cast(elementType); + auto result = GetImpl()->UpdateTSArrayType(_context, _original, _elementType); + return result; +} +KOALA_INTEROP_3(UpdateTSArrayType, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSArrayTypeElementTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSArrayTypeElementTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSArrayTypeElementTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSSignatureDeclaration(KNativePointer context, KInt kind, KNativePointer signature) +{ + const auto _context = reinterpret_cast(context); + const auto _kind = static_cast(kind); + const auto _signature = reinterpret_cast(signature); + auto result = GetImpl()->CreateTSSignatureDeclaration(_context, _kind, _signature); + return result; +} +KOALA_INTEROP_3(CreateTSSignatureDeclaration, KNativePointer, KNativePointer, KInt, KNativePointer); + +KNativePointer impl_UpdateTSSignatureDeclaration(KNativePointer context, KNativePointer original, KInt kind, KNativePointer signature) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _kind = static_cast(kind); + const auto _signature = reinterpret_cast(signature); + auto result = GetImpl()->UpdateTSSignatureDeclaration(_context, _original, _kind, _signature); + return result; +} +KOALA_INTEROP_4(UpdateTSSignatureDeclaration, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointer); + +KNativePointer impl_TSSignatureDeclarationTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSSignatureDeclarationTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSSignatureDeclarationTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSSignatureDeclarationTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSSignatureDeclarationTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSSignatureDeclarationTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSSignatureDeclarationParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSSignatureDeclarationParamsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSSignatureDeclarationParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSSignatureDeclarationReturnTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSSignatureDeclarationReturnTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSSignatureDeclarationReturnTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSSignatureDeclarationReturnTypeAnnotation(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSSignatureDeclarationReturnTypeAnnotation(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSSignatureDeclarationReturnTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_TSSignatureDeclarationKindConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSSignatureDeclarationKindConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSSignatureDeclarationKindConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_CreateExportAllDeclaration(KNativePointer context, KNativePointer source, KNativePointer exported) +{ + const auto _context = reinterpret_cast(context); + const auto _source = reinterpret_cast(source); + const auto _exported = reinterpret_cast(exported); + auto result = GetImpl()->CreateExportAllDeclaration(_context, _source, _exported); + return result; +} +KOALA_INTEROP_3(CreateExportAllDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateExportAllDeclaration(KNativePointer context, KNativePointer original, KNativePointer source, KNativePointer exported) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _source = reinterpret_cast(source); + const auto _exported = reinterpret_cast(exported); + auto result = GetImpl()->UpdateExportAllDeclaration(_context, _original, _source, _exported); + return result; +} +KOALA_INTEROP_4(UpdateExportAllDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExportAllDeclarationSourceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportAllDeclarationSourceConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExportAllDeclarationSourceConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExportAllDeclarationExportedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportAllDeclarationExportedConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExportAllDeclarationExportedConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateExportSpecifier(KNativePointer context, KNativePointer local, KNativePointer exported) +{ + const auto _context = reinterpret_cast(context); + const auto _local = reinterpret_cast(local); + const auto _exported = reinterpret_cast(exported); + auto result = GetImpl()->CreateExportSpecifier(_context, _local, _exported); + return result; +} +KOALA_INTEROP_3(CreateExportSpecifier, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateExportSpecifier(KNativePointer context, KNativePointer original, KNativePointer local, KNativePointer exported) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _local = reinterpret_cast(local); + const auto _exported = reinterpret_cast(exported); + auto result = GetImpl()->UpdateExportSpecifier(_context, _original, _local, _exported); + return result; +} +KOALA_INTEROP_4(UpdateExportSpecifier, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExportSpecifierLocalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportSpecifierLocalConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExportSpecifierLocalConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExportSpecifierExportedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportSpecifierExportedConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExportSpecifierExportedConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ExportSpecifierSetDefault(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ExportSpecifierSetDefault(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ExportSpecifierSetDefault, KNativePointer, KNativePointer); + +KBoolean impl_ExportSpecifierIsDefaultConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportSpecifierIsDefaultConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExportSpecifierIsDefaultConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ExportSpecifierSetConstantExpression(KNativePointer context, KNativePointer receiver, KNativePointer constantExpression) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _constantExpression = reinterpret_cast(constantExpression); + GetImpl()->ExportSpecifierSetConstantExpression(_context, _receiver, _constantExpression); + return ; +} +KOALA_INTEROP_V3(ExportSpecifierSetConstantExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExportSpecifierGetConstantExpressionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportSpecifierGetConstantExpressionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExportSpecifierGetConstantExpressionConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSTupleType(KNativePointer context, KNativePointerArray elementTypes, KUInt elementTypesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _elementTypes = reinterpret_cast(elementTypes); + const auto _elementTypesSequenceLength = static_cast(elementTypesSequenceLength); + auto result = GetImpl()->CreateTSTupleType(_context, _elementTypes, _elementTypesSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateTSTupleType, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateTSTupleType(KNativePointer context, KNativePointer original, KNativePointerArray elementTypes, KUInt elementTypesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _elementTypes = reinterpret_cast(elementTypes); + const auto _elementTypesSequenceLength = static_cast(elementTypesSequenceLength); + auto result = GetImpl()->UpdateTSTupleType(_context, _original, _elementTypes, _elementTypesSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateTSTupleType, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_TSTupleTypeElementTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTupleTypeElementTypeConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTupleTypeElementTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateFunctionExpression(KNativePointer context, KNativePointer func) +{ + const auto _context = reinterpret_cast(context); + const auto _func = reinterpret_cast(func); + auto result = GetImpl()->CreateFunctionExpression(_context, _func); + return result; +} +KOALA_INTEROP_2(CreateFunctionExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateFunctionExpression(KNativePointer context, KNativePointer original, KNativePointer func) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _func = reinterpret_cast(func); + auto result = GetImpl()->UpdateFunctionExpression(_context, _original, _func); + return result; +} +KOALA_INTEROP_3(UpdateFunctionExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateFunctionExpression1(KNativePointer context, KNativePointer namedExpr, KNativePointer func) +{ + const auto _context = reinterpret_cast(context); + const auto _namedExpr = reinterpret_cast(namedExpr); + const auto _func = reinterpret_cast(func); + auto result = GetImpl()->CreateFunctionExpression1(_context, _namedExpr, _func); + return result; +} +KOALA_INTEROP_3(CreateFunctionExpression1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateFunctionExpression1(KNativePointer context, KNativePointer original, KNativePointer namedExpr, KNativePointer func) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _namedExpr = reinterpret_cast(namedExpr); + const auto _func = reinterpret_cast(func); + auto result = GetImpl()->UpdateFunctionExpression1(_context, _original, _namedExpr, _func); + return result; +} +KOALA_INTEROP_4(UpdateFunctionExpression1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionExpressionFunctionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionExpressionFunctionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(FunctionExpressionFunctionConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionExpressionFunction(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionExpressionFunction(_context, _receiver); + return result; +} +KOALA_INTEROP_2(FunctionExpressionFunction, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_FunctionExpressionIsAnonymousConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionExpressionIsAnonymousConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(FunctionExpressionIsAnonymousConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionExpressionId(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionExpressionId(_context, _receiver); + return result; +} +KOALA_INTEROP_2(FunctionExpressionId, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSIndexSignature(KNativePointer context, KNativePointer param, KNativePointer typeAnnotation, KBoolean readonly_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _param = reinterpret_cast(param); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _readonly_arg = static_cast(readonly_arg); + auto result = GetImpl()->CreateTSIndexSignature(_context, _param, _typeAnnotation, _readonly_arg); + return result; +} +KOALA_INTEROP_4(CreateTSIndexSignature, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateTSIndexSignature(KNativePointer context, KNativePointer original, KNativePointer param, KNativePointer typeAnnotation, KBoolean readonly_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _param = reinterpret_cast(param); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _readonly_arg = static_cast(readonly_arg); + auto result = GetImpl()->UpdateTSIndexSignature(_context, _original, _param, _typeAnnotation, _readonly_arg); + return result; +} +KOALA_INTEROP_5(UpdateTSIndexSignature, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_TSIndexSignatureParamConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSIndexSignatureParamConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSIndexSignatureParamConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSIndexSignatureTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSIndexSignatureTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSIndexSignatureTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSIndexSignatureReadonlyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSIndexSignatureReadonlyConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSIndexSignatureReadonlyConst, KBoolean, KNativePointer, KNativePointer); + +KInt impl_TSIndexSignatureKindConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSIndexSignatureKindConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSIndexSignatureKindConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSModuleDeclaration(KNativePointer context, KNativePointer name, KNativePointer body, KBoolean declare, KBoolean _global) +{ + const auto _context = reinterpret_cast(context); + const auto _name = reinterpret_cast(name); + const auto _body = reinterpret_cast(body); + const auto _declare = static_cast(declare); + const auto __global = static_cast(_global); + auto result = GetImpl()->CreateTSModuleDeclaration(_context, _name, _body, _declare, __global); + return result; +} +KOALA_INTEROP_5(CreateTSModuleDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean, KBoolean); + +KNativePointer impl_UpdateTSModuleDeclaration(KNativePointer context, KNativePointer original, KNativePointer name, KNativePointer body, KBoolean declare, KBoolean _global) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _name = reinterpret_cast(name); + const auto _body = reinterpret_cast(body); + const auto _declare = static_cast(declare); + const auto __global = static_cast(_global); + auto result = GetImpl()->UpdateTSModuleDeclaration(_context, _original, _name, _body, _declare, __global); + return result; +} +KOALA_INTEROP_6(UpdateTSModuleDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean, KBoolean); + +KNativePointer impl_TSModuleDeclarationNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSModuleDeclarationNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSModuleDeclarationNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSModuleDeclarationBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSModuleDeclarationBodyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSModuleDeclarationBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSModuleDeclarationGlobalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSModuleDeclarationGlobalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSModuleDeclarationGlobalConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_TSModuleDeclarationIsExternalOrAmbientConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSModuleDeclarationIsExternalOrAmbientConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSModuleDeclarationIsExternalOrAmbientConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateImportDeclaration(KNativePointer context, KNativePointer source, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KInt importKinds) +{ + const auto _context = reinterpret_cast(context); + const auto _source = reinterpret_cast(source); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + const auto _importKinds = static_cast(importKinds); + auto result = GetImpl()->CreateImportDeclaration(_context, _source, _specifiers, _specifiersSequenceLength, _importKinds); + return result; +} +KOALA_INTEROP_5(CreateImportDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt); + +KNativePointer impl_UpdateImportDeclaration(KNativePointer context, KNativePointer original, KNativePointer source, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KInt importKinds) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _source = reinterpret_cast(source); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + const auto _importKinds = static_cast(importKinds); + auto result = GetImpl()->UpdateImportDeclaration(_context, _original, _source, _specifiers, _specifiersSequenceLength, _importKinds); + return result; +} +KOALA_INTEROP_6(UpdateImportDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt); + +void impl_ImportDeclarationEmplaceSpecifiers(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ImportDeclarationEmplaceSpecifiers(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ImportDeclarationEmplaceSpecifiers, KNativePointer, KNativePointer, KNativePointer); + +void impl_ImportDeclarationClearSpecifiers(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ImportDeclarationClearSpecifiers(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ImportDeclarationClearSpecifiers, KNativePointer, KNativePointer); + +void impl_ImportDeclarationSetValueSpecifiers(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->ImportDeclarationSetValueSpecifiers(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(ImportDeclarationSetValueSpecifiers, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_ImportDeclarationSpecifiersForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ImportDeclarationSpecifiersForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ImportDeclarationSpecifiersForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportDeclarationSourceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportDeclarationSourceConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ImportDeclarationSourceConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportDeclarationSource(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportDeclarationSource(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ImportDeclarationSource, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportDeclarationSpecifiersConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ImportDeclarationSpecifiersConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ImportDeclarationSpecifiersConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ImportDeclarationIsTypeKindConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportDeclarationIsTypeKindConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ImportDeclarationIsTypeKindConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSParenthesizedType(KNativePointer context, KNativePointer type) +{ + const auto _context = reinterpret_cast(context); + const auto _type = reinterpret_cast(type); + auto result = GetImpl()->CreateTSParenthesizedType(_context, _type); + return result; +} +KOALA_INTEROP_2(CreateTSParenthesizedType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSParenthesizedType(KNativePointer context, KNativePointer original, KNativePointer type) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _type = reinterpret_cast(type); + auto result = GetImpl()->UpdateTSParenthesizedType(_context, _original, _type); + return result; +} +KOALA_INTEROP_3(UpdateTSParenthesizedType, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSParenthesizedTypeTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSParenthesizedTypeTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSParenthesizedTypeTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_LiteralIsFoldedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->LiteralIsFoldedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(LiteralIsFoldedConst, KBoolean, KNativePointer, KNativePointer); + +void impl_LiteralSetFolded(KNativePointer context, KNativePointer receiver, KBoolean folded) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _folded = static_cast(folded); + GetImpl()->LiteralSetFolded(_context, _receiver, _folded); + return ; +} +KOALA_INTEROP_V3(LiteralSetFolded, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_CreateCharLiteral(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateCharLiteral(_context); + return result; +} +KOALA_INTEROP_1(CreateCharLiteral, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateCharLiteral(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateCharLiteral(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateCharLiteral, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSIntrinsicNode(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateETSIntrinsicNode(_context); + return result; +} +KOALA_INTEROP_1(CreateETSIntrinsicNode, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSIntrinsicNode(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateETSIntrinsicNode(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateETSIntrinsicNode, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSIntrinsicNode1(KNativePointer context, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->CreateETSIntrinsicNode1(_context, _other); + return result; +} +KOALA_INTEROP_2(CreateETSIntrinsicNode1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSIntrinsicNode1(KNativePointer context, KNativePointer original, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->UpdateETSIntrinsicNode1(_context, _original, _other); + return result; +} +KOALA_INTEROP_3(UpdateETSIntrinsicNode1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSIntrinsicNode2(KNativePointer context, KInt type, KNativePointerArray _arguments, KUInt _argumentsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _type = static_cast(type); + const auto __arguments = reinterpret_cast(_arguments); + const auto __argumentsSequenceLength = static_cast(_argumentsSequenceLength); + auto result = GetImpl()->CreateETSIntrinsicNode2(_context, _type, __arguments, __argumentsSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateETSIntrinsicNode2, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateETSIntrinsicNode2(KNativePointer context, KNativePointer original, KInt type, KNativePointerArray _arguments, KUInt _argumentsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _type = static_cast(type); + const auto __arguments = reinterpret_cast(_arguments); + const auto __argumentsSequenceLength = static_cast(_argumentsSequenceLength); + auto result = GetImpl()->UpdateETSIntrinsicNode2(_context, _original, _type, __arguments, __argumentsSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateETSIntrinsicNode2, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointerArray, KUInt); + +KInt impl_ETSIntrinsicNodeTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSIntrinsicNodeTypeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSIntrinsicNodeTypeConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_ETSIntrinsicNodeArgumentsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSIntrinsicNodeArgumentsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSIntrinsicNodeArgumentsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSPackageDeclaration(KNativePointer context, KNativePointer name) +{ + const auto _context = reinterpret_cast(context); + const auto _name = reinterpret_cast(name); + auto result = GetImpl()->CreateETSPackageDeclaration(_context, _name); + return result; +} +KOALA_INTEROP_2(CreateETSPackageDeclaration, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSPackageDeclaration(KNativePointer context, KNativePointer original, KNativePointer name) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _name = reinterpret_cast(name); + auto result = GetImpl()->UpdateETSPackageDeclaration(_context, _original, _name); + return result; +} +KOALA_INTEROP_3(UpdateETSPackageDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSImportDeclaration(KNativePointer context, KNativePointer importPath, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KInt importKinds) +{ + const auto _context = reinterpret_cast(context); + const auto _importPath = reinterpret_cast(importPath); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + const auto _importKinds = static_cast(importKinds); + auto result = GetImpl()->CreateETSImportDeclaration(_context, _importPath, _specifiers, _specifiersSequenceLength, _importKinds); + return result; +} +KOALA_INTEROP_5(CreateETSImportDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt); + +KNativePointer impl_UpdateETSImportDeclaration(KNativePointer context, KNativePointer original, KNativePointer importPath, KNativePointerArray specifiers, KUInt specifiersSequenceLength, KInt importKinds) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _importPath = reinterpret_cast(importPath); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + const auto _importKinds = static_cast(importKinds); + auto result = GetImpl()->UpdateETSImportDeclaration(_context, _original, _importPath, _specifiers, _specifiersSequenceLength, _importKinds); + return result; +} +KOALA_INTEROP_6(UpdateETSImportDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KInt); + +void impl_ETSImportDeclarationSetImportMetadata(KNativePointer context, KNativePointer receiver, KInt importFlags, KInt lang, KStringPtr& resolvedSource, KStringPtr& declPath, KStringPtr& ohmUrl) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _importFlags = static_cast(importFlags); + const auto _lang = static_cast(lang); + const auto _resolvedSource = getStringCopy(resolvedSource); + const auto _declPath = getStringCopy(declPath); + const auto _ohmUrl = getStringCopy(ohmUrl); + GetImpl()->ETSImportDeclarationSetImportMetadata(_context, _receiver, _importFlags, _lang, _resolvedSource, _declPath, _ohmUrl); + return ; +} +KOALA_INTEROP_V7(ETSImportDeclarationSetImportMetadata, KNativePointer, KNativePointer, KInt, KInt, KStringPtr, KStringPtr, KStringPtr); + +KNativePointer impl_ETSImportDeclarationDeclPathConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSImportDeclarationDeclPathConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ETSImportDeclarationDeclPathConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSImportDeclarationOhmUrlConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSImportDeclarationOhmUrlConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ETSImportDeclarationOhmUrlConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ETSImportDeclarationIsValidConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSImportDeclarationIsValidConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSImportDeclarationIsValidConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ETSImportDeclarationIsPureDynamicConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSImportDeclarationIsPureDynamicConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSImportDeclarationIsPureDynamicConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ETSImportDeclarationSetAssemblerName(KNativePointer context, KNativePointer receiver, KStringPtr& assemblerName) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _assemblerName = getStringCopy(assemblerName); + GetImpl()->ETSImportDeclarationSetAssemblerName(_context, _receiver, _assemblerName); + return ; +} +KOALA_INTEROP_V3(ETSImportDeclarationSetAssemblerName, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_ETSImportDeclarationAssemblerNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSImportDeclarationAssemblerNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ETSImportDeclarationAssemblerNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSImportDeclarationResolvedSourceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSImportDeclarationResolvedSourceConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ETSImportDeclarationResolvedSourceConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSStructDeclaration(KNativePointer context, KNativePointer def) +{ + const auto _context = reinterpret_cast(context); + const auto _def = reinterpret_cast(def); + auto result = GetImpl()->CreateETSStructDeclaration(_context, _def); + return result; +} +KOALA_INTEROP_2(CreateETSStructDeclaration, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSStructDeclaration(KNativePointer context, KNativePointer original, KNativePointer def) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _def = reinterpret_cast(def); + auto result = GetImpl()->UpdateETSStructDeclaration(_context, _original, _def); + return result; +} +KOALA_INTEROP_3(UpdateETSStructDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSModuleBlock(KNativePointer context, KNativePointerArray statements, KUInt statementsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _statements = reinterpret_cast(statements); + const auto _statementsSequenceLength = static_cast(statementsSequenceLength); + auto result = GetImpl()->CreateTSModuleBlock(_context, _statements, _statementsSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateTSModuleBlock, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateTSModuleBlock(KNativePointer context, KNativePointer original, KNativePointerArray statements, KUInt statementsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _statements = reinterpret_cast(statements); + const auto _statementsSequenceLength = static_cast(statementsSequenceLength); + auto result = GetImpl()->UpdateTSModuleBlock(_context, _original, _statements, _statementsSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateTSModuleBlock, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_TSModuleBlockStatementsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSModuleBlockStatementsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSModuleBlockStatementsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSNewArrayInstanceExpression(KNativePointer context, KNativePointer typeReference, KNativePointer dimension) +{ + const auto _context = reinterpret_cast(context); + const auto _typeReference = reinterpret_cast(typeReference); + const auto _dimension = reinterpret_cast(dimension); + auto result = GetImpl()->CreateETSNewArrayInstanceExpression(_context, _typeReference, _dimension); + return result; +} +KOALA_INTEROP_3(CreateETSNewArrayInstanceExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSNewArrayInstanceExpression(KNativePointer context, KNativePointer original, KNativePointer typeReference, KNativePointer dimension) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _typeReference = reinterpret_cast(typeReference); + const auto _dimension = reinterpret_cast(dimension); + auto result = GetImpl()->UpdateETSNewArrayInstanceExpression(_context, _original, _typeReference, _dimension); + return result; +} +KOALA_INTEROP_4(UpdateETSNewArrayInstanceExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSNewArrayInstanceExpressionTypeReference(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSNewArrayInstanceExpressionTypeReference(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSNewArrayInstanceExpressionTypeReference, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSNewArrayInstanceExpressionTypeReferenceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSNewArrayInstanceExpressionTypeReferenceConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSNewArrayInstanceExpressionTypeReferenceConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSNewArrayInstanceExpressionDimension(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSNewArrayInstanceExpressionDimension(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSNewArrayInstanceExpressionDimension, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSNewArrayInstanceExpressionDimensionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSNewArrayInstanceExpressionDimensionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSNewArrayInstanceExpressionDimensionConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSNewArrayInstanceExpressionSetDimension(KNativePointer context, KNativePointer receiver, KNativePointer dimension) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dimension = reinterpret_cast(dimension); + GetImpl()->ETSNewArrayInstanceExpressionSetDimension(_context, _receiver, _dimension); + return ; +} +KOALA_INTEROP_V3(ETSNewArrayInstanceExpressionSetDimension, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSNewArrayInstanceExpressionClearPreferredType(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ETSNewArrayInstanceExpressionClearPreferredType(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ETSNewArrayInstanceExpressionClearPreferredType, KNativePointer, KNativePointer); + +KNativePointer impl_CreateAnnotationDeclaration(KNativePointer context, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->CreateAnnotationDeclaration(_context, _expr); + return result; +} +KOALA_INTEROP_2(CreateAnnotationDeclaration, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateAnnotationDeclaration(KNativePointer context, KNativePointer original, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->UpdateAnnotationDeclaration(_context, _original, _expr); + return result; +} +KOALA_INTEROP_3(UpdateAnnotationDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateAnnotationDeclaration1(KNativePointer context, KNativePointer expr, KNativePointerArray properties, KUInt propertiesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _expr = reinterpret_cast(expr); + const auto _properties = reinterpret_cast(properties); + const auto _propertiesSequenceLength = static_cast(propertiesSequenceLength); + auto result = GetImpl()->CreateAnnotationDeclaration1(_context, _expr, _properties, _propertiesSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateAnnotationDeclaration1, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateAnnotationDeclaration1(KNativePointer context, KNativePointer original, KNativePointer expr, KNativePointerArray properties, KUInt propertiesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expr = reinterpret_cast(expr); + const auto _properties = reinterpret_cast(properties); + const auto _propertiesSequenceLength = static_cast(propertiesSequenceLength); + auto result = GetImpl()->UpdateAnnotationDeclaration1(_context, _original, _expr, _properties, _propertiesSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateAnnotationDeclaration1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_AnnotationDeclarationInternalNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AnnotationDeclarationInternalNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(AnnotationDeclarationInternalNameConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationSetInternalName(KNativePointer context, KNativePointer receiver, KStringPtr& internalName) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _internalName = getStringCopy(internalName); + GetImpl()->AnnotationDeclarationSetInternalName(_context, _receiver, _internalName); + return ; +} +KOALA_INTEROP_V3(AnnotationDeclarationSetInternalName, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_AnnotationDeclarationExprConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AnnotationDeclarationExprConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AnnotationDeclarationExprConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationDeclarationExpr(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AnnotationDeclarationExpr(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AnnotationDeclarationExpr, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationDeclarationProperties(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationDeclarationProperties(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationDeclarationProperties, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationDeclarationPropertiesForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationDeclarationPropertiesForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationDeclarationPropertiesForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationDeclarationPropertiesConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationDeclarationPropertiesConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationDeclarationPropertiesConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationAddProperties(KNativePointer context, KNativePointer receiver, KNativePointerArray properties, KUInt propertiesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _properties = reinterpret_cast(properties); + const auto _propertiesSequenceLength = static_cast(propertiesSequenceLength); + GetImpl()->AnnotationDeclarationAddProperties(_context, _receiver, _properties, _propertiesSequenceLength); + return ; +} +KOALA_INTEROP_V4(AnnotationDeclarationAddProperties, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KBoolean impl_AnnotationDeclarationIsSourceRetentionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AnnotationDeclarationIsSourceRetentionConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AnnotationDeclarationIsSourceRetentionConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AnnotationDeclarationIsBytecodeRetentionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AnnotationDeclarationIsBytecodeRetentionConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AnnotationDeclarationIsBytecodeRetentionConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_AnnotationDeclarationIsRuntimeRetentionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AnnotationDeclarationIsRuntimeRetentionConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AnnotationDeclarationIsRuntimeRetentionConst, KBoolean, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationSetSourceRetention(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AnnotationDeclarationSetSourceRetention(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AnnotationDeclarationSetSourceRetention, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationSetBytecodeRetention(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AnnotationDeclarationSetBytecodeRetention(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AnnotationDeclarationSetBytecodeRetention, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationSetRuntimeRetention(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AnnotationDeclarationSetRuntimeRetention(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AnnotationDeclarationSetRuntimeRetention, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationDeclarationGetBaseNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AnnotationDeclarationGetBaseNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AnnotationDeclarationGetBaseNameConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationEmplaceProperties(KNativePointer context, KNativePointer receiver, KNativePointer properties) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _properties = reinterpret_cast(properties); + GetImpl()->AnnotationDeclarationEmplaceProperties(_context, _receiver, _properties); + return ; +} +KOALA_INTEROP_V3(AnnotationDeclarationEmplaceProperties, KNativePointer, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationClearProperties(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AnnotationDeclarationClearProperties(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AnnotationDeclarationClearProperties, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationSetValueProperties(KNativePointer context, KNativePointer receiver, KNativePointer properties, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _properties = reinterpret_cast(properties); + const auto _index = static_cast(index); + GetImpl()->AnnotationDeclarationSetValueProperties(_context, _receiver, _properties, _index); + return ; +} +KOALA_INTEROP_V4(AnnotationDeclarationSetValueProperties, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KBoolean impl_AnnotationDeclarationHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AnnotationDeclarationHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AnnotationDeclarationHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->AnnotationDeclarationEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(AnnotationDeclarationEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->AnnotationDeclarationClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(AnnotationDeclarationClearAnnotations, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->AnnotationDeclarationDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(AnnotationDeclarationDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationDeclarationAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationDeclarationAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationDeclarationAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationDeclarationAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationDeclarationAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationDeclarationAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationDeclarationAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationDeclarationAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationDeclarationAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AnnotationDeclarationSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->AnnotationDeclarationSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(AnnotationDeclarationSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_AnnotationDeclarationSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->AnnotationDeclarationSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(AnnotationDeclarationSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateAnnotationUsage(KNativePointer context, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->CreateAnnotationUsageIr(_context, _expr); + return result; +} +KOALA_INTEROP_2(CreateAnnotationUsage, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateAnnotationUsage(KNativePointer context, KNativePointer original, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->UpdateAnnotationUsageIr(_context, _original, _expr); + return result; +} +KOALA_INTEROP_3(UpdateAnnotationUsage, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateAnnotationUsage1(KNativePointer context, KNativePointer expr, KNativePointerArray properties, KUInt propertiesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _expr = reinterpret_cast(expr); + const auto _properties = reinterpret_cast(properties); + const auto _propertiesSequenceLength = static_cast(propertiesSequenceLength); + auto result = GetImpl()->CreateAnnotationUsageIr1(_context, _expr, _properties, _propertiesSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateAnnotationUsage1, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateAnnotationUsage1(KNativePointer context, KNativePointer original, KNativePointer expr, KNativePointerArray properties, KUInt propertiesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expr = reinterpret_cast(expr); + const auto _properties = reinterpret_cast(properties); + const auto _propertiesSequenceLength = static_cast(propertiesSequenceLength); + auto result = GetImpl()->UpdateAnnotationUsageIr1(_context, _original, _expr, _properties, _propertiesSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateAnnotationUsage1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_AnnotationUsageExpr(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AnnotationUsageIrExpr(_context, _receiver); + return result; +} +KOALA_INTEROP_2(AnnotationUsageExpr, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationUsageProperties(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationUsageIrProperties(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationUsageProperties, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotationUsagePropertiesConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->AnnotationUsageIrPropertiesConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(AnnotationUsagePropertiesConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AnnotationUsageAddProperty(KNativePointer context, KNativePointer receiver, KNativePointer property) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _property = reinterpret_cast(property); + GetImpl()->AnnotationUsageIrAddProperty(_context, _receiver, _property); + return ; +} +KOALA_INTEROP_V3(AnnotationUsageAddProperty, KNativePointer, KNativePointer, KNativePointer); + +void impl_AnnotationUsageSetProperties(KNativePointer context, KNativePointer receiver, KNativePointerArray properties, KUInt propertiesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _properties = reinterpret_cast(properties); + const auto _propertiesSequenceLength = static_cast(propertiesSequenceLength); + GetImpl()->AnnotationUsageIrSetProperties(_context, _receiver, _properties, _propertiesSequenceLength); + return ; +} +KOALA_INTEROP_V4(AnnotationUsageSetProperties, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_AnnotationUsageGetBaseNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AnnotationUsageIrGetBaseNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AnnotationUsageGetBaseNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateEmptyStatement(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateEmptyStatement(_context); + return result; +} +KOALA_INTEROP_1(CreateEmptyStatement, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateEmptyStatement(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateEmptyStatement(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateEmptyStatement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateEmptyStatement1(KNativePointer context, KBoolean isBrokenStatement) +{ + const auto _context = reinterpret_cast(context); + const auto _isBrokenStatement = static_cast(isBrokenStatement); + auto result = GetImpl()->CreateEmptyStatement1(_context, _isBrokenStatement); + return result; +} +KOALA_INTEROP_2(CreateEmptyStatement1, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateEmptyStatement1(KNativePointer context, KNativePointer original, KBoolean isBrokenStatement) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _isBrokenStatement = static_cast(isBrokenStatement); + auto result = GetImpl()->UpdateEmptyStatement1(_context, _original, _isBrokenStatement); + return result; +} +KOALA_INTEROP_3(UpdateEmptyStatement1, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_EmptyStatementIsBrokenStatement(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->EmptyStatementIsBrokenStatement(_context, _receiver); + return result; +} +KOALA_INTEROP_2(EmptyStatementIsBrokenStatement, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateWhileStatement(KNativePointer context, KNativePointer test, KNativePointer body) +{ + const auto _context = reinterpret_cast(context); + const auto _test = reinterpret_cast(test); + const auto _body = reinterpret_cast(body); + auto result = GetImpl()->CreateWhileStatement(_context, _test, _body); + return result; +} +KOALA_INTEROP_3(CreateWhileStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateWhileStatement(KNativePointer context, KNativePointer original, KNativePointer test, KNativePointer body) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _test = reinterpret_cast(test); + const auto _body = reinterpret_cast(body); + auto result = GetImpl()->UpdateWhileStatement(_context, _original, _test, _body); + return result; +} +KOALA_INTEROP_4(UpdateWhileStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_WhileStatementTestConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->WhileStatementTestConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(WhileStatementTestConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_WhileStatementTest(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->WhileStatementTest(_context, _receiver); + return result; +} +KOALA_INTEROP_2(WhileStatementTest, KNativePointer, KNativePointer, KNativePointer); + +void impl_WhileStatementSetTest(KNativePointer context, KNativePointer receiver, KNativePointer test) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _test = reinterpret_cast(test); + GetImpl()->WhileStatementSetTest(_context, _receiver, _test); + return ; +} +KOALA_INTEROP_V3(WhileStatementSetTest, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_WhileStatementBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->WhileStatementBodyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(WhileStatementBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_WhileStatementBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->WhileStatementBody(_context, _receiver); + return result; +} +KOALA_INTEROP_2(WhileStatementBody, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateFunctionSignature(KNativePointer context, KNativePointer typeParams, KNativePointerArray params, KUInt paramsSequenceLength, KNativePointer returnTypeAnnotation, KBoolean hasReceiver) +{ + const auto _context = reinterpret_cast(context); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _params = reinterpret_cast(params); + const auto _paramsSequenceLength = static_cast(paramsSequenceLength); + const auto _returnTypeAnnotation = reinterpret_cast(returnTypeAnnotation); + const auto _hasReceiver = static_cast(hasReceiver); + auto result = GetImpl()->CreateFunctionSignature(_context, _typeParams, _params, _paramsSequenceLength, _returnTypeAnnotation, _hasReceiver); + return result; +} +KOALA_INTEROP_6(CreateFunctionSignature, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KBoolean); + +KNativePointer impl_FunctionSignatureParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->FunctionSignatureParamsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(FunctionSignatureParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionSignatureParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->FunctionSignatureParams(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(FunctionSignatureParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionSignatureTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionSignatureTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(FunctionSignatureTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionSignatureTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionSignatureTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(FunctionSignatureTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionSignatureReturnType(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionSignatureReturnType(_context, _receiver); + return result; +} +KOALA_INTEROP_2(FunctionSignatureReturnType, KNativePointer, KNativePointer, KNativePointer); + +void impl_FunctionSignatureSetReturnType(KNativePointer context, KNativePointer receiver, KNativePointer type) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _type = reinterpret_cast(type); + GetImpl()->FunctionSignatureSetReturnType(_context, _receiver, _type); + return ; +} +KOALA_INTEROP_V3(FunctionSignatureSetReturnType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionSignatureReturnTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionSignatureReturnTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(FunctionSignatureReturnTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_FunctionSignatureClone(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionSignatureClone(_context, _receiver); + return result; +} +KOALA_INTEROP_2(FunctionSignatureClone, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_FunctionSignatureHasReceiverConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->FunctionSignatureHasReceiverConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(FunctionSignatureHasReceiverConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateChainExpression(KNativePointer context, KNativePointer expression) +{ + const auto _context = reinterpret_cast(context); + const auto _expression = reinterpret_cast(expression); + auto result = GetImpl()->CreateChainExpression(_context, _expression); + return result; +} +KOALA_INTEROP_2(CreateChainExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateChainExpression(KNativePointer context, KNativePointer original, KNativePointer expression) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expression = reinterpret_cast(expression); + auto result = GetImpl()->UpdateChainExpression(_context, _original, _expression); + return result; +} +KOALA_INTEROP_3(UpdateChainExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ChainExpressionGetExpressionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ChainExpressionGetExpressionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ChainExpressionGetExpressionConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ChainExpressionGetExpression(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ChainExpressionGetExpression(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ChainExpressionGetExpression, KNativePointer, KNativePointer, KNativePointer); + +void impl_ChainExpressionCompileToRegConst(KNativePointer context, KNativePointer receiver, KNativePointer pg, KNativePointer objReg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _pg = reinterpret_cast(pg); + const auto _objReg = reinterpret_cast(objReg); + GetImpl()->ChainExpressionCompileToRegConst(_context, _receiver, _pg, _objReg); + return ; +} +KOALA_INTEROP_V4(ChainExpressionCompileToRegConst, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSIntersectionType(KNativePointer context, KNativePointerArray types, KUInt typesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _types = reinterpret_cast(types); + const auto _typesSequenceLength = static_cast(typesSequenceLength); + auto result = GetImpl()->CreateTSIntersectionType(_context, _types, _typesSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateTSIntersectionType, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateTSIntersectionType(KNativePointer context, KNativePointer original, KNativePointerArray types, KUInt typesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _types = reinterpret_cast(types); + const auto _typesSequenceLength = static_cast(typesSequenceLength); + auto result = GetImpl()->UpdateTSIntersectionType(_context, _original, _types, _typesSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateTSIntersectionType, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_TSIntersectionTypeTypesConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSIntersectionTypeTypesConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSIntersectionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateUpdateExpression(KNativePointer context, KNativePointer argument, KInt updateOperator, KBoolean isPrefix) +{ + const auto _context = reinterpret_cast(context); + const auto _argument = reinterpret_cast(argument); + const auto _updateOperator = static_cast(updateOperator); + const auto _isPrefix = static_cast(isPrefix); + auto result = GetImpl()->CreateUpdateExpression(_context, _argument, _updateOperator, _isPrefix); + return result; +} +KOALA_INTEROP_4(CreateUpdateExpression, KNativePointer, KNativePointer, KNativePointer, KInt, KBoolean); + +KNativePointer impl_UpdateUpdateExpression(KNativePointer context, KNativePointer original, KNativePointer argument, KInt updateOperator, KBoolean isPrefix) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _argument = reinterpret_cast(argument); + const auto _updateOperator = static_cast(updateOperator); + const auto _isPrefix = static_cast(isPrefix); + auto result = GetImpl()->UpdateUpdateExpression(_context, _original, _argument, _updateOperator, _isPrefix); + return result; +} +KOALA_INTEROP_5(UpdateUpdateExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt, KBoolean); + +KInt impl_UpdateExpressionOperatorTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->UpdateExpressionOperatorTypeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(UpdateExpressionOperatorTypeConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateExpressionArgument(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->UpdateExpressionArgument(_context, _receiver); + return result; +} +KOALA_INTEROP_2(UpdateExpressionArgument, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateExpressionArgumentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->UpdateExpressionArgumentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(UpdateExpressionArgumentConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_UpdateExpressionIsPrefixConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->UpdateExpressionIsPrefixConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(UpdateExpressionIsPrefixConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateBlockExpression(KNativePointer context, KNativePointerArray statements, KUInt statementsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _statements = reinterpret_cast(statements); + const auto _statementsSequenceLength = static_cast(statementsSequenceLength); + auto result = GetImpl()->CreateBlockExpression(_context, _statements, _statementsSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateBlockExpression, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateBlockExpression(KNativePointer context, KNativePointer original, KNativePointerArray statements, KUInt statementsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _statements = reinterpret_cast(statements); + const auto _statementsSequenceLength = static_cast(statementsSequenceLength); + auto result = GetImpl()->UpdateBlockExpression(_context, _original, _statements, _statementsSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateBlockExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_BlockExpressionStatementsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->BlockExpressionStatementsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(BlockExpressionStatementsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BlockExpressionStatements(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->BlockExpressionStatements(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(BlockExpressionStatements, KNativePointer, KNativePointer, KNativePointer); + +void impl_BlockExpressionAddStatements(KNativePointer context, KNativePointer receiver, KNativePointerArray statements, KUInt statementsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _statements = reinterpret_cast(statements); + const auto _statementsSequenceLength = static_cast(statementsSequenceLength); + GetImpl()->BlockExpressionAddStatements(_context, _receiver, _statements, _statementsSequenceLength); + return ; +} +KOALA_INTEROP_V4(BlockExpressionAddStatements, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_BlockExpressionAddStatement(KNativePointer context, KNativePointer receiver, KNativePointer statement) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _statement = reinterpret_cast(statement); + GetImpl()->BlockExpressionAddStatement(_context, _receiver, _statement); + return ; +} +KOALA_INTEROP_V3(BlockExpressionAddStatement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSTypeLiteral(KNativePointer context, KNativePointerArray members, KUInt membersSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _members = reinterpret_cast(members); + const auto _membersSequenceLength = static_cast(membersSequenceLength); + auto result = GetImpl()->CreateTSTypeLiteral(_context, _members, _membersSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateTSTypeLiteral, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateTSTypeLiteral(KNativePointer context, KNativePointer original, KNativePointerArray members, KUInt membersSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _members = reinterpret_cast(members); + const auto _membersSequenceLength = static_cast(membersSequenceLength); + auto result = GetImpl()->UpdateTSTypeLiteral(_context, _original, _members, _membersSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateTSTypeLiteral, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_TSTypeLiteralMembersConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeLiteralMembersConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeLiteralMembersConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSTypeParameter(KNativePointer context, KNativePointer name, KNativePointer constraint, KNativePointer defaultType) +{ + const auto _context = reinterpret_cast(context); + const auto _name = reinterpret_cast(name); + const auto _constraint = reinterpret_cast(constraint); + const auto _defaultType = reinterpret_cast(defaultType); + auto result = GetImpl()->CreateTSTypeParameter(_context, _name, _constraint, _defaultType); + return result; +} +KOALA_INTEROP_4(CreateTSTypeParameter, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSTypeParameter(KNativePointer context, KNativePointer original, KNativePointer name, KNativePointer constraint, KNativePointer defaultType) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _name = reinterpret_cast(name); + const auto _constraint = reinterpret_cast(constraint); + const auto _defaultType = reinterpret_cast(defaultType); + auto result = GetImpl()->UpdateTSTypeParameter(_context, _original, _name, _constraint, _defaultType); + return result; +} +KOALA_INTEROP_5(UpdateTSTypeParameter, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSTypeParameter1(KNativePointer context, KNativePointer name, KNativePointer constraint, KNativePointer defaultType, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _name = reinterpret_cast(name); + const auto _constraint = reinterpret_cast(constraint); + const auto _defaultType = reinterpret_cast(defaultType); + const auto _flags = static_cast(flags); + auto result = GetImpl()->CreateTSTypeParameter1(_context, _name, _constraint, _defaultType, _flags); + return result; +} +KOALA_INTEROP_5(CreateTSTypeParameter1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateTSTypeParameter1(KNativePointer context, KNativePointer original, KNativePointer name, KNativePointer constraint, KNativePointer defaultType, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _name = reinterpret_cast(name); + const auto _constraint = reinterpret_cast(constraint); + const auto _defaultType = reinterpret_cast(defaultType); + const auto _flags = static_cast(flags); + auto result = GetImpl()->UpdateTSTypeParameter1(_context, _original, _name, _constraint, _defaultType, _flags); + return result; +} +KOALA_INTEROP_6(UpdateTSTypeParameter1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_TSTypeParameterNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeParameterNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeParameterNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeParameterName(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeParameterName(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSTypeParameterName, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeParameterConstraint(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeParameterConstraint(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSTypeParameterConstraint, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeParameterConstraintConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeParameterConstraintConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeParameterConstraintConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeParameterSetConstraint(KNativePointer context, KNativePointer receiver, KNativePointer constraint) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _constraint = reinterpret_cast(constraint); + GetImpl()->TSTypeParameterSetConstraint(_context, _receiver, _constraint); + return ; +} +KOALA_INTEROP_V3(TSTypeParameterSetConstraint, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeParameterDefaultTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeParameterDefaultTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypeParameterDefaultTypeConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeParameterSetDefaultType(KNativePointer context, KNativePointer receiver, KNativePointer defaultType) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _defaultType = reinterpret_cast(defaultType); + GetImpl()->TSTypeParameterSetDefaultType(_context, _receiver, _defaultType); + return ; +} +KOALA_INTEROP_V3(TSTypeParameterSetDefaultType, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSTypeParameterHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeParameterHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSTypeParameterHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_TSTypeParameterEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->TSTypeParameterEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(TSTypeParameterEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeParameterClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TSTypeParameterClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TSTypeParameterClearAnnotations, KNativePointer, KNativePointer); + +void impl_TSTypeParameterDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->TSTypeParameterDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(TSTypeParameterDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeParameterAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeParameterAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeParameterAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeParameterAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeParameterAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeParameterAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypeParameterAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeParameterAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeParameterAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeParameterSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TSTypeParameterSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TSTypeParameterSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_TSTypeParameterSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TSTypeParameterSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TSTypeParameterSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateTSBooleanKeyword(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSBooleanKeyword(_context); + return result; +} +KOALA_INTEROP_1(CreateTSBooleanKeyword, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSBooleanKeyword(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSBooleanKeyword(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSBooleanKeyword, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateSpreadElement(KNativePointer context, KInt nodeType, KNativePointer argument) +{ + const auto _context = reinterpret_cast(context); + const auto _nodeType = static_cast(nodeType); + const auto _argument = reinterpret_cast(argument); + auto result = GetImpl()->CreateSpreadElement(_context, _nodeType, _argument); + return result; +} +KOALA_INTEROP_3(CreateSpreadElement, KNativePointer, KNativePointer, KInt, KNativePointer); + +KNativePointer impl_UpdateSpreadElement(KNativePointer context, KNativePointer original, KInt nodeType, KNativePointer argument) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _nodeType = static_cast(nodeType); + const auto _argument = reinterpret_cast(argument); + auto result = GetImpl()->UpdateSpreadElement(_context, _original, _nodeType, _argument); + return result; +} +KOALA_INTEROP_4(UpdateSpreadElement, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointer); + +KNativePointer impl_SpreadElementArgumentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SpreadElementArgumentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(SpreadElementArgumentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_SpreadElementArgument(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SpreadElementArgument(_context, _receiver); + return result; +} +KOALA_INTEROP_2(SpreadElementArgument, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_SpreadElementIsOptionalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SpreadElementIsOptionalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(SpreadElementIsOptionalConst, KBoolean, KNativePointer, KNativePointer); + +void impl_SpreadElementSetOptional(KNativePointer context, KNativePointer receiver, KBoolean optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _optional_arg = static_cast(optional_arg); + GetImpl()->SpreadElementSetOptional(_context, _receiver, _optional_arg); + return ; +} +KOALA_INTEROP_V3(SpreadElementSetOptional, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_SpreadElementValidateExpression(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SpreadElementValidateExpression(_context, _receiver); + return result; +} +KOALA_INTEROP_2(SpreadElementValidateExpression, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_SpreadElementConvertibleToRest(KNativePointer context, KNativePointer receiver, KBoolean isDeclaration, KBoolean allowPattern) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isDeclaration = static_cast(isDeclaration); + const auto _allowPattern = static_cast(allowPattern); + auto result = GetImpl()->SpreadElementConvertibleToRest(_context, _receiver, _isDeclaration, _allowPattern); + return result; +} +KOALA_INTEROP_4(SpreadElementConvertibleToRest, KBoolean, KNativePointer, KNativePointer, KBoolean, KBoolean); + +KNativePointer impl_SpreadElementTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SpreadElementTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(SpreadElementTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_SpreadElementSetTsTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + GetImpl()->SpreadElementSetTsTypeAnnotation(_context, _receiver, _typeAnnotation); + return ; +} +KOALA_INTEROP_V3(SpreadElementSetTsTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSTypePredicate(KNativePointer context, KNativePointer parameterName, KNativePointer typeAnnotation, KBoolean asserts) +{ + const auto _context = reinterpret_cast(context); + const auto _parameterName = reinterpret_cast(parameterName); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _asserts = static_cast(asserts); + auto result = GetImpl()->CreateTSTypePredicate(_context, _parameterName, _typeAnnotation, _asserts); + return result; +} +KOALA_INTEROP_4(CreateTSTypePredicate, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateTSTypePredicate(KNativePointer context, KNativePointer original, KNativePointer parameterName, KNativePointer typeAnnotation, KBoolean asserts) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _parameterName = reinterpret_cast(parameterName); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _asserts = static_cast(asserts); + auto result = GetImpl()->UpdateTSTypePredicate(_context, _original, _parameterName, _typeAnnotation, _asserts); + return result; +} +KOALA_INTEROP_5(UpdateTSTypePredicate, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_TSTypePredicateParameterNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypePredicateParameterNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypePredicateParameterNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSTypePredicateTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypePredicateTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSTypePredicateTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSTypePredicateAssertsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypePredicateAssertsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSTypePredicateAssertsConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateImportNamespaceSpecifier(KNativePointer context, KNativePointer local) +{ + const auto _context = reinterpret_cast(context); + const auto _local = reinterpret_cast(local); + auto result = GetImpl()->CreateImportNamespaceSpecifier(_context, _local); + return result; +} +KOALA_INTEROP_2(CreateImportNamespaceSpecifier, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateImportNamespaceSpecifier(KNativePointer context, KNativePointer original, KNativePointer local) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _local = reinterpret_cast(local); + auto result = GetImpl()->UpdateImportNamespaceSpecifier(_context, _original, _local); + return result; +} +KOALA_INTEROP_3(UpdateImportNamespaceSpecifier, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportNamespaceSpecifierLocal(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportNamespaceSpecifierLocal(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ImportNamespaceSpecifierLocal, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportNamespaceSpecifierLocalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportNamespaceSpecifierLocalConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ImportNamespaceSpecifierLocalConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateExportNamedDeclaration(KNativePointer context, KNativePointer source, KNativePointerArray specifiers, KUInt specifiersSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _source = reinterpret_cast(source); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + auto result = GetImpl()->CreateExportNamedDeclaration(_context, _source, _specifiers, _specifiersSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateExportNamedDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateExportNamedDeclaration(KNativePointer context, KNativePointer original, KNativePointer source, KNativePointerArray specifiers, KUInt specifiersSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _source = reinterpret_cast(source); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + auto result = GetImpl()->UpdateExportNamedDeclaration(_context, _original, _source, _specifiers, _specifiersSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateExportNamedDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateExportNamedDeclaration1(KNativePointer context, KNativePointer decl, KNativePointerArray specifiers, KUInt specifiersSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _decl = reinterpret_cast(decl); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + auto result = GetImpl()->CreateExportNamedDeclaration1(_context, _decl, _specifiers, _specifiersSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateExportNamedDeclaration1, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateExportNamedDeclaration1(KNativePointer context, KNativePointer original, KNativePointer decl, KNativePointerArray specifiers, KUInt specifiersSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _decl = reinterpret_cast(decl); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + auto result = GetImpl()->UpdateExportNamedDeclaration1(_context, _original, _decl, _specifiers, _specifiersSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateExportNamedDeclaration1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateExportNamedDeclaration2(KNativePointer context, KNativePointer decl) +{ + const auto _context = reinterpret_cast(context); + const auto _decl = reinterpret_cast(decl); + auto result = GetImpl()->CreateExportNamedDeclaration2(_context, _decl); + return result; +} +KOALA_INTEROP_2(CreateExportNamedDeclaration2, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateExportNamedDeclaration2(KNativePointer context, KNativePointer original, KNativePointer decl) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _decl = reinterpret_cast(decl); + auto result = GetImpl()->UpdateExportNamedDeclaration2(_context, _original, _decl); + return result; +} +KOALA_INTEROP_3(UpdateExportNamedDeclaration2, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExportNamedDeclarationDeclConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportNamedDeclarationDeclConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExportNamedDeclarationDeclConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExportNamedDeclarationSourceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExportNamedDeclarationSourceConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExportNamedDeclarationSourceConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExportNamedDeclarationSpecifiersConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ExportNamedDeclarationSpecifiersConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ExportNamedDeclarationSpecifiersConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ExportNamedDeclarationReplaceSpecifiers(KNativePointer context, KNativePointer receiver, KNativePointerArray specifiers, KUInt specifiersSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _specifiers = reinterpret_cast(specifiers); + const auto _specifiersSequenceLength = static_cast(specifiersSequenceLength); + GetImpl()->ExportNamedDeclarationReplaceSpecifiers(_context, _receiver, _specifiers, _specifiersSequenceLength); + return ; +} +KOALA_INTEROP_V4(ExportNamedDeclarationReplaceSpecifiers, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateETSParameterExpression(KNativePointer context, KNativePointer identOrSpread, KBoolean isOptional) +{ + const auto _context = reinterpret_cast(context); + const auto _identOrSpread = reinterpret_cast(identOrSpread); + const auto _isOptional = static_cast(isOptional); + auto result = GetImpl()->CreateETSParameterExpression(_context, _identOrSpread, _isOptional); + return result; +} +KOALA_INTEROP_3(CreateETSParameterExpression, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateETSParameterExpression(KNativePointer context, KNativePointer original, KNativePointer identOrSpread, KBoolean isOptional) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _identOrSpread = reinterpret_cast(identOrSpread); + const auto _isOptional = static_cast(isOptional); + auto result = GetImpl()->UpdateETSParameterExpression(_context, _original, _identOrSpread, _isOptional); + return result; +} +KOALA_INTEROP_4(UpdateETSParameterExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_CreateETSParameterExpression1(KNativePointer context, KNativePointer identOrSpread, KNativePointer initializer) +{ + const auto _context = reinterpret_cast(context); + const auto _identOrSpread = reinterpret_cast(identOrSpread); + const auto _initializer = reinterpret_cast(initializer); + auto result = GetImpl()->CreateETSParameterExpression1(_context, _identOrSpread, _initializer); + return result; +} +KOALA_INTEROP_3(CreateETSParameterExpression1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSParameterExpression1(KNativePointer context, KNativePointer original, KNativePointer identOrSpread, KNativePointer initializer) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _identOrSpread = reinterpret_cast(identOrSpread); + const auto _initializer = reinterpret_cast(initializer); + auto result = GetImpl()->UpdateETSParameterExpression1(_context, _original, _identOrSpread, _initializer); + return result; +} +KOALA_INTEROP_4(UpdateETSParameterExpression1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ETSParameterExpressionNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionIdentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionIdentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSParameterExpressionIdentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionIdent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionIdent(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSParameterExpressionIdent, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionSetIdent(KNativePointer context, KNativePointer receiver, KNativePointer ident) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _ident = reinterpret_cast(ident); + GetImpl()->ETSParameterExpressionSetIdent(_context, _receiver, _ident); + return ; +} +KOALA_INTEROP_V3(ETSParameterExpressionSetIdent, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionSpread(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionSpread(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSParameterExpressionSpread, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionSpreadConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionSpreadConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSParameterExpressionSpreadConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionSetSpread(KNativePointer context, KNativePointer receiver, KNativePointer spread) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _spread = reinterpret_cast(spread); + GetImpl()->ETSParameterExpressionSetSpread(_context, _receiver, _spread); + return ; +} +KOALA_INTEROP_V3(ETSParameterExpressionSetSpread, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionRestParameterConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionRestParameterConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSParameterExpressionRestParameterConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionRestParameter(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionRestParameter(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSParameterExpressionRestParameter, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionInitializerConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionInitializerConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSParameterExpressionInitializerConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionInitializer(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionInitializer(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSParameterExpressionInitializer, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionSetLexerSaved(KNativePointer context, KNativePointer receiver, KStringPtr& savedLexer) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _savedLexer = getStringCopy(savedLexer); + GetImpl()->ETSParameterExpressionSetLexerSaved(_context, _receiver, _savedLexer); + return ; +} +KOALA_INTEROP_V3(ETSParameterExpressionSetLexerSaved, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_ETSParameterExpressionLexerSavedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionLexerSavedConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ETSParameterExpressionLexerSavedConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSParameterExpressionTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionTypeAnnotation(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionTypeAnnotation(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSParameterExpressionTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionSetTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer typeNode) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeNode = reinterpret_cast(typeNode); + GetImpl()->ETSParameterExpressionSetTypeAnnotation(_context, _receiver, _typeNode); + return ; +} +KOALA_INTEROP_V3(ETSParameterExpressionSetTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ETSParameterExpressionIsOptionalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionIsOptionalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSParameterExpressionIsOptionalConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionSetOptional(KNativePointer context, KNativePointer receiver, KBoolean value) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _value = static_cast(value); + GetImpl()->ETSParameterExpressionSetOptional(_context, _receiver, _value); + return ; +} +KOALA_INTEROP_V3(ETSParameterExpressionSetOptional, KNativePointer, KNativePointer, KBoolean); + +void impl_ETSParameterExpressionSetInitializer(KNativePointer context, KNativePointer receiver, KNativePointer initExpr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _initExpr = reinterpret_cast(initExpr); + GetImpl()->ETSParameterExpressionSetInitializer(_context, _receiver, _initExpr); + return ; +} +KOALA_INTEROP_V3(ETSParameterExpressionSetInitializer, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ETSParameterExpressionIsRestParameterConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionIsRestParameterConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSParameterExpressionIsRestParameterConst, KBoolean, KNativePointer, KNativePointer); + +KUInt impl_ETSParameterExpressionGetRequiredParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionGetRequiredParamsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSParameterExpressionGetRequiredParamsConst, KUInt, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionSetRequiredParams(KNativePointer context, KNativePointer receiver, KUInt extraValue) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _extraValue = static_cast(extraValue); + GetImpl()->ETSParameterExpressionSetRequiredParams(_context, _receiver, _extraValue); + return ; +} +KOALA_INTEROP_V3(ETSParameterExpressionSetRequiredParams, KNativePointer, KNativePointer, KUInt); + +KBoolean impl_ETSParameterExpressionHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSParameterExpressionHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSParameterExpressionHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ETSParameterExpressionEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ETSParameterExpressionEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ETSParameterExpressionClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ETSParameterExpressionClearAnnotations, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->ETSParameterExpressionDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(ETSParameterExpressionDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSParameterExpressionAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSParameterExpressionAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSParameterExpressionAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSParameterExpressionAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSParameterExpressionAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSParameterExpressionAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSParameterExpressionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSParameterExpressionSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ETSParameterExpressionSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ETSParameterExpressionSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ETSParameterExpressionSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ETSParameterExpressionSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ETSParameterExpressionSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateTSTypeParameterInstantiation(KNativePointer context, KNativePointerArray params, KUInt paramsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _params = reinterpret_cast(params); + const auto _paramsSequenceLength = static_cast(paramsSequenceLength); + auto result = GetImpl()->CreateTSTypeParameterInstantiation(_context, _params, _paramsSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateTSTypeParameterInstantiation, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateTSTypeParameterInstantiation(KNativePointer context, KNativePointer original, KNativePointerArray params, KUInt paramsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _params = reinterpret_cast(params); + const auto _paramsSequenceLength = static_cast(paramsSequenceLength); + auto result = GetImpl()->UpdateTSTypeParameterInstantiation(_context, _original, _params, _paramsSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateTSTypeParameterInstantiation, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_TSTypeParameterInstantiationParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeParameterInstantiationParamsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeParameterInstantiationParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateNullLiteral(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateNullLiteral(_context); + return result; +} +KOALA_INTEROP_1(CreateNullLiteral, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateNullLiteral(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateNullLiteral(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateNullLiteral, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSInferType(KNativePointer context, KNativePointer typeParam) +{ + const auto _context = reinterpret_cast(context); + const auto _typeParam = reinterpret_cast(typeParam); + auto result = GetImpl()->CreateTSInferType(_context, _typeParam); + return result; +} +KOALA_INTEROP_2(CreateTSInferType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSInferType(KNativePointer context, KNativePointer original, KNativePointer typeParam) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _typeParam = reinterpret_cast(typeParam); + auto result = GetImpl()->UpdateTSInferType(_context, _original, _typeParam); + return result; +} +KOALA_INTEROP_3(UpdateTSInferType, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInferTypeTypeParamConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInferTypeTypeParamConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSInferTypeTypeParamConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateSwitchCaseStatement(KNativePointer context, KNativePointer test, KNativePointerArray consequent, KUInt consequentSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _test = reinterpret_cast(test); + const auto _consequent = reinterpret_cast(consequent); + const auto _consequentSequenceLength = static_cast(consequentSequenceLength); + auto result = GetImpl()->CreateSwitchCaseStatement(_context, _test, _consequent, _consequentSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateSwitchCaseStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateSwitchCaseStatement(KNativePointer context, KNativePointer original, KNativePointer test, KNativePointerArray consequent, KUInt consequentSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _test = reinterpret_cast(test); + const auto _consequent = reinterpret_cast(consequent); + const auto _consequentSequenceLength = static_cast(consequentSequenceLength); + auto result = GetImpl()->UpdateSwitchCaseStatement(_context, _original, _test, _consequent, _consequentSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateSwitchCaseStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_SwitchCaseStatementTest(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SwitchCaseStatementTest(_context, _receiver); + return result; +} +KOALA_INTEROP_2(SwitchCaseStatementTest, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_SwitchCaseStatementTestConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SwitchCaseStatementTestConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(SwitchCaseStatementTestConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_SwitchCaseStatementSetTest(KNativePointer context, KNativePointer receiver, KNativePointer test) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _test = reinterpret_cast(test); + GetImpl()->SwitchCaseStatementSetTest(_context, _receiver, _test); + return ; +} +KOALA_INTEROP_V3(SwitchCaseStatementSetTest, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_SwitchCaseStatementConsequentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->SwitchCaseStatementConsequentConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(SwitchCaseStatementConsequentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateYieldExpression(KNativePointer context, KNativePointer argument, KBoolean isDelegate) +{ + const auto _context = reinterpret_cast(context); + const auto _argument = reinterpret_cast(argument); + const auto _isDelegate = static_cast(isDelegate); + auto result = GetImpl()->CreateYieldExpression(_context, _argument, _isDelegate); + return result; +} +KOALA_INTEROP_3(CreateYieldExpression, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateYieldExpression(KNativePointer context, KNativePointer original, KNativePointer argument, KBoolean isDelegate) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _argument = reinterpret_cast(argument); + const auto _isDelegate = static_cast(isDelegate); + auto result = GetImpl()->UpdateYieldExpression(_context, _original, _argument, _isDelegate); + return result; +} +KOALA_INTEROP_4(UpdateYieldExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_YieldExpressionHasDelegateConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->YieldExpressionHasDelegateConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(YieldExpressionHasDelegateConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_YieldExpressionArgumentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->YieldExpressionArgumentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(YieldExpressionArgumentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSImportEqualsDeclaration(KNativePointer context, KNativePointer id, KNativePointer moduleReference, KBoolean isExport) +{ + const auto _context = reinterpret_cast(context); + const auto _id = reinterpret_cast(id); + const auto _moduleReference = reinterpret_cast(moduleReference); + const auto _isExport = static_cast(isExport); + auto result = GetImpl()->CreateTSImportEqualsDeclaration(_context, _id, _moduleReference, _isExport); + return result; +} +KOALA_INTEROP_4(CreateTSImportEqualsDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateTSImportEqualsDeclaration(KNativePointer context, KNativePointer original, KNativePointer id, KNativePointer moduleReference, KBoolean isExport) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _id = reinterpret_cast(id); + const auto _moduleReference = reinterpret_cast(moduleReference); + const auto _isExport = static_cast(isExport); + auto result = GetImpl()->UpdateTSImportEqualsDeclaration(_context, _original, _id, _moduleReference, _isExport); + return result; +} +KOALA_INTEROP_5(UpdateTSImportEqualsDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_TSImportEqualsDeclarationIdConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSImportEqualsDeclarationIdConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSImportEqualsDeclarationIdConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSImportEqualsDeclarationModuleReferenceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSImportEqualsDeclarationModuleReferenceConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSImportEqualsDeclarationModuleReferenceConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSImportEqualsDeclarationIsExportConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSImportEqualsDeclarationIsExportConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSImportEqualsDeclarationIsExportConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateBooleanLiteral(KNativePointer context, KBoolean value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = static_cast(value); + auto result = GetImpl()->CreateBooleanLiteral(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateBooleanLiteral, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateBooleanLiteral(KNativePointer context, KNativePointer original, KBoolean value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = static_cast(value); + auto result = GetImpl()->UpdateBooleanLiteral(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateBooleanLiteral, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_BooleanLiteralValueConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BooleanLiteralValueConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BooleanLiteralValueConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSNumberKeyword(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSNumberKeyword(_context); + return result; +} +KOALA_INTEROP_1(CreateTSNumberKeyword, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSNumberKeyword(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSNumberKeyword(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSNumberKeyword, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateClassStaticBlock(KNativePointer context, KNativePointer value) +{ + const auto _context = reinterpret_cast(context); + const auto _value = reinterpret_cast(value); + auto result = GetImpl()->CreateClassStaticBlock(_context, _value); + return result; +} +KOALA_INTEROP_2(CreateClassStaticBlock, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateClassStaticBlock(KNativePointer context, KNativePointer original, KNativePointer value) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _value = reinterpret_cast(value); + auto result = GetImpl()->UpdateClassStaticBlock(_context, _original, _value); + return result; +} +KOALA_INTEROP_3(UpdateClassStaticBlock, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassStaticBlockFunction(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassStaticBlockFunction(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassStaticBlockFunction, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassStaticBlockFunctionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassStaticBlockFunctionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassStaticBlockFunctionConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassStaticBlockNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassStaticBlockNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ClassStaticBlockNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSNonNullExpression(KNativePointer context, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->CreateTSNonNullExpression(_context, _expr); + return result; +} +KOALA_INTEROP_2(CreateTSNonNullExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSNonNullExpression(KNativePointer context, KNativePointer original, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->UpdateTSNonNullExpression(_context, _original, _expr); + return result; +} +KOALA_INTEROP_3(UpdateTSNonNullExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSNonNullExpressionExprConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSNonNullExpressionExprConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSNonNullExpressionExprConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSNonNullExpressionExpr(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSNonNullExpressionExpr(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSNonNullExpressionExpr, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSNonNullExpressionSetExpr(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->TSNonNullExpressionSetExpr(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(TSNonNullExpressionSetExpr, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreatePrefixAssertionExpression(KNativePointer context, KNativePointer expr, KNativePointer type) +{ + const auto _context = reinterpret_cast(context); + const auto _expr = reinterpret_cast(expr); + const auto _type = reinterpret_cast(type); + auto result = GetImpl()->CreatePrefixAssertionExpression(_context, _expr, _type); + return result; +} +KOALA_INTEROP_3(CreatePrefixAssertionExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdatePrefixAssertionExpression(KNativePointer context, KNativePointer original, KNativePointer expr, KNativePointer type) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expr = reinterpret_cast(expr); + const auto _type = reinterpret_cast(type); + auto result = GetImpl()->UpdatePrefixAssertionExpression(_context, _original, _expr, _type); + return result; +} +KOALA_INTEROP_4(UpdatePrefixAssertionExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_PrefixAssertionExpressionExprConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PrefixAssertionExpressionExprConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(PrefixAssertionExpressionExprConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_PrefixAssertionExpressionTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->PrefixAssertionExpressionTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(PrefixAssertionExpressionTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateClassExpression(KNativePointer context, KNativePointer def) +{ + const auto _context = reinterpret_cast(context); + const auto _def = reinterpret_cast(def); + auto result = GetImpl()->CreateClassExpression(_context, _def); + return result; +} +KOALA_INTEROP_2(CreateClassExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateClassExpression(KNativePointer context, KNativePointer original, KNativePointer def) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _def = reinterpret_cast(def); + auto result = GetImpl()->UpdateClassExpression(_context, _original, _def); + return result; +} +KOALA_INTEROP_3(UpdateClassExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassExpressionDefinitionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassExpressionDefinitionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassExpressionDefinitionConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateForOfStatement(KNativePointer context, KNativePointer left, KNativePointer right, KNativePointer body, KBoolean isAwait) +{ + const auto _context = reinterpret_cast(context); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + const auto _body = reinterpret_cast(body); + const auto _isAwait = static_cast(isAwait); + auto result = GetImpl()->CreateForOfStatement(_context, _left, _right, _body, _isAwait); + return result; +} +KOALA_INTEROP_5(CreateForOfStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateForOfStatement(KNativePointer context, KNativePointer original, KNativePointer left, KNativePointer right, KNativePointer body, KBoolean isAwait) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + const auto _body = reinterpret_cast(body); + const auto _isAwait = static_cast(isAwait); + auto result = GetImpl()->UpdateForOfStatement(_context, _original, _left, _right, _body, _isAwait); + return result; +} +KOALA_INTEROP_6(UpdateForOfStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_ForOfStatementLeft(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForOfStatementLeft(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ForOfStatementLeft, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForOfStatementLeftConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForOfStatementLeftConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ForOfStatementLeftConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForOfStatementRight(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForOfStatementRight(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ForOfStatementRight, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForOfStatementRightConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForOfStatementRightConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ForOfStatementRightConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForOfStatementBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForOfStatementBody(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ForOfStatementBody, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForOfStatementBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForOfStatementBodyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ForOfStatementBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ForOfStatementIsAwaitConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForOfStatementIsAwaitConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ForOfStatementIsAwaitConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTemplateLiteral(KNativePointer context, KNativePointerArray quasis, KUInt quasisSequenceLength, KNativePointerArray expressions, KUInt expressionsSequenceLength, KStringPtr& multilineString) +{ + const auto _context = reinterpret_cast(context); + const auto _quasis = reinterpret_cast(quasis); + const auto _quasisSequenceLength = static_cast(quasisSequenceLength); + const auto _expressions = reinterpret_cast(expressions); + const auto _expressionsSequenceLength = static_cast(expressionsSequenceLength); + const auto _multilineString = getStringCopy(multilineString); + auto result = GetImpl()->CreateTemplateLiteral(_context, _quasis, _quasisSequenceLength, _expressions, _expressionsSequenceLength, _multilineString); + return result; +} +KOALA_INTEROP_6(CreateTemplateLiteral, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointerArray, KUInt, KStringPtr); + +KNativePointer impl_UpdateTemplateLiteral(KNativePointer context, KNativePointer original, KNativePointerArray quasis, KUInt quasisSequenceLength, KNativePointerArray expressions, KUInt expressionsSequenceLength, KStringPtr& multilineString) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _quasis = reinterpret_cast(quasis); + const auto _quasisSequenceLength = static_cast(quasisSequenceLength); + const auto _expressions = reinterpret_cast(expressions); + const auto _expressionsSequenceLength = static_cast(expressionsSequenceLength); + const auto _multilineString = getStringCopy(multilineString); + auto result = GetImpl()->UpdateTemplateLiteral(_context, _original, _quasis, _quasisSequenceLength, _expressions, _expressionsSequenceLength, _multilineString); + return result; +} +KOALA_INTEROP_7(UpdateTemplateLiteral, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointerArray, KUInt, KStringPtr); + +KNativePointer impl_TemplateLiteralQuasisConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TemplateLiteralQuasisConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TemplateLiteralQuasisConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TemplateLiteralExpressionsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TemplateLiteralExpressionsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TemplateLiteralExpressionsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TemplateLiteralGetMultilineStringConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TemplateLiteralGetMultilineStringConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(TemplateLiteralGetMultilineStringConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSUnionType(KNativePointer context, KNativePointerArray types, KUInt typesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _types = reinterpret_cast(types); + const auto _typesSequenceLength = static_cast(typesSequenceLength); + auto result = GetImpl()->CreateTSUnionType(_context, _types, _typesSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateTSUnionType, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateTSUnionType(KNativePointer context, KNativePointer original, KNativePointerArray types, KUInt typesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _types = reinterpret_cast(types); + const auto _typesSequenceLength = static_cast(typesSequenceLength); + auto result = GetImpl()->UpdateTSUnionType(_context, _original, _types, _typesSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateTSUnionType, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_TSUnionTypeTypesConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSUnionTypeTypesConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSUnionTypeTypesConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSUnknownKeyword(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSUnknownKeyword(_context); + return result; +} +KOALA_INTEROP_1(CreateTSUnknownKeyword, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSUnknownKeyword(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSUnknownKeyword(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSUnknownKeyword, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateIdentifier(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateIdentifier(_context); + return result; +} +KOALA_INTEROP_1(CreateIdentifier, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateIdentifier(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateIdentifier(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateIdentifier, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateIdentifier1(KNativePointer context, KStringPtr& name) +{ + const auto _context = reinterpret_cast(context); + const auto _name = getStringCopy(name); + auto result = GetImpl()->CreateIdentifier1(_context, _name); + return result; +} +KOALA_INTEROP_2(CreateIdentifier1, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_UpdateIdentifier1(KNativePointer context, KNativePointer original, KStringPtr& name) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _name = getStringCopy(name); + auto result = GetImpl()->UpdateIdentifier1(_context, _original, _name); + return result; +} +KOALA_INTEROP_3(UpdateIdentifier1, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_CreateIdentifier2(KNativePointer context, KStringPtr& name, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _name = getStringCopy(name); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + auto result = GetImpl()->CreateIdentifier2(_context, _name, _typeAnnotation); + return result; +} +KOALA_INTEROP_3(CreateIdentifier2, KNativePointer, KNativePointer, KStringPtr, KNativePointer); + +KNativePointer impl_UpdateIdentifier2(KNativePointer context, KNativePointer original, KStringPtr& name, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _name = getStringCopy(name); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + auto result = GetImpl()->UpdateIdentifier2(_context, _original, _name, _typeAnnotation); + return result; +} +KOALA_INTEROP_4(UpdateIdentifier2, KNativePointer, KNativePointer, KNativePointer, KStringPtr, KNativePointer); + +KNativePointer impl_IdentifierNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(IdentifierNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_IdentifierName(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierName(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(IdentifierName, KNativePointer, KNativePointer, KNativePointer); + +void impl_IdentifierSetName(KNativePointer context, KNativePointer receiver, KStringPtr& newName) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _newName = getStringCopy(newName); + GetImpl()->IdentifierSetName(_context, _receiver, _newName); + return ; +} +KOALA_INTEROP_V3(IdentifierSetName, KNativePointer, KNativePointer, KStringPtr); + +KBoolean impl_IdentifierIsErrorPlaceHolderConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierIsErrorPlaceHolderConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierIsErrorPlaceHolderConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_IdentifierIsOptionalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierIsOptionalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierIsOptionalConst, KBoolean, KNativePointer, KNativePointer); + +void impl_IdentifierSetOptional(KNativePointer context, KNativePointer receiver, KBoolean optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _optional_arg = static_cast(optional_arg); + GetImpl()->IdentifierSetOptional(_context, _receiver, _optional_arg); + return ; +} +KOALA_INTEROP_V3(IdentifierSetOptional, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_IdentifierIsReferenceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierIsReferenceConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierIsReferenceConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_IdentifierIsTdzConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierIsTdzConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierIsTdzConst, KBoolean, KNativePointer, KNativePointer); + +void impl_IdentifierSetTdz(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->IdentifierSetTdz(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(IdentifierSetTdz, KNativePointer, KNativePointer); + +void impl_IdentifierSetAccessor(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->IdentifierSetAccessor(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(IdentifierSetAccessor, KNativePointer, KNativePointer); + +KBoolean impl_IdentifierIsAccessorConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierIsAccessorConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierIsAccessorConst, KBoolean, KNativePointer, KNativePointer); + +void impl_IdentifierSetMutator(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->IdentifierSetMutator(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(IdentifierSetMutator, KNativePointer, KNativePointer); + +KBoolean impl_IdentifierIsMutatorConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierIsMutatorConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierIsMutatorConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_IdentifierIsReceiverConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierIsReceiverConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierIsReceiverConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_IdentifierIsPrivateIdentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierIsPrivateIdentConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierIsPrivateIdentConst, KBoolean, KNativePointer, KNativePointer); + +void impl_IdentifierSetPrivate(KNativePointer context, KNativePointer receiver, KBoolean isPrivate) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isPrivate = static_cast(isPrivate); + GetImpl()->IdentifierSetPrivate(_context, _receiver, _isPrivate); + return ; +} +KOALA_INTEROP_V3(IdentifierSetPrivate, KNativePointer, KNativePointer, KBoolean); + +KBoolean impl_IdentifierIsIgnoreBoxConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierIsIgnoreBoxConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierIsIgnoreBoxConst, KBoolean, KNativePointer, KNativePointer); + +void impl_IdentifierSetIgnoreBox(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->IdentifierSetIgnoreBox(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(IdentifierSetIgnoreBox, KNativePointer, KNativePointer); + +KBoolean impl_IdentifierIsAnnotationDeclConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierIsAnnotationDeclConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierIsAnnotationDeclConst, KBoolean, KNativePointer, KNativePointer); + +void impl_IdentifierSetAnnotationDecl(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->IdentifierSetAnnotationDecl(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(IdentifierSetAnnotationDecl, KNativePointer, KNativePointer); + +KBoolean impl_IdentifierIsAnnotationUsageConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierIsAnnotationUsageConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierIsAnnotationUsageConst, KBoolean, KNativePointer, KNativePointer); + +void impl_IdentifierSetAnnotationUsage(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->IdentifierSetAnnotationUsage(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(IdentifierSetAnnotationUsage, KNativePointer, KNativePointer); + +KNativePointer impl_IdentifierCloneReference(KNativePointer context, KNativePointer receiver, KNativePointer parent) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _parent = reinterpret_cast(parent); + auto result = GetImpl()->IdentifierCloneReference(_context, _receiver, _parent); + return result; +} +KOALA_INTEROP_3(IdentifierCloneReference, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_IdentifierValidateExpression(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierValidateExpression(_context, _receiver); + return result; +} +KOALA_INTEROP_2(IdentifierValidateExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_IdentifierTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->IdentifierTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(IdentifierTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_IdentifierSetTsTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + GetImpl()->IdentifierSetTsTypeAnnotation(_context, _receiver, _typeAnnotation); + return ; +} +KOALA_INTEROP_V3(IdentifierSetTsTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateOpaqueTypeNode1(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateOpaqueTypeNode1(_context); + return result; +} +KOALA_INTEROP_1(CreateOpaqueTypeNode1, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateOpaqueTypeNode1(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateOpaqueTypeNode1(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateOpaqueTypeNode1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateBlockStatement(KNativePointer context, KNativePointerArray statementList, KUInt statementListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _statementList = reinterpret_cast(statementList); + const auto _statementListSequenceLength = static_cast(statementListSequenceLength); + auto result = GetImpl()->CreateBlockStatement(_context, _statementList, _statementListSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateBlockStatement, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateBlockStatement(KNativePointer context, KNativePointer original, KNativePointerArray statementList, KUInt statementListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _statementList = reinterpret_cast(statementList); + const auto _statementListSequenceLength = static_cast(statementListSequenceLength); + auto result = GetImpl()->UpdateBlockStatement(_context, _original, _statementList, _statementListSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateBlockStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_BlockStatementStatementsForUpdates(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->BlockStatementStatementsForUpdates(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(BlockStatementStatementsForUpdates, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BlockStatementStatements(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->BlockStatementStatements(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(BlockStatementStatements, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BlockStatementStatementsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->BlockStatementStatementsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(BlockStatementStatementsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_BlockStatementSetStatements(KNativePointer context, KNativePointer receiver, KNativePointerArray statementList, KUInt statementListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _statementList = reinterpret_cast(statementList); + const auto _statementListSequenceLength = static_cast(statementListSequenceLength); + GetImpl()->BlockStatementSetStatements(_context, _receiver, _statementList, _statementListSequenceLength); + return ; +} +KOALA_INTEROP_V4(BlockStatementSetStatements, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_BlockStatementAddStatements(KNativePointer context, KNativePointer receiver, KNativePointerArray statementList, KUInt statementListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _statementList = reinterpret_cast(statementList); + const auto _statementListSequenceLength = static_cast(statementListSequenceLength); + GetImpl()->BlockStatementAddStatements(_context, _receiver, _statementList, _statementListSequenceLength); + return ; +} +KOALA_INTEROP_V4(BlockStatementAddStatements, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_BlockStatementClearStatements(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->BlockStatementClearStatements(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(BlockStatementClearStatements, KNativePointer, KNativePointer); + +void impl_BlockStatementAddStatement(KNativePointer context, KNativePointer receiver, KNativePointer statement) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _statement = reinterpret_cast(statement); + GetImpl()->BlockStatementAddStatement(_context, _receiver, _statement); + return ; +} +KOALA_INTEROP_V3(BlockStatementAddStatement, KNativePointer, KNativePointer, KNativePointer); + +void impl_BlockStatementAddStatement1(KNativePointer context, KNativePointer receiver, KUInt idx, KNativePointer statement) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _idx = static_cast(idx); + const auto _statement = reinterpret_cast(statement); + GetImpl()->BlockStatementAddStatement1(_context, _receiver, _idx, _statement); + return ; +} +KOALA_INTEROP_V4(BlockStatementAddStatement1, KNativePointer, KNativePointer, KUInt, KNativePointer); + +void impl_BlockStatementAddTrailingBlock(KNativePointer context, KNativePointer receiver, KNativePointer stmt, KNativePointer trailingBlock) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _stmt = reinterpret_cast(stmt); + const auto _trailingBlock = reinterpret_cast(trailingBlock); + GetImpl()->BlockStatementAddTrailingBlock(_context, _receiver, _stmt, _trailingBlock); + return ; +} +KOALA_INTEROP_V4(BlockStatementAddTrailingBlock, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BlockStatementSearchStatementInTrailingBlock(KNativePointer context, KNativePointer receiver, KNativePointer item) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _item = reinterpret_cast(item); + auto result = GetImpl()->BlockStatementSearchStatementInTrailingBlock(_context, _receiver, _item); + return result; +} +KOALA_INTEROP_3(BlockStatementSearchStatementInTrailingBlock, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateDirectEvalExpression(KNativePointer context, KNativePointer callee, KNativePointerArray _arguments, KUInt _argumentsSequenceLength, KNativePointer typeParams, KBoolean optional_arg, KUInt parserStatus) +{ + const auto _context = reinterpret_cast(context); + const auto _callee = reinterpret_cast(callee); + const auto __arguments = reinterpret_cast(_arguments); + const auto __argumentsSequenceLength = static_cast(_argumentsSequenceLength); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _optional_arg = static_cast(optional_arg); + const auto _parserStatus = static_cast(parserStatus); + auto result = GetImpl()->CreateDirectEvalExpression(_context, _callee, __arguments, __argumentsSequenceLength, _typeParams, _optional_arg, _parserStatus); + return result; +} +KOALA_INTEROP_7(CreateDirectEvalExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KBoolean, KUInt); + +KNativePointer impl_UpdateDirectEvalExpression(KNativePointer context, KNativePointer original, KNativePointer callee, KNativePointerArray _arguments, KUInt _argumentsSequenceLength, KNativePointer typeParams, KBoolean optional_arg, KUInt parserStatus) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _callee = reinterpret_cast(callee); + const auto __arguments = reinterpret_cast(_arguments); + const auto __argumentsSequenceLength = static_cast(_argumentsSequenceLength); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _optional_arg = static_cast(optional_arg); + const auto _parserStatus = static_cast(parserStatus); + auto result = GetImpl()->UpdateDirectEvalExpression(_context, _original, _callee, __arguments, __argumentsSequenceLength, _typeParams, _optional_arg, _parserStatus); + return result; +} +KOALA_INTEROP_8(UpdateDirectEvalExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KNativePointer, KBoolean, KUInt); + +KNativePointer impl_CreateTSTypeParameterDeclaration(KNativePointer context, KNativePointerArray params, KUInt paramsSequenceLength, KUInt requiredParams) +{ + const auto _context = reinterpret_cast(context); + const auto _params = reinterpret_cast(params); + const auto _paramsSequenceLength = static_cast(paramsSequenceLength); + const auto _requiredParams = static_cast(requiredParams); + auto result = GetImpl()->CreateTSTypeParameterDeclaration(_context, _params, _paramsSequenceLength, _requiredParams); + return result; +} +KOALA_INTEROP_4(CreateTSTypeParameterDeclaration, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KUInt); + +KNativePointer impl_UpdateTSTypeParameterDeclaration(KNativePointer context, KNativePointer original, KNativePointerArray params, KUInt paramsSequenceLength, KUInt requiredParams) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _params = reinterpret_cast(params); + const auto _paramsSequenceLength = static_cast(paramsSequenceLength); + const auto _requiredParams = static_cast(requiredParams); + auto result = GetImpl()->UpdateTSTypeParameterDeclaration(_context, _original, _params, _paramsSequenceLength, _requiredParams); + return result; +} +KOALA_INTEROP_5(UpdateTSTypeParameterDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt, KUInt); + +KNativePointer impl_TSTypeParameterDeclarationParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TSTypeParameterDeclarationParamsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TSTypeParameterDeclarationParamsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeParameterDeclarationAddParam(KNativePointer context, KNativePointer receiver, KNativePointer param) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _param = reinterpret_cast(param); + GetImpl()->TSTypeParameterDeclarationAddParam(_context, _receiver, _param); + return ; +} +KOALA_INTEROP_V3(TSTypeParameterDeclarationAddParam, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSTypeParameterDeclarationSetValueParams(KNativePointer context, KNativePointer receiver, KNativePointer source, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + const auto _index = static_cast(index); + GetImpl()->TSTypeParameterDeclarationSetValueParams(_context, _receiver, _source, _index); + return ; +} +KOALA_INTEROP_V4(TSTypeParameterDeclarationSetValueParams, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KUInt impl_TSTypeParameterDeclarationRequiredParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSTypeParameterDeclarationRequiredParamsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSTypeParameterDeclarationRequiredParamsConst, KUInt, KNativePointer, KNativePointer); + +KNativePointer impl_CreateMethodDefinition(KNativePointer context, KInt kind, KNativePointer key, KNativePointer value, KInt modifiers, KBoolean isComputed) +{ + const auto _context = reinterpret_cast(context); + const auto _kind = static_cast(kind); + const auto _key = reinterpret_cast(key); + const auto _value = reinterpret_cast(value); + const auto _modifiers = static_cast(modifiers); + const auto _isComputed = static_cast(isComputed); + auto result = GetImpl()->CreateMethodDefinition(_context, _kind, _key, _value, _modifiers, _isComputed); + return result; +} +KOALA_INTEROP_6(CreateMethodDefinition, KNativePointer, KNativePointer, KInt, KNativePointer, KNativePointer, KInt, KBoolean); + +KNativePointer impl_UpdateMethodDefinition(KNativePointer context, KNativePointer original, KInt kind, KNativePointer key, KNativePointer value, KInt modifiers, KBoolean isComputed) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _kind = static_cast(kind); + const auto _key = reinterpret_cast(key); + const auto _value = reinterpret_cast(value); + const auto _modifiers = static_cast(modifiers); + const auto _isComputed = static_cast(isComputed); + auto result = GetImpl()->UpdateMethodDefinition(_context, _original, _kind, _key, _value, _modifiers, _isComputed); + return result; +} +KOALA_INTEROP_7(UpdateMethodDefinition, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointer, KNativePointer, KInt, KBoolean); + +KInt impl_MethodDefinitionKindConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionKindConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionKindConst, KInt, KNativePointer, KNativePointer); + +KBoolean impl_MethodDefinitionIsConstructorConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionIsConstructorConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionIsConstructorConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_MethodDefinitionIsMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionIsMethodConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionIsMethodConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_MethodDefinitionIsExtensionMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionIsExtensionMethodConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionIsExtensionMethodConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_MethodDefinitionIsGetterConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionIsGetterConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionIsGetterConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_MethodDefinitionIsSetterConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionIsSetterConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionIsSetterConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_MethodDefinitionIsDefaultAccessModifierConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionIsDefaultAccessModifierConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionIsDefaultAccessModifierConst, KBoolean, KNativePointer, KNativePointer); + +void impl_MethodDefinitionSetDefaultAccessModifier(KNativePointer context, KNativePointer receiver, KBoolean isDefault) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isDefault = static_cast(isDefault); + GetImpl()->MethodDefinitionSetDefaultAccessModifier(_context, _receiver, _isDefault); + return ; +} +KOALA_INTEROP_V3(MethodDefinitionSetDefaultAccessModifier, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_MethodDefinitionOverloadsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->MethodDefinitionOverloadsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(MethodDefinitionOverloadsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_MethodDefinitionBaseOverloadMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionBaseOverloadMethodConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(MethodDefinitionBaseOverloadMethodConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_MethodDefinitionBaseOverloadMethod(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionBaseOverloadMethod(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionBaseOverloadMethod, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_MethodDefinitionAsyncPairMethodConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionAsyncPairMethodConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(MethodDefinitionAsyncPairMethodConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_MethodDefinitionAsyncPairMethod(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionAsyncPairMethod(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionAsyncPairMethod, KNativePointer, KNativePointer, KNativePointer); + +void impl_MethodDefinitionSetOverloads(KNativePointer context, KNativePointer receiver, KNativePointerArray overloads, KUInt overloadsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _overloads = reinterpret_cast(overloads); + const auto _overloadsSequenceLength = static_cast(overloadsSequenceLength); + GetImpl()->MethodDefinitionSetOverloads(_context, _receiver, _overloads, _overloadsSequenceLength); + return ; +} +KOALA_INTEROP_V4(MethodDefinitionSetOverloads, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_MethodDefinitionAddOverload(KNativePointer context, KNativePointer receiver, KNativePointer overload) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _overload = reinterpret_cast(overload); + GetImpl()->MethodDefinitionAddOverload(_context, _receiver, _overload); + return ; +} +KOALA_INTEROP_V3(MethodDefinitionAddOverload, KNativePointer, KNativePointer, KNativePointer); + +void impl_MethodDefinitionSetBaseOverloadMethod(KNativePointer context, KNativePointer receiver, KNativePointer baseOverloadMethod) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _baseOverloadMethod = reinterpret_cast(baseOverloadMethod); + GetImpl()->MethodDefinitionSetBaseOverloadMethod(_context, _receiver, _baseOverloadMethod); + return ; +} +KOALA_INTEROP_V3(MethodDefinitionSetBaseOverloadMethod, KNativePointer, KNativePointer, KNativePointer); + +void impl_MethodDefinitionSetAsyncPairMethod(KNativePointer context, KNativePointer receiver, KNativePointer asyncPairMethod) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _asyncPairMethod = reinterpret_cast(asyncPairMethod); + GetImpl()->MethodDefinitionSetAsyncPairMethod(_context, _receiver, _asyncPairMethod); + return ; +} +KOALA_INTEROP_V3(MethodDefinitionSetAsyncPairMethod, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_MethodDefinitionHasOverload(KNativePointer context, KNativePointer receiver, KNativePointer overload) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _overload = reinterpret_cast(overload); + auto result = GetImpl()->MethodDefinitionHasOverload(_context, _receiver, _overload); + return result; +} +KOALA_INTEROP_3(MethodDefinitionHasOverload, KBoolean, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_MethodDefinitionFunction(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionFunction(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MethodDefinitionFunction, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_MethodDefinitionFunctionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MethodDefinitionFunctionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(MethodDefinitionFunctionConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_MethodDefinitionInitializeOverloadInfo(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->MethodDefinitionInitializeOverloadInfo(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(MethodDefinitionInitializeOverloadInfo, KNativePointer, KNativePointer); + +void impl_MethodDefinitionEmplaceOverloads(KNativePointer context, KNativePointer receiver, KNativePointer overloads) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _overloads = reinterpret_cast(overloads); + GetImpl()->MethodDefinitionEmplaceOverloads(_context, _receiver, _overloads); + return ; +} +KOALA_INTEROP_V3(MethodDefinitionEmplaceOverloads, KNativePointer, KNativePointer, KNativePointer); + +void impl_MethodDefinitionClearOverloads(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->MethodDefinitionClearOverloads(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(MethodDefinitionClearOverloads, KNativePointer, KNativePointer); + +void impl_MethodDefinitionSetValueOverloads(KNativePointer context, KNativePointer receiver, KNativePointer overloads, KUInt index) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _overloads = reinterpret_cast(overloads); + const auto _index = static_cast(index); + GetImpl()->MethodDefinitionSetValueOverloads(_context, _receiver, _overloads, _index); + return ; +} +KOALA_INTEROP_V4(MethodDefinitionSetValueOverloads, KNativePointer, KNativePointer, KNativePointer, KUInt); + +KNativePointer impl_CreateOverloadDeclaration(KNativePointer context, KNativePointer key, KInt modifiers) +{ + const auto _context = reinterpret_cast(context); + const auto _key = reinterpret_cast(key); + const auto _modifiers = static_cast(modifiers); + auto result = GetImpl()->CreateOverloadDeclaration(_context, _key, _modifiers); + return result; +} +KOALA_INTEROP_3(CreateOverloadDeclaration, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateOverloadDeclaration(KNativePointer context, KNativePointer original, KNativePointer key, KInt modifiers) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _key = reinterpret_cast(key); + const auto _modifiers = static_cast(modifiers); + auto result = GetImpl()->UpdateOverloadDeclaration(_context, _original, _key, _modifiers); + return result; +} +KOALA_INTEROP_4(UpdateOverloadDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); + +KInt impl_OverloadDeclarationFlagConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->OverloadDeclarationFlagConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(OverloadDeclarationFlagConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_OverloadDeclarationOverloadedList(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->OverloadDeclarationOverloadedList(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(OverloadDeclarationOverloadedList, KNativePointer, KNativePointer, KNativePointer); + +void impl_OverloadDeclarationSetOverloadedList(KNativePointer context, KNativePointer receiver, KNativePointerArray overloadedList, KUInt overloadedListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _overloadedList = reinterpret_cast(overloadedList); + const auto _overloadedListSequenceLength = static_cast(overloadedListSequenceLength); + GetImpl()->OverloadDeclarationSetOverloadedList(_context, _receiver, _overloadedList, _overloadedListSequenceLength); + return ; +} +KOALA_INTEROP_V4(OverloadDeclarationSetOverloadedList, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_OverloadDeclarationPushFront(KNativePointer context, KNativePointer receiver, KNativePointer overloadedExpression) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _overloadedExpression = reinterpret_cast(overloadedExpression); + GetImpl()->OverloadDeclarationPushFront(_context, _receiver, _overloadedExpression); + return ; +} +KOALA_INTEROP_V3(OverloadDeclarationPushFront, KNativePointer, KNativePointer, KNativePointer); + +void impl_OverloadDeclarationAddOverloadDeclFlag(KNativePointer context, KNativePointer receiver, KInt overloadFlag) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _overloadFlag = static_cast(overloadFlag); + GetImpl()->OverloadDeclarationAddOverloadDeclFlag(_context, _receiver, _overloadFlag); + return ; +} +KOALA_INTEROP_V3(OverloadDeclarationAddOverloadDeclFlag, KNativePointer, KNativePointer, KInt); + +KBoolean impl_OverloadDeclarationHasOverloadDeclFlagConst(KNativePointer context, KNativePointer receiver, KInt overloadFlag) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _overloadFlag = static_cast(overloadFlag); + auto result = GetImpl()->OverloadDeclarationHasOverloadDeclFlagConst(_context, _receiver, _overloadFlag); + return result; +} +KOALA_INTEROP_3(OverloadDeclarationHasOverloadDeclFlagConst, KBoolean, KNativePointer, KNativePointer, KInt); + +KBoolean impl_OverloadDeclarationIsConstructorOverloadDeclaration(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->OverloadDeclarationIsConstructorOverloadDeclaration(_context, _receiver); + return result; +} +KOALA_INTEROP_2(OverloadDeclarationIsConstructorOverloadDeclaration, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_OverloadDeclarationIsFunctionOverloadDeclaration(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->OverloadDeclarationIsFunctionOverloadDeclaration(_context, _receiver); + return result; +} +KOALA_INTEROP_2(OverloadDeclarationIsFunctionOverloadDeclaration, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_OverloadDeclarationIsClassMethodOverloadDeclaration(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->OverloadDeclarationIsClassMethodOverloadDeclaration(_context, _receiver); + return result; +} +KOALA_INTEROP_2(OverloadDeclarationIsClassMethodOverloadDeclaration, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_OverloadDeclarationIsInterfaceMethodOverloadDeclaration(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->OverloadDeclarationIsInterfaceMethodOverloadDeclaration(_context, _receiver); + return result; +} +KOALA_INTEROP_2(OverloadDeclarationIsInterfaceMethodOverloadDeclaration, KBoolean, KNativePointer, KNativePointer); + +void impl_OverloadDeclarationDumpModifierConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->OverloadDeclarationDumpModifierConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(OverloadDeclarationDumpModifierConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSNullKeyword(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSNullKeyword(_context); + return result; +} +KOALA_INTEROP_1(CreateTSNullKeyword, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSNullKeyword(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSNullKeyword(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSNullKeyword, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSInterfaceHeritage(KNativePointer context, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->CreateTSInterfaceHeritage(_context, _expr); + return result; +} +KOALA_INTEROP_2(CreateTSInterfaceHeritage, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSInterfaceHeritage(KNativePointer context, KNativePointer original, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->UpdateTSInterfaceHeritage(_context, _original, _expr); + return result; +} +KOALA_INTEROP_3(UpdateTSInterfaceHeritage, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceHeritageExpr(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceHeritageExpr(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSInterfaceHeritageExpr, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSInterfaceHeritageExprConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSInterfaceHeritageExprConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSInterfaceHeritageExprConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ExpressionIsGroupedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionIsGroupedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExpressionIsGroupedConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ExpressionSetGrouped(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ExpressionSetGrouped(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ExpressionSetGrouped, KNativePointer, KNativePointer); + +KNativePointer impl_ExpressionAsLiteralConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionAsLiteralConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExpressionAsLiteralConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExpressionAsLiteral(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionAsLiteral(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExpressionAsLiteral, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ExpressionIsLiteralConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionIsLiteralConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExpressionIsLiteralConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ExpressionIsTypeNodeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionIsTypeNodeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExpressionIsTypeNodeConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ExpressionIsAnnotatedExpressionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionIsAnnotatedExpressionConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExpressionIsAnnotatedExpressionConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_ExpressionAsTypeNode(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionAsTypeNode(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExpressionAsTypeNode, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExpressionAsTypeNodeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionAsTypeNodeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExpressionAsTypeNodeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExpressionAsAnnotatedExpression(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionAsAnnotatedExpression(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExpressionAsAnnotatedExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ExpressionAsAnnotatedExpressionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionAsAnnotatedExpressionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ExpressionAsAnnotatedExpressionConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ExpressionIsBrokenExpressionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionIsBrokenExpressionConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ExpressionIsBrokenExpressionConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_ExpressionToStringConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ExpressionToStringConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ExpressionToStringConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AnnotatedExpressionTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AnnotatedExpressionTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AnnotatedExpressionTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_AnnotatedExpressionSetTsTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + GetImpl()->AnnotatedExpressionSetTsTypeAnnotation(_context, _receiver, _typeAnnotation); + return ; +} +KOALA_INTEROP_V3(AnnotatedExpressionSetTsTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_MaybeOptionalExpressionIsOptionalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->MaybeOptionalExpressionIsOptionalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(MaybeOptionalExpressionIsOptionalConst, KBoolean, KNativePointer, KNativePointer); + +void impl_MaybeOptionalExpressionClearOptional(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->MaybeOptionalExpressionClearOptional(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(MaybeOptionalExpressionClearOptional, KNativePointer, KNativePointer); + +KNativePointer impl_CreateSrcDumper(KNativePointer context, KNativePointer node) +{ + const auto _context = reinterpret_cast(context); + const auto _node = reinterpret_cast(node); + auto result = GetImpl()->CreateSrcDumper(_context, _node); + return result; +} +KOALA_INTEROP_2(CreateSrcDumper, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateSrcDumper1(KNativePointer context, KNativePointer node, KBoolean isDeclgen) +{ + const auto _context = reinterpret_cast(context); + const auto _node = reinterpret_cast(node); + const auto _isDeclgen = static_cast(isDeclgen); + auto result = GetImpl()->CreateSrcDumper1(_context, _node, _isDeclgen); + return result; +} +KOALA_INTEROP_3(CreateSrcDumper1, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +void impl_SrcDumperAdd(KNativePointer context, KNativePointer receiver, KStringPtr& str) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _str = getStringCopy(str); + GetImpl()->SrcDumperAdd(_context, _receiver, _str); + return ; +} +KOALA_INTEROP_V3(SrcDumperAdd, KNativePointer, KNativePointer, KStringPtr); + +void impl_SrcDumperAdd1(KNativePointer context, KNativePointer receiver, KBoolean i) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _i = static_cast(i); + GetImpl()->SrcDumperAdd1(_context, _receiver, _i); + return ; +} +KOALA_INTEROP_V3(SrcDumperAdd1, KNativePointer, KNativePointer, KBoolean); + +void impl_SrcDumperAdd2(KNativePointer context, KNativePointer receiver, KInt i) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _i = static_cast(i); + GetImpl()->SrcDumperAdd2(_context, _receiver, _i); + return ; +} +KOALA_INTEROP_V3(SrcDumperAdd2, KNativePointer, KNativePointer, KInt); + +void impl_SrcDumperAdd3(KNativePointer context, KNativePointer receiver, KInt i) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _i = static_cast(i); + GetImpl()->SrcDumperAdd3(_context, _receiver, _i); + return ; +} +KOALA_INTEROP_V3(SrcDumperAdd3, KNativePointer, KNativePointer, KInt); + +void impl_SrcDumperAdd4(KNativePointer context, KNativePointer receiver, KLong l) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _l = static_cast(l); + GetImpl()->SrcDumperAdd4(_context, _receiver, _l); + return ; +} +KOALA_INTEROP_V3(SrcDumperAdd4, KNativePointer, KNativePointer, KLong); + +void impl_SrcDumperAdd5(KNativePointer context, KNativePointer receiver, KFloat f) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _f = static_cast(f); + GetImpl()->SrcDumperAdd5(_context, _receiver, _f); + return ; +} +KOALA_INTEROP_V3(SrcDumperAdd5, KNativePointer, KNativePointer, KFloat); + +void impl_SrcDumperAdd6(KNativePointer context, KNativePointer receiver, KDouble d) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _d = static_cast(d); + GetImpl()->SrcDumperAdd6(_context, _receiver, _d); + return ; +} +KOALA_INTEROP_V3(SrcDumperAdd6, KNativePointer, KNativePointer, KDouble); + +KNativePointer impl_SrcDumperStrConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SrcDumperStrConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(SrcDumperStrConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_SrcDumperIncrIndent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->SrcDumperIncrIndent(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(SrcDumperIncrIndent, KNativePointer, KNativePointer); + +void impl_SrcDumperDecrIndent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->SrcDumperDecrIndent(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(SrcDumperDecrIndent, KNativePointer, KNativePointer); + +void impl_SrcDumperEndl(KNativePointer context, KNativePointer receiver, KUInt num) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _num = static_cast(num); + GetImpl()->SrcDumperEndl(_context, _receiver, _num); + return ; +} +KOALA_INTEROP_V3(SrcDumperEndl, KNativePointer, KNativePointer, KUInt); + +KBoolean impl_SrcDumperIsDeclgenConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SrcDumperIsDeclgenConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(SrcDumperIsDeclgenConst, KBoolean, KNativePointer, KNativePointer); + +void impl_SrcDumperDumpNode(KNativePointer context, KNativePointer receiver, KStringPtr& key) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _key = getStringCopy(key); + GetImpl()->SrcDumperDumpNode(_context, _receiver, _key); + return ; +} +KOALA_INTEROP_V3(SrcDumperDumpNode, KNativePointer, KNativePointer, KStringPtr); + +void impl_SrcDumperRemoveNode(KNativePointer context, KNativePointer receiver, KStringPtr& key) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _key = getStringCopy(key); + GetImpl()->SrcDumperRemoveNode(_context, _receiver, _key); + return ; +} +KOALA_INTEROP_V3(SrcDumperRemoveNode, KNativePointer, KNativePointer, KStringPtr); + +KBoolean impl_SrcDumperIsIndirectDepPhaseConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SrcDumperIsIndirectDepPhaseConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(SrcDumperIsIndirectDepPhaseConst, KBoolean, KNativePointer, KNativePointer); + +void impl_SrcDumperRun(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->SrcDumperRun(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(SrcDumperRun, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSClassLiteral(KNativePointer context, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->CreateETSClassLiteral(_context, _expr); + return result; +} +KOALA_INTEROP_2(CreateETSClassLiteral, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSClassLiteral(KNativePointer context, KNativePointer original, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expr = reinterpret_cast(expr); + auto result = GetImpl()->UpdateETSClassLiteral(_context, _original, _expr); + return result; +} +KOALA_INTEROP_3(UpdateETSClassLiteral, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSClassLiteralExprConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSClassLiteralExprConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSClassLiteralExprConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateBreakStatement(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateBreakStatement(_context); + return result; +} +KOALA_INTEROP_1(CreateBreakStatement, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateBreakStatement(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateBreakStatement(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateBreakStatement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateBreakStatement1(KNativePointer context, KNativePointer ident) +{ + const auto _context = reinterpret_cast(context); + const auto _ident = reinterpret_cast(ident); + auto result = GetImpl()->CreateBreakStatement1(_context, _ident); + return result; +} +KOALA_INTEROP_2(CreateBreakStatement1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateBreakStatement1(KNativePointer context, KNativePointer original, KNativePointer ident) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _ident = reinterpret_cast(ident); + auto result = GetImpl()->UpdateBreakStatement1(_context, _original, _ident); + return result; +} +KOALA_INTEROP_3(UpdateBreakStatement1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BreakStatementIdentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BreakStatementIdentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(BreakStatementIdentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BreakStatementIdent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BreakStatementIdent(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BreakStatementIdent, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_BreakStatementTargetConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BreakStatementTargetConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(BreakStatementTargetConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_BreakStatementHasTargetConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->BreakStatementHasTargetConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(BreakStatementHasTargetConst, KBoolean, KNativePointer, KNativePointer); + +void impl_BreakStatementSetTarget(KNativePointer context, KNativePointer receiver, KNativePointer target) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _target = reinterpret_cast(target); + GetImpl()->BreakStatementSetTarget(_context, _receiver, _target); + return ; +} +KOALA_INTEROP_V3(BreakStatementSetTarget, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateRegExpLiteral(KNativePointer context, KStringPtr& pattern, KInt flags, KStringPtr& flagsStr) +{ + const auto _context = reinterpret_cast(context); + const auto _pattern = getStringCopy(pattern); + const auto _flags = static_cast(flags); + const auto _flagsStr = getStringCopy(flagsStr); + auto result = GetImpl()->CreateRegExpLiteral(_context, _pattern, _flags, _flagsStr); + return result; +} +KOALA_INTEROP_4(CreateRegExpLiteral, KNativePointer, KNativePointer, KStringPtr, KInt, KStringPtr); + +KNativePointer impl_UpdateRegExpLiteral(KNativePointer context, KNativePointer original, KStringPtr& pattern, KInt flags, KStringPtr& flagsStr) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _pattern = getStringCopy(pattern); + const auto _flags = static_cast(flags); + const auto _flagsStr = getStringCopy(flagsStr); + auto result = GetImpl()->UpdateRegExpLiteral(_context, _original, _pattern, _flags, _flagsStr); + return result; +} +KOALA_INTEROP_5(UpdateRegExpLiteral, KNativePointer, KNativePointer, KNativePointer, KStringPtr, KInt, KStringPtr); + +KNativePointer impl_RegExpLiteralPatternConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->RegExpLiteralPatternConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(RegExpLiteralPatternConst, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_RegExpLiteralFlagsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->RegExpLiteralFlagsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(RegExpLiteralFlagsConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSMappedType(KNativePointer context, KNativePointer typeParameter, KNativePointer typeAnnotation, KInt readonly_arg, KInt optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _typeParameter = reinterpret_cast(typeParameter); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _readonly_arg = static_cast(readonly_arg); + const auto _optional_arg = static_cast(optional_arg); + auto result = GetImpl()->CreateTSMappedType(_context, _typeParameter, _typeAnnotation, _readonly_arg, _optional_arg); + return result; +} +KOALA_INTEROP_5(CreateTSMappedType, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt, KInt); + +KNativePointer impl_UpdateTSMappedType(KNativePointer context, KNativePointer original, KNativePointer typeParameter, KNativePointer typeAnnotation, KInt readonly_arg, KInt optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _typeParameter = reinterpret_cast(typeParameter); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _readonly_arg = static_cast(readonly_arg); + const auto _optional_arg = static_cast(optional_arg); + auto result = GetImpl()->UpdateTSMappedType(_context, _original, _typeParameter, _typeAnnotation, _readonly_arg, _optional_arg); + return result; +} +KOALA_INTEROP_6(UpdateTSMappedType, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt, KInt); + +KNativePointer impl_TSMappedTypeTypeParameter(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMappedTypeTypeParameter(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSMappedTypeTypeParameter, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSMappedTypeTypeAnnotation(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMappedTypeTypeAnnotation(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSMappedTypeTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KInt impl_TSMappedTypeReadonly(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMappedTypeReadonly(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSMappedTypeReadonly, KInt, KNativePointer, KNativePointer); + +KInt impl_TSMappedTypeOptional(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSMappedTypeOptional(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSMappedTypeOptional, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSAnyKeyword(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSAnyKeyword(_context); + return result; +} +KOALA_INTEROP_1(CreateTSAnyKeyword, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSAnyKeyword(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSAnyKeyword(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSAnyKeyword, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateClassDeclaration(KNativePointer context, KNativePointer def) +{ + const auto _context = reinterpret_cast(context); + const auto _def = reinterpret_cast(def); + auto result = GetImpl()->CreateClassDeclaration(_context, _def); + return result; +} +KOALA_INTEROP_2(CreateClassDeclaration, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateClassDeclaration(KNativePointer context, KNativePointer original, KNativePointer def) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _def = reinterpret_cast(def); + auto result = GetImpl()->UpdateClassDeclaration(_context, _original, _def); + return result; +} +KOALA_INTEROP_3(UpdateClassDeclaration, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDeclarationDefinition(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDeclarationDefinition(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ClassDeclarationDefinition, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ClassDeclarationDefinitionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ClassDeclarationDefinitionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ClassDeclarationDefinitionConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ClassDeclarationSetDefinition(KNativePointer context, KNativePointer receiver, KNativePointer def) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _def = reinterpret_cast(def); + GetImpl()->ClassDeclarationSetDefinition(_context, _receiver, _def); + return ; +} +KOALA_INTEROP_V3(ClassDeclarationSetDefinition, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSIndexedAccessType(KNativePointer context, KNativePointer objectType, KNativePointer indexType) +{ + const auto _context = reinterpret_cast(context); + const auto _objectType = reinterpret_cast(objectType); + const auto _indexType = reinterpret_cast(indexType); + auto result = GetImpl()->CreateTSIndexedAccessType(_context, _objectType, _indexType); + return result; +} +KOALA_INTEROP_3(CreateTSIndexedAccessType, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSIndexedAccessType(KNativePointer context, KNativePointer original, KNativePointer objectType, KNativePointer indexType) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _objectType = reinterpret_cast(objectType); + const auto _indexType = reinterpret_cast(indexType); + auto result = GetImpl()->UpdateTSIndexedAccessType(_context, _original, _objectType, _indexType); + return result; +} +KOALA_INTEROP_4(UpdateTSIndexedAccessType, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSIndexedAccessTypeObjectTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSIndexedAccessTypeObjectTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSIndexedAccessTypeObjectTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSIndexedAccessTypeIndexTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSIndexedAccessTypeIndexTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSIndexedAccessTypeIndexTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSQualifiedName(KNativePointer context, KNativePointer left, KNativePointer right) +{ + const auto _context = reinterpret_cast(context); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + auto result = GetImpl()->CreateTSQualifiedName(_context, _left, _right); + return result; +} +KOALA_INTEROP_3(CreateTSQualifiedName, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSQualifiedName(KNativePointer context, KNativePointer original, KNativePointer left, KNativePointer right) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _left = reinterpret_cast(left); + const auto _right = reinterpret_cast(right); + auto result = GetImpl()->UpdateTSQualifiedName(_context, _original, _left, _right); + return result; +} +KOALA_INTEROP_4(UpdateTSQualifiedName, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSQualifiedNameLeftConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSQualifiedNameLeftConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSQualifiedNameLeftConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSQualifiedNameLeft(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSQualifiedNameLeft(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSQualifiedNameLeft, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSQualifiedNameRightConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSQualifiedNameRightConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSQualifiedNameRightConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSQualifiedNameRight(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSQualifiedNameRight(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSQualifiedNameRight, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSQualifiedNameNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSQualifiedNameNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(TSQualifiedNameNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSQualifiedNameResolveLeftMostQualifiedName(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSQualifiedNameResolveLeftMostQualifiedName(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSQualifiedNameResolveLeftMostQualifiedName, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSQualifiedNameResolveLeftMostQualifiedNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSQualifiedNameResolveLeftMostQualifiedNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSQualifiedNameResolveLeftMostQualifiedNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateAwaitExpression(KNativePointer context, KNativePointer argument) +{ + const auto _context = reinterpret_cast(context); + const auto _argument = reinterpret_cast(argument); + auto result = GetImpl()->CreateAwaitExpression(_context, _argument); + return result; +} +KOALA_INTEROP_2(CreateAwaitExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateAwaitExpression(KNativePointer context, KNativePointer original, KNativePointer argument) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _argument = reinterpret_cast(argument); + auto result = GetImpl()->UpdateAwaitExpression(_context, _original, _argument); + return result; +} +KOALA_INTEROP_3(UpdateAwaitExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_AwaitExpressionArgumentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AwaitExpressionArgumentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(AwaitExpressionArgumentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateValidationInfo(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateValidationInfo(_context); + return result; +} +KOALA_INTEROP_1(CreateValidationInfo, KNativePointer, KNativePointer); + +KNativePointer impl_CreateValidationInfo1(KNativePointer context, KStringPtr& m, KNativePointer p) +{ + const auto _context = reinterpret_cast(context); + const auto _m = getStringCopy(m); + const auto _p = reinterpret_cast(p); + auto result = GetImpl()->CreateValidationInfo1(_context, _m, _p); + return result; +} +KOALA_INTEROP_3(CreateValidationInfo1, KNativePointer, KNativePointer, KStringPtr, KNativePointer); + +KBoolean impl_ValidationInfoFailConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ValidationInfoFailConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ValidationInfoFailConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateContinueStatement(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateContinueStatement(_context); + return result; +} +KOALA_INTEROP_1(CreateContinueStatement, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateContinueStatement(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateContinueStatement(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateContinueStatement, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateContinueStatement1(KNativePointer context, KNativePointer ident) +{ + const auto _context = reinterpret_cast(context); + const auto _ident = reinterpret_cast(ident); + auto result = GetImpl()->CreateContinueStatement1(_context, _ident); + return result; +} +KOALA_INTEROP_2(CreateContinueStatement1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateContinueStatement1(KNativePointer context, KNativePointer original, KNativePointer ident) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _ident = reinterpret_cast(ident); + auto result = GetImpl()->UpdateContinueStatement1(_context, _original, _ident); + return result; +} +KOALA_INTEROP_3(UpdateContinueStatement1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ContinueStatementIdentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ContinueStatementIdentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ContinueStatementIdentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ContinueStatementIdent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ContinueStatementIdent(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ContinueStatementIdent, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ContinueStatementTargetConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ContinueStatementTargetConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ContinueStatementTargetConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ContinueStatementHasTargetConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ContinueStatementHasTargetConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ContinueStatementHasTargetConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ContinueStatementSetTarget(KNativePointer context, KNativePointer receiver, KNativePointer target) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _target = reinterpret_cast(target); + GetImpl()->ContinueStatementSetTarget(_context, _receiver, _target); + return ; +} +KOALA_INTEROP_V3(ContinueStatementSetTarget, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSNewMultiDimArrayInstanceExpression(KNativePointer context, KNativePointer typeReference, KNativePointerArray dimensions, KUInt dimensionsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _typeReference = reinterpret_cast(typeReference); + const auto _dimensions = reinterpret_cast(dimensions); + const auto _dimensionsSequenceLength = static_cast(dimensionsSequenceLength); + auto result = GetImpl()->CreateETSNewMultiDimArrayInstanceExpression(_context, _typeReference, _dimensions, _dimensionsSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateETSNewMultiDimArrayInstanceExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateETSNewMultiDimArrayInstanceExpression(KNativePointer context, KNativePointer original, KNativePointer typeReference, KNativePointerArray dimensions, KUInt dimensionsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _typeReference = reinterpret_cast(typeReference); + const auto _dimensions = reinterpret_cast(dimensions); + const auto _dimensionsSequenceLength = static_cast(dimensionsSequenceLength); + auto result = GetImpl()->UpdateETSNewMultiDimArrayInstanceExpression(_context, _original, _typeReference, _dimensions, _dimensionsSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateETSNewMultiDimArrayInstanceExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateETSNewMultiDimArrayInstanceExpression1(KNativePointer context, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->CreateETSNewMultiDimArrayInstanceExpression1(_context, _other); + return result; +} +KOALA_INTEROP_2(CreateETSNewMultiDimArrayInstanceExpression1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSNewMultiDimArrayInstanceExpression1(KNativePointer context, KNativePointer original, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->UpdateETSNewMultiDimArrayInstanceExpression1(_context, _original, _other); + return result; +} +KOALA_INTEROP_3(UpdateETSNewMultiDimArrayInstanceExpression1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSNewMultiDimArrayInstanceExpressionTypeReference(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSNewMultiDimArrayInstanceExpressionTypeReference(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSNewMultiDimArrayInstanceExpressionTypeReference, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSNewMultiDimArrayInstanceExpressionTypeReferenceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSNewMultiDimArrayInstanceExpressionTypeReferenceConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSNewMultiDimArrayInstanceExpressionTypeReferenceConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSNewMultiDimArrayInstanceExpressionDimensions(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSNewMultiDimArrayInstanceExpressionDimensions(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSNewMultiDimArrayInstanceExpressionDimensions, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSNewMultiDimArrayInstanceExpressionDimensionsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSNewMultiDimArrayInstanceExpressionDimensionsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSNewMultiDimArrayInstanceExpressionDimensionsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSNewMultiDimArrayInstanceExpressionClearPreferredType(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ETSNewMultiDimArrayInstanceExpressionClearPreferredType(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ETSNewMultiDimArrayInstanceExpressionClearPreferredType, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSNamedTupleMember(KNativePointer context, KNativePointer label, KNativePointer elementType, KBoolean optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _label = reinterpret_cast(label); + const auto _elementType = reinterpret_cast(elementType); + const auto _optional_arg = static_cast(optional_arg); + auto result = GetImpl()->CreateTSNamedTupleMember(_context, _label, _elementType, _optional_arg); + return result; +} +KOALA_INTEROP_4(CreateTSNamedTupleMember, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateTSNamedTupleMember(KNativePointer context, KNativePointer original, KNativePointer label, KNativePointer elementType, KBoolean optional_arg) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _label = reinterpret_cast(label); + const auto _elementType = reinterpret_cast(elementType); + const auto _optional_arg = static_cast(optional_arg); + auto result = GetImpl()->UpdateTSNamedTupleMember(_context, _original, _label, _elementType, _optional_arg); + return result; +} +KOALA_INTEROP_5(UpdateTSNamedTupleMember, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_TSNamedTupleMemberLabelConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSNamedTupleMemberLabelConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSNamedTupleMemberLabelConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSNamedTupleMemberElementType(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSNamedTupleMemberElementType(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSNamedTupleMemberElementType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSNamedTupleMemberElementTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSNamedTupleMemberElementTypeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSNamedTupleMemberElementTypeConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSNamedTupleMemberIsOptionalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSNamedTupleMemberIsOptionalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSNamedTupleMemberIsOptionalConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateImportExpression(KNativePointer context, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _source = reinterpret_cast(source); + auto result = GetImpl()->CreateImportExpression(_context, _source); + return result; +} +KOALA_INTEROP_2(CreateImportExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateImportExpression(KNativePointer context, KNativePointer original, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _source = reinterpret_cast(source); + auto result = GetImpl()->UpdateImportExpression(_context, _original, _source); + return result; +} +KOALA_INTEROP_3(UpdateImportExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportExpressionSource(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportExpressionSource(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ImportExpressionSource, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ImportExpressionSourceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ImportExpressionSourceConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ImportExpressionSourceConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateAstDumper(KNativePointer context, KNativePointer node, KStringPtr& sourceCode) +{ + const auto _context = reinterpret_cast(context); + const auto _node = reinterpret_cast(node); + const auto _sourceCode = getStringCopy(sourceCode); + auto result = GetImpl()->CreateAstDumper(_context, _node, _sourceCode); + return result; +} +KOALA_INTEROP_3(CreateAstDumper, KNativePointer, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_AstDumperModifierToString(KNativePointer context, KNativePointer receiver, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _flags = static_cast(flags); + auto result = GetImpl()->AstDumperModifierToString(_context, _receiver, _flags); + return StageArena::strdup(result); +} +KOALA_INTEROP_3(AstDumperModifierToString, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_AstDumperTypeOperatorToString(KNativePointer context, KNativePointer receiver, KInt operatorType) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _operatorType = static_cast(operatorType); + auto result = GetImpl()->AstDumperTypeOperatorToString(_context, _receiver, _operatorType); + return StageArena::strdup(result); +} +KOALA_INTEROP_3(AstDumperTypeOperatorToString, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_AstDumperStrConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->AstDumperStrConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(AstDumperStrConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSNullType(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateETSNullTypeIr(_context); + return result; +} +KOALA_INTEROP_1(CreateETSNullType, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSNullType(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateETSNullTypeIr(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateETSNullType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSUndefinedType(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateETSUndefinedTypeIr(_context); + return result; +} +KOALA_INTEROP_1(CreateETSUndefinedType, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSUndefinedType(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateETSUndefinedTypeIr(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateETSUndefinedType, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTypeofExpression(KNativePointer context, KNativePointer argument) +{ + const auto _context = reinterpret_cast(context); + const auto _argument = reinterpret_cast(argument); + auto result = GetImpl()->CreateTypeofExpression(_context, _argument); + return result; +} +KOALA_INTEROP_2(CreateTypeofExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTypeofExpression(KNativePointer context, KNativePointer original, KNativePointer argument) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _argument = reinterpret_cast(argument); + auto result = GetImpl()->UpdateTypeofExpression(_context, _original, _argument); + return result; +} +KOALA_INTEROP_3(UpdateTypeofExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TypeofExpressionArgumentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TypeofExpressionArgumentConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TypeofExpressionArgumentConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSEnumMember(KNativePointer context, KNativePointer key, KNativePointer init) +{ + const auto _context = reinterpret_cast(context); + const auto _key = reinterpret_cast(key); + const auto _init = reinterpret_cast(init); + auto result = GetImpl()->CreateTSEnumMember(_context, _key, _init); + return result; +} +KOALA_INTEROP_3(CreateTSEnumMember, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSEnumMember(KNativePointer context, KNativePointer original, KNativePointer key, KNativePointer init) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _key = reinterpret_cast(key); + const auto _init = reinterpret_cast(init); + auto result = GetImpl()->UpdateTSEnumMember(_context, _original, _key, _init); + return result; +} +KOALA_INTEROP_4(UpdateTSEnumMember, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSEnumMember1(KNativePointer context, KNativePointer key, KNativePointer init, KBoolean isGenerated) +{ + const auto _context = reinterpret_cast(context); + const auto _key = reinterpret_cast(key); + const auto _init = reinterpret_cast(init); + const auto _isGenerated = static_cast(isGenerated); + auto result = GetImpl()->CreateTSEnumMember1(_context, _key, _init, _isGenerated); + return result; +} +KOALA_INTEROP_4(CreateTSEnumMember1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateTSEnumMember1(KNativePointer context, KNativePointer original, KNativePointer key, KNativePointer init, KBoolean isGenerated) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _key = reinterpret_cast(key); + const auto _init = reinterpret_cast(init); + const auto _isGenerated = static_cast(isGenerated); + auto result = GetImpl()->UpdateTSEnumMember1(_context, _original, _key, _init, _isGenerated); + return result; +} +KOALA_INTEROP_5(UpdateTSEnumMember1, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_TSEnumMemberKeyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumMemberKeyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSEnumMemberKeyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSEnumMemberKey(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumMemberKey(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSEnumMemberKey, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSEnumMemberInitConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumMemberInitConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSEnumMemberInitConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSEnumMemberInit(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumMemberInit(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSEnumMemberInit, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSEnumMemberIsGeneratedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumMemberIsGeneratedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSEnumMemberIsGeneratedConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_TSEnumMemberNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSEnumMemberNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(TSEnumMemberNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateSwitchStatement(KNativePointer context, KNativePointer discriminant, KNativePointerArray cases, KUInt casesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _discriminant = reinterpret_cast(discriminant); + const auto _cases = reinterpret_cast(cases); + const auto _casesSequenceLength = static_cast(casesSequenceLength); + auto result = GetImpl()->CreateSwitchStatement(_context, _discriminant, _cases, _casesSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateSwitchStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateSwitchStatement(KNativePointer context, KNativePointer original, KNativePointer discriminant, KNativePointerArray cases, KUInt casesSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _discriminant = reinterpret_cast(discriminant); + const auto _cases = reinterpret_cast(cases); + const auto _casesSequenceLength = static_cast(casesSequenceLength); + auto result = GetImpl()->UpdateSwitchStatement(_context, _original, _discriminant, _cases, _casesSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateSwitchStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_SwitchStatementDiscriminantConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SwitchStatementDiscriminantConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(SwitchStatementDiscriminantConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_SwitchStatementDiscriminant(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->SwitchStatementDiscriminant(_context, _receiver); + return result; +} +KOALA_INTEROP_2(SwitchStatementDiscriminant, KNativePointer, KNativePointer, KNativePointer); + +void impl_SwitchStatementSetDiscriminant(KNativePointer context, KNativePointer receiver, KNativePointer discriminant) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _discriminant = reinterpret_cast(discriminant); + GetImpl()->SwitchStatementSetDiscriminant(_context, _receiver, _discriminant); + return ; +} +KOALA_INTEROP_V3(SwitchStatementSetDiscriminant, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_SwitchStatementCasesConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->SwitchStatementCasesConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(SwitchStatementCasesConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_SwitchStatementCases(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->SwitchStatementCases(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(SwitchStatementCases, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateDoWhileStatement(KNativePointer context, KNativePointer body, KNativePointer test) +{ + const auto _context = reinterpret_cast(context); + const auto _body = reinterpret_cast(body); + const auto _test = reinterpret_cast(test); + auto result = GetImpl()->CreateDoWhileStatement(_context, _body, _test); + return result; +} +KOALA_INTEROP_3(CreateDoWhileStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateDoWhileStatement(KNativePointer context, KNativePointer original, KNativePointer body, KNativePointer test) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _body = reinterpret_cast(body); + const auto _test = reinterpret_cast(test); + auto result = GetImpl()->UpdateDoWhileStatement(_context, _original, _body, _test); + return result; +} +KOALA_INTEROP_4(UpdateDoWhileStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_DoWhileStatementBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->DoWhileStatementBodyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(DoWhileStatementBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_DoWhileStatementBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->DoWhileStatementBody(_context, _receiver); + return result; +} +KOALA_INTEROP_2(DoWhileStatementBody, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_DoWhileStatementTestConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->DoWhileStatementTestConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(DoWhileStatementTestConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_DoWhileStatementTest(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->DoWhileStatementTest(_context, _receiver); + return result; +} +KOALA_INTEROP_2(DoWhileStatementTest, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateCatchClause(KNativePointer context, KNativePointer param, KNativePointer body) +{ + const auto _context = reinterpret_cast(context); + const auto _param = reinterpret_cast(param); + const auto _body = reinterpret_cast(body); + auto result = GetImpl()->CreateCatchClause(_context, _param, _body); + return result; +} +KOALA_INTEROP_3(CreateCatchClause, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateCatchClause(KNativePointer context, KNativePointer original, KNativePointer param, KNativePointer body) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _param = reinterpret_cast(param); + const auto _body = reinterpret_cast(body); + auto result = GetImpl()->UpdateCatchClause(_context, _original, _param, _body); + return result; +} +KOALA_INTEROP_4(UpdateCatchClause, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateCatchClause1(KNativePointer context, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->CreateCatchClause1(_context, _other); + return result; +} +KOALA_INTEROP_2(CreateCatchClause1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateCatchClause1(KNativePointer context, KNativePointer original, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->UpdateCatchClause1(_context, _original, _other); + return result; +} +KOALA_INTEROP_3(UpdateCatchClause1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CatchClauseParam(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CatchClauseParam(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CatchClauseParam, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CatchClauseParamConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CatchClauseParamConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(CatchClauseParamConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CatchClauseBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CatchClauseBody(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CatchClauseBody, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CatchClauseBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CatchClauseBodyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(CatchClauseBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_CatchClauseIsDefaultCatchClauseConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->CatchClauseIsDefaultCatchClauseConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(CatchClauseIsDefaultCatchClauseConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_CreateSequenceExpression(KNativePointer context, KNativePointerArray sequence_arg, KUInt sequence_argSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _sequence_arg = reinterpret_cast(sequence_arg); + const auto _sequence_argSequenceLength = static_cast(sequence_argSequenceLength); + auto result = GetImpl()->CreateSequenceExpression(_context, _sequence_arg, _sequence_argSequenceLength); + return result; +} +KOALA_INTEROP_3(CreateSequenceExpression, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateSequenceExpression(KNativePointer context, KNativePointer original, KNativePointerArray sequence_arg, KUInt sequence_argSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _sequence_arg = reinterpret_cast(sequence_arg); + const auto _sequence_argSequenceLength = static_cast(sequence_argSequenceLength); + auto result = GetImpl()->UpdateSequenceExpression(_context, _original, _sequence_arg, _sequence_argSequenceLength); + return result; +} +KOALA_INTEROP_4(UpdateSequenceExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_SequenceExpressionSequenceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->SequenceExpressionSequenceConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(SequenceExpressionSequenceConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_SequenceExpressionSequence(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->SequenceExpressionSequence(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(SequenceExpressionSequence, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateArrowFunctionExpression(KNativePointer context, KNativePointer func) +{ + const auto _context = reinterpret_cast(context); + const auto _func = reinterpret_cast(func); + auto result = GetImpl()->CreateArrowFunctionExpression(_context, _func); + return result; +} +KOALA_INTEROP_2(CreateArrowFunctionExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateArrowFunctionExpression(KNativePointer context, KNativePointer original, KNativePointer func) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _func = reinterpret_cast(func); + auto result = GetImpl()->UpdateArrowFunctionExpression(_context, _original, _func); + return result; +} +KOALA_INTEROP_3(UpdateArrowFunctionExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateArrowFunctionExpression1(KNativePointer context, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->CreateArrowFunctionExpression1(_context, _other); + return result; +} +KOALA_INTEROP_2(CreateArrowFunctionExpression1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateArrowFunctionExpression1(KNativePointer context, KNativePointer original, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->UpdateArrowFunctionExpression1(_context, _original, _other); + return result; +} +KOALA_INTEROP_3(UpdateArrowFunctionExpression1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ArrowFunctionExpressionFunctionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArrowFunctionExpressionFunctionConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ArrowFunctionExpressionFunctionConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ArrowFunctionExpressionFunction(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArrowFunctionExpressionFunction(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ArrowFunctionExpressionFunction, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ArrowFunctionExpressionCreateTypeAnnotation(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArrowFunctionExpressionCreateTypeAnnotation(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ArrowFunctionExpressionCreateTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ArrowFunctionExpressionHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArrowFunctionExpressionHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ArrowFunctionExpressionHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ArrowFunctionExpressionEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->ArrowFunctionExpressionEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(ArrowFunctionExpressionEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_ArrowFunctionExpressionClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ArrowFunctionExpressionClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ArrowFunctionExpressionClearAnnotations, KNativePointer, KNativePointer); + +void impl_ArrowFunctionExpressionDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->ArrowFunctionExpressionDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(ArrowFunctionExpressionDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ArrowFunctionExpressionAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ArrowFunctionExpressionAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ArrowFunctionExpressionAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ArrowFunctionExpressionAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ArrowFunctionExpressionAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ArrowFunctionExpressionAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ArrowFunctionExpressionAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ArrowFunctionExpressionAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ArrowFunctionExpressionAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ArrowFunctionExpressionSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ArrowFunctionExpressionSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ArrowFunctionExpressionSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ArrowFunctionExpressionSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->ArrowFunctionExpressionSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(ArrowFunctionExpressionSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateOmittedExpression(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateOmittedExpression(_context); + return result; +} +KOALA_INTEROP_1(CreateOmittedExpression, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateOmittedExpression(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateOmittedExpression(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateOmittedExpression, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSNewClassInstanceExpression(KNativePointer context, KNativePointer typeReference, KNativePointerArray _arguments, KUInt _argumentsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _typeReference = reinterpret_cast(typeReference); + const auto __arguments = reinterpret_cast(_arguments); + const auto __argumentsSequenceLength = static_cast(_argumentsSequenceLength); + auto result = GetImpl()->CreateETSNewClassInstanceExpression(_context, _typeReference, __arguments, __argumentsSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateETSNewClassInstanceExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateETSNewClassInstanceExpression(KNativePointer context, KNativePointer original, KNativePointer typeReference, KNativePointerArray _arguments, KUInt _argumentsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _typeReference = reinterpret_cast(typeReference); + const auto __arguments = reinterpret_cast(_arguments); + const auto __argumentsSequenceLength = static_cast(_argumentsSequenceLength); + auto result = GetImpl()->UpdateETSNewClassInstanceExpression(_context, _original, _typeReference, __arguments, __argumentsSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateETSNewClassInstanceExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateETSNewClassInstanceExpression1(KNativePointer context, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->CreateETSNewClassInstanceExpression1(_context, _other); + return result; +} +KOALA_INTEROP_2(CreateETSNewClassInstanceExpression1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSNewClassInstanceExpression1(KNativePointer context, KNativePointer original, KNativePointer other) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _other = reinterpret_cast(other); + auto result = GetImpl()->UpdateETSNewClassInstanceExpression1(_context, _original, _other); + return result; +} +KOALA_INTEROP_3(UpdateETSNewClassInstanceExpression1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSNewClassInstanceExpressionGetTypeRefConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSNewClassInstanceExpressionGetTypeRefConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSNewClassInstanceExpressionGetTypeRefConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSNewClassInstanceExpressionGetArguments(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSNewClassInstanceExpressionGetArguments(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSNewClassInstanceExpressionGetArguments, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSNewClassInstanceExpressionGetArgumentsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->ETSNewClassInstanceExpressionGetArgumentsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(ETSNewClassInstanceExpressionGetArgumentsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ETSNewClassInstanceExpressionSetArguments(KNativePointer context, KNativePointer receiver, KNativePointerArray _arguments, KUInt _argumentsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto __arguments = reinterpret_cast(_arguments); + const auto __argumentsSequenceLength = static_cast(_argumentsSequenceLength); + GetImpl()->ETSNewClassInstanceExpressionSetArguments(_context, _receiver, __arguments, __argumentsSequenceLength); + return ; +} +KOALA_INTEROP_V4(ETSNewClassInstanceExpressionSetArguments, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_ETSNewClassInstanceExpressionAddToArgumentsFront(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->ETSNewClassInstanceExpressionAddToArgumentsFront(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(ETSNewClassInstanceExpressionAddToArgumentsFront, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSAsExpression(KNativePointer context, KNativePointer expression, KNativePointer typeAnnotation, KBoolean isConst) +{ + const auto _context = reinterpret_cast(context); + const auto _expression = reinterpret_cast(expression); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _isConst = static_cast(isConst); + auto result = GetImpl()->CreateTSAsExpression(_context, _expression, _typeAnnotation, _isConst); + return result; +} +KOALA_INTEROP_4(CreateTSAsExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_UpdateTSAsExpression(KNativePointer context, KNativePointer original, KNativePointer expression, KNativePointer typeAnnotation, KBoolean isConst) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _expression = reinterpret_cast(expression); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + const auto _isConst = static_cast(isConst); + auto result = GetImpl()->UpdateTSAsExpression(_context, _original, _expression, _typeAnnotation, _isConst); + return result; +} +KOALA_INTEROP_5(UpdateTSAsExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_TSAsExpressionExprConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSAsExpressionExprConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSAsExpressionExprConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TSAsExpressionExpr(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSAsExpressionExpr(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSAsExpressionExpr, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSAsExpressionSetExpr(KNativePointer context, KNativePointer receiver, KNativePointer expr) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _expr = reinterpret_cast(expr); + GetImpl()->TSAsExpressionSetExpr(_context, _receiver, _expr); + return ; +} +KOALA_INTEROP_V3(TSAsExpressionSetExpr, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_TSAsExpressionIsConstConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSAsExpressionIsConstConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSAsExpressionIsConstConst, KBoolean, KNativePointer, KNativePointer); + +void impl_TSAsExpressionSetUncheckedCast(KNativePointer context, KNativePointer receiver, KBoolean isUncheckedCast) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _isUncheckedCast = static_cast(isUncheckedCast); + GetImpl()->TSAsExpressionSetUncheckedCast(_context, _receiver, _isUncheckedCast); + return ; +} +KOALA_INTEROP_V3(TSAsExpressionSetUncheckedCast, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_TSAsExpressionTypeAnnotationConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSAsExpressionTypeAnnotationConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSAsExpressionTypeAnnotationConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TSAsExpressionSetTsTypeAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer typeAnnotation) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _typeAnnotation = reinterpret_cast(typeAnnotation); + GetImpl()->TSAsExpressionSetTsTypeAnnotation(_context, _receiver, _typeAnnotation); + return ; +} +KOALA_INTEROP_V3(TSAsExpressionSetTsTypeAnnotation, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateForUpdateStatement(KNativePointer context, KNativePointer init, KNativePointer test, KNativePointer update, KNativePointer body) +{ + const auto _context = reinterpret_cast(context); + const auto _init = reinterpret_cast(init); + const auto _test = reinterpret_cast(test); + const auto _update = reinterpret_cast(update); + const auto _body = reinterpret_cast(body); + auto result = GetImpl()->CreateForUpdateStatement(_context, _init, _test, _update, _body); + return result; +} +KOALA_INTEROP_5(CreateForUpdateStatement, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForUpdateStatementInit(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForUpdateStatementInit(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ForUpdateStatementInit, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForUpdateStatementInitConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForUpdateStatementInitConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ForUpdateStatementInitConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForUpdateStatementTest(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForUpdateStatementTest(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ForUpdateStatementTest, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForUpdateStatementTestConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForUpdateStatementTestConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ForUpdateStatementTestConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForUpdateStatementUpdateConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForUpdateStatementUpdateConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ForUpdateStatementUpdateConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForUpdateStatementBody(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForUpdateStatementBody(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ForUpdateStatementBody, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ForUpdateStatementBodyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ForUpdateStatementBodyConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ForUpdateStatementBodyConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSTypeReferencePart(KNativePointer context, KNativePointer name, KNativePointer typeParams, KNativePointer prev) +{ + const auto _context = reinterpret_cast(context); + const auto _name = reinterpret_cast(name); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _prev = reinterpret_cast(prev); + auto result = GetImpl()->CreateETSTypeReferencePart(_context, _name, _typeParams, _prev); + return result; +} +KOALA_INTEROP_4(CreateETSTypeReferencePart, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSTypeReferencePart(KNativePointer context, KNativePointer original, KNativePointer name, KNativePointer typeParams, KNativePointer prev) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _name = reinterpret_cast(name); + const auto _typeParams = reinterpret_cast(typeParams); + const auto _prev = reinterpret_cast(prev); + auto result = GetImpl()->UpdateETSTypeReferencePart(_context, _original, _name, _typeParams, _prev); + return result; +} +KOALA_INTEROP_5(UpdateETSTypeReferencePart, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSTypeReferencePart1(KNativePointer context, KNativePointer name) +{ + const auto _context = reinterpret_cast(context); + const auto _name = reinterpret_cast(name); + auto result = GetImpl()->CreateETSTypeReferencePart1(_context, _name); + return result; +} +KOALA_INTEROP_2(CreateETSTypeReferencePart1, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateETSTypeReferencePart1(KNativePointer context, KNativePointer original, KNativePointer name) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _name = reinterpret_cast(name); + auto result = GetImpl()->UpdateETSTypeReferencePart1(_context, _original, _name); + return result; +} +KOALA_INTEROP_3(UpdateETSTypeReferencePart1, KNativePointer, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTypeReferencePartPrevious(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferencePartPrevious(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSTypeReferencePartPrevious, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTypeReferencePartPreviousConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferencePartPreviousConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSTypeReferencePartPreviousConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTypeReferencePartName(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferencePartName(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSTypeReferencePartName, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTypeReferencePartTypeParams(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferencePartTypeParams(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSTypeReferencePartTypeParams, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTypeReferencePartTypeParamsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferencePartTypeParamsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSTypeReferencePartTypeParamsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTypeReferencePartNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferencePartNameConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSTypeReferencePartNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSTypeReferencePartGetIdent(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSTypeReferencePartGetIdent(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSTypeReferencePartGetIdent, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSReExportDeclarationGetETSImportDeclarationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSReExportDeclarationGetETSImportDeclarationsConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSReExportDeclarationGetETSImportDeclarationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSReExportDeclarationGetETSImportDeclarations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSReExportDeclarationGetETSImportDeclarations(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSReExportDeclarationGetETSImportDeclarations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSReExportDeclarationGetProgramPathConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSReExportDeclarationGetProgramPathConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ETSReExportDeclarationGetProgramPathConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSPrimitiveType(KNativePointer context, KInt type) +{ + const auto _context = reinterpret_cast(context); + const auto _type = static_cast(type); + auto result = GetImpl()->CreateETSPrimitiveType(_context, _type); + return result; +} +KOALA_INTEROP_2(CreateETSPrimitiveType, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateETSPrimitiveType(KNativePointer context, KNativePointer original, KInt type) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _type = static_cast(type); + auto result = GetImpl()->UpdateETSPrimitiveType(_context, _original, _type); + return result; +} +KOALA_INTEROP_3(UpdateETSPrimitiveType, KNativePointer, KNativePointer, KNativePointer, KInt); + +KInt impl_ETSPrimitiveTypeGetPrimitiveTypeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSPrimitiveTypeGetPrimitiveTypeConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSPrimitiveTypeGetPrimitiveTypeConst, KInt, KNativePointer, KNativePointer); + +KBoolean impl_TypeNodeHasAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TypeNodeHasAnnotationsConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TypeNodeHasAnnotationsConst, KBoolean, KNativePointer, KNativePointer); + +void impl_TypeNodeEmplaceAnnotation(KNativePointer context, KNativePointer receiver, KNativePointer source) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _source = reinterpret_cast(source); + GetImpl()->TypeNodeEmplaceAnnotation(_context, _receiver, _source); + return ; +} +KOALA_INTEROP_V3(TypeNodeEmplaceAnnotation, KNativePointer, KNativePointer, KNativePointer); + +void impl_TypeNodeClearAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->TypeNodeClearAnnotations(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(TypeNodeClearAnnotations, KNativePointer, KNativePointer); + +void impl_TypeNodeDumpAnnotationsConst(KNativePointer context, KNativePointer receiver, KNativePointer dumper) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _dumper = reinterpret_cast(dumper); + GetImpl()->TypeNodeDumpAnnotationsConst(_context, _receiver, _dumper); + return ; +} +KOALA_INTEROP_V3(TypeNodeDumpAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TypeNodeAnnotationsForUpdate(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TypeNodeAnnotationsForUpdate(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TypeNodeAnnotationsForUpdate, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TypeNodeAnnotations(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TypeNodeAnnotations(_context, _receiver, &length); + return StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TypeNodeAnnotations, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_TypeNodeAnnotationsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->TypeNodeAnnotationsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(TypeNodeAnnotationsConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_TypeNodeSetAnnotations(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TypeNodeSetAnnotations(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TypeNodeSetAnnotations, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +void impl_TypeNodeSetAnnotations1(KNativePointer context, KNativePointer receiver, KNativePointerArray annotationList, KUInt annotationListSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _annotationList = reinterpret_cast(annotationList); + const auto _annotationListSequenceLength = static_cast(annotationListSequenceLength); + GetImpl()->TypeNodeSetAnnotations1(_context, _receiver, _annotationList, _annotationListSequenceLength); + return ; +} +KOALA_INTEROP_V4(TypeNodeSetAnnotations1, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_CreateNewExpression(KNativePointer context, KNativePointer callee, KNativePointerArray _arguments, KUInt _argumentsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _callee = reinterpret_cast(callee); + const auto __arguments = reinterpret_cast(_arguments); + const auto __argumentsSequenceLength = static_cast(_argumentsSequenceLength); + auto result = GetImpl()->CreateNewExpression(_context, _callee, __arguments, __argumentsSequenceLength); + return result; +} +KOALA_INTEROP_4(CreateNewExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_UpdateNewExpression(KNativePointer context, KNativePointer original, KNativePointer callee, KNativePointerArray _arguments, KUInt _argumentsSequenceLength) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _callee = reinterpret_cast(callee); + const auto __arguments = reinterpret_cast(_arguments); + const auto __argumentsSequenceLength = static_cast(_argumentsSequenceLength); + auto result = GetImpl()->UpdateNewExpression(_context, _original, _callee, __arguments, __argumentsSequenceLength); + return result; +} +KOALA_INTEROP_5(UpdateNewExpression, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KNativePointerArray, KUInt); + +KNativePointer impl_NewExpressionCalleeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->NewExpressionCalleeConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(NewExpressionCalleeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_NewExpressionArgumentsConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + std::size_t length; + auto result = GetImpl()->NewExpressionArgumentsConst(_context, _receiver, &length); + return (void*)StageArena::cloneVector(result, length); +} +KOALA_INTEROP_2(NewExpressionArgumentsConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSParameterProperty(KNativePointer context, KInt accessibility, KNativePointer parameter, KBoolean readonly_arg, KBoolean isStatic, KBoolean isExport) +{ + const auto _context = reinterpret_cast(context); + const auto _accessibility = static_cast(accessibility); + const auto _parameter = reinterpret_cast(parameter); + const auto _readonly_arg = static_cast(readonly_arg); + const auto _isStatic = static_cast(isStatic); + const auto _isExport = static_cast(isExport); + auto result = GetImpl()->CreateTSParameterProperty(_context, _accessibility, _parameter, _readonly_arg, _isStatic, _isExport); + return result; +} +KOALA_INTEROP_6(CreateTSParameterProperty, KNativePointer, KNativePointer, KInt, KNativePointer, KBoolean, KBoolean, KBoolean); + +KNativePointer impl_UpdateTSParameterProperty(KNativePointer context, KNativePointer original, KInt accessibility, KNativePointer parameter, KBoolean readonly_arg, KBoolean isStatic, KBoolean isExport) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _accessibility = static_cast(accessibility); + const auto _parameter = reinterpret_cast(parameter); + const auto _readonly_arg = static_cast(readonly_arg); + const auto _isStatic = static_cast(isStatic); + const auto _isExport = static_cast(isExport); + auto result = GetImpl()->UpdateTSParameterProperty(_context, _original, _accessibility, _parameter, _readonly_arg, _isStatic, _isExport); + return result; +} +KOALA_INTEROP_7(UpdateTSParameterProperty, KNativePointer, KNativePointer, KNativePointer, KInt, KNativePointer, KBoolean, KBoolean, KBoolean); + +KInt impl_TSParameterPropertyAccessibilityConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSParameterPropertyAccessibilityConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSParameterPropertyAccessibilityConst, KInt, KNativePointer, KNativePointer); + +KBoolean impl_TSParameterPropertyReadonlyConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSParameterPropertyReadonlyConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSParameterPropertyReadonlyConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_TSParameterPropertyIsStaticConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSParameterPropertyIsStaticConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSParameterPropertyIsStaticConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_TSParameterPropertyIsExportConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSParameterPropertyIsExportConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(TSParameterPropertyIsExportConst, KBoolean, KNativePointer, KNativePointer); + +KNativePointer impl_TSParameterPropertyParameterConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->TSParameterPropertyParameterConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(TSParameterPropertyParameterConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateETSWildcardType(KNativePointer context, KNativePointer typeReference, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _typeReference = reinterpret_cast(typeReference); + const auto _flags = static_cast(flags); + auto result = GetImpl()->CreateETSWildcardType(_context, _typeReference, _flags); + return result; +} +KOALA_INTEROP_3(CreateETSWildcardType, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_UpdateETSWildcardType(KNativePointer context, KNativePointer original, KNativePointer typeReference, KInt flags) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + const auto _typeReference = reinterpret_cast(typeReference); + const auto _flags = static_cast(flags); + auto result = GetImpl()->UpdateETSWildcardType(_context, _original, _typeReference, _flags); + return result; +} +KOALA_INTEROP_4(UpdateETSWildcardType, KNativePointer, KNativePointer, KNativePointer, KNativePointer, KInt); + +KNativePointer impl_ETSWildcardTypeTypeReference(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSWildcardTypeTypeReference(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ETSWildcardTypeTypeReference, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ETSWildcardTypeTypeReferenceConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ETSWildcardTypeTypeReferenceConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ETSWildcardTypeTypeReferenceConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_CreateTSThisType(KNativePointer context) +{ + const auto _context = reinterpret_cast(context); + auto result = GetImpl()->CreateTSThisType(_context); + return result; +} +KOALA_INTEROP_1(CreateTSThisType, KNativePointer, KNativePointer); + +KNativePointer impl_UpdateTSThisType(KNativePointer context, KNativePointer original) +{ + const auto _context = reinterpret_cast(context); + const auto _original = reinterpret_cast(original); + auto result = GetImpl()->UpdateTSThisType(_context, _original); + return result; +} +KOALA_INTEROP_2(UpdateTSThisType, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramSetKind(KNativePointer context, KNativePointer receiver, KInt kind) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _kind = static_cast(kind); + GetImpl()->ProgramSetKind(_context, _receiver, _kind); + return ; +} +KOALA_INTEROP_V3(ProgramSetKind, KNativePointer, KNativePointer, KInt); + +void impl_ProgramPushVarBinder(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ProgramPushVarBinder(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ProgramPushVarBinder, KNativePointer, KNativePointer); + +void impl_ProgramPushChecker(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ProgramPushChecker(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ProgramPushChecker, KNativePointer, KNativePointer); + +KInt impl_ProgramKindConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramKindConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramKindConst, KInt, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramSourceCodeConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramSourceCodeConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramSourceCodeConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramSourceFilePathConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramSourceFilePathConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramSourceFilePathConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramSourceFileFolderConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramSourceFileFolderConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramSourceFileFolderConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramFileNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramFileNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramFileNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramFileNameWithExtensionConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramFileNameWithExtensionConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramFileNameWithExtensionConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramAbsoluteNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramAbsoluteNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramAbsoluteNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramResolvedFilePathConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramResolvedFilePathConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramResolvedFilePathConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramRelativeFilePathConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramRelativeFilePathConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramRelativeFilePathConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramSetRelativeFilePath(KNativePointer context, KNativePointer receiver, KStringPtr& relPath) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _relPath = getStringCopy(relPath); + GetImpl()->ProgramSetRelativeFilePath(_context, _receiver, _relPath); + return ; +} +KOALA_INTEROP_V3(ProgramSetRelativeFilePath, KNativePointer, KNativePointer, KStringPtr); + +KNativePointer impl_ProgramAst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramAst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramAst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramAstConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramAstConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ProgramAstConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramSetAst(KNativePointer context, KNativePointer receiver, KNativePointer ast) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _ast = reinterpret_cast(ast); + GetImpl()->ProgramSetAst(_context, _receiver, _ast); + return ; +} +KOALA_INTEROP_V3(ProgramSetAst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramGlobalClass(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramGlobalClass(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramGlobalClass, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramGlobalClassConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramGlobalClassConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ProgramGlobalClassConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramSetGlobalClass(KNativePointer context, KNativePointer receiver, KNativePointer globalClass) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _globalClass = reinterpret_cast(globalClass); + GetImpl()->ProgramSetGlobalClass(_context, _receiver, _globalClass); + return ; +} +KOALA_INTEROP_V3(ProgramSetGlobalClass, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramPackageStartConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramPackageStartConst(_context, _receiver); + return (void*)result; +} +KOALA_INTEROP_2(ProgramPackageStartConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramSetPackageStart(KNativePointer context, KNativePointer receiver, KNativePointer start) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _start = reinterpret_cast(start); + GetImpl()->ProgramSetPackageStart(_context, _receiver, _start); + return ; +} +KOALA_INTEROP_V3(ProgramSetPackageStart, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramSetSource(KNativePointer context, KNativePointer receiver, KStringPtr& sourceCode, KStringPtr& sourceFilePath, KStringPtr& sourceFileFolder) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _sourceCode = getStringCopy(sourceCode); + const auto _sourceFilePath = getStringCopy(sourceFilePath); + const auto _sourceFileFolder = getStringCopy(sourceFileFolder); + GetImpl()->ProgramSetSource(_context, _receiver, _sourceCode, _sourceFilePath, _sourceFileFolder); + return ; +} +KOALA_INTEROP_V5(ProgramSetSource, KNativePointer, KNativePointer, KStringPtr, KStringPtr, KStringPtr); + +void impl_ProgramSetPackageInfo(KNativePointer context, KNativePointer receiver, KStringPtr& name, KInt kind) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _name = getStringCopy(name); + const auto _kind = static_cast(kind); + GetImpl()->ProgramSetPackageInfo(_context, _receiver, _name, _kind); + return ; +} +KOALA_INTEROP_V4(ProgramSetPackageInfo, KNativePointer, KNativePointer, KStringPtr, KInt); + +KNativePointer impl_ProgramModuleNameConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramModuleNameConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramModuleNameConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ProgramModulePrefixConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramModulePrefixConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramModulePrefixConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsSeparateModuleConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsSeparateModuleConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsSeparateModuleConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsDeclarationModuleConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsDeclarationModuleConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsDeclarationModuleConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsPackageConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsPackageConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsPackageConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsDeclForDynamicStaticInteropConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsDeclForDynamicStaticInteropConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsDeclForDynamicStaticInteropConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ProgramSetFlag(KNativePointer context, KNativePointer receiver, KInt flag) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _flag = static_cast(flag); + GetImpl()->ProgramSetFlag(_context, _receiver, _flag); + return ; +} +KOALA_INTEROP_V3(ProgramSetFlag, KNativePointer, KNativePointer, KInt); + +KBoolean impl_ProgramGetFlagConst(KNativePointer context, KNativePointer receiver, KInt flag) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _flag = static_cast(flag); + auto result = GetImpl()->ProgramGetFlagConst(_context, _receiver, _flag); + return result; +} +KOALA_INTEROP_3(ProgramGetFlagConst, KBoolean, KNativePointer, KNativePointer, KInt); + +void impl_ProgramSetASTChecked(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ProgramSetASTChecked(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ProgramSetASTChecked, KNativePointer, KNativePointer); + +void impl_ProgramRemoveAstChecked(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ProgramRemoveAstChecked(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ProgramRemoveAstChecked, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsASTChecked(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsASTChecked(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsASTChecked, KBoolean, KNativePointer, KNativePointer); + +void impl_ProgramMarkASTAsLowered(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ProgramMarkASTAsLowered(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ProgramMarkASTAsLowered, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsASTLoweredConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsASTLoweredConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsASTLoweredConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsStdLibConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsStdLibConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsStdLibConst, KBoolean, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsGenAbcForExternalConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsGenAbcForExternalConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsGenAbcForExternalConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ProgramSetGenAbcForExternalSources(KNativePointer context, KNativePointer receiver, KBoolean genAbc) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _genAbc = static_cast(genAbc); + GetImpl()->ProgramSetGenAbcForExternalSources(_context, _receiver, _genAbc); + return ; +} +KOALA_INTEROP_V3(ProgramSetGenAbcForExternalSources, KNativePointer, KNativePointer, KBoolean); + +KNativePointer impl_ProgramDumpConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramDumpConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ProgramDumpConst, KNativePointer, KNativePointer, KNativePointer); + +void impl_ProgramDumpSilentConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ProgramDumpSilentConst(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ProgramDumpSilentConst, KNativePointer, KNativePointer); + +KBoolean impl_ProgramIsDiedConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ProgramIsDiedConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ProgramIsDiedConst, KBoolean, KNativePointer, KNativePointer); + +void impl_ProgramAddFileDependencies(KNativePointer context, KNativePointer receiver, KStringPtr& file, KStringPtr& depFile) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + const auto _file = getStringCopy(file); + const auto _depFile = getStringCopy(depFile); + GetImpl()->ProgramAddFileDependencies(_context, _receiver, _file, _depFile); + return ; +} +KOALA_INTEROP_V4(ProgramAddFileDependencies, KNativePointer, KNativePointer, KStringPtr, KStringPtr); + +KNativePointer impl_CreateArkTsConfig(KNativePointer context, KStringPtr& configPath, KNativePointer de) +{ + const auto _context = reinterpret_cast(context); + const auto _configPath = getStringCopy(configPath); + const auto _de = reinterpret_cast(de); + auto result = GetImpl()->CreateArkTsConfig(_context, _configPath, _de); + return result; +} +KOALA_INTEROP_3(CreateArkTsConfig, KNativePointer, KNativePointer, KStringPtr, KNativePointer); + +void impl_ArkTsConfigResolveAllDependenciesInArkTsConfig(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + GetImpl()->ArkTsConfigResolveAllDependenciesInArkTsConfig(_context, _receiver); + return ; +} +KOALA_INTEROP_V2(ArkTsConfigResolveAllDependenciesInArkTsConfig, KNativePointer, KNativePointer); + +KNativePointer impl_ArkTsConfigConfigPathConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArkTsConfigConfigPathConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ArkTsConfigConfigPathConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ArkTsConfigPackageConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArkTsConfigPackageConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ArkTsConfigPackageConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ArkTsConfigBaseUrlConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArkTsConfigBaseUrlConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ArkTsConfigBaseUrlConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ArkTsConfigRootDirConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArkTsConfigRootDirConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ArkTsConfigRootDirConst, KNativePointer, KNativePointer, KNativePointer); + +KNativePointer impl_ArkTsConfigOutDirConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArkTsConfigOutDirConst(_context, _receiver); + return StageArena::strdup(result); +} +KOALA_INTEROP_2(ArkTsConfigOutDirConst, KNativePointer, KNativePointer, KNativePointer); + +KBoolean impl_ArkTsConfigUseUrlConst(KNativePointer context, KNativePointer receiver) +{ + const auto _context = reinterpret_cast(context); + const auto _receiver = reinterpret_cast(receiver); + auto result = GetImpl()->ArkTsConfigUseUrlConst(_context, _receiver); + return result; +} +KOALA_INTEROP_2(ArkTsConfigUseUrlConst, KBoolean, KNativePointer, KNativePointer); + diff --git a/koala_tools/ui2abc/libarkts/package.json b/koala_tools/ui2abc/libarkts/package.json new file mode 100644 index 0000000000000000000000000000000000000000..8c07d9d7a5e38ca948b3d67e3b99a13a94393952 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/package.json @@ -0,0 +1,84 @@ +{ + "name": "@koalaui/libarkts", + "version": "1.7.9+devel", + "bin": "./lib/es2panda", + "typesVersions": { + "*": { + "./compat/*": [ + "./lib/types/wrapper-compat/index.d.ts" + ], + "*": [ + "./lib/types/index.d.ts" + ] + } + }, + "exports": { + ".": "./lib/libarkts.js", + "./compat": "./lib/libarkts-compat.js", + "./plugins/*": "./lib/plugins/*.js" + }, + "files": [ + "./lib/**/*", + "./build/**/*", + "./plugins/build/src/**/*" + ], + "config": { + "panda_sdk_path": "../../incremental/tools/panda/node_modules/@panda/sdk", + "panda_sdk_version": "next" + }, + "dependencies": { + "@koalaui/ets-tsc": "4.9.5-r6", + "@koalaui/build-common": "1.7.9+devel", + "@koalaui/compat": "1.7.9+devel", + "@koalaui/common": "1.7.9+devel", + "@koalaui/harness": "1.7.9+devel", + "@koalaui/interop": "1.7.9+devel", + "@koalaui/fast-arktsc": "1.7.9+devel", + "@idlizer/arktscgen": "2.1.10-arktscgen-2", + "@types/mocha": "^9.1.0", + "mocha": "^9.2.2", + "node-addon-api": "8.0.0", + "node-api-headers": "0.0.5", + "commander": "10.0.1" + }, + "devDependencies": { + "rollup": "^4.13.0", + "@rollup/plugin-commonjs": "^26.0.1", + "@rollup/plugin-node-resolve": "^15.3.0", + "@rollup/plugin-terser": "^0.4.4", + "@rollup/plugin-typescript": "^11.1.6", + "rimraf": "^6.0.1" + }, + "scripts": { + "clean": "rimraf build native/build* ./.rollup.cache tsconfig.tsbuildinfo lib", + "clean:plugins": "rimraf plugins/build", + "compile:koala:interop": "npm run --prefix ../../interop compile", + "compile:meson": "cd native && meson setup build && meson compile -C build", + "compile:meson:mingw": "cd native && meson setup --cross-file ./mingw.cross mingw_build && meson compile -C mingw_build", + "crosscompile:meson": "cd native && CXX=clang++ meson setup -D cross_compile=true build && CXX=clang++ meson compile -C build", + "copy:.node": "mkdir -p ./build/native/build && cp ./native/build/es2panda_*.node ./build/native/build", + "compile:native": "npm run compile:koala:interop && npm run compile:meson && npm run copy:.node", + "crosscompile:native": "npm run compile:koala:interop && npm run crosscompile:meson && npm run copy:.node", + "compile": "npm run compile:native && npm run compile:js", + "compile:release": "npm run crosscompile:native && npm run compile:js", + "compile:js": "rm -rf lib/ && rollup -c rollup.lib.mjs && rollup -c rollup.es2panda.mjs", + "compile:plugins": "rollup -c ./rollup.printer-plugin.mjs", + "direct": "fast-arktsc --config arktsconfig.json --compiler ../../incremental/tools/panda/arkts/ui2abc --link-name ./build/abc/main.abc && ninja -f build/abc/build.ninja", + "simultaneous": "mkdir -p build/abc && bash ../../incremental/tools/panda/arkts/ui2abc --simultaneous --arktsconfig arktsconfig.json --output ./build/abc/main.abc:./build/abc/library.abc plugins/input/main.ets:plugins/input/library.ets", + "run": "npm run compile && npm run compile:plugins && npm run simultaneous", + "run:memo": "npm run compile && npm run compile:plugins && npm run compile --prefix ../memo-plugin && npm run memo", + "run:abc": "$npm_package_config_panda_sdk_path/linux_host_tools/bin/ark --load-runtimes=ets --boot-panda-files=$npm_package_config_panda_sdk_path/ets/etsstdlib.abc ./main.abc main.ETSGLOBAL::main", + "mocha": "PANDA_SDK_PATH=${PANDA_SDK_PATH:=$npm_package_config_panda_sdk_path} TS_NODE_PROJECT=./test/tsconfig.json mocha -r tsconfig-paths/register --reporter-option maxDiffSize=0", + "test:light": "npm run mocha", + "test": "npm run compile:native && npm run test:light", + "test:golden": "npm run compile:native && TEST_GOLDEN=1 npm run test:light", + "compile:playground": "cd playground && meson setup build && meson compile -C build", + "run:playground": "npm run compile:playground && mkdir -p build && ./playground/build/playground _ --extension ets --stdlib ../../incremental/tools/panda/node_modules/@panda/sdk/ets/stdlib --output build/playground.abc ./playground/src/main.ets", + "panda:sdk:clean": "cd ../../incremental/tools/panda && rimraf node_modules", + "panda:sdk:install": "cd ../../incremental/tools/panda && echo \"Installing panda sdk $npm_package_config_panda_sdk_version\" && PANDA_SDK_VERSION=$npm_package_config_panda_sdk_version npm run panda:sdk:install", + "panda:sdk:reinstall": "npm run panda:sdk:clean && npm run panda:sdk:install", + "regenerate:current": "rimraf -rf src/generated && npm run compile -C ../../../arktscgen && node ../../../arktscgen --panda-sdk-path $npm_package_config_panda_sdk_path --output-dir ../ --options-file ./generator/options.json5 --no-initialize --debug", + "regenerate": "rimraf -rf src/generated && arktscgen --panda-sdk-path ${PANDA_SDK_PATH:=$npm_package_config_panda_sdk_path} --output-dir ../ --options-file ./generator/options.json5 --no-initialize", + "reinstall:regenerate": "npm run panda:sdk:reinstall && npm run regenerate && git diff --shortstat" + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/plugins/input/direct.ets b/koala_tools/ui2abc/libarkts/plugins/input/direct.ets new file mode 100644 index 0000000000000000000000000000000000000000..b51286dbbd777886f910d1274831c1f0aba8774d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/input/direct.ets @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { __memo_context_type, __memo_id_type } from "@koalaui/runtime" + +@Retention({policy: "SOURCE"}) +@interface memo { } + +class A { + +} + +class Memo { + @memo static memo_method(): int { + return 1 + } + + @memo static memo_call(): int { + @memo const f = (): int => { + return 2 + } + return f() + } +} diff --git a/koala_tools/ui2abc/libarkts/plugins/input/export.ets b/koala_tools/ui2abc/libarkts/plugins/input/export.ets new file mode 100644 index 0000000000000000000000000000000000000000..77e954c91731fbabddeac5c3c122e9799c8752ef --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/input/export.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export function foo() { + console.log("Hello, world!") +} + +export const TEST: double = 2.718281828459045; diff --git a/koala_tools/ui2abc/libarkts/plugins/input/f.ets b/koala_tools/ui2abc/libarkts/plugins/input/f.ets new file mode 100644 index 0000000000000000000000000000000000000000..6904403bc5aa43fb340076f9de3c18d885ec081b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/input/f.ets @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export function f() { + console.log("Hello, world!") +} diff --git a/koala_tools/ui2abc/libarkts/plugins/input/library.ets b/koala_tools/ui2abc/libarkts/plugins/input/library.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a90478cce3064de4ad1521dde0bedfeb7da1083 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/input/library.ets @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export function testFunction(): string { + return "yes" +} +export function anotherFunction(): string { + return "no" +} + diff --git a/koala_tools/ui2abc/libarkts/plugins/input/main.ets b/koala_tools/ui2abc/libarkts/plugins/input/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..4846a65a957ef52a657ca7c743d4b86341481788 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/input/main.ets @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +enum X { + A = 17 +} + +namespace Y { + function foo() { + } +} + +function foo(value: int): void { + switch (X.fromValue(value)) { + case X.A: + console.log("A") + break + default: + console.log("default") + + } +} + diff --git a/koala_tools/ui2abc/libarkts/plugins/input/no-import-no-struct.ets b/koala_tools/ui2abc/libarkts/plugins/input/no-import-no-struct.ets new file mode 100644 index 0000000000000000000000000000000000000000..c1e39867ade1d3df4af5aada138eef6acb3d317c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/input/no-import-no-struct.ets @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@interface Component{} + +@interface BuilderLambda { + value: string +} + +@Component +class MyComponent { + @BuilderLambda("instantiateImpl") + static $_instantiate(factory: () => MyComponent): MyComponent { + const instance = factory() + return instance + } + + static instantiateImpl(builder: (instance: MyComponent)=>void, factory: () => MyComponent): void { + const instance = factory() + builder(instance) + } + + width(value: number): MyComponent { return this } + build() {} +} + + +@Component +class AnotherComponent { + + build() { + MyComponent() + .width(17.0) + } +} diff --git a/koala_tools/ui2abc/libarkts/plugins/input/one_recursive.ts b/koala_tools/ui2abc/libarkts/plugins/input/one_recursive.ts new file mode 100644 index 0000000000000000000000000000000000000000..baf5bae595d84d887b36395aa290c248b6b56f12 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/input/one_recursive.ts @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Two } from "./two_recursive" + +export interface One { + two(): Two { + throw new Error("") + } +} + diff --git a/koala_tools/ui2abc/libarkts/plugins/input/two_recursive.ts b/koala_tools/ui2abc/libarkts/plugins/input/two_recursive.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3e6de586b443924412f819e9b630276dfd3fbb5 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/input/two_recursive.ts @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { One } from "./one_recursive" + +export interface Two { + one(): One { + throw new Error("") + } +} + diff --git a/koala_tools/ui2abc/libarkts/plugins/input/variable.ets b/koala_tools/ui2abc/libarkts/plugins/input/variable.ets new file mode 100644 index 0000000000000000000000000000000000000000..289ef6ec995e13b4fa383a9634cf896b2529ce58 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/input/variable.ets @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const X: number = 1.2345; diff --git a/koala_tools/ui2abc/libarkts/plugins/src/print-visitor.ts b/koala_tools/ui2abc/libarkts/plugins/src/print-visitor.ts new file mode 100644 index 0000000000000000000000000000000000000000..c2c30cbf5bd1a6c002ff3e3a458698ea47a01e0d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/src/print-visitor.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" + + +export class PrintVisitor extends arkts.AbstractVisitor { + private result = "" + + private printNode(node: arkts.AstNode) { + return `${" ".repeat(4 * this.indentation)}${arkts.asString(node)}` + } + + visitor(node: arkts.AstNode): arkts.AstNode { + console.log(this.printNode(node)) + return this.visitEachChild(node) + } +} diff --git a/koala_tools/ui2abc/libarkts/plugins/src/printer-plugin.ts b/koala_tools/ui2abc/libarkts/plugins/src/printer-plugin.ts new file mode 100644 index 0000000000000000000000000000000000000000..0d87341193ab16bd2f7778db6c74b00898c1b9d1 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/src/printer-plugin.ts @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +import * as arkts from "@koalaui/libarkts" +import { PrintVisitor } from './print-visitor' + +export interface TransformerOptions { + trace?: boolean, +} + +export function printerTransformer( + userPluginOptions?: TransformerOptions +) { + return (program: arkts.Program) => { + return new PrintVisitor().visitor(program.ast) + } +} + +export function init(parsedJson?: Object, checkedJson?: Object) { + let pluginContext = new arkts.PluginContextImpl() + const parsedHooks = new arkts.DumpingHooks(arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED, "printer") + const checkedHooks = new arkts.DumpingHooks(arkts.Es2pandaContextState.ES2PANDA_STATE_CHECKED, "printer") + return { + name: "printer", + parsed(hooks: arkts.RunTransformerHooks = parsedHooks) { + console.log("[printer-plugin] Run parsed state plugin") + const transform = printerTransformer(parsedJson) + const prog = arkts.arktsGlobal.compilerContext!.program + const state = arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED + try { + arkts.runTransformer(prog, state, transform, pluginContext, hooks) + } catch(e) { + console.trace(e) + throw e + } + }, + checked(hooks: arkts.RunTransformerHooks = checkedHooks) { + console.log("[printer-plugin] Run checked state plugin") + const transform = printerTransformer(checkedJson) + const prog = arkts.arktsGlobal.compilerContext!.program + const state = arkts.Es2pandaContextState.ES2PANDA_STATE_CHECKED + try { + arkts.runTransformer(prog, state, transform, pluginContext, hooks) + arkts.recheckSubtree(prog.ast) + } catch(e) { + console.trace(e) + throw e + } + }, + } +} diff --git a/koala_tools/ui2abc/libarkts/plugins/tsconfig.json b/koala_tools/ui2abc/libarkts/plugins/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..2336e67754f08e5aa65c9f893a4737409b71c1dd --- /dev/null +++ b/koala_tools/ui2abc/libarkts/plugins/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@koalaui/build-common/tsconfig.json", + "compilerOptions": { + "rootDir": ".", + "baseUrl": ".", + "outDir": "./build", + "module": "CommonJS" + }, + "include": [ + "./src/printer-plugin.ts", + "./src/print-visitor.ts", + ] +} diff --git a/koala_tools/ui2abc/libarkts/rollup.es2panda.mjs b/koala_tools/ui2abc/libarkts/rollup.es2panda.mjs new file mode 100644 index 0000000000000000000000000000000000000000..bbcc959915ea0bd0ebfae4ff34d21dad0b249c26 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/rollup.es2panda.mjs @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2024 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 nodeResolve from "@rollup/plugin-node-resolve"; +import typescript from "@rollup/plugin-typescript"; +import commonjs from '@rollup/plugin-commonjs' + +/** @type {import("rollup").RollupOptions} */ +export default { + input: "./src-host/es2panda.ts", + output: { + file: "./lib/es2panda.js", + format: "commonjs", + banner: [ + "#!/usr/bin/env node", + APACHE_LICENSE_HEADER() + ].join("\n"), + }, + external: ["@koalaui/libarkts"], + plugins: [ + commonjs(), + typescript({ + outputToFilesystem: false, + module: "esnext", + sourceMap: false, + declarationMap: false, + declaration: false, + composite: false, + tsconfig: "./tsconfig.host.json" + }), + nodeResolve({ + extensions: [".js", ".mjs", ".cjs", ".ts", ".cts", ".mts"], + preferBuiltins: true, + }) + ], +} + +function APACHE_LICENSE_HEADER() { + return ` +/** +* @license +* Copyright (c) ${new Date().getUTCFullYear()} 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. +*/ + +` +} diff --git a/koala_tools/ui2abc/libarkts/rollup.lib.mjs b/koala_tools/ui2abc/libarkts/rollup.lib.mjs new file mode 100644 index 0000000000000000000000000000000000000000..6a17260d346d00d94e9d81e459a73524bf199738 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/rollup.lib.mjs @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2024 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 nodeResolve from "@rollup/plugin-node-resolve"; +import typescript from "@rollup/plugin-typescript"; +import commonjs from '@rollup/plugin-commonjs' + +const ENABLE_SOURCE_MAPS = false // Enable for debugging + +/** @type {import("rollup").RollupOptions} */ +export default makeConfig() + +function makeConfig(input, output) { + return { + input: { + 'libarkts': "./src/index.ts" + }, + output: { + dir: "lib", + format: "commonjs", + plugins: [ + // terser() + ], + manualChunks: { + 'libarkts-common': ["./src/index.ts"], + // Improve: maybe split scripts into smaller chunks + // 'libarkts-api': ["./src/arkts-api/index.ts"], + // 'libarkts-generated': ["./src/generated/index.ts"], + }, + banner: APACHE_LICENSE_HEADER(), + sourcemap: ENABLE_SOURCE_MAPS + }, + plugins: [ + commonjs(), + typescript({ + outputToFilesystem: false, + outDir: "lib", + module: "esnext", + sourceMap: ENABLE_SOURCE_MAPS, + declaration: true, + declarationMap: false, + declarationDir: "lib/types", + composite: false, + }), + nodeResolve({ + extensions: [".js", ".mjs", ".cjs", ".ts", ".cts", ".mts"] + }) + ], + } +} + +function APACHE_LICENSE_HEADER() { + return ` +/** +* @license +* Copyright (c) ${new Date().getUTCFullYear()} 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. +*/ + +` +} diff --git a/koala_tools/ui2abc/libarkts/rollup.printer-plugin.mjs b/koala_tools/ui2abc/libarkts/rollup.printer-plugin.mjs new file mode 100644 index 0000000000000000000000000000000000000000..fc5779c87606020bf8ff7a4abd50a404393881d7 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/rollup.printer-plugin.mjs @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024 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 nodeResolve from "@rollup/plugin-node-resolve"; +import typescript from "@rollup/plugin-typescript"; +import commonjs from '@rollup/plugin-commonjs' + +/** @type {import("rollup").RollupOptions} */ +export default { + input: "./plugins/src/printer-plugin.ts", + output: { + file: "./lib/plugins/printer-plugin.js", + format: "commonjs", + banner: [ + "#!/usr/bin/env node", + APACHE_LICENSE_HEADER() + ].join("\n"), + }, + external: ["@koalaui/libarkts"], + plugins: [ + commonjs(), + typescript({ + outputToFilesystem: false, + module: "esnext", + sourceMap: false, + declarationMap: false, + declaration: false, + composite: false, + tsconfig: "./tsconfig.plugin.json" + }), + nodeResolve({ + extensions: [".js", ".mjs", ".cjs", ".ts", ".cts", ".mts"] + }) + ], +} + +function APACHE_LICENSE_HEADER() { + return ` +/** +* @license +* Copyright (c) ${new Date().getUTCFullYear()} 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. +*/ + +` +} diff --git a/koala_tools/ui2abc/libarkts/src-host/es2panda.ts b/koala_tools/ui2abc/libarkts/src-host/es2panda.ts new file mode 100644 index 0000000000000000000000000000000000000000..632ae8f796f561c147c800ba8722e51812cbe438 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src-host/es2panda.ts @@ -0,0 +1,302 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as fs from "node:fs" +import * as path from "node:path" +import { checkSDK, arktsGlobal as global, findStdlib, DumpingHooks, listPrograms, initVisitsTable } from "@koalaui/libarkts" +import { PluginEntry, PluginInitializer, CompilationOptions, Program } from "@koalaui/libarkts" +import { Command } from "commander" +import { throwError } from "@koalaui/libarkts" +import { Es2pandaContextState } from "@koalaui/libarkts" +import { Tracer, traceGlobal, Options, Config, Context, proceedToState, dumpProgramInfo, dumpArkTsConfigInfo } from "@koalaui/libarkts" + +interface CommandLineOptions { + files: string[] + configPath: string + outputs: string[] + dumpAst: boolean + simultaneous: boolean + profileMemory: boolean + trace: boolean +} + +function readResponseFile(arg: string | undefined): string | undefined { + if (!arg) { + return undefined + } + if (!arg.startsWith('@')) { + return arg + } + return fs.readFileSync(arg.slice(1), 'utf-8') +} + +function parseCommandLineArgs(): CommandLineOptions { + const commander = new Command() + .argument('[file]', 'Path to files to be compiled') + .option('--file, ', 'Path to file to be compiled (deprecated)') + .option('--arktsconfig, ', 'Path to arkts configuration file') + .option('--ets-module', 'Do nothing, legacy compatibility') + .option('--output, ', 'The name of result file') + .option('--dump-plugin-ast', 'Dump ast before and after each plugin') + .option('--simultaneous', 'Use "simultaneous" mode of compilation') + .option('--profile-memory', 'Profile memory usage') + .option('--trace', 'Trace plugin compilation') + .parse(process.argv) + + const cliOptions = commander.opts() + const cliArgs = commander.args + const fileArg = readResponseFile(cliOptions.file ?? cliArgs[0]) + if (!fileArg) { + reportErrorAndExit(`Either --file option or file argument is required`) + } + const files = fileArg.split(/[ :]/g).map((it: string) => path.resolve(it)) + const configPath = path.resolve(cliOptions.arktsconfig) + const outputArg = cliOptions.output + const outputs = outputArg.split(':').map((it: string) => path.resolve(it)) + files.forEach((it: string) => { + if (!fs.existsSync(it)) { + reportErrorAndExit(`File path doesn't exist: ${it}`) + } + }) + if (!fs.existsSync(configPath)) { + reportErrorAndExit(`Arktsconfig path doesn't exist: ${configPath}`) + } + + const dumpAst = cliOptions.dumpPluginAst ?? false + const simultaneous = cliOptions.simultaneous ?? false + const profileMemory = cliOptions.profileMemory ?? false + const trace = cliOptions.trace ?? false + + return { files, configPath, outputs, dumpAst, simultaneous, profileMemory, trace } +} + +function insertPlugin( + pluginEntry: PluginEntry, + state: Es2pandaContextState, + dumpAst: boolean, +) { + const pluginName = `${pluginEntry.name}-${Es2pandaContextState[state].substring(`ES2PANDA_STATE_`.length).toLowerCase()}` + global.profiler.curPlugin = pluginName + global.profiler.transformStarted() + + const hooks = new DumpingHooks(state, pluginName, dumpAst) + + if (state == Es2pandaContextState.ES2PANDA_STATE_PARSED) { + pluginEntry.parsed?.(hooks) + } + + if (state == Es2pandaContextState.ES2PANDA_STATE_CHECKED) { + pluginEntry.checked?.(hooks) + } + + global.profiler.transformEnded(state, pluginName) + global.profiler.curPlugin = "" +} + +// Improve: move to profiler +function dumpMemoryProfilerInfo(str: string) { + console.log(str, process.memoryUsage().rss) +} + +function dumpCompilationInfo(simultaneous: boolean) { + traceGlobal(() => { + const programs = listPrograms(global.compilerContext!.program) + if (simultaneous) { + const programsForCodegeneration = programs.filter(it => it.isGenAbcForExternal) + traceGlobal(() => `Programs for codegeneration : ${programsForCodegeneration.length}`) + traceGlobal(() => `External programs passed to plugins: ${programs.length - programsForCodegeneration.length - 1}`) + } else { + traceGlobal(() => `Programs for codegeneration : 1`) + traceGlobal(() => `External programs passed to plugins: ${programs.length - 1}`) + } + }) +} + +function createContextAdapter(filePaths: string[]): Context { + return Context.createFromFile(filePaths[0]) +} + +function invoke( + configPath: string, + filePaths: string[], + outputPath: string, + pluginsByState: Map, + dumpAst: boolean, + profileMemory: boolean, + trace: boolean, + simultaneous: boolean, + createContext: (fileNames: string[]) => Context, +): void { + const stdlib = findStdlib() + const cmd = ['--arktsconfig', configPath, '--extension', 'ets', '--stdlib', stdlib, '--output', outputPath] + if (simultaneous) { + cmd.push('--simultaneous') + } + cmd.push(filePaths[0]) + + fs.mkdirSync(path.dirname(outputPath), { recursive: true }) + if (trace) { + Tracer.startGlobalTracing(path.dirname(outputPath)) + } + Tracer.pushContext('es2panda') + + initVisitsTable() + + const compilerConfig = Config.create(['_', ...cmd]) + global.config = compilerConfig.peer + if (!global.configIsInitialized()) + throw new Error(`Wrong config: path=${configPath}`) + + const compilerContext = createContext(filePaths) + global.compilerContext = compilerContext + global.isContextGenerateAbcForExternalSourceFiles = simultaneous + + const options = Options.createOptions(new Config(global.config)) + global.arktsconfig = options.getArkTsConfig() + dumpArkTsConfigInfo(global.arktsconfig) + + if (profileMemory) dumpMemoryProfilerInfo('Memory usage before proceed to parsed:') + proceedToState(Es2pandaContextState.ES2PANDA_STATE_PARSED) + if (profileMemory) dumpMemoryProfilerInfo('Memory usage after proceed to parsed:') + + pluginsByState.get(Es2pandaContextState.ES2PANDA_STATE_PARSED)?.forEach(plugin => { + if (profileMemory) dumpMemoryProfilerInfo(`Memory usage before ${plugin.name}-parsed:`) + insertPlugin(plugin, Es2pandaContextState.ES2PANDA_STATE_PARSED, dumpAst) + if (profileMemory) dumpMemoryProfilerInfo(`Memory usage after ${plugin.name}-parsed:`) + }) + + dumpCompilationInfo(simultaneous) + + if (profileMemory) dumpMemoryProfilerInfo('Memory usage before proceed to checked:') + proceedToState(Es2pandaContextState.ES2PANDA_STATE_CHECKED) + if (profileMemory) dumpMemoryProfilerInfo('Memory usage after proceed to checked:') + + pluginsByState.get(Es2pandaContextState.ES2PANDA_STATE_CHECKED)?.forEach(plugin => { + if (profileMemory) dumpMemoryProfilerInfo(`Memory usage before ${plugin.name}-checked:`) + insertPlugin(plugin, Es2pandaContextState.ES2PANDA_STATE_CHECKED, dumpAst) + if (profileMemory) dumpMemoryProfilerInfo(`Memory usage after ${plugin.name}-checked:`) + }) + + if (profileMemory) dumpMemoryProfilerInfo('Memory usage before proceed to asm:') + proceedToState(Es2pandaContextState.ES2PANDA_STATE_ASM_GENERATED) + if (profileMemory) dumpMemoryProfilerInfo('Memory usage after proceed to asm:') + + if (profileMemory) dumpMemoryProfilerInfo('Memory usage before proceed to bin:') + proceedToState(Es2pandaContextState.ES2PANDA_STATE_BIN_GENERATED) + if (profileMemory) dumpMemoryProfilerInfo('Memory usage after proceed to bin:') + + global.profiler.compilationEnded() + global.profiler.report() + global.profiler.reportToFile(true) + + compilerContext.destroy() + compilerConfig.destroy() + + Tracer.popContext() + if (trace) { + Tracer.stopGlobalTracing() + } +} + +function loadPlugin(configDir: string, transform: string) { + /** Improve: read and pass plugin options */ + const plugin = (transform.startsWith(".") || transform.startsWith("/")) ? + path.resolve(configDir, transform) : transform + const pluginEntry = require(plugin) + if (!pluginEntry.init) { + throw new Error(`init is not specified in plugin ${transform}`) + } + if (typeof (pluginEntry.init) !== 'function') { + throw new Error(`init is not a function in plugin ${transform}`) + } + return pluginEntry.init +} + +function stateFromString(stateName: string): Es2pandaContextState { + switch (stateName) { + case "parsed": return Es2pandaContextState.ES2PANDA_STATE_PARSED + case "checked": return Es2pandaContextState.ES2PANDA_STATE_CHECKED + default: throw new Error(`Invalid state name: ${stateName}`) + } +} + +function readAndSortPlugins(configDir: string, plugins: any[]) { + const pluginsByState = new Map() + const pluginInitializers = new Map() + const pluginParsedStageOptions = new Map() + const pluginCheckedStageOptions = new Map() + + plugins.forEach(it => { + const transform = it.transform + if (!transform) { + throwError(`arktsconfig plugins objects should specify transform`) + } + const state = stateFromString(it.state) + if (!pluginInitializers.has(it.transform)) { + pluginInitializers.set(it.transform, loadPlugin(configDir, it.transform)) + } + if (!pluginsByState.has(state)) { + pluginsByState.set(state, []) + } + if (state == Es2pandaContextState.ES2PANDA_STATE_PARSED) { + pluginParsedStageOptions.set(it.transform, it) + } + if (state == Es2pandaContextState.ES2PANDA_STATE_CHECKED) { + pluginCheckedStageOptions.set(it.transform, it) + } + }) + + pluginInitializers.forEach((pluginInit, pluginTransform) => { + const parsedJson = pluginParsedStageOptions.get(pluginTransform) + const checkedJson = pluginCheckedStageOptions.get(pluginTransform) + const plugin = pluginInit(parsedJson, checkedJson) + if (parsedJson && plugin.parsed) { + pluginsByState.get(Es2pandaContextState.ES2PANDA_STATE_PARSED)?.push(plugin) + } + if (checkedJson && plugin.checked) { + pluginsByState.get(Es2pandaContextState.ES2PANDA_STATE_CHECKED)?.push(plugin) + } + }) + + return pluginsByState +} + +export function main() { + checkSDK() + const { files, configPath, outputs, dumpAst, simultaneous, profileMemory, trace } = parseCommandLineArgs() + if (!simultaneous && files.length != outputs.length) { + reportErrorAndExit("Different length of inputs and outputs") + } + const arktsconfig = JSON.parse(fs.readFileSync(configPath).toString()) + const configDir = path.dirname(configPath) + const compilerOptions = arktsconfig.compilerOptions ?? throwError(`arktsconfig should specify compilerOptions`) + const plugins = compilerOptions.plugins ?? [] + const pluginsByState = readAndSortPlugins(configDir, plugins) + + if (simultaneous) { + invoke(configPath, files, outputs[0], pluginsByState, dumpAst, profileMemory, trace, simultaneous, Context.createContextGenerateAbcForExternalSourceFiles) + } else { + for (var i = 0; i < files.length; i++) { + invoke(configPath, [files[i]], outputs[i], pluginsByState, dumpAst, profileMemory, trace, simultaneous, createContextAdapter) + } + } +} + +function reportErrorAndExit(message: string): never { + console.error(message) + process.exit(1) +} + +main() diff --git a/koala_tools/ui2abc/libarkts/src/Es2pandaNativeModule.ts b/koala_tools/ui2abc/libarkts/src/Es2pandaNativeModule.ts new file mode 100644 index 0000000000000000000000000000000000000000..e107d7eda9cd1b77f585cf4dcdddbe6e34d3f64d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/Es2pandaNativeModule.ts @@ -0,0 +1,262 @@ +/* + * 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 { + KNativePointer as KPtr, + KInt, + KBoolean, + KNativePointer, + registerNativeModuleLibraryName, + loadNativeModuleLibrary, + KDouble, + KUInt, + KStringArrayPtr, +} from "@koalaui/interop" +import { Es2pandaNativeModule as GeneratedEs2pandaNativeModule, KNativePointerArray } from "./generated/Es2pandaNativeModule" +import * as path from "path" +import * as fs from "fs" +import { Es2pandaPluginDiagnosticType } from "./generated/Es2pandaEnums" + +// Improve: this type should be in interop +export type KPtrArray = BigUint64Array + +export class Es2pandaNativeModule { + _AnnotationAllowedAnnotations(context: KPtr, node: KPtr, returnLen: KPtr): KPtr { + throw new Error("Not implemented") + } + _AstNodeRebind(context: KPtr, node: KPtr): void { + throw new Error("Not implemented") + } + _ContextState(context: KPtr): KInt { + throw new Error("Not implemented") + } + _AstNodeChildren(context: KPtr, node: KPtr): KPtr { + throw new Error("Not implemented") + } + _AstNodeDumpModifiers(context: KPtr, node: KPtr): KPtr { + throw new Error("Not implemented") + } + _CreateConfig(argc: number, argv: string[]): KPtr { + throw new Error("Not implemented") + } + _DestroyConfig(peer: KNativePointer): void { + throw new Error("Not implemented") + } + _CreateContextFromString(config: KPtr, source: String, filename: String): KPtr { + throw new Error("Not implemented") + } + _CreateContextFromFile(config: KPtr, filename: String): KPtr { + throw new Error("Not implemented") + } + _CreateCacheContextFromFile(config: KNativePointer, sourceFileName: String, globalContext: KNativePointer, isExternal: KBoolean): KNativePointer { + throw new Error("Not implemented"); + } + _InsertGlobalStructInfo(context: KNativePointer, str: String): void { + throw new Error("Not implemented"); + } + _HasGlobalStructInfo(context: KNativePointer, str: String): KBoolean { + throw new Error("Not implemented"); + } + _CreateGlobalContext(config: KNativePointer, externalFileList: KStringArrayPtr, fileNum: KUInt, lspUsage: KBoolean): KNativePointer { + throw new Error("Not implemented"); + } + _DestroyGlobalContext(context: KNativePointer): void { + throw new Error("Not implemented"); + } + _DestroyContext(context: KPtr): void { + throw new Error("Not implemented") + } + _ProceedToState(context: KPtr, state: number): void { + throw new Error("Not implemented") + } + _CheckerStartChecker(context: KPtr): KBoolean { + throw new Error("Not implemented") + } + _AstNodeVariableConst(context: KPtr, ast: KPtr): KPtr { + throw new Error("Not implemented") + } + _CreateNumberLiteral(context: KPtr, value: KDouble): KPtr { + throw new Error("Not implemented") + } + _AstNodeSetChildrenParentPtr(context: KPtr, node: KPtr): void { + throw new Error("Not implemented") + } + _AstNodeOnUpdate(context: KPtr, newNode: KPtr, replacedNode: KPtr): void { + throw new Error("Not implemented") + } + _AstNodeUpdateAll(context: KPtr, node: KPtr): void { + throw new Error("Not implemented") + } + _VariableDeclaration(context: KPtr, variable: KPtr): KPtr { + throw new Error("Not implemented") + } + _DeclNode(context: KPtr, decl: KPtr): KPtr { + throw new Error("Not implemented") + } + _ProgramSourceFilePath(context: KNativePointer, instance: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _ProgramExternalSources(context: KNativePointer, instance: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _ProgramDirectExternalSources(context: KNativePointer, instance: KNativePointer): KNativePointer { + throw new Error("Not implemented") + } + _ExternalSourceName(instance: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _ExternalSourcePrograms(instance: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _ETSParserBuildImportDeclaration(context: KNativePointer, importKinds: KInt, specifiers: KNativePointerArray, specifiersSequenceLength: KUInt, source: KNativePointer, program: KNativePointer, flags: KInt): KNativePointer { + throw new Error("Not implemented"); + } + _ImportPathManagerResolvePathConst(context: KNativePointer, importPathManager: KNativePointer, currentModulePath: String, importPath: String, sourcePosition: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _ETSParserGetImportPathManager(context: KNativePointer): KPtr { + throw new Error("Not implemented"); + } + _SourcePositionCol(context: KNativePointer, instance: KNativePointer): KInt { + throw new Error("Not implemented"); + } + _ConfigGetOptions(config: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _OptionsArkTsConfig(context: KNativePointer, options: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _Checker_CreateOpaqueTypeNode(context: KNativePointer, type: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _Checker_ScriptFunctionSignature(context: KNativePointer, node: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _Checker_ScriptFunctionSetSignature(context: KNativePointer, node: KNativePointer, signature: KNativePointer): void { + throw new Error("Not implemented"); + } + _Checker_SignatureReturnType(context: KNativePointer, signature: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _Checker_ScriptFunctionGetPreferredReturnType(context: KNativePointer, node: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _Checker_ScriptFunctionSetPreferredReturnType(context: KNativePointer, node: KNativePointer, type: KNativePointer): void { + throw new Error("Not implemented"); + } + _Checker_ExpressionGetPreferredType(context: KNativePointer, node: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _Checker_ExpressionSetPreferredType(context: KNativePointer, node: KNativePointer, type: KNativePointer): void { + throw new Error("Not implemented"); + } + _Checker_TypeToString(context: KNativePointer, type: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _Checker_TypeClone(context: KNativePointer, type: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _Checker_TypeNodeGetType(context: KNativePointer, node: KNativePointer): KNativePointer { + throw new Error("Not implemented"); + } + _ScriptFunctionSetParams(context: KNativePointer, receiver: KNativePointer, paramsList: BigUint64Array, paramsListLength: KUInt): void { + throw new Error("Not implemented") + } + _ClassDefinitionSetBody(context: KNativePointer, receiver: KNativePointer, body: BigUint64Array, bodyLength: KUInt): void { + throw new Error("Not implemented") + } + + // From koala-wrapper + _ClassVariableDeclaration(context: KNativePointer, classInstance: KNativePointer): KNativePointer { + throw new Error("Not implemented") + } + _ETSParserGetGlobalProgramAbsName(context: KNativePointer): KNativePointer { + throw new Error("Not implemented") + } + _CreateDiagnosticKind(context: KNativePointer, message: string, type: Es2pandaPluginDiagnosticType): KNativePointer { + throw new Error("Not implemented") + } + _CreateDiagnosticInfo(context: KNativePointer, kind: KNativePointer, args: string[], argc: number, pos: KNativePointer): KNativePointer { + throw new Error("Not implemented") + } + _CreateSuggestionInfo(context: KNativePointer, kind: KNativePointer, args: string[], + argc: number, substitutionCode: string, title: string, range: KNativePointer): KNativePointer { + throw new Error("Not implemented") + } + _LogDiagnostic(context: KNativePointer, kind: KNativePointer, argv: string[], argc: number, pos: KNativePointer): void { + throw new Error("Not implemented") + } + _SetUpSoPath(soPath: string): void { + throw new Error("Not implemented") + } + _MemInitialize(): void { + throw new Error("Not implemented") + } + _MemFinalize(): void { + throw new Error("Not implemented") + } + _ProgramCanSkipPhases(context: KNativePointer, program: KNativePointer): boolean { + throw new Error("Not implemented") + } + _GenerateTsDeclarationsFromContext(config: KPtr, outputDeclEts: String, outputEts: String, exportAll: KBoolean, isolated: KBoolean, recordFile: String): KPtr { + throw new Error("Not implemented") + } + _AstNodeProgram(context: KNativePointer, instance: KNativePointer): KNativePointer { + throw new Error("Not implemented") + } + _CreateContextGenerateAbcForExternalSourceFiles(config: KPtr, fileCount: KInt, filenames: string[]): KPtr { + throw new Error('Not implemented'); + } + + _GetCompilationMode(config: KNativePointer): KInt { + throw new Error('Not implemented'); + } + + _CreateTypeNodeFromTsType(context: KNativePointer, classInstance: KNativePointer): KNativePointer { + throw new Error('Not implemented'); + } +} + +export function findNativeModule(): string { + const candidates = [ + path.resolve(__dirname, "../native/build"), + path.resolve(__dirname, "../build/native/build"), + ] + let result = undefined + candidates.forEach(path => { + if (fs.existsSync(path)) { + result = path + return + } + }) + if (result) + return path.join(result, "es2panda") + throw new Error("Cannot find native module") +} + +export function initEs2panda(): Es2pandaNativeModule { + registerNativeModuleLibraryName("NativeModule", findNativeModule()) + const instance = new Es2pandaNativeModule() + loadNativeModuleLibrary("NativeModule", instance) + return instance +} + +export function initGeneratedEs2panda(): GeneratedEs2pandaNativeModule { + registerNativeModuleLibraryName("NativeModule", findNativeModule()) + const instance = new GeneratedEs2pandaNativeModule() + // registerNativeModule("InteropNativeModule", NativeModule) + loadNativeModuleLibrary("NativeModule", instance) + return instance +} diff --git a/koala_tools/ui2abc/libarkts/src/InteropNativeModule.ts b/koala_tools/ui2abc/libarkts/src/InteropNativeModule.ts new file mode 100644 index 0000000000000000000000000000000000000000..5b4d48048462892295281961f399c13b807096b8 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/InteropNativeModule.ts @@ -0,0 +1,53 @@ +/* + * 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 { + KNativePointer as KPtr, + KInt, + registerNativeModuleLibraryName, + loadNativeModuleLibrary +} from "@koalaui/interop" +import { findNativeModule } from "./Es2pandaNativeModule" + +export class InteropNativeModule { + _StringLength(ptr: KPtr): KInt { + throw new Error("Not implemented") + } + _StringData(ptr: KPtr, buffer: KPtr, length: KInt): void { + throw new Error("Not implemented") + } + _GetStringFinalizer(): KPtr { + throw new Error("Not implemented") + } + _RawUtf8ToString(ptr: KPtr): string { + throw new Error("Not implemented") + } + _InvokeFinalizer(ptr: KPtr, finalizer: KPtr): void { + throw new Error("Not implemented") + } + _GetPtrVectorSize(ptr: KPtr): KInt { + throw new Error("Not implemented") + } + _GetPtrVectorElement(ptr: KPtr, index: KInt): KPtr { + throw new Error("Not implemented") + } +} + +export function initInterop(): InteropNativeModule { + registerNativeModuleLibraryName("InteropNativeModule", findNativeModule()) + const instance = new InteropNativeModule() + loadNativeModuleLibrary("InteropNativeModule", instance) + return instance +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/AbstractVisitor.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/AbstractVisitor.ts new file mode 100644 index 0000000000000000000000000000000000000000..eb21588719f92c9cfbf9d66d4b9725dfc1542722 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/AbstractVisitor.ts @@ -0,0 +1,50 @@ +/* + * 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 { AstNode } from "./peers/AstNode" +import { visitEachChild } from "./visitor" +import { Program } from "../generated" + +export interface VisitorOptions { + program?: Program +} + +export abstract class AbstractVisitor { + public program?: Program + + constructor(options?: VisitorOptions) { + this.program = options?.program; + } + + indentation = 0 + + withIndentation(exec: () => T) { + this.indentation++ + const result = exec() + this.indentation-- + return result + } + + abstract visitor(node: AstNode, options?: object): AstNode + + visitEachChild(node: AstNode, options?: object): AstNode { + return this.withIndentation(() => + visitEachChild( + node, + it => this.visitor(it, options) + ) + ) + } +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/ChainExpressionFilter.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/ChainExpressionFilter.ts new file mode 100644 index 0000000000000000000000000000000000000000..3d22c7c46fd7d0c09de50fca8ad5409c5393e170 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/ChainExpressionFilter.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { BlockStatement, ChainExpression, Expression, isChainExpression, isMemberExpression, MemberExpression } from "src/generated"; +import { AbstractVisitor } from "./AbstractVisitor"; +import { AstNode } from "./peers/AstNode" +import { factory } from "./factory/nodeFactory"; +import { Es2pandaTokenType, Es2pandaVariableDeclarationKind, Es2pandaVariableDeclaratorFlag } from "src/generated/Es2pandaEnums"; + + +export class ChainExpressionFilter extends AbstractVisitor { + static counter = 0 + transformChainExpression(node: ChainExpression): Expression { + const expression = node.expression + if (expression == undefined) return node + if (!isMemberExpression(expression)) return node + return this.transformMemberExpression(expression) + } + transformMemberExpression(expression: MemberExpression): Expression { + const temporaryVarName = `chaintmp%%_${ChainExpressionFilter.counter++}` + return factory.createBlockExpression( + [ + factory.createVariableDeclaration( + Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_LET, + [ + factory.createVariableDeclarator( + Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_LET, + factory.createIdentifier(temporaryVarName), + expression.object + ) + ], + undefined + ), + factory.createExpressionStatement( + factory.createConditionalExpression( + factory.createBinaryExpression( + factory.createIdentifier(temporaryVarName, undefined), + factory.createUndefinedLiteral(), + Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_STRICT_EQUAL + ), + factory.createUndefinedLiteral(), + factory.createMemberExpression( + factory.createIdentifier(temporaryVarName, undefined), + expression.property, + expression.kind, + expression.isComputed, + false + ) + ) + ) + ] + ) + } + + + visitor(beforeChildren: BlockStatement): BlockStatement + visitor(beforeChildren: AstNode): AstNode { + const node = this.visitEachChild(beforeChildren) + if (isChainExpression(node)) { + return this.transformChainExpression(node) + } + if (isMemberExpression(node) && node.isOptional) { + return this.transformMemberExpression(node) + } + return node + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/ImportStorage.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/ImportStorage.ts new file mode 100644 index 0000000000000000000000000000000000000000..24c3bbada48b7eb7e7ced8f17158bfd3c6363345 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/ImportStorage.ts @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { KNativePointer } from "@koalaui/interop" +import { ETSModule, ImportDeclaration, isETSImportDeclaration, Program, Statement } from "../generated" +import { passNode, passNodeArray, unpackNonNullableNode } from "./utilities/private" +import { global } from "./static/global" +import { Es2pandaImportFlags, Es2pandaImportKinds } from "../generated/Es2pandaEnums" +import { factory } from "./factory/nodeFactory" + +export class ImportStorage { + // Improve: migrate to wrappers instead of pointers + private imports: Set = new Set() + private importSources: Set = new Set() + + constructor(private program: Program, private isParserState: boolean) { + for (const statement of program.ast.statements) { + if (isETSImportDeclaration(statement)) { + this.imports.add(statement.peer) + if (!isParserState) { + // Improve: is source non nullable? + this.importSources.add(statement.source?.str) + } + } + } + } + + update() { + // Save current statements + const statements = this.program.ast.statements + + // Update parser information + const newStatements: Statement[] = [] + for (const statement of statements) { + if (isETSImportDeclaration(statement) && !this.imports.has(statement.peer)) { + if (!this.isParserState && !this.importSources.has(statement.source?.str)) { + console.warn("Attempt to insert import from new source after parsed state:") + console.warn(statement.dumpSrc()) + } + + const importDeclaration = unpackNonNullableNode( + // Note: this call is important, we cannot just pass "statement" to "InsertETSImportDeclarationAndParse" + global.es2panda._ETSParserBuildImportDeclaration( + global.context, + Es2pandaImportKinds.IMPORT_KINDS_ALL, // Improve: do we use IMPORT_KINDS_TYPES? + passNodeArray(statement.specifiers), + statement.specifiers.length, + passNode(statement.source), + this.program.peer, + Es2pandaImportFlags.IMPORT_FLAGS_NONE, // Improve: where to get it? + ) + ) + global.generatedEs2panda._InsertETSImportDeclarationAndParse(global.context, this.program.peer, importDeclaration.peer) + newStatements.push(importDeclaration) + } else { + newStatements.push(statement) + } + } + + // Drop import statements generated by compiler in the beginning of the ETSModule + const module = this.program.ast as ETSModule + this.program.setAst( + factory.updateETSModule( + module, + newStatements, + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + } +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/ProgramProvider.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/ProgramProvider.ts new file mode 100644 index 0000000000000000000000000000000000000000..6831a29ed0a70eace6a05472438e9c1ffb146f56 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/ProgramProvider.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { KNativePointer } from "@koalaui/interop" +import { defaultFilter, listPrograms } from "./plugins" +import { Program } from "../generated" + +export class ProgramProvider { + // Improve: migrate to wrappers instead of pointers + seenPrograms: Set = new Set() + queue: Program[] = [] + + constructor(private mainProgram: Program, private readonly filter: (name: string) => boolean = defaultFilter) { + this.seenPrograms.add(mainProgram.peer) + this.queue = [mainProgram] + } + + updateQueue() { + const listed = listPrograms(this.mainProgram, this.filter) + for (const program of listed) { + if (!this.seenPrograms.has(program.peer)) { + this.seenPrograms.add(program.peer) + this.queue.push(program) + } + } + } + + next(): Program | undefined { + if (this.queue.length == 0) { + this.updateQueue() + if (this.queue.length == 0) { + // console.log("PROGRAMS:", this.seenPrograms.size) + return undefined + } + } + return this.queue.shift() + } +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/class-by-peer.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/class-by-peer.ts new file mode 100644 index 0000000000000000000000000000000000000000..0c00f1dbe4d2a78ab8b92235bd6582c5b9ce100d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/class-by-peer.ts @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2024 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 { Es2pandaAstNodeType } from "../generated/Es2pandaEnums" +import { throwError } from "../utils" +import { global } from "./static/global" +import { KNativePointer } from "@koalaui/interop" +import { AstNode } from "./peers/AstNode" +import { NodeCache } from "./node-cache" + +export const nodeByType = new Map AstNode>([]) + +export function nodeFrom(peer: KNativePointer): T { + const fromCache = NodeCache.get(peer) + if (fromCache) { + return fromCache + } + const type = global.generatedEs2panda._AstNodeTypeConst(global.context, peer) + const create = nodeByType.get(type) ?? throwError(`unknown node type: ${type}`) + return create(peer) as T +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/factory/nodeFactory.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/factory/nodeFactory.ts new file mode 100644 index 0000000000000000000000000000000000000000..b94d05d0298747b05ad8961069c14549934965fd --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/factory/nodeFactory.ts @@ -0,0 +1,129 @@ +/* + * 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 { + BlockStatement, + CallExpression, + ClassDefinition, + ClassProperty, + ETSImportDeclaration, + ETSModule, + ETSStructDeclaration, + ETSTuple, + ETSTypeReferencePart, + MemberExpression, + ObjectExpression, + TryStatement, + TSTypeParameter, + VariableDeclarator, +} from "../../generated" +import { factory as generatedFactory } from "../../generated/factory" +import { createScriptFunction, updateScriptFunction } from "../node-utilities/ScriptFunction" +import { updateCallExpression } from "../node-utilities/CallExpression" +import { createNumberLiteral, updateNumberLiteral } from "../node-utilities/NumberLiteral" +import { updateMemberExpression } from "../node-utilities/MemberExpression" +import { createETSParameterExpression, updateETSParameterExpression } from "../node-utilities/ETSParameterExpression" +import { updateTSTypeParameter } from "../node-utilities/TSTypeParameter" +import { updateETSTypeReferencePart } from "../node-utilities/TSTypeReferencePart" +import { updateETSImportDeclaration } from "../node-utilities/ETSImportDeclaration" +import { updateVariableDeclarator } from "../node-utilities/VariableDeclarator" +import { updateClassDefinition } from "../node-utilities/ClassDefinition" +import { updateETSStructDeclaration } from "../node-utilities/ETSStructDeclaration" +import { updateClassProperty } from "../node-utilities/ClassProperty" +import { createETSFunctionType, updateETSFunctionType } from "../node-utilities/ETSFunctionType" +import { createMethodDefinition, updateMethodDefinition } from "../node-utilities/MethodDefinition" +import { createTSInterfaceDeclaration, updateTSInterfaceDeclaration } from "../node-utilities/TSInterfaceDeclaration" +import { updateTryStatement } from "../node-utilities/TryStatement" +import { createAssignmentExpression, updateAssignmentExpression } from "../node-utilities/AssignmentExpression" +import { createObjectExpression, updateObjectExpression } from "../node-utilities/ObjectExpression" +import { updateETSTuple } from "../node-utilities/ETSTuple" +import { createArrayExpression, updateArrayExpression } from "../node-utilities/ArrayExpression" +import { updateBlockStatement } from "../node-utilities/BlockStatement" +import { updateETSModule } from "../node-utilities/ETSModule" +import { createOpaqueTypeNode } from "../node-utilities/OpaqueTypeNode" + +export const factory = { + ...generatedFactory, + + createETSModule: ETSModule.createETSModule, + updateETSModule, + + createCallExpression: CallExpression.createCallExpression, + updateCallExpression, + + createMemberExpression: MemberExpression.createMemberExpression, + updateMemberExpression, + + createScriptFunction, + updateScriptFunction, + + createNumberLiteral, + updateNumberLiteral, + + createETSParameterExpression, + updateETSParameterExpression, + + createTypeParameter: TSTypeParameter.create1TSTypeParameter, + updateTypeParameter: updateTSTypeParameter, + + createETSTypeReferencePart: ETSTypeReferencePart.createETSTypeReferencePart, + updateETSTypeReferencePart, + + createETSImportDeclaration: ETSImportDeclaration.createETSImportDeclaration, + updateETSImportDeclaration, + + createVariableDeclarator: VariableDeclarator.create1VariableDeclarator, + updateVariableDeclarator, + + createETSStructDeclaration: ETSStructDeclaration.createETSStructDeclaration, + updateETSStructDeclaration, + + createClassDefinition: ClassDefinition.createClassDefinition, + updateClassDefinition, + + createClassProperty: ClassProperty.createClassProperty, + updateClassProperty, + + createETSFunctionType, + updateETSFunctionType, + + createMethodDefinition, + updateMethodDefinition, + + createInterfaceDeclaration: createTSInterfaceDeclaration, + updateInterfaceDeclaration: updateTSInterfaceDeclaration, + + createTryStatement: TryStatement.createTryStatement, + updateTryStatement, + + createAssignmentExpression, + updateAssignmentExpression, + + createObjectExpression, + updateObjectExpression, + + createETSTuple: ETSTuple.create2ETSTuple, + updateETSTuple, + + createArrayExpression, + updateArrayExpression, + + createBlockStatement: BlockStatement.createBlockStatement, + updateBlockStatement, + + updateInterfaceBody : generatedFactory.updateTSInterfaceBody, + + createOpaqueTypeNode, +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/index.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..3d088c3480552327dd3e5a027c8ca70e0594e36b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/index.ts @@ -0,0 +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. + */ + +export * from "../generated/Es2pandaEnums" +export * from "../generated" + +export * from "./utilities/private" +export * from "./utilities/public" +export * from "./factory/nodeFactory" +export * from "./visitor" +export * from "./AbstractVisitor" +export * from "./ChainExpressionFilter" +export * from "./plugins" +export * from "./ImportStorage" +export * from "./ProgramProvider" + +export * from "./peers/AstNode" +export * from "./peers/Config" +export * from "./peers/Context" +export { GlobalContext } from "./peers/Context" +export * from "./peers/ExternalSource" +export * from "./peers/Options" +export * from "./node-utilities/ArkTsConfig" +export * from "./node-utilities/Program" +export * from "./peers/ImportPathManager" +export * from "./static/globalUtils" +export { global as arktsGlobal } from "./static/global" +export * from "./wrapper-compat" \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-cache.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-cache.ts new file mode 100644 index 0000000000000000000000000000000000000000..149831d3f167c284ac4ba5e6dbc49b8fe4f06446 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-cache.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { KNativePointer } from "@koalaui/interop" +import { AstNode } from "./peers/AstNode" + +export class NodeCache { + private static cache = new Map() + + static cached(pointer: KNativePointer, factory: (pointer: KNativePointer) => AstNode): T { + const cached = NodeCache.cache.get(pointer) + if (cached !== undefined) { + return cached as T + } + const node = factory(pointer) + NodeCache.addToCache(pointer, node) + return node as T + } + + static get(pointer: KNativePointer): T | undefined { + return NodeCache.cache.get(pointer) as T | undefined + } + + public static addToCache(pointer: KNativePointer, node: AstNode) { + NodeCache.cache.set(pointer, node) + } + + public static clear(): void { + NodeCache.cache.clear() + } +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ArkTsConfig.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ArkTsConfig.ts new file mode 100644 index 0000000000000000000000000000000000000000..7778a25d686b661443c6121b471101e1f05aed22 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ArkTsConfig.ts @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2024 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 { ArkTsConfig } from "../../generated" +import { traceGlobal } from "../../tracer" + +export function dumpArkTsConfigInfo(arkTsConfig: ArkTsConfig) { + traceGlobal(() => `ArkTsConfig info:`) + traceGlobal(() => `\tBaseUrl: ${arkTsConfig.baseUrl}`) + traceGlobal(() => `\tConfigPath: ${arkTsConfig.configPath}`) + traceGlobal(() => `\tOutDir: ${arkTsConfig.outDir}`) + traceGlobal(() => `\tPackage: ${arkTsConfig.package}`) + traceGlobal(() => `\tRootDir: ${arkTsConfig.rootDir}`) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ArrayExpression.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ArrayExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..f4ce7df2a7756031f15e849693eed6acb31754e9 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ArrayExpression.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2024 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 { Es2pandaAstNodeType } from "../../generated/Es2pandaEnums" +import { ArrayExpression, Expression } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function createArrayExpression( + elements: readonly Expression[] +): ArrayExpression { + return ArrayExpression.create1ArrayExpression( + Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION, + elements, + false + ) +} + +export function updateArrayExpression( + original: ArrayExpression, + elements: readonly Expression[] +): ArrayExpression { + if (isSameNativeObject(original.elements, elements)) { + return original + } + return updateNodeByNode( + createArrayExpression(elements), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/AssignmentExpression.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/AssignmentExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..b5fa8024e53e4313536f4a373836a9911590dc47 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/AssignmentExpression.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2024 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 { AssignmentExpression, Expression } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" +import { Es2pandaAstNodeType, Es2pandaTokenType } from "../../generated/Es2pandaEnums" + +export function createAssignmentExpression( + left: Expression | undefined, + right: Expression | undefined, + assignmentOperator: Es2pandaTokenType +): AssignmentExpression { + return AssignmentExpression.create1AssignmentExpression( + Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION, + left, + right, + assignmentOperator, + ) +} + +export function updateAssignmentExpression( + original: AssignmentExpression, + left: Expression | undefined, + right: Expression | undefined, + assignmentOperator: Es2pandaTokenType +): AssignmentExpression { + if (isSameNativeObject(left, original.left) + && isSameNativeObject(right, original.right) + && isSameNativeObject(assignmentOperator, original.operatorType) + ) { + return original + } + return updateNodeByNode( + createAssignmentExpression(left, right, assignmentOperator), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/BlockStatement.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/BlockStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..8da2777584465889f125e14beb343836fac7b45a --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/BlockStatement.ts @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 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 { BlockStatement, Statement } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function updateBlockStatement(original: BlockStatement, statements: readonly Statement[]): BlockStatement { + if (isSameNativeObject(statements, original.statements)) { + return original + } + return updateNodeByNode(BlockStatement.createBlockStatement(statements), original) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/CallExpression.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/CallExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..3d58248927b703386db73466e3dea1e63ecb2670 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/CallExpression.ts @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { BlockStatement, CallExpression, Expression, TSTypeParameterInstantiation } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function updateCallExpression( + original: CallExpression, + callee: Expression | undefined, + _arguments: readonly Expression[], + typeParams: TSTypeParameterInstantiation | undefined, + optional_arg: boolean = false, + trailingComma: boolean = false, + trailingBlock: BlockStatement | undefined = undefined, +): CallExpression { + if (isSameNativeObject(callee, original.callee) + && isSameNativeObject(_arguments, original.arguments) + && isSameNativeObject(typeParams, original.typeParams) + && isSameNativeObject(optional_arg, original.isOptional) + && isSameNativeObject(trailingComma, original.hasTrailingComma) + && isSameNativeObject(trailingBlock, original.trailingBlock) + ) { + return original + } + return updateNodeByNode( + CallExpression.createCallExpression(callee, _arguments, typeParams, optional_arg, trailingComma, trailingBlock), + original + ) +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ClassDefinition.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ClassDefinition.ts new file mode 100644 index 0000000000000000000000000000000000000000..0e7a778282ac6cd9030bb0933135202220469dc9 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ClassDefinition.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2024 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 { + AnnotationUsage, + ClassDefinition, + Expression, + Identifier, + MethodDefinition, + TSClassImplements, + TSTypeParameterDeclaration, + TSTypeParameterInstantiation +} from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" +import { AstNode } from "../peers/AstNode" +import { Es2pandaClassDefinitionModifiers, Es2pandaModifierFlags } from "../../generated/Es2pandaEnums" + +export function updateClassDefinition( + original: ClassDefinition, + ident: Identifier | undefined, + typeParams: TSTypeParameterDeclaration | undefined, + superTypeParams: TSTypeParameterInstantiation | undefined, + _implements: readonly TSClassImplements[], + ctor: MethodDefinition | undefined, + superClass: Expression | undefined, + body: readonly AstNode[], + modifiers: Es2pandaClassDefinitionModifiers, + flags: Es2pandaModifierFlags, + annotations?: readonly AnnotationUsage[] +): ClassDefinition { + if (isSameNativeObject(ident, original.ident) + && (isSameNativeObject(typeParams, original.typeParams)) + && (isSameNativeObject(superTypeParams, original.superTypeParams)) + && (isSameNativeObject(_implements, original.implements)) + && (isSameNativeObject(ctor, original.ctor)) + && (isSameNativeObject(superClass, original.super)) + && (isSameNativeObject(body, original.body)) + && (isSameNativeObject(modifiers, original.modifiers)) + && (isSameNativeObject(flags, original.modifierFlags)) + && (isSameNativeObject(annotations, original.annotations)) + ) { + return original + } + return updateNodeByNode( + ClassDefinition.createClassDefinition( + ident, + typeParams, + superTypeParams, + _implements, + ctor, + superClass, + body, + modifiers, + flags, + annotations, + ), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ClassProperty.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ClassProperty.ts new file mode 100644 index 0000000000000000000000000000000000000000..d22553dd8e6ae57927d55fca257ceff40830b0da --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ClassProperty.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2024 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 { AnnotationUsage, ClassProperty, Expression, TypeNode } from "../../generated" +import { Es2pandaModifierFlags } from "../../generated/Es2pandaEnums" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function updateClassProperty( + original: ClassProperty, + key: Expression | undefined, + value: Expression | undefined, + typeAnnotation: TypeNode | undefined, + modifiers: Es2pandaModifierFlags, + isComputed: boolean, + annotations?: readonly AnnotationUsage[], +): ClassProperty { + if (isSameNativeObject(key, original.key) + && isSameNativeObject(value, original.value) + && isSameNativeObject(typeAnnotation, original.typeAnnotation) + && isSameNativeObject(modifiers, original.modifierFlags) + && isSameNativeObject(isComputed, original.isComputed) + && isSameNativeObject(annotations, original.annotations) + ) { + return original + } + return updateNodeByNode( + ClassProperty.createClassProperty(key, value, typeAnnotation, modifiers, isComputed, annotations), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSFunctionType.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSFunctionType.ts new file mode 100644 index 0000000000000000000000000000000000000000..a549a0d5388b2f3ec0b611f0391a16d83d4692e7 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSFunctionType.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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 { AnnotationUsage, ETSFunctionType, Expression, FunctionSignature, TSTypeParameterDeclaration, TypeNode } from "../../generated" +import { Es2pandaScriptFunctionFlags } from "../../generated/Es2pandaEnums" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function createETSFunctionType( + typeParams: TSTypeParameterDeclaration | undefined, + params: readonly Expression[], + returnTypeAnnotation: TypeNode | undefined, + hasReceiver: boolean, + funcFlags: Es2pandaScriptFunctionFlags, + annotations?: readonly AnnotationUsage[], +): ETSFunctionType { + return ETSFunctionType.createETSFunctionType( + FunctionSignature.createFunctionSignature( + typeParams, + params, + returnTypeAnnotation, + hasReceiver, + ), + funcFlags, + annotations, + ) +} + +export function updateETSFunctionType( + original: ETSFunctionType, + typeParams: TSTypeParameterDeclaration | undefined, + params: readonly Expression[], + returnTypeAnnotation: TypeNode | undefined, + hasReceiver: boolean, + funcFlags: Es2pandaScriptFunctionFlags, + annotations?: readonly AnnotationUsage[], +): ETSFunctionType { + if (isSameNativeObject(typeParams, original.typeParams) + && isSameNativeObject(params, original.params) + && isSameNativeObject(returnTypeAnnotation, original.returnType) + && isSameNativeObject(funcFlags, original.flags) + && isSameNativeObject(annotations, original.annotations) + ) { + return original + } + return updateNodeByNode( + createETSFunctionType(typeParams, params, returnTypeAnnotation, hasReceiver, funcFlags, annotations), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSImportDeclaration.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSImportDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..34078a1084a487dad4ec83d17b5d47ca59453771 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSImportDeclaration.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2024 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 { ETSImportDeclaration, StringLiteral } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" +import { AstNode } from "../peers/AstNode" +import { Es2pandaImportKinds } from "../../generated/Es2pandaEnums" + +export function updateETSImportDeclaration( + original: ETSImportDeclaration, + source: StringLiteral | undefined, + specifiers: readonly AstNode[], + importKind: Es2pandaImportKinds +): ETSImportDeclaration { + if (isSameNativeObject(source, original.source) + && isSameNativeObject(specifiers, original.specifiers) + /* no getter for importKind */ + ) { + /* Improve: probably should set importMetadata, but no getter provided yet */ + return original + } + return updateNodeByNode( + ETSImportDeclaration.createETSImportDeclaration(source, specifiers, importKind), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSModule.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSModule.ts new file mode 100644 index 0000000000000000000000000000000000000000..c875efab0bfb15a8eb20042b31cf5321c0ea887f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSModule.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2024 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 { ETSModule, Identifier, Program, Statement } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" +import { Es2pandaModuleFlag } from "../../generated/Es2pandaEnums" + +export function updateETSModule( + original: ETSModule, + statementList: readonly Statement[], + ident: Identifier | undefined, + flag: Es2pandaModuleFlag, + program?: Program, +) { + if (isSameNativeObject(statementList, original.statements) + && isSameNativeObject(ident, original.ident) + && isSameNativeObject(flag, original.getNamespaceFlag()) + && isSameNativeObject(program, original.program) + ) { + return original + } + return updateNodeByNode( + ETSModule.createETSModule( + statementList, + ident, + flag, + program, + ), + original, + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSParameterExpression.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSParameterExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..f09511a5cfc01a29feb9ba83611ecde81341e8fe --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSParameterExpression.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2024 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 { AnnotatedExpression, AnnotationUsage, ETSParameterExpression, Expression, TypeNode } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function createETSParameterExpression( + identOrSpread: AnnotatedExpression | undefined, + isOptional: boolean, + initExpr?: Expression, + annotations?: readonly AnnotationUsage[] +): ETSParameterExpression { + const res = ETSParameterExpression.createETSParameterExpression(identOrSpread, isOptional, annotations) + if (initExpr) { + res.setInitializer(initExpr) + } + return res +} + +export function updateETSParameterExpression( + original: ETSParameterExpression, + identOrSpread: AnnotatedExpression | undefined, + isOptional: boolean, + initExpr?: Expression, + annotations?: readonly AnnotationUsage[], +): ETSParameterExpression { + if ((isSameNativeObject(identOrSpread, original.ident) || isSameNativeObject(identOrSpread, original.restParameter)) + && isSameNativeObject(isOptional, original.isOptional) + && isSameNativeObject(initExpr, original.initializer) + && isSameNativeObject(annotations, original.annotations) + ) { + return original + } + return updateNodeByNode( + createETSParameterExpression(identOrSpread, isOptional, initExpr, annotations), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSStructDeclaration.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSStructDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..f4fbd959604e907ee35efdd8fcbc16840899fd25 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSStructDeclaration.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2024 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 { ClassDefinition, ETSStructDeclaration } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function updateETSStructDeclaration( + original: ETSStructDeclaration, + def?: ClassDefinition +): ETSStructDeclaration { + if (isSameNativeObject(def, original.definition)) { + return original + } + return updateNodeByNode( + ETSStructDeclaration.createETSStructDeclaration(def), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSTuple.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSTuple.ts new file mode 100644 index 0000000000000000000000000000000000000000..65bc8633adfaef97ce99d7f154474618e1930737 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ETSTuple.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2024 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 { ETSTuple, TypeNode } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function updateETSTuple( + original: ETSTuple, + typeList: readonly TypeNode[] +): ETSTuple { + if (isSameNativeObject(typeList, original.tupleTypeAnnotationsList)) { + return original + } + return updateNodeByNode( + ETSTuple.create2ETSTuple(typeList), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/MemberExpression.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/MemberExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..fdaa969d9b616fec7e33820583768fc6e9d7b966 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/MemberExpression.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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 { Expression, MemberExpression } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" +import { Es2pandaMemberExpressionKind } from "../../generated/Es2pandaEnums" + +export function updateMemberExpression( + original: MemberExpression, + object_arg: Expression | undefined, + property: Expression | undefined, + kind: Es2pandaMemberExpressionKind, + computed: boolean, + optional_arg: boolean +): MemberExpression { + if (isSameNativeObject(object_arg, original.object) + && isSameNativeObject(property, original.property) + && isSameNativeObject(kind, original.kind) + && isSameNativeObject(computed, original.isComputed) + && isSameNativeObject(optional_arg, original.isOptional) + ) { + return original + } + return updateNodeByNode( + MemberExpression.createMemberExpression(object_arg, property, kind, computed, optional_arg), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/MethodDefinition.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/MethodDefinition.ts new file mode 100644 index 0000000000000000000000000000000000000000..4308241d295d5e66d148f08d0dd22d1920d9f276 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/MethodDefinition.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2024 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 { Expression, MethodDefinition } from "../../generated" +import { + Es2pandaMethodDefinitionKind, + Es2pandaModifierFlags, +} from "../../generated/Es2pandaEnums" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function createMethodDefinition( + kind: Es2pandaMethodDefinitionKind, + key: Expression | undefined, + value: Expression | undefined, + modifiers: Es2pandaModifierFlags, + isComputed: boolean, + overloads?: readonly MethodDefinition[] +): MethodDefinition { + return MethodDefinition.createMethodDefinition( + kind, + key, + value, + modifiers, + isComputed, + overloads, + ) +} + +export function updateMethodDefinition( + original: MethodDefinition, + kind: Es2pandaMethodDefinitionKind, + key: Expression | undefined, + value: Expression | undefined, + modifiers: Es2pandaModifierFlags, + isComputed: boolean, + overloads?: readonly MethodDefinition[] +): MethodDefinition { + if (isSameNativeObject(kind, original.kind) + && isSameNativeObject(key, original.key) + && isSameNativeObject(value, original.value) + && isSameNativeObject(modifiers, original.modifierFlags) + && isSameNativeObject(isComputed, original.isComputed) + && isSameNativeObject(overloads, original.overloads) + ) { + return original + } + return updateNodeByNode( + createMethodDefinition( + kind, + key, + value, + modifiers, + isComputed, + overloads, + ), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/NumberLiteral.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/NumberLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..369587f7ba28dedf0dfbeba8aed789a2ba29874c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/NumberLiteral.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { global } from "../static/global" +import { NumberLiteral } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" +import { Es2pandaAstNodeType } from "../../generated/Es2pandaEnums" + +export function createNumberLiteral( + value: number +): NumberLiteral { + return new NumberLiteral( + global.es2panda._CreateNumberLiteral( + global.context, + value + ), + Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL, + ) +} + +export function updateNumberLiteral( + original: NumberLiteral, + value: number +): NumberLiteral { + if (isSameNativeObject(value.toString(), original.str)) { + return original + } + return updateNodeByNode( + createNumberLiteral(value), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ObjectExpression.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ObjectExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..cb7ef117f6330d66d75bd6c0ecc376d708d59c3f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ObjectExpression.ts @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2024 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 { KNativePointer } from "@koalaui/interop" +import { ObjectExpression, Expression } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" +import { Es2pandaAstNodeType } from "../../generated/Es2pandaEnums" + +export function createObjectExpression( + properties: readonly Expression[], + preferredReturnType?: KNativePointer, +): ObjectExpression { + const result = ObjectExpression.createObjectExpression( + Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION, + properties, + false, // Improve: provide trailingComma value from native module through ObjectExpression? + ) + if (preferredReturnType) { + result.setPreferredTypePointer(preferredReturnType) + } + return result +} + +export function updateObjectExpression( + original: ObjectExpression, + properties: readonly Expression[], + preferredReturnType?: KNativePointer, +): ObjectExpression { + if (isSameNativeObject(properties, original.properties) + && preferredReturnType == original.getPreferredTypePointer()) { + return original + } + return updateNodeByNode( + createObjectExpression( + properties, + preferredReturnType + ), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/OpaqueTypeNode.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/OpaqueTypeNode.ts new file mode 100644 index 0000000000000000000000000000000000000000..aa4162e3136b47d2a858fe4da943fe31eb7ed3b1 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/OpaqueTypeNode.ts @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { KNativePointer } from "@koalaui/interop" +import { global } from "../static/global" +import { OpaqueTypeNode } from "../../generated" +import { Es2pandaAstNodeType } from "../../generated/Es2pandaEnums" + +export function createOpaqueTypeNode( + typePointer: KNativePointer +): OpaqueTypeNode { + return new OpaqueTypeNode(global.es2panda._Checker_CreateOpaqueTypeNode(global.context, typePointer), Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/Program.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/Program.ts new file mode 100644 index 0000000000000000000000000000000000000000..ba5ac902257e49ba3a55b427954c6b27d7151a36 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/Program.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2024 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 { Program } from "../../generated" +import { traceGlobal } from "../../tracer" + +export function dumpProgramInfo(program: Program) { + traceGlobal(() => `Program info:`) + traceGlobal(() => `\tAbsoluteName: ${program.absoluteName}`) + traceGlobal(() => `\tFileName: ${program.fileName}`) + traceGlobal(() => `\tFileNameWithExtension: ${program.fileNameWithExtension}`) + traceGlobal(() => `\tModuleName: ${program.moduleName}`) + traceGlobal(() => `\tModulePrefix: ${program.modulePrefix}`) + traceGlobal(() => `\tRelativeFilePath: ${program.relativeFilePath}`) + traceGlobal(() => `\tResolvedFilePath: ${program.resolvedFilePath}`) + traceGlobal(() => `\tSourceFileFolder: ${program.sourceFileFolder}`) + traceGlobal(() => `\tSourceFilePath: ${program.sourceFilePath}`) +} + +export function dumpProgramSrcFormatted(program: Program, recursive: boolean, withLines: boolean = true) { + const lines = program.ast.dumpSrc() + console.log(`// file: ${program.absoluteName}`) + if (withLines) { + console.log(lines.split('\n').map((it, index) => `${`${index + 1}`.padStart(4)} |${it}`).join('\n')) + } else { + console.log(lines) + } +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ScriptFunction.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ScriptFunction.ts new file mode 100644 index 0000000000000000000000000000000000000000..8b7a0f6cac9968eb962d2f7015cadcd193d0fb22 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/ScriptFunction.ts @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + AnnotationUsage, + Expression, + FunctionSignature, + Identifier, + ScriptFunction, + TSTypeParameterDeclaration, + TypeNode +} from "../../generated" +import { AstNode } from "../peers/AstNode" +import { Es2pandaModifierFlags, Es2pandaScriptFunctionFlags } from "../../generated/Es2pandaEnums" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" +import { KNativePointer } from "@koalaui/interop" + +export function createScriptFunction( + databody: AstNode | undefined, + typeParams: TSTypeParameterDeclaration | undefined, + params: readonly Expression[], + returnTypeAnnotation: TypeNode | undefined, + hasReceiver: boolean, + datafuncFlags: Es2pandaScriptFunctionFlags, + dataflags: Es2pandaModifierFlags, + ident: Identifier | undefined, + annotations: readonly AnnotationUsage[] | undefined, + signaturePointer?: KNativePointer, + preferredReturnTypePointer?: KNativePointer, +) { + const res = ScriptFunction.createScriptFunction( + databody, + FunctionSignature.createFunctionSignature( + typeParams, + params, + returnTypeAnnotation, + hasReceiver, + ), + datafuncFlags, + dataflags, + ident, + annotations, + ) + if (signaturePointer) { + res.setSignaturePointer(signaturePointer) + } + if (preferredReturnTypePointer) { + res.setPreferredReturnTypePointer(preferredReturnTypePointer) + } + return res +} + +export function updateScriptFunction( + original: ScriptFunction, + databody: AstNode | undefined, + typeParams: TSTypeParameterDeclaration | undefined, + params: readonly Expression[], + returnTypeAnnotation: TypeNode | undefined, + hasReceiver: boolean, + datafuncFlags: Es2pandaScriptFunctionFlags, + dataflags: Es2pandaModifierFlags, + ident: Identifier | undefined, + annotations: readonly AnnotationUsage[] | undefined, + signaturePointer?: KNativePointer, + preferredReturnTypePointer?: KNativePointer, +) { + if (isSameNativeObject(databody, original.body) + && isSameNativeObject(typeParams, original.typeParams) + && isSameNativeObject(params, original.params) + && isSameNativeObject(returnTypeAnnotation, original.returnTypeAnnotation) + && isSameNativeObject(hasReceiver, original.hasReceiver) + && isSameNativeObject(datafuncFlags, original.flags) + && isSameNativeObject(dataflags, original.modifierFlags) + && isSameNativeObject(ident, original.id) + && isSameNativeObject(annotations, original.annotations) + && signaturePointer == original.getSignaturePointer() + && preferredReturnTypePointer == original.getPreferredReturnTypePointer() + ) { + return original + } + return updateNodeByNode( + createScriptFunction( + databody, + typeParams, + params, + returnTypeAnnotation, + hasReceiver, + datafuncFlags, + dataflags, + ident, + annotations, + signaturePointer, + preferredReturnTypePointer, + ), + original + ) +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..dc7becd09c854123b3e8b58d038a6818d937f8aa --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TSInterfaceDeclaration.ts @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2024 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 { + TSInterfaceDeclaration, TSInterfaceHeritage +} from "../../generated" +import { + Es2pandaModifierFlags, +} from "../../generated/Es2pandaEnums" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" +import { AstNode } from "../peers/AstNode" + +export function createTSInterfaceDeclaration( + _extends: readonly TSInterfaceHeritage[], + id: AstNode | undefined, + typeParams: AstNode | undefined, + body: AstNode | undefined, + isStatic: boolean, + isExternal: boolean, + modifierFlags?: Es2pandaModifierFlags, +): TSInterfaceDeclaration { + return TSInterfaceDeclaration.createTSInterfaceDeclaration( + _extends, + id, + typeParams, + body, + isStatic, + isExternal, + modifierFlags, + ) +} + +export function updateTSInterfaceDeclaration( + original: TSInterfaceDeclaration, + _extends: readonly TSInterfaceHeritage[], + id: AstNode | undefined, + typeParams: AstNode | undefined, + body: AstNode | undefined, + isStatic: boolean, + isExternal: boolean, + modifierFlags?: Es2pandaModifierFlags, +): TSInterfaceDeclaration { + if (isSameNativeObject(_extends, original.extends) + && isSameNativeObject(id, original.id) + && isSameNativeObject(typeParams, original.typeParams) + && isSameNativeObject(body, original.body) + && isSameNativeObject(isStatic, original.isStatic) + && isSameNativeObject(isExternal, original.isFromExternal) + && isSameNativeObject(modifierFlags, original.modifierFlags) + ) { + return original + } + return updateNodeByNode( + createTSInterfaceDeclaration( + _extends, + id, + typeParams, + body, + isStatic, + isExternal, + modifierFlags, + ), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TSTypeParameter.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TSTypeParameter.ts new file mode 100644 index 0000000000000000000000000000000000000000..e60b4315346e1c842687f572391079a595a07f8c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TSTypeParameter.ts @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2024 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 { Identifier, TSTypeParameter, TypeNode } from "../../generated" +import { Es2pandaModifierFlags } from "../../generated/Es2pandaEnums" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function updateTSTypeParameter( + original: TSTypeParameter, + name: Identifier | undefined, + constraint: TypeNode | undefined, + defaultType: TypeNode | undefined, + flags: Es2pandaModifierFlags +): TSTypeParameter { + if (isSameNativeObject(name, original.name) + && isSameNativeObject(constraint, original.constraint) + && isSameNativeObject(defaultType, original.defaultType) + && isSameNativeObject(flags, original.modifierFlags) + ) { + return original + } + return updateNodeByNode( + TSTypeParameter.create1TSTypeParameter(name, constraint, defaultType, flags), + original + ) +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TSTypeReferencePart.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TSTypeReferencePart.ts new file mode 100644 index 0000000000000000000000000000000000000000..b68d6ba3dc8d14cc2e02f05975c436c1b5accd00 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TSTypeReferencePart.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2024 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 { ETSTypeReferencePart, Expression, TSTypeParameterInstantiation } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function updateETSTypeReferencePart( + original: ETSTypeReferencePart, + name?: Expression, + typeParams?: TSTypeParameterInstantiation, + prev?: ETSTypeReferencePart +): ETSTypeReferencePart { + if (isSameNativeObject(name, original.name) + && isSameNativeObject(typeParams, original.typeParams) + && isSameNativeObject(prev, original.previous) + ) { + return original + } + return updateNodeByNode( + ETSTypeReferencePart.createETSTypeReferencePart(name, typeParams, prev), + original + ) +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TryStatement.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TryStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..0a36dd51a43bc058fcb5ecf2e8f3d436ff7be87b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/TryStatement.ts @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { BlockStatement, CatchClause, LabelPair, Statement, TryStatement } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function updateTryStatement( + original: TryStatement, + block: BlockStatement | undefined, + catchClauses: readonly CatchClause[], + finalizer: BlockStatement | undefined, + finalizerInsertionsLabelPair: readonly LabelPair[], + finalizerInsertionsStatement: readonly Statement[] +): TryStatement { + if (isSameNativeObject(block, original.block) + && isSameNativeObject(catchClauses, original.catchClauses) + && isSameNativeObject(finalizer, original.finallyBlock) + ) { + return original + } + return updateNodeByNode( + TryStatement.createTryStatement( + block, + catchClauses, + finalizer, + finalizerInsertionsLabelPair, + finalizerInsertionsStatement, + ), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/VariableDeclarator.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/VariableDeclarator.ts new file mode 100644 index 0000000000000000000000000000000000000000..75c2ef64991a079be8d96c0ca690b73cff16c9f4 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/node-utilities/VariableDeclarator.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2024 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 { Expression, VariableDeclarator } from "../../generated" +import { Es2pandaVariableDeclaratorFlag } from "../../generated/Es2pandaEnums" +import { isSameNativeObject } from "../peers/ArktsObject" +import { updateNodeByNode } from "../utilities/private" + +export function updateVariableDeclarator( + original: VariableDeclarator, + flag: Es2pandaVariableDeclaratorFlag, + ident?: Expression, + init?: Expression +): VariableDeclarator { + if (isSameNativeObject(flag, original.flag) + && isSameNativeObject(ident, original.id) + && isSameNativeObject(init, original.init) + ) { + return original + } + return updateNodeByNode( + VariableDeclarator.create1VariableDeclarator(flag, ident, init), + original + ) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/peers/ArktsObject.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/ArktsObject.ts new file mode 100644 index 0000000000000000000000000000000000000000..c3906ac15248437657e2e4a829cc7e1768f402c5 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/ArktsObject.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2024 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 { KNativePointer } from "@koalaui/interop" + +export abstract class ArktsObject { + protected constructor(peer: KNativePointer) { + this.peer = peer + } + + peer: KNativePointer + + public onUpdate(node: ArktsObject) {} +} + +export function isSameNativeObject( + first: T | readonly T[], + second: T | readonly T[] +): boolean { + if (Array.isArray(first) && Array.isArray(second)) { + if (first.length !== second.length) { + return false + } + for (let i = 0; i < first.length; i++) { + if (!isSameNativeObject(first[i], second[i])) { + return false + } + } + return true + } + if (first instanceof ArktsObject && second instanceof ArktsObject) { + return first?.peer === second?.peer + } + return first === second +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/peers/AstNode.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/AstNode.ts new file mode 100644 index 0000000000000000000000000000000000000000..d8d398c24b4edb7ddb27731c24409624d95e821f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/AstNode.ts @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2024 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 { isNullPtr, KInt, KNativePointer, nullptr } from "@koalaui/interop" +import { global } from "../static/global" +import { allFlags, unpackNode, unpackNodeArray, unpackNonNullableNode, unpackString } from "../utilities/private" +import { throwError } from "../../utils" +import { Es2pandaAstNodeType, Es2pandaModifierFlags } from "../../generated/Es2pandaEnums" +import { ArktsObject } from "./ArktsObject" +import { SourcePosition } from "../../generated/peers/SourcePosition" +import { NodeCache } from "../node-cache" + +export abstract class AstNode extends ArktsObject { + public readonly astNodeType: Es2pandaAstNodeType + + protected constructor(peer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + global.profiler.nodeCreated() + if (isNullPtr(peer)) { + throwError(`attempted to create AstNode from nullptr`) + } + super(peer) + this.astNodeType = astNodeType + this.setChildrenParentPtr() + NodeCache.addToCache(peer, this) + } + + public get originalPeer(): KNativePointer { + const result = global.generatedEs2panda._AstNodeOriginalNodeConst(global.context, this.peer) + if (result === nullptr) { + this.originalPeer = this.peer + return this.peer + } + return result + } + + public set originalPeer(peer: KNativePointer) { + global.generatedEs2panda._AstNodeSetOriginalNode(global.context, this.peer, peer) + } + + public getChildren(): readonly AstNode[] { + return unpackNodeArray(global.es2panda._AstNodeChildren(global.context, this.peer)) + } + + public getSubtree(): readonly AstNode[] { + return this.getChildren().reduce( + (prev: readonly AstNode[], curr) => { + return prev.concat(curr.getSubtree()) + }, + [this] + ) + } + + public updateModifiers(modifierFlags: KInt | undefined): this { + global.generatedEs2panda._AstNodeClearModifier(global.context, this.peer, allFlags) + global.generatedEs2panda._AstNodeAddModifier(global.context, this.peer, modifierFlags ?? Es2pandaModifierFlags.MODIFIER_FLAGS_NONE) + return this + } + + public dump(indentation: number = 0): string { + const children = this.getChildren() + .map((it) => it.dump(indentation + 1)) + const msg = + `${indentation}_` + + ` ` + + this.dumpMessage() + return "> " + " ".repeat(4 * indentation) + msg + "\n" + children.join("") + } + + protected dumpMessage(): string { + return `` + } + + public dumpJson(): string { + return unpackString(global.generatedEs2panda._AstNodeDumpJSONConst(global.context, this.peer)) + } + + public dumpSrc(): string { + return unpackString(global.generatedEs2panda._AstNodeDumpEtsSrcConst(global.context, this.peer)) + } + + public dumpModifiers(): string { + return unpackString(global.es2panda._AstNodeDumpModifiers(global.context, this.peer)) + } + + // public clone(): this { + // return unpackNonNullableNode(global.generatedEs2panda._AstNodeClone(global.context, this.peer, this.parent.peer)); + // } + + // public get parent(): AstNode { + // const parent = global.generatedEs2panda._AstNodeParent(global.context, this.peer) + // if (parent === nullptr) { + // throwError(`no parent`) + // } + // return unpackNonNullableNode(parent) + // } + + // public set parent(node: AstNode) { + // global.generatedEs2panda._AstNodeSetParent(global.context, this.peer, node.peer) + // } + + public clone(): this { + const clonedNode = unpackNonNullableNode( + global.generatedEs2panda._AstNodeClone(global.context, this.peer, this.parent?.peer ?? nullptr) + ); + clonedNode.parent = undefined; + return clonedNode as this; + } + + public get parent(): AstNode | undefined { + const parent = global.generatedEs2panda._AstNodeParent(global.context, this.peer); + return unpackNode(parent); + } + + public set parent(node: AstNode | undefined) { + global.generatedEs2panda._AstNodeSetParent(global.context, this.peer, node?.peer ?? nullptr); + } + + public get modifierFlags(): Es2pandaModifierFlags { + return global.generatedEs2panda._AstNodeModifiers(global.context, this.peer) + } + + public set modifierFlags(flags: KInt | undefined) { + global.generatedEs2panda._AstNodeClearModifier(global.context, this.peer, allFlags) + global.generatedEs2panda._AstNodeAddModifier(global.context, this.peer, flags ?? Es2pandaModifierFlags.MODIFIER_FLAGS_NONE) + } + + /** @deprecated Use {@link modifierFlags} instead */ + public get modifiers(): KInt { + return this.modifierFlags + } + + /** @deprecated Use {@link modifierFlags} instead */ + public set modifiers(flags: KInt | undefined) { + this.modifierFlags = flags + } + + public setChildrenParentPtr(): void { + if (this.peer === nullptr) { + throwError('setChildrenParentPtr called on NULLPTR') + } + global.es2panda._AstNodeSetChildrenParentPtr(global.context, this.peer) + } + + public override onUpdate(original: AstNode): void { + // Improve: Update modifiers only for specific AST nodes in the generated factory code + this.modifierFlags = original.modifierFlags + + global.es2panda._AstNodeOnUpdate(global.context, this.peer, original.peer) + } + + public get isExport(): boolean { + return global.generatedEs2panda._AstNodeIsExportedConst(global.context, this.peer); + } + + public get isDefaultExport(): boolean { + return global.generatedEs2panda._AstNodeIsDefaultExportedConst(global.context, this.peer); + } + + public get isStatic(): boolean { + return global.generatedEs2panda._AstNodeIsStaticConst(global.context, this.peer); + } + + public get startPosition(): SourcePosition { + return new SourcePosition(global.generatedEs2panda._AstNodeStartConst(global.context, this.peer)); + } + + public set startPosition(start: SourcePosition) { + global.generatedEs2panda._AstNodeSetStart(global.context, this.peer, start.peer); + } + + public get endPosition(): SourcePosition { + return new SourcePosition(global.generatedEs2panda._AstNodeEndConst(global.context, this.peer)); + } + + public set endPosition(end: SourcePosition) { + global.generatedEs2panda._AstNodeSetEnd(global.context, this.peer, end.peer); + } +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/peers/Config.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/Config.ts new file mode 100644 index 0000000000000000000000000000000000000000..4e91cb987253230b6d65e2ede1ee582afd4aa0f5 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/Config.ts @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2024 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 { ArktsObject } from "./ArktsObject" +import { global } from "../static/global" +import { passStringArray } from "../utilities/private" +import { KNativePointer, nullptr } from "@koalaui/interop" +import { Es2pandaCompilationMode } from "../../generated/Es2pandaEnums" + +export class Config extends ArktsObject { + constructor(peer: KNativePointer) { + super(peer) + // Improve: wait for getter from api + this.path = `` + } + + static create( + input: readonly string[] + ): Config { + return new Config( + global.es2panda._CreateConfig(input.length, passStringArray(input)) + ) + } + + static createDefault(): Config { + if (global.configIsInitialized()) { + console.warn(`Config already initialized`) + return new Config( + global.config + ) + } + return new Config( + global.es2panda._CreateConfig( + 4, + passStringArray(["", "--arktsconfig", "./arktsconfig.json", global.filePath]) + ) + ) + } + + destroy() { + if (this.peer != nullptr) { + global.es2panda._DestroyConfig(this.peer) + this.peer = nullptr + } + } + + get compilationMode(): Es2pandaCompilationMode { + return global.es2panda._GetCompilationMode(this.peer); + } + + + readonly path: string +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/peers/Context.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/Context.ts new file mode 100644 index 0000000000000000000000000000000000000000..78eed92417ec479014d9989c2ca4f6d77726f879 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/Context.ts @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2024 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 { ArktsObject } from "./ArktsObject" +import { Program } from "../../generated" +import { global } from "../static/global" +import { passString, passStringArray } from "../utilities/private" +import { KNativePointer, nullptr, KBoolean } from "@koalaui/interop" +import { Config } from "./Config" +import { filterSource, throwError } from "../../utils" +import { AstNode } from "./AstNode" + +export class Context extends ArktsObject { + constructor(peer: KNativePointer) { + super(peer) + } + + static createFromString(source: string): Context { + if (!global.configIsInitialized()) { + throw new Error(`Config not initialized`) + } + return new Context( + global.es2panda._CreateContextFromString( + global.config, + passString(source), + passString(global.filePath) + ) + ) + } + + /** @deprecated Use {@link createCacheFromFile} instead */ + static createCacheContextFromFile( + configPtr: KNativePointer, + fileName: string, + globalContextPtr: KNativePointer, + isExternal: KBoolean + ): Context { + return new Context( + global.es2panda._CreateCacheContextFromFile(configPtr, passString(fileName), globalContextPtr, isExternal) + ); + } + + static createFromFile(filePath: string): Context { + return new Context( + global.es2panda._CreateContextFromFile( + global.config, + passString(filePath) + ) + ) + } + + static createCacheFromFile(filePath: string, config: Config, globalContext: GlobalContext, isExternal: boolean) { + return new Context( + global.es2panda._CreateCacheContextFromFile( + config.peer, + passString(filePath), + globalContext.peer, + isExternal + ) + ) + } + + static createContextGenerateAbcForExternalSourceFiles( + filenames: string[]): Context { + if (!global.configIsInitialized()) { + throwError(`Config not initialized`); + } + return new Context( + global.es2panda._CreateContextGenerateAbcForExternalSourceFiles(global.config, filenames.length, passStringArray(filenames)) + ); + } + + destroy() { + if (this.peer != nullptr) { + global.es2panda._DestroyContext(this.peer) + this.peer = nullptr + } + } + + /** @deprecated */ + static destroyAndRecreate(ast: AstNode): Context { + console.log('[TS WRAPPER] DESTROY AND RECREATE'); + const source = filterSource(ast.dumpSrc()); + global.es2panda._DestroyContext(global.context); + global.compilerContext = Context.createFromString(source) as any; // Improve: commonize Context + + return new Context(global.context); + } + + get program(): Program { + return new Program(global.generatedEs2panda._ContextProgram(this.peer)); + } +} + +export class GlobalContext extends ArktsObject { + static create( + config: Config, externalFileList: string[] + ): GlobalContext { + return new GlobalContext( + global.es2panda._CreateGlobalContext( + config.peer, + passStringArray(externalFileList), + externalFileList.length, + false + ) + ) + } + + constructor(peer: KNativePointer) { + super(peer) + } + + destroy() { + if (this.peer != nullptr) { + global.es2panda._DestroyGlobalContext(this.peer) + this.peer = nullptr + } + } +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/peers/ExternalSource.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/ExternalSource.ts new file mode 100644 index 0000000000000000000000000000000000000000..ad8ddcacdd538e01edf58b9afbc2f60b3ae63eb4 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/ExternalSource.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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 { global } from "../static/global" +import { acceptNativeObjectArrayResult, unpackString } from "../utilities/private" +import { KNativePointer, nullptr } from "@koalaui/interop" +import { Program } from "../../generated" +import { ArktsObject } from "./ArktsObject" + +export class ExternalSource extends ArktsObject { + constructor(peer: KNativePointer) { + super(peer) + } + + getName(): string { + return unpackString(global.es2panda._ExternalSourceName(this.peer)) + } + + get programs(): Program[] { + return acceptNativeObjectArrayResult( + global.es2panda._ExternalSourcePrograms(this.peer), + (instance: KNativePointer) => new Program(instance) + ) + } + + static instantiate(peer: KNativePointer) { + return new ExternalSource(peer) + } +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/peers/ImportPathManager.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/ImportPathManager.ts new file mode 100644 index 0000000000000000000000000000000000000000..020ac88c99073c0a9d08555db95afee8726e2cc6 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/ImportPathManager.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ArktsObject } from "./ArktsObject" +import { global } from "../static/global" +import { KNativePointer } from "@koalaui/interop" + +export class ImportPathManager extends ArktsObject { + constructor(peer: KNativePointer) { + super(peer) + } + + static create(): ImportPathManager { + return new ImportPathManager( + global.es2panda._ETSParserGetImportPathManager(global.context) + ); + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/peers/Options.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/Options.ts new file mode 100644 index 0000000000000000000000000000000000000000..cadb3e1e006a3d0ab835f9f220f2c4de67413a60 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/peers/Options.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { KNativePointer } from "@koalaui/interop" +import { ArktsObject } from "./ArktsObject" +import { global } from "../static/global" +import { Config } from "./Config" +import { ArkTsConfig } from "../../generated" + +export class Options extends ArktsObject { + constructor(peer: KNativePointer) { + super(peer) + } + + static createOptions(config: Config) { + return new Options(global.es2panda._ConfigGetOptions(config.peer)) + } + + getArkTsConfig(): ArkTsConfig { + return new ArkTsConfig(global.es2panda._OptionsArkTsConfig(global.context, this.peer)) + } +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/plugins.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/plugins.ts new file mode 100644 index 0000000000000000000000000000000000000000..9e9b207ad31d6e26d7cd173923ceac24dd94e180 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/plugins.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Es2pandaContextState } from "../generated/Es2pandaEnums" +import { Program } from "../generated" +import { ExternalSource } from "./peers/ExternalSource" +import { KNativePointer } from "@koalaui/interop" +import { global } from "./static/global" +import { RunTransformerHooks } from "../plugin-utils" + +export interface CompilationOptions { + readonly isProgramForCodegeneration: boolean, + readonly state: Es2pandaContextState, +} + +export interface PluginContext { + setParameter(name: string, value: V): void + parameter(name: string) : V | undefined +} + +export class PluginContextImpl implements PluginContext { + map = new Map() + parameter(name: string): V|undefined { + return this.map.get(name) as (V|undefined) + } + setParameter(name: string, value: V) { + this.map.set(name, value as Object) + } +} + +export type ProgramTransformer = (program: Program, compilationOptions: CompilationOptions, context: PluginContext) => void + +export function defaultFilter(name: string) { + if (name.startsWith("std.")) return false + if (name.startsWith("escompat")) return false + return true +} + +export function listPrograms(program: Program, filter: (name: string) => boolean = defaultFilter): Program[] { + return [ + program, + ...program.getExternalSources().flatMap((it: ExternalSource) => { + if (filter(it.getName())) { + return it.programs + } + return [] + }) + ] +} + +export interface PluginEntry { + name?: string + parsed?: (hooks?: RunTransformerHooks) => void + checked?: (hooks?: RunTransformerHooks) => void + clean?: (hooks?: RunTransformerHooks) => void +} + +export type PluginInitializer = (parsedJson?: Object, checkedJson?: Object) => PluginEntry diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/static/global.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/static/global.ts new file mode 100644 index 0000000000000000000000000000000000000000..282529aef69161a958b36be3e58b269793aed9d6 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/static/global.ts @@ -0,0 +1,107 @@ +/* + * 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 { throwError } from "../../utils" +import { KNativePointer, nullptr } from "@koalaui/interop" +import { initEs2panda, Es2pandaNativeModule, initGeneratedEs2panda } from "../../Es2pandaNativeModule" +import { Es2pandaNativeModule as GeneratedEs2pandaNativeModule } from "../../generated/Es2pandaNativeModule" +import { initInterop, InteropNativeModule } from "../../InteropNativeModule" +import { Context } from "../peers/Context" +import { Profiler } from "./profiler" +import { ArkTsConfig } from "../../generated" +import { Config } from '../peers/Config'; + +export class UpdateTracker { + stack: boolean[] = [] + + push() { + this.stack.push(false) + } + + update() { + this.stack[this.stack.length - 1] = true + } + + check() { + return this.stack.pop() + } +} + +export class global { + public static filePath: string = "./plugins/input/main.ets" + + public static arktsconfig?: ArkTsConfig + public static configObj?: Config; + + private static _config?: KNativePointer + public static set config(config: KNativePointer) { + global._config = config + global.configObj = new Config(global._config); + } + public static get config(): KNativePointer { + return global._config ?? throwError('Global.config not initialized') + } + public static configIsInitialized(): boolean { + return global._config !== undefined && global._config !== nullptr + } + public static resetConfig(): void { + global._config = undefined + global.configObj = undefined; + } + + // Improve: rename to contextPeer + public static get context(): KNativePointer { + return global.compilerContext?.peer ?? throwError('Global.context not initialized') + } + + // Improve: rename to context when the pointer valued one is eliminated + public static compilerContext: Context | undefined + public static isContextGenerateAbcForExternalSourceFiles: boolean = false + + private static _es2panda: Es2pandaNativeModule | undefined = undefined + public static get es2panda(): Es2pandaNativeModule { + if (this._es2panda === undefined) { + this._es2panda = initEs2panda() + } + return this._es2panda + } + + private static _generatedEs2panda: GeneratedEs2pandaNativeModule | undefined = undefined + public static get generatedEs2panda(): GeneratedEs2pandaNativeModule { + if (this._generatedEs2panda === undefined) { + this._generatedEs2panda = initGeneratedEs2panda() + } + return this._generatedEs2panda + } + + private static _interop: InteropNativeModule | undefined = undefined + public static get interop(): InteropNativeModule { + if (this._interop === undefined) this._interop = initInterop() + return this._interop + + } + + public static profiler = new Profiler() + + // Check node type values during node creation + public static validatePeerTypes = false + + public static clearContext(): void { + global.compilerContext = undefined + } + + // Keep track of update info to optimize performance + public static updateTracker: UpdateTracker = new UpdateTracker() +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/static/globalUtils.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/static/globalUtils.ts new file mode 100644 index 0000000000000000000000000000000000000000..f23b1facfbbc5886cd744b894d781897614494fc --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/static/globalUtils.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { KNativePointer } from "@koalaui/interop"; +import { Context } from "../peers/Context"; +import { global } from "./global"; +import { NodeCache } from "../node-cache" + +export function getOrUpdateGlobalContext(peer: KNativePointer): Context { + if (!global.compilerContext || global.context !== peer) { + NodeCache.clear(); + global.compilerContext = new Context(peer); + } + return global.compilerContext; +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/static/profiler.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/static/profiler.ts new file mode 100644 index 0000000000000000000000000000000000000000..5a1d2e15a458c5a0ff71dfbef369d787353a66d2 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/static/profiler.ts @@ -0,0 +1,189 @@ +/* + * 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 * as fs from "fs" +import * as path from "path" +import { Es2pandaContextState } from "../../generated/Es2pandaEnums" +import { global } from "./global" + +const PERFORMANCE_DATA_DIR = "./performance-results/" + +interface PluginData { + transformTime: number + transformTimeDeps: number + visitedNodes: number + createdNodes: number + contextState?: Es2pandaContextState +} + +function emptyPluginData(contextState?: Es2pandaContextState): PluginData { + return { + transformTime: 0, + transformTimeDeps: 0, + visitedNodes: 0, + createdNodes: 0, + contextState: contextState + } +} + +interface PerformanceData { + filePath: string + + visitedNodes: number + createdNodes: number + proceedTime: number + totalTime: number + + pluginsByName: Record +} + +interface PerformanceDataFile { + data: PerformanceData[] + summary?: PerformanceData +} + +function parseFile(performanceFile: string): PerformanceDataFile | undefined { + if (!fs.existsSync(performanceFile)) return undefined + + const data = fs.readFileSync(path.resolve(performanceFile)).toString() + if (!data.length) return undefined + return JSON.parse(data) as PerformanceDataFile +} + +export class Profiler implements PerformanceData { + filePath: string = "" + visitedNodes: number = 0 + createdNodes: number = 0 + proceedTime: number = 0 + totalTime: number = 0 + pluginsByName: Record = {} + + curPlugin: string = "" + curContextState?: Es2pandaContextState + + private getPluginData(pluginName: string, contextState?: Es2pandaContextState): PluginData { + if (!(pluginName in this.pluginsByName)) { + this.pluginsByName[pluginName] = emptyPluginData(contextState) + } + return this.pluginsByName[pluginName] + } + + disableReport = false + + nodeCreated() { + this.createdNodes++ + if (this.curPlugin) this.getPluginData(this.curPlugin, this.curContextState).createdNodes++ + } + + nodeVisited() { + this.visitedNodes++ + if (this.curPlugin) this.getPluginData(this.curPlugin, this.curContextState).visitedNodes++ + } + + private transformStartTime = 0 + transformStarted() { + this.transformStartTime = Date.now() + } + private transformDepStartTime = 0 + transformDepStarted() { + this.transformDepStartTime = Date.now() + } + + transformEnded(state: Es2pandaContextState, pluginName: string) { + const transformEndTime = Date.now() + const consumedTime = transformEndTime - this.transformStartTime + this.getPluginData(pluginName, state).transformTime += consumedTime + } + + transformDepEnded(state: Es2pandaContextState, pluginName: string) { + const transformEndTime = Date.now() + const consumedTime = transformEndTime - this.transformDepStartTime + this.getPluginData(pluginName, state).transformTimeDeps += consumedTime + } + + proceededToState(consumedTime: number) { + this.proceedTime += consumedTime + } + + private compilationStartTime = 0 + compilationStarted(filePath: string) { + this.filePath = filePath + + this.visitedNodes = 0 + this.createdNodes = 0 + this.proceedTime = 0 + this.totalTime = 0 + this.pluginsByName = {} + + this.curPlugin = "" + this.compilationStartTime = Date.now() + } + + compilationEnded() { + const consumedTime: number = Date.now() - this.compilationStartTime + this.totalTime = consumedTime + } + + report() { + Object.entries(this.pluginsByName).forEach((data, key) => { + console.log(data[0], "totalTransformTime =", data[1].transformTime, "ms") + console.log(data[0], "totalDepsTransformTime =", data[1].transformTimeDeps, "ms") + }) + } + + reportToFile(withSummary: boolean = false) { + if (this.disableReport) return + const outDir = path.resolve(global.arktsconfig!.outDir, PERFORMANCE_DATA_DIR) + fs.mkdirSync(outDir, { recursive: true }) + const outFilePath = path.resolve(outDir, path.basename(this.filePath)) + ".json" + + const data: PerformanceDataFile = { data: [this as PerformanceData] } + if (!fs.existsSync(outFilePath)) { + fs.writeFileSync(outFilePath, JSON.stringify(data)) + } else { + const savedData: PerformanceDataFile | undefined = parseFile(outFilePath) ?? data + savedData.data.push(this as PerformanceData) + + if (withSummary) { + const summary: PerformanceData = { + filePath: this.filePath, + visitedNodes: savedData.data.map(it => it.visitedNodes).reduce((sum, it) => sum + it), + createdNodes: savedData.data.map(it => it.createdNodes).reduce((sum, it) => sum + it), + proceedTime: savedData.data.map(it => it.proceedTime).reduce((sum, it) => sum + it), + totalTime: savedData.data.map(it => it.totalTime).reduce((sum, it) => sum + it), + pluginsByName: {} + } + const pluginNames = new Set(savedData.data.flatMap(it => Object.keys(it.pluginsByName))) + for (const pluginName of pluginNames) { + const sumTransformTime = savedData.data.map(it => it.pluginsByName).filter(it => !!it[pluginName]).map(it => it[pluginName].transformTime).reduce((sum, it) => sum+it) + const sumTransformTimeDeps = savedData.data.map(it => it.pluginsByName).filter(it => !!it[pluginName]).map(it => it[pluginName].transformTimeDeps).reduce((sum, it) => sum+it) + const sumCreatedNodes = savedData.data.map(it => it.pluginsByName).filter(it => !!it[pluginName]).map(it => it[pluginName].createdNodes).reduce((sum, it) => sum+it) + const sumVisitedNodes = savedData.data.map(it => it.pluginsByName).filter(it => !!it[pluginName]).map(it => it[pluginName].visitedNodes).reduce((sum, it) => sum+it) + + summary.pluginsByName[pluginName] = { + transformTime: sumTransformTime, + transformTimeDeps: sumTransformTimeDeps, + createdNodes: sumCreatedNodes, + visitedNodes: sumVisitedNodes, + } + } + + savedData.summary = summary + } + + fs.writeFileSync(outFilePath, JSON.stringify(savedData)) + } + } +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/extensions.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/extensions.ts new file mode 100644 index 0000000000000000000000000000000000000000..85e816557b737a1698570a5d4b4a4470635b2be8 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/extensions.ts @@ -0,0 +1,120 @@ +/* + * 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 { KInt, KNativePointer } from "@koalaui/interop" +import type { + ClassDefinition, + ETSModule, + Expression, + MethodDefinition, + NumberLiteral, + Program, + ScriptFunction, + SourcePosition, +} from "../../generated" +import { ExternalSource } from "../peers/ExternalSource" +import { Es2pandaModuleFlag } from "../../generated/Es2pandaEnums" +import { global } from "../static/global" +import { acceptNativeObjectArrayResult, passNodeArray } from "./private" +import type { AstNode } from "../peers/AstNode" + +export function extension_ETSModuleGetNamespaceFlag(this: ETSModule): Es2pandaModuleFlag { + return (this.isETSScript ? Es2pandaModuleFlag.MODULE_FLAG_ETSSCRIPT : 0) + + (this.isNamespace ? Es2pandaModuleFlag.MODULE_FLAG_NAMESPACE : 0) + + (this.isNamespaceChainLastNode ? Es2pandaModuleFlag.MODULE_FLAG_NAMESPACE_CHAIN_LAST_NODE : 0) +} + +// this is a workaround for overloads not included in children list +export function extension_MethodDefinitionSetChildrenParentPtr(this: MethodDefinition) { + global.es2panda._AstNodeSetChildrenParentPtr(global.context, this.peer) + const overloads = this.overloads + for (const overload of overloads) { + overload.setBaseOverloadMethod(this) + overload.parent = this // overloads are not listed as children in native + } +} + +export function extension_MethodDefinitionOnUpdate(this: MethodDefinition, original: MethodDefinition): void { + this.setChildrenParentPtr() + global.es2panda._AstNodeOnUpdate(global.context, this.peer, original.peer) + const originalBase = original.baseOverloadMethod + if (originalBase) { + this.setBaseOverloadMethod(originalBase) + } +} + +// Improve: generate checker related stuff +export function extension_ScriptFunctionGetSignaturePointer(this: ScriptFunction): KNativePointer { + return global.es2panda._Checker_ScriptFunctionSignature(global.context, this.peer) +} + +export function extension_ScriptFunctionSetSignaturePointer(this: ScriptFunction, signaturePointer: KNativePointer): void { + global.es2panda._Checker_ScriptFunctionSetSignature(global.context, this.peer, signaturePointer) +} + +// Improve: perhaps "preferredReturnType" stuff can be removed later if "signature" is always enough +export function extension_ScriptFunctionGetPreferredReturnTypePointer(this: ScriptFunction): KNativePointer { + return global.es2panda._Checker_ScriptFunctionGetPreferredReturnType(global.context, this.peer) +} + +export function extension_ScriptFunctionSetPreferredReturnTypePointer(this: ScriptFunction, typePointer: KNativePointer): void { + global.es2panda._Checker_ScriptFunctionSetPreferredReturnType(global.context, this.peer, typePointer) +} + +// Improve: generate checker related stuff +export function extension_ExpressionGetPreferredTypePointer(this: Expression): KNativePointer { + return global.es2panda._Checker_ExpressionGetPreferredType(global.context, this.peer) +} + +export function extension_ExpressionSetPreferredTypePointer(this: Expression, typePointer: KNativePointer): void { + global.es2panda._Checker_ExpressionSetPreferredType(global.context, this.peer, typePointer) +} + +// Improve: generate methods with string[] args or return type +export function extension_ProgramGetExternalSources(this: Program): ExternalSource[] { + return acceptNativeObjectArrayResult( + global.es2panda._ProgramExternalSources(global.context, this.peer), + ExternalSource.instantiate, + ) +} + +// Improve: SourcePositionLine is global in idl +export function extension_SourcePositionGetLine(this: SourcePosition): KInt { + return global.generatedEs2panda._SourcePositionLine(global.context, this.peer) +} + +// Improve: SourcePositionCol is not described in idl +export function extension_SourcePositionGetCol(this: SourcePosition): KInt { + return global.es2panda._SourcePositionCol(global.context, this.peer) +} + +export function extension_SourcePositionToString(this: SourcePosition): string { + return `:${this.getLine() + 1}:${this.getCol()}` +} + +// Improve: weird API +export function extension_NumberLiteralValue(this: NumberLiteral): number { + return +this.dumpSrc() +} + +// Improve: weird API +export function extension_ScriptFunctionSetParams(this: ScriptFunction, params: readonly Expression[]): void { + global.es2panda._ScriptFunctionSetParams(global.context, this.peer, passNodeArray(params), params.length) +} + +// Improve: weird API +export function extension_ClassDefinitionSetBody(this: ClassDefinition, body: readonly AstNode[]): void { + global.es2panda._ClassDefinitionSetBody(global.context, this.peer, passNodeArray(body), body.length) +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/nativePtrDecoder.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/nativePtrDecoder.ts new file mode 100644 index 0000000000000000000000000000000000000000..08bf50a728f45098ea4441f06f85f83bd3de89a5 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/nativePtrDecoder.ts @@ -0,0 +1,69 @@ +/* + * 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 { int32 } from "@koalaui/common" +import { + Access, + ArrayDecoder, + CallbackRegistry, + NativeStringBase, + nullptr, + pointer, + providePlatformDefinedData, + withByteArray +} from "@koalaui/interop" +import { global } from "../static/global" + +class NativeString extends NativeStringBase { + constructor(ptr: pointer) { + super(ptr) + } + protected bytesLength(): int32 { + return global.interop._StringLength(this.ptr) + } + protected getData(data: Uint8Array): void { + withByteArray(data, Access.WRITE, (dataPtr: pointer) => { + global.interop._StringData(this.ptr, dataPtr, data.length) + }) + } + close(): void { + global.interop._InvokeFinalizer(this.ptr, global.interop._GetStringFinalizer()) + this.ptr = nullptr + } +} + +providePlatformDefinedData({ + nativeString(ptr: pointer): NativeStringBase { + return new NativeString(ptr) + }, + nativeStringArrayDecoder(): ArrayDecoder { + throw new Error("Not yet implemented") + }, + callbackRegistry(): CallbackRegistry | undefined { + return undefined + } +}) + +export class NativePtrDecoder extends ArrayDecoder { + getArraySize(blob: pointer) { + return global.interop._GetPtrVectorSize(blob) + } + disposeArray(blob: pointer): void { + // Improve: + } + getArrayElement(blob: pointer, index: int32): pointer { + return global.interop._GetPtrVectorElement(blob, index) + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/private.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/private.ts new file mode 100644 index 0000000000000000000000000000000000000000..24d909ff81baaaadd8750e82d811775169660014 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/private.ts @@ -0,0 +1,156 @@ +/* + * 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 { global } from "../static/global" +import { isNumber, throwError } from "../../utils" +import { + KInt, + KNativePointer as KPtr, + KNativePointer, + nullptr, + withString, + withStringArray +} from "@koalaui/interop" +import { NativePtrDecoder } from "./nativePtrDecoder" +import { Es2pandaAstNodeType, Es2pandaModifierFlags, Es2pandaScriptFunctionFlags } from "../../generated/Es2pandaEnums" +import { nodeFrom } from "../class-by-peer" +import { AstNode } from "../peers/AstNode" +import { ArktsObject } from "../peers/ArktsObject" + +export const arrayOfNullptr = new BigUint64Array([nullptr]) + +export const allFlags = + Object.values(Es2pandaModifierFlags) + .filter(isNumber) + .reduce( + (prev, next) => prev | next, + 0 + ) + +export function assertValidPeer(peer: KPtr, expectedKind: Es2pandaAstNodeType): void { + if (peer === nullptr) { + throwError(`invalid peer`) + } + + if (global.validatePeerTypes) { + const peerType = global.generatedEs2panda._AstNodeTypeConst(global.context, peer) + if (peerType === Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION && expectedKind === Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION) { + // Improve: Struct is a child class of Class + return + } + if (peerType === Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION && expectedKind === Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DECLARATION) { + // Improve: ETSImportDeclaration is a child of a ImportDeclaration + return + } + if (peerType === Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE && expectedKind === Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT) { + // Improve: ETSModule is a child of a BlockStatement + return + } + if (peerType !== expectedKind) { + throwError(`expected: ${Es2pandaAstNodeType[expectedKind]}, got: ${Es2pandaAstNodeType[peerType]}`) + } + } +} + +export function acceptNativeObjectArrayResult(arrayObject: KNativePointer, factory: (instance: KNativePointer) => T): T[] { + return new NativePtrDecoder().decode(arrayObject).map(factory); +} + +export function unpackNonNullableNode(peer: KNativePointer): T { + if (peer === nullptr) { + throwError('peer is NULLPTR (maybe you should use unpackNode)') + } + return nodeFrom(peer) +} + +export function unpackNode(peer: KNativePointer): T | undefined { + if (peer === nullptr) { + return undefined + } + return nodeFrom(peer) +} + +export function passNode(node: ArktsObject | undefined): KNativePointer { + return node?.peer ?? nullptr +} + +export function unpackNodeArray(nodesPtr: KNativePointer): T[] { + if (nodesPtr === nullptr) { + throwError('nodesPtr is NULLPTR (maybe you should use unpackNodeArray)') + } + return new NativePtrDecoder() + .decode(nodesPtr) + .map((peer: KNativePointer) => unpackNonNullableNode(peer)) +} + +export function passNodeArray(nodes: readonly ArktsObject[] | undefined): BigUint64Array { + return new BigUint64Array( + nodes + ?.filter(it => it.peer != undefined) + ?.map(node => BigInt(node.peer)) + ?? [] + ) +} + +export function unpackNonNullableObject(type: { new (peer: KNativePointer): T }, peer: KNativePointer): T { + if (peer === nullptr) { + throwError('peer is NULLPTR (maybe you should use unpackObject)') + } + return new type(peer) +} + +export function unpackObject(type: { new (peer: KNativePointer): T }, peer: KNativePointer): T | undefined { + if (peer === nullptr) { + return undefined + } + return new type(peer) +} + +export function unpackString(peer: KNativePointer): string { + return global.interop._RawUtf8ToString(peer) +} + +// Improve: use direct string arguments instead. +export function passString(str: string | undefined): string { + return str ?? "" +} + +// Improve: use direct string arguments instead. +export function passStringArray(strings: readonly string[]): string[] { + return withStringArray(strings, (it: string[]) => it) +} + +export function passNodeWithNewModifiers(node: T, modifiers: KInt): T { + return unpackNonNullableNode(node.peer).updateModifiers(modifiers) +} + +export function scriptFunctionHasBody(peer: KNativePointer): boolean { + const flags = global.generatedEs2panda._ScriptFunctionFlagsConst(global.context, peer) + return (flags & Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_EXTERNAL) === 0 + && (flags & Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_EXTERNAL_OVERLOAD) === 0 +} + +export function updateNodeByNode(node: T, original: T): T { + if (original.peer === nullptr) { + throwError('update called on NULLPTR') + } + node.onUpdate(original) + return node +} + +export function nodeType(node: AstNode): Es2pandaAstNodeType { + return global.generatedEs2panda._AstNodeTypeConst(global.context, passNode(node)) +} + diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/public.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/public.ts new file mode 100644 index 0000000000000000000000000000000000000000..3c025a409561ecfae736e251e272238bf3a91114 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/utilities/public.ts @@ -0,0 +1,397 @@ +/* + * 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 { global } from "../static/global" +import { isNumber, throwError, withWarning } from "../../utils" +import { KNativePointer, nullptr, KInt} from "@koalaui/interop" +import { passNode, passNodeArray, unpackNodeArray, unpackNonNullableNode, passString, unpackString, nodeType } from "./private" +import { Es2pandaContextState, Es2pandaModifierFlags, Es2pandaMethodDefinitionKind, Es2pandaPrimitiveType, Es2pandaScriptFunctionFlags, Es2pandaAstNodeType } from "../../generated/Es2pandaEnums" +import type { AstNode } from "../peers/AstNode" +import { SourcePosition } from "../../generated" +import { isSameNativeObject } from "../peers/ArktsObject" +import { + type AnnotationUsage, + ClassDefinition, + ClassProperty, + ETSModule, + isClassDefinition, + isFunctionDeclaration, + isMemberExpression, + isScriptFunction, + isIdentifier, + isETSModule, + ImportSpecifier, + Program, + isObjectExpression, + ETSImportDeclaration, + isProperty, + isTSInterfaceDeclaration, + isNumberLiteral, + Property, + MemberExpression, + isMethodDefinition, + TypeNode, +} from "../../generated" +import { Config } from "../peers/Config" +import { Context } from "../peers/Context" +import { NodeCache } from "../node-cache" +import { listPrograms } from "../plugins" +import { factory } from "../factory/nodeFactory" +import { traceGlobal } from "../../tracer" + +/** + * Improve: Replace or remove with better naming + * + * @deprecated + */ +export function createETSModuleFromContext(): ETSModule { + let program = global.generatedEs2panda._ContextProgram(global.context) + if (program == nullptr) { + throw new Error(`Program is null for context ${global.context.toString(16)}`) + } + const ast = global.generatedEs2panda._ProgramAst(global.context, program) + if (ast == nullptr) { + throw new Error(`AST is null for program ${program.toString(16)}`) + + } + return new ETSModule(ast, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE) +} + +/** + * Now used only in tests + * Improve: Remove or replace with better method + * + * @deprecated + */ +export function createETSModuleFromSource( + source: string, + state: Es2pandaContextState = Es2pandaContextState.ES2PANDA_STATE_PARSED, +): ETSModule { + if (!global.configIsInitialized()) { + global.config = Config.createDefault().peer + } + global.compilerContext = Context.createFromString(source) + proceedToState(state) + let program = global.generatedEs2panda._ContextProgram(global.compilerContext.peer) + if (program == nullptr) + throw new Error(`Program is null for ${source} 0x${global.compilerContext.peer.toString(16)}`) + return new ETSModule(global.generatedEs2panda._ProgramAst(global.context, program), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE) +} + +export function metaDatabase(fileName: string): string { + if (fileName.endsWith(".meta.json")) throw new Error(`Must pass source, not database: ${fileName}`) + return `${fileName}.meta.json` +} + +export function checkErrors() { + if (global.es2panda._ContextState(global.context) === Es2pandaContextState.ES2PANDA_STATE_ERROR) { + traceGlobal(() => `Terminated due to compilation errors occured`) + console.log(unpackString(global.generatedEs2panda._GetAllErrorMessages(global.context))) + // global.es2panda._DestroyConfig(global.config) + process.exit(1) + } +} + +export function proceedToState(state: Es2pandaContextState): void { + if (state <= global.es2panda._ContextState(global.context)) { + return + } + NodeCache.clear() + const before = Date.now() + traceGlobal(() => `Proceeding to state ${Es2pandaContextState[state]}: start`) + global.es2panda._ProceedToState(global.context, state) + traceGlobal(() => `Proceeding to state ${Es2pandaContextState[state]}: done`) + const after = Date.now() + global.profiler.proceededToState(after-before) + checkErrors() +} + +/** @deprecated Use {@link rebindContext} instead */ +export function rebindSubtree(node: AstNode): void { + NodeCache.clear() + traceGlobal(() => `Rebind: start`) + global.es2panda._AstNodeRebind(global.context, node.peer) + traceGlobal(() => `Rebind: done`) + checkErrors() +} + +/** @deprecated Use {@link recheckSubtree} instead */ +export function recheckSubtree(node: AstNode): void { + NodeCache.clear() + traceGlobal(() => `Recheck: start`) + global.generatedEs2panda._AstNodeRecheck(global.context, node.peer) + traceGlobal(() => `Recheck: done`) + checkErrors() +} + +export function rebindContext(context: KNativePointer = global.context): void { + NodeCache.clear() + traceGlobal(() => `Rebind: start`) + global.es2panda._AstNodeRebind( + context, + global.generatedEs2panda._ProgramAst( + context, + global.generatedEs2panda._ContextProgram( + context + ) + ) + ) + traceGlobal(() => `Rebind: done`) + checkErrors() +} + +export function recheckContext(context: KNativePointer = global.context): void { + NodeCache.clear() + traceGlobal(() => `Recheck: start`) + global.generatedEs2panda._AstNodeRecheck( + context, + global.generatedEs2panda._ProgramAst( + context, + global.generatedEs2panda._ContextProgram( + context, + ) + ) + ) + traceGlobal(() => `Recheck: done`) + checkErrors() +} + +export function getDecl(node: AstNode): AstNode | undefined { + if (isMemberExpression(node)) { + return getDeclFromArrayOrObjectMember(node) + } + if (isObjectExpression(node)) { + return getPeerObjectDecl(passNode(node)) + } + const decl = getPeerDecl(passNode(node)) + if (!!decl) { + return decl + } + if (!!node.parent && isProperty(node.parent)) { + return getDeclFromProperty(node.parent) + } + return undefined +} + +function getDeclFromProperty(node: Property): AstNode | undefined { + if (!node.key) { + return undefined + } + if (!!node.parent && !isObjectExpression(node.parent)) { + return getPeerDecl(passNode(node.key)) + } + return getDeclFromObjectExpressionProperty(node) +} + +function getDeclFromObjectExpressionProperty(node: Property): AstNode | undefined { + const declNode = getPeerObjectDecl(passNode(node.parent)) + if (!declNode || !node.key || !isIdentifier(node.key)) { + return undefined + } + let body: readonly AstNode[] = [] + if (isClassDefinition(declNode)) { + body = declNode.body + } else if (isTSInterfaceDeclaration(declNode)) { + body = declNode.body?.body ?? [] + } + return body.find( + (statement) => + isMethodDefinition(statement) && + statement.kind === Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_GET && + !!statement.id && + !!node.key && + isIdentifier(node.key) && + statement.id.name === node.key.name + ) +} + +function getDeclFromArrayOrObjectMember(node: MemberExpression): AstNode | undefined { + if (isNumberLiteral(node.property)) { + return node.object ? getDecl(node.object) : undefined + } + return node.property ? getDecl(node.property) : undefined +} + +export function getPeerDecl(peer: KNativePointer): AstNode | undefined { + const decl = global.generatedEs2panda._DeclarationFromIdentifier(global.context, peer) + if (decl === nullptr) { + return undefined + } + return unpackNonNullableNode(decl) +} + +export function getPeerObjectDecl(peer: KNativePointer): AstNode | undefined { + const decl = global.es2panda._ClassVariableDeclaration(global.context, peer); + if (decl === nullptr) { + return undefined; + } + return unpackNonNullableNode(decl) +} + +export function getAnnotations(node: AstNode): readonly AnnotationUsage[] { + if (!isFunctionDeclaration(node) && !isScriptFunction(node) && !isClassDefinition(node)) { + throwError('for now annotations allowed only for: functionDeclaration, scriptFunction, classDefinition') + } + return unpackNodeArray(global.es2panda._AnnotationAllowedAnnotations(global.context, node.peer, nullptr)) +} + +export function getOriginalNode(node: AstNode): AstNode { + if (node === undefined) { + // Improve: fix this + throwError('there is no arkts pair of ts node (unable to getOriginalNode)') + } + if (node.originalPeer === nullptr) { + return node + } + return unpackNonNullableNode(node.originalPeer) +} + +export function getFileName(): string { + return global.filePath +} + +export function getJsDoc(node: AstNode): string | undefined { + const result = unpackString(global.generatedEs2panda._JsdocStringFromDeclaration(global.context, node.peer)) + return result === 'Empty Jsdoc' ? undefined : result +} + + +// Improve: It seems like Definition overrides AstNode modifiers +// with it's own modifiers which is completely unrelated set of flags. +// Use this function if you need +// the language level modifiers: public, declare, export, etc. +export function classDefinitionFlags(node: ClassDefinition): Es2pandaModifierFlags { + return global.generatedEs2panda._AstNodeModifiers(global.context, node.peer) +} + +// Improve: ClassProperty's optional flag is set by AstNode's modifiers flags. +export function classPropertySetOptional(node: ClassProperty, value: boolean): ClassProperty { + if (value) { + node.modifierFlags |= Es2pandaModifierFlags.MODIFIER_FLAGS_OPTIONAL; + } else { + node.modifierFlags &= Es2pandaModifierFlags.MODIFIER_FLAGS_OPTIONAL; + } + return node; +} + +export function hasModifierFlag(node: AstNode, flag: Es2pandaModifierFlags): boolean { + if (!node) return false; + + let modifiers; + if (isClassDefinition(node)) { + modifiers = classDefinitionFlags(node); + } else { + modifiers = node.modifierFlags + } + return (modifiers & flag) === flag; +} + +export function modifiersToString(modifiers: Es2pandaModifierFlags): string { + return Object.values(Es2pandaModifierFlags) + .filter(isNumber) + .map(it => { + console.log(it.valueOf(), Es2pandaModifierFlags[it], modifiers.valueOf() & it) + return ((modifiers.valueOf() & it) === it) ? Es2pandaModifierFlags[it] : "" + }).join(" ") +} + +export function nameIfIdentifier(node: AstNode): string { + return isIdentifier(node) ? `'${node.name}'` : "" +} + +export function nameIfETSModule(node: AstNode): string { + return isETSModule(node) ? `'${node.ident?.name}'` : "" +} + +export function asString(node: AstNode|undefined): string { + return `${node?.constructor.name} ${node ? nameIfIdentifier(node) : undefined}` +} + +const defaultPandaSdk = "../../../incremental/tools/panda/node_modules/@panda/sdk" + + +export function findStdlib(): string { + const sdk = process.env.PANDA_SDK_PATH ?? withWarning( + defaultPandaSdk, + `PANDA_SDK_PATH not set, assuming ${defaultPandaSdk}` + ) + return `${sdk}/ets/stdlib` +} + +export function generateTsDeclarationsFromContext( + outputDeclEts: string, + outputEts: string, + exportAll: boolean, + isolated: boolean, + recordFile: string +): KInt { + return global.es2panda._GenerateTsDeclarationsFromContext( + global.context, + passString(outputDeclEts), + passString(outputEts), + exportAll, + isolated, + recordFile + ); +} + +export function setAllParents(ast: AstNode): void { + global.es2panda._AstNodeUpdateAll(global.context, ast.peer); +} + +export function getProgramFromAstNode(node: AstNode): Program { + return new Program(global.es2panda._AstNodeProgram(global.context, node.peer)) +} + +export function importDeclarationInsert(node: ETSImportDeclaration, program: Program): void { + global.generatedEs2panda._InsertETSImportDeclarationAndParse(global.context, program.peer, node.peer) +} + +export function signatureReturnType(signature: KNativePointer): KNativePointer { + if (!signature) { + return nullptr + } + return global.es2panda._Checker_SignatureReturnType(global.context, signature) +} + +export function convertCheckerTypeToTypeNode(typePeer: KNativePointer | undefined): TypeNode | undefined { + if (!typePeer) { + return undefined + } + return factory.createOpaqueTypeNode( + global.es2panda._Checker_TypeClone(global.context, typePeer) + ) +} + +export function originalSourcePositionString(node: AstNode | undefined) { + if (!node) { + return `[undefined]` + } + const originalPeer = node.originalPeer + const sourcePosition = new SourcePosition(global.generatedEs2panda._AstNodeStartConst(global.context, originalPeer)) + const program = new Program(global.es2panda._AstNodeProgram(global.context, originalPeer)) + if (!program.peer) { + // This can happen if we are calling this method on node that is in update now and parent chain does not lead to program + return `[${global.filePath}${sourcePosition.toString()}]` + } + return `[${program.absoluteName}${sourcePosition.toString()}]` +} + +export function generateStaticDeclarationsFromContext(outputPath: string): KInt { + return global.generatedEs2panda._GenerateStaticDeclarationsFromContext( + global.context, + passString(outputPath) + ); +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/visitor.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/visitor.ts new file mode 100644 index 0000000000000000000000000000000000000000..761ac8d023d3cbdbfd4f1f6f3f0cda4e7e84d95a --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/visitor.ts @@ -0,0 +1,1200 @@ +/* + * 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 { isSameNativeObject } from "../arkts-api/peers/ArktsObject" +import { + AnnotationUsage, + ArrayExpression, + ArrowFunctionExpression, + AssignmentExpression, + BinaryExpression, + BlockExpression, + BlockStatement, + CallExpression, + CatchClause, + ChainExpression, + ClassDeclaration, + ClassDefinition, + ClassProperty, + ClassStaticBlock, + ConditionalExpression, + DoWhileStatement, + ETSFunctionType, + ETSImportDeclaration, + ETSModule, + ETSNewClassInstanceExpression, + ETSParameterExpression, + ETSStructDeclaration, + ETSTuple, + ETSTypeReference, + ETSTypeReferencePart, + ETSUnionType, + Expression, + ExpressionStatement, + ForInStatement, + ForOfStatement, + ForUpdateStatement, + FunctionDeclaration, + FunctionExpression, + Identifier, + IfStatement, + isArrayExpression, + isArrowFunctionExpression, + isAssignmentExpression, + isBinaryExpression, + isBlockExpression, + isBlockStatement, + isCallExpression, + isChainExpression, + isClassDeclaration, + isClassDefinition, + isClassProperty, + isConditionalExpression, + isDoWhileStatement, + isETSFunctionType, + isETSImportDeclaration, + isETSModule, + isETSNewClassInstanceExpression, + isETSParameterExpression, + isETSStructDeclaration, + isETSTuple, + isETSTypeReference, + isETSTypeReferencePart, + isETSUnionType, + isExpressionStatement, + isForInStatement, + isForOfStatement, + isForUpdateStatement, + isFunctionDeclaration, + isFunctionExpression, + isIdentifier, + isIfStatement, + isMemberExpression, + isMethodDefinition, + isObjectExpression, + isProperty, + isReturnStatement, + isScriptFunction, + isSwitchCaseStatement, + isSwitchStatement, + isTemplateLiteral, + isTryStatement, + isTSAsExpression, + isTSInterfaceBody, + isTSInterfaceDeclaration, + isTSNonNullExpression, + isTSTypeAliasDeclaration, + isTSTypeParameterDeclaration, + isTSTypeParameterInstantiation, + isUpdateExpression, + isVariableDeclaration, + isVariableDeclarator, + isWhileStatement, + MemberExpression, + MethodDefinition, + ObjectExpression, + Property, + ReturnStatement, + ScriptFunction, + Statement, + SwitchCaseStatement, + SwitchStatement, + TemplateElement, + TemplateLiteral, + TryStatement, + TSAsExpression, + TSClassImplements, + TSInterfaceBody, + TSInterfaceDeclaration, + TSInterfaceHeritage, + TSNonNullExpression, + TSTypeAliasDeclaration, + TSTypeParameter, + TSTypeParameterDeclaration, + TSTypeParameterInstantiation, + TypeNode, + UpdateExpression, + VariableDeclaration, + VariableDeclarator, + WhileStatement +} from "../generated" +import { Es2pandaAstNodeType, Es2pandaImportKinds } from "../generated/Es2pandaEnums" +import { factory } from "./factory/nodeFactory" +import { AstNode } from "./peers/AstNode" +import { global } from "./static/global" + +type Visitor = (node: AstNode, options?: object) => AstNode + +export interface DoubleNode { + originNode: AstNode; + translatedNode: AstNode; +} + +export class StructInfo { + stateVariables: Set = new Set(); + initializeBody: AstNode[] = []; + updateBody: AstNode[] = []; +} + +export class GlobalInfo { + private _structCollection: Set; + private static instance: GlobalInfo; + private _structMap: Map; + + private constructor() { + this._structCollection = new Set(); + this._structMap = new Map(); + } + + public static getInfoInstance(): GlobalInfo { + if (!this.instance) { + this.instance = new GlobalInfo(); + } + return this.instance; + } + + public add(str: string): void { + this._structCollection.add(str); + } + + public getStructCollection(): Set { + return this._structCollection; + } + + public getStructInfo(structName: string): StructInfo { + const structInfo = this._structMap.get(structName); + if (!structInfo) { + return new StructInfo(); + } + return structInfo; + } + + public setStructInfo(structName: string, info: StructInfo): void { + this._structMap.set(structName, info); + } +} + +// Improve: rethink (remove as) +function nodeVisitor(node: T, visitor: Visitor): T { + if (node === undefined) { + return node + } + const result = visitor(node) as T + if (node != result) { + global.updateTracker.update() + } + return result +} + +// Improve: rethink (remove as) +function nodesVisitor(nodes: TIn, visitor: Visitor): T[] | TIn { + if (nodes === undefined) { + return nodes + } + return nodes.map(node => { + const result = visitor(node) as T + if (node != result) { + global.updateTracker.update() + } + return result + }) +} + +function visitBlockStatement(node: BlockStatement, visitor: Visitor) { + global.updateTracker.push() + const newStatements: readonly Statement[] = nodesVisitor(node.statements, visitor) + if (global.updateTracker.check()) { + node.setStatements(newStatements) + } + return node +} + +function visitETSModule(node: ETSModule, visitor: Visitor) { + global.updateTracker.push() + const newStatements: readonly Statement[] = nodesVisitor(node.statements, visitor) + const oldIdent = node.ident + const newIdent = nodeVisitor(oldIdent, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newIdent, oldIdent)) { + const result = factory.createETSModule( + newStatements, + newIdent, + node.getNamespaceFlag(), + node.program, + ) + result.onUpdate(node) + return result + } + node.setStatements(newStatements) + } + return node +} + +function visitCallExpression(node: CallExpression, visitor: Visitor) { + global.updateTracker.push() + const newCallee = nodeVisitor(node.callee, visitor) + const oldArguments = node.arguments + const newArguments: readonly Expression[] = nodesVisitor(oldArguments, visitor) + const newTypeParams = nodeVisitor(node.typeParams, visitor) + const newTrailingBlock = nodeVisitor(node.trailingBlock, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newArguments, oldArguments)) { + const result = factory.createCallExpression( + newCallee, + newArguments, + newTypeParams, + node.isOptional, + node.hasTrailingComma, + newTrailingBlock, + ) + result.onUpdate(node) + return result + } + node.setCallee(newCallee) + node.setTypeParams(newTypeParams) + node.setTrailingBlock(newTrailingBlock) + } + return node +} + +function visitIdentifier(node: Identifier, visitor: Visitor) { + global.updateTracker.push() + const newTypeAnnotation = nodeVisitor(node.typeAnnotation, visitor) + if (global.updateTracker.check()) { + const result = factory.createIdentifier(node.name, newTypeAnnotation) + result.onUpdate(node) + return result + } + return node +} + +function visitMemberExpression(node: MemberExpression, visitor: Visitor) { + global.updateTracker.push() + const newObject = nodeVisitor(node.object, visitor) + const newProperty = nodeVisitor(node.property, visitor) + if (global.updateTracker.check()) { + node.setObject(newObject) + node.setProperty(newProperty) + } + return node +} + +function visitETSTypeReference(node: ETSTypeReference, visitor: Visitor) { + global.updateTracker.push() + const newPart = nodeVisitor(node.part, visitor) + if (global.updateTracker.check()) { + const result = factory.createETSTypeReference( + newPart, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitETSTypeReferencePart(node: ETSTypeReferencePart, visitor: Visitor) { + global.updateTracker.push() + const newName = nodeVisitor(node.name, visitor) + const newTypeParams = nodeVisitor(node.typeParams, visitor) + const newPrev = nodeVisitor(node.previous, visitor) + if (global.updateTracker.check()) { + const result = factory.createETSTypeReferencePart( + newName, + newTypeParams, + newPrev, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitScriptFunction(node: ScriptFunction, visitor: Visitor) { + global.updateTracker.push() + const newBody = nodeVisitor(node.body, visitor) + const oldTypeParams = node.typeParams + const newTypeParams = nodeVisitor(oldTypeParams, visitor) + const newParams: readonly Expression[] = nodesVisitor(node.params, visitor) + const newReturnTypeAnnotation = nodeVisitor(node.returnTypeAnnotation, visitor) + const newId = nodeVisitor(node.id, visitor) + const newAnnotations: readonly AnnotationUsage[] = nodesVisitor(node.annotations, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newTypeParams, oldTypeParams)) { + const result = factory.createScriptFunction( + newBody, + newTypeParams, + newParams, + newReturnTypeAnnotation, + node.hasReceiver, + node.flags, + node.modifierFlags, + newId, + newAnnotations, + node.getSignaturePointer(), + node.getPreferredReturnTypePointer(), + ) + result.onUpdate(node) + return result + } + node.setBody(newBody) + node.setParams(newParams) + node.setReturnTypeAnnotation(newReturnTypeAnnotation) + if (newId) node.setIdent(newId) + node.setAnnotations(newAnnotations) + } + return node +} + +function visitMethodDefinition(node: MethodDefinition, visitor: Visitor) { + global.updateTracker.push() + const oldId = node.id + const newId = nodeVisitor(oldId, visitor) + const oldValue = node.value + const newValue = nodeVisitor(oldValue, visitor) + const newOverloads: readonly MethodDefinition[] = nodesVisitor(node.overloads, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newValue, node.value) || !isSameNativeObject(newId, oldId)) { + const result = factory.createMethodDefinition( + node.kind, + newId, + newValue, + node.modifierFlags, + node.isComputed, + newOverloads, + ) + result.onUpdate(node) + return result + } + node.setOverloads(newOverloads) + newOverloads.forEach(it => { + it.setBaseOverloadMethod(node) + it.parent = node + }) + } + return node +} + +function visitArrowFunctionExpression(node: ArrowFunctionExpression, visitor: Visitor) { + global.updateTracker.push() + const oldFunction = node.function + const newFunction = nodeVisitor(oldFunction, visitor) + const newAnnotations: readonly AnnotationUsage[] = nodesVisitor(node.annotations, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newFunction, oldFunction)) { + const result = factory.createArrowFunctionExpression( + newFunction, + newAnnotations, + ) + result.onUpdate(node) + return result + } + node.setAnnotations(newAnnotations) + } + return node +} + +function visitFunctionDeclaration(node: FunctionDeclaration, visitor: Visitor) { + global.updateTracker.push() + const oldFunction = node.function + const newFunction = nodeVisitor(oldFunction, visitor) + const newAnnotations: readonly AnnotationUsage[] = nodesVisitor(node.annotations, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newFunction, oldFunction)) { + const result = factory.createFunctionDeclaration( + newFunction, + newAnnotations, + node.isAnonymous, + ) + result.onUpdate(node) + return result + } + node.setAnnotations(newAnnotations) + } + return node +} + +function visitBlockExpression(node: BlockExpression, visitor: Visitor) { + global.updateTracker.push() + const newStatements: readonly Statement[] = nodesVisitor(node.statements, visitor) + if (global.updateTracker.check()) { + const result = factory.createBlockExpression( + newStatements, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitChainExpression(node: ChainExpression, visitor: Visitor) { + global.updateTracker.push() + const newExpression = nodeVisitor(node.expression, visitor) + if (global.updateTracker.check()) { + const result = factory.createChainExpression( + newExpression, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitExpressionStatement(node: ExpressionStatement, visitor: Visitor) { + global.updateTracker.push() + const newExpression = nodeVisitor(node.expression, visitor) + if (global.updateTracker.check()) { + node.setExpression(newExpression) + } + return node +} + +function visitETSStructDeclaration(node: ETSStructDeclaration, visitor: Visitor) { + global.updateTracker.push() + const newDefinition = nodeVisitor(node.definition, visitor) + if (global.updateTracker.check()) { + node.setDefinition(newDefinition) + } + return node +} + +function visitClassDeclaration(node: ClassDeclaration, visitor: Visitor) { + global.updateTracker.push() + const newDefinition = nodeVisitor(node.definition, visitor) + if (global.updateTracker.check()) { + node.setDefinition(newDefinition) + } + return node +} + +function visitTSInterfaceBody(node: TSInterfaceBody, visitor: Visitor) { + global.updateTracker.push() + const newBody = nodesVisitor(node.body, visitor) + if (global.updateTracker.check()) { + const result = factory.createTSInterfaceBody( + newBody, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitClassDefinition(node: ClassDefinition, visitor: Visitor) { + global.updateTracker.push() + const newIdent = nodeVisitor(node.ident, visitor) + const newTypeParams = nodeVisitor(node.typeParams, visitor) + const oldSuperTypeParams = node.superTypeParams + const newSuperTypeParams = nodeVisitor(oldSuperTypeParams, visitor) + const oldImplements = node.implements + const newImplements: readonly TSClassImplements[] = nodesVisitor(oldImplements, visitor) + const newSuper = nodeVisitor(node.super, visitor) + const newBody = nodesVisitor(node.body, visitor) + const newAnnotations: readonly AnnotationUsage[] = nodesVisitor(node.annotations, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(oldSuperTypeParams, newSuperTypeParams) || !isSameNativeObject(newImplements, oldImplements)) { + const result = factory.createClassDefinition( + newIdent, + newTypeParams, + newSuperTypeParams, + newImplements, + undefined, /* can not pass node.ctor here because of mismatching types */ + newSuper, + newBody, + node.modifiers, + node.modifierFlags, + newAnnotations, + ) + result.onUpdate(node) + return result + } + node.setIdent(newIdent) + node.setTypeParams(newTypeParams) + node.setSuper(newSuper) + node.setBody(newBody) + node.setAnnotations(newAnnotations) + } + return node +} + +function visitETSParameterExpression(node: ETSParameterExpression, visitor: Visitor) { + if (node.isRestParameter) { + /** there is no RestParameter node at .idl */ + return node + } + global.updateTracker.push() + const newIdent = nodeVisitor(node.ident, visitor) + const newInit = nodeVisitor(node.initializer, visitor) + const newAnnotations: readonly AnnotationUsage[] = nodesVisitor(node.annotations, visitor) + if (global.updateTracker.check()) { + node.setIdent(newIdent) + node.setInitializer(newInit) + node.setAnnotations(newAnnotations) + } + return node +} + +function visitSwitchStatement(node: SwitchStatement, visitor: Visitor) { + global.updateTracker.push() + const newDiscriminant = nodeVisitor(node.discriminant, visitor) + const oldCases = node.cases + const newCases: readonly SwitchCaseStatement[] = nodesVisitor(oldCases, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newCases, oldCases)) { + const result = factory.createSwitchStatement( + newDiscriminant, + newCases, + ) + result.onUpdate(node) + return result + } + node.setDiscriminant(newDiscriminant) + } + return node +} + +function visitSwitchCaseStatement(node: SwitchCaseStatement, visitor: Visitor) { + global.updateTracker.push() + const newTest = nodeVisitor(node.test, visitor) + const oldConsequent = node.consequent + const newConsequent: readonly Statement[] = nodesVisitor(oldConsequent, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newConsequent, oldConsequent)) { + const result = factory.createSwitchCaseStatement( + newTest, + newConsequent, + ) + result.onUpdate(node) + return result + } + node.setTest(newTest) + } + return node +} + +function visitTSInterfaceDeclaration(node: TSInterfaceDeclaration, visitor: Visitor) { + global.updateTracker.push() + const newExtends: readonly TSInterfaceHeritage[] = nodesVisitor(node.extends, visitor) + const newIdent = nodeVisitor(node.id, visitor) + const newTypeParams = nodeVisitor(node.typeParams, visitor) + const newBody = nodeVisitor(node.body, visitor) + if (global.updateTracker.check()) { + const result = factory.createInterfaceDeclaration( + newExtends, + newIdent, + newTypeParams, + newBody, + node.isStatic, + node.isFromExternal, + node.modifierFlags, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitIfStatement(node: IfStatement, visitor: Visitor) { + global.updateTracker.push() + const newTest = nodeVisitor(node.test, visitor) + const oldConsequent = node.consequent + const newConsequent = nodeVisitor(oldConsequent, visitor) + const newAlternate = nodeVisitor(node.alternate, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newConsequent, oldConsequent)) { + const result = factory.createIfStatement( + newTest, + newConsequent, + newAlternate, + ) + result.onUpdate(node) + return result + } + node.setTest(newTest) + if (newTest) newTest.parent = node + node.setAlternate(newAlternate) + } + return node +} + +function visitConditionalExpression(node: ConditionalExpression, visitor: Visitor) { + global.updateTracker.push() + const newTest = nodeVisitor(node.test, visitor) + const newConsequent = nodeVisitor(node.consequent, visitor) + const newAlternate = nodeVisitor(node.alternate, visitor) + if (global.updateTracker.check()) { + node.setTest(newTest) + node.setConsequent(newConsequent) + node.setAlternate(newAlternate) + } + return node +} + +function visitVariableDeclararion(node: VariableDeclaration, visitor: Visitor) { + global.updateTracker.push() + const oldDeclarators = node.declarators + const newDeclarators: readonly VariableDeclarator[] = nodesVisitor(oldDeclarators, visitor) + const newAnnotations: readonly AnnotationUsage[] = nodesVisitor(node.annotations, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newDeclarators, oldDeclarators)) { + const result = factory.createVariableDeclaration( + node.kind, + newDeclarators, + newAnnotations, + ) + result.onUpdate(node) + return result + } + node.setAnnotations(newAnnotations) + } + return node +} + +function visitVariableDeclarator(node: VariableDeclarator, visitor: Visitor) { + global.updateTracker.push() + const oldId = node.id + const newId = nodeVisitor(oldId, visitor) + const newInit = nodeVisitor(node.init, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newId, oldId)) { + const result = factory.createVariableDeclarator( + node.flag, + newId, + newInit, + ) + result.onUpdate(node) + return result + } + node.setInit(newInit) + } + return node +} + +function visitReturnStatement(node: ReturnStatement, visitor: Visitor) { + global.updateTracker.push() + const newArgument = nodeVisitor(node.argument, visitor) + if (global.updateTracker.check()) { + node.setArgument(newArgument) + } + return node +} + +function visitTSAsExpression(node: TSAsExpression, visitor: Visitor) { + global.updateTracker.push() + const newExpr = nodeVisitor(node.expr, visitor) + const oldTypeAnnotation = node.typeAnnotation + const newTypeAnnotation = nodeVisitor(oldTypeAnnotation, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newTypeAnnotation, oldTypeAnnotation)) { + const result = factory.createTSAsExpression( + newExpr, + newTypeAnnotation, + node.isConst, + ) + result.onUpdate(node) + return result + } + node.setExpr(newExpr) + } + return node +} + +function visitTemplateLiteral(node: TemplateLiteral, visitor: Visitor) { + global.updateTracker.push() + const newQuasis: readonly TemplateElement[] = nodesVisitor(node.quasis, visitor) + const newExpression: readonly Expression[] = nodesVisitor(node.expressions, visitor) + if (global.updateTracker.check()) { + const result = factory.createTemplateLiteral( + newQuasis, + newExpression, + node.multilineString, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitTSTypeAliasDeclaration(node: TSTypeAliasDeclaration, visitor: Visitor) { + global.updateTracker.push() + const oldId = node.id + const newId = nodeVisitor(oldId, visitor) + const newTypeParams = nodeVisitor(node.typeParams, visitor) + const oldTypeAnnotation = node.typeAnnotation + const newTypeAnnotation = nodeVisitor(oldTypeAnnotation, visitor) + const newAnnotations: readonly AnnotationUsage[] = nodesVisitor(node.annotations, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newId, oldId) || !isSameNativeObject(newTypeAnnotation, oldTypeAnnotation)) { + const result = factory.createTSTypeAliasDeclaration( + newId, + newTypeParams, + newTypeAnnotation, + newAnnotations, + ) + result.onUpdate(node) + return result + } + node.setAnnotations(newAnnotations) + node.setTypeParameters(newTypeParams) + } + return node +} + +function visitTryStatement(node: TryStatement, visitor: Visitor) { + global.updateTracker.push() + const newBlock = nodeVisitor(node.block, visitor) + const newCatchClauses: readonly CatchClause[] = nodesVisitor(node.catchClauses, visitor) + const newFinallyBlock = nodeVisitor(node.finallyBlock, visitor) + if (global.updateTracker.check()) { + const result = factory.createTryStatement( + newBlock, + newCatchClauses, + newFinallyBlock, + [], + [], + ) + result.onUpdate(node) + return result + } + return node +} + +function visitObjectExpression(node: ObjectExpression, visitor: Visitor) { + global.updateTracker.push() + const newProperties: readonly Expression[] = nodesVisitor(node.properties, visitor) + if (global.updateTracker.check()) { + const result = factory.createObjectExpression( + newProperties, + node.getPreferredTypePointer(), + ) + result.onUpdate(node) + return result + } + return node +} + +function visitFunctionExpression(node: FunctionExpression, visitor: Visitor) { + global.updateTracker.push() + const newId = nodeVisitor(node.id, visitor) + const newFunction = nodeVisitor(node.function, visitor) + if (global.updateTracker.check()) { + const result = factory.createFunctionExpression( + newId, + newFunction, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitArrayExpression(node: ArrayExpression, visitor: Visitor) { + global.updateTracker.push() + const newElements: readonly Expression[] = nodesVisitor(node.elements, visitor) + if (global.updateTracker.check()) { + node.setElements(newElements) + } + return node +} + +function visitAssignmentExpression(node: AssignmentExpression, visitor: Visitor) { + global.updateTracker.push() + const newLeft = nodeVisitor(node.left, visitor) + const newRight = nodeVisitor(node.right, visitor) + if (global.updateTracker.check()) { + node.setLeft(newLeft) + node.setRight(newRight) + } + return node +} + +function visitETSTyple(node: ETSTuple, visitor: Visitor) { + global.updateTracker.push() + const newTypeAnnotationList: readonly TypeNode[] = nodesVisitor(node.tupleTypeAnnotationsList, visitor) + if (global.updateTracker.check()) { + node.setTypeAnnotationsList(newTypeAnnotationList) + } + return node +} + +function visitETSUnionType(node: ETSUnionType, visitor: Visitor) { + global.updateTracker.push() + const oldTypes = node.types + const newTypes: readonly TypeNode[] = nodesVisitor(oldTypes, visitor) + const newAnnotations: readonly AnnotationUsage[] = nodesVisitor(node.annotations, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newTypes, oldTypes)) { + const result = factory.createETSUnionType( + newTypes, + newAnnotations, + ) + result.onUpdate(node) + return result + } + node.setAnnotations(newAnnotations) + } + return node +} + +function visitETSFunctionType(node: ETSFunctionType, visitor: Visitor) { + global.updateTracker.push() + const oldTypeParams = node.typeParams + const newTypeParams = nodeVisitor(oldTypeParams, visitor) + const oldParams = node.params + const newParams: readonly Expression[] = nodesVisitor(oldParams, visitor) + const oldReturnTypeAnnotation = node.returnType + const newReturnTypeAnnotation = nodeVisitor(oldReturnTypeAnnotation, visitor) + const newAnnotations: readonly AnnotationUsage[] = nodesVisitor(node.annotations, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newTypeParams, oldTypeParams) + || !isSameNativeObject(newParams, oldParams) + || !isSameNativeObject(newReturnTypeAnnotation, oldReturnTypeAnnotation) + ) { + const result = factory.createETSFunctionType( + newTypeParams, + newParams, + newReturnTypeAnnotation, + node.isExtensionFunction, + node.flags, + newAnnotations, + ) + result.onUpdate(node) + return result + } + node.setAnnotations(newAnnotations) + } + return node +} + +function visitClassProperty(node: ClassProperty, visitor: Visitor) { + global.updateTracker.push() + const oldKey = node.key + const newKey = nodeVisitor(oldKey, visitor) + const newValue = nodeVisitor(node.value, visitor) + const newTypeAnnotation = nodeVisitor(node.typeAnnotation, visitor) + const newAnnotations: readonly AnnotationUsage[] = nodesVisitor(node.annotations, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newKey, oldKey)) { + const result = factory.createClassProperty( + newKey, + newValue, + newTypeAnnotation, + node.modifierFlags, + node.isComputed, + newAnnotations, + ) + result.onUpdate(node) + return result + } + node.setValue(newValue) + node.setTypeAnnotation(newTypeAnnotation) + node.setAnnotations(newAnnotations) + } + return node +} + +function visitProperty(node: Property, visitor: Visitor) { + global.updateTracker.push() + const newKey = nodeVisitor(node.key, visitor) + const newValue = nodeVisitor(node.value, visitor) + if (global.updateTracker.check()) { + const result = factory.createProperty( + node.kind, + newKey, + newValue, + node.isMethod, + node.isComputed, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitBinaryExpression(node: BinaryExpression, visitor: Visitor) { + global.updateTracker.push() + const newLeft = nodeVisitor(node.left, visitor) + const newRight = nodeVisitor(node.right, visitor) + if (global.updateTracker.check()) { + node.setLeft(newLeft) + node.setRight(newRight) + } + return node +} + +function visitETSNewClassInstanceExpression(node: ETSNewClassInstanceExpression, visitor: Visitor) { + global.updateTracker.push() + const oldTypeRef = node.typeRef + const newTypeRef = nodeVisitor(oldTypeRef, visitor) + const newArguments: readonly Expression[] = nodesVisitor(node.arguments, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newTypeRef, oldTypeRef)) { + const result = factory.createETSNewClassInstanceExpression( + newTypeRef, + newArguments, + ) + result.onUpdate(node) + return result + } + node.setArguments(newArguments) + newArguments.forEach(it => it.parent = node) + } + return node +} + +function visitWhileStatement(node: WhileStatement, visitor: Visitor) { + global.updateTracker.push() + const newTest = nodeVisitor(node.test, visitor) + const oldBody = node.body + const newBody = nodeVisitor(node.body, visitor) + if (global.updateTracker.check()) { + if (!isSameNativeObject(newBody, oldBody)) { + const result = factory.createWhileStatement( + newTest, + newBody, + ) + result.onUpdate(node) + return result + } + node.setTest(newTest) + } + return node +} + +function visitDoWhileStatement(node: DoWhileStatement, visitor: Visitor) { + global.updateTracker.push() + const newBody = nodeVisitor(node.body, visitor) + const newTest = nodeVisitor(node.test, visitor) + if (global.updateTracker.check()) { + const result = factory.createDoWhileStatement( + newBody, + newTest, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitForUpdateStatement(node: ForUpdateStatement, visitor: Visitor) { + global.updateTracker.push() + const newInit = nodeVisitor(node.init, visitor) + const newTest = nodeVisitor(node.test, visitor) + const newUpdate = nodeVisitor(node.update, visitor) + const newBody = nodeVisitor(node.body, visitor) + if (global.updateTracker.check()) { + const result = factory.createForUpdateStatement( + newInit, + newTest, + newUpdate, + newBody, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitForInStatement(node: ForInStatement, visitor: Visitor) { + global.updateTracker.push() + const newLeft = nodeVisitor(node.left, visitor) + const newRight = nodeVisitor(node.right, visitor) + const newBody = nodeVisitor(node.body, visitor) + if (global.updateTracker.check()) { + const result = factory.createForInStatement( + newLeft, + newRight, + newBody, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitForOfStatement(node: ForOfStatement, visitor: Visitor) { + global.updateTracker.push() + const newLeft = nodeVisitor(node.left, visitor) + const newRight = nodeVisitor(node.right, visitor) + const newBody = nodeVisitor(node.body, visitor) + if (global.updateTracker.check()) { + const result = factory.createForOfStatement( + newLeft, + newRight, + newBody, + node.isAwait, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitETSImportDeclaration(node: ETSImportDeclaration, visitor: Visitor) { + global.updateTracker.push() + const newSource = nodeVisitor(node.source, visitor) + const newSpecifiers = nodesVisitor(node.specifiers, visitor) + if (global.updateTracker.check()) { + const result = factory.createETSImportDeclaration( + newSource, + newSpecifiers, + Es2pandaImportKinds.IMPORT_KINDS_ALL, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitTSNonNullExpression(node: TSNonNullExpression, visitor: Visitor) { + global.updateTracker.push() + const newExpr = nodeVisitor(node.expr, visitor) + if (global.updateTracker.check()) { + node.setExpr(newExpr) + if (newExpr) newExpr.parent = node + } + return node +} + +function visitUpdateExpression(node: UpdateExpression, visitor: Visitor) { + global.updateTracker.push() + const newArgument = nodeVisitor(node.argument, visitor) + if (global.updateTracker.check()) { + const result = factory.createUpdateExpression( + newArgument, + node.operatorType, + node.isPrefix, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitTSTypeParameterInstantiation(node: TSTypeParameterInstantiation, visitor: Visitor) { + global.updateTracker.push() + const newParams: readonly TypeNode[] = nodesVisitor(node.params, visitor) + if (global.updateTracker.check()) { + const result = factory.createTSTypeParameterInstantiation( + newParams, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitTSTypeParameterDeclaration(node: TSTypeParameterDeclaration, visitor: Visitor) { + global.updateTracker.push() + const newParams: readonly TSTypeParameter[] = nodesVisitor(node.params, visitor) + if (global.updateTracker.check()) { + const result = factory.createTSTypeParameterDeclaration( + newParams, + node.requiredParams, + ) + result.onUpdate(node) + return result + } + return node +} + +function visitClassStaticBlock(node: ClassStaticBlock, visitor: Visitor) { + global.updateTracker.push() + const newId = nodeVisitor(node.id, visitor) + const newFunction = nodeVisitor(node.function, visitor) + if (global.updateTracker.check()) { + const result = ClassStaticBlock.createClassStaticBlock( + factory.createFunctionExpression( + newId, + newFunction, + ) + ) + result.onUpdate(node) + return result + } + return node +} + +const visitsTable: (((node: any, visitor: Visitor) => any) | undefined)[] = [] + +export function initVisitsTable() { + const length = Object.values(Es2pandaAstNodeType).length / 2 + visitsTable.push(...new Array(length)) + + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER] = visitIdentifier + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION] = visitMemberExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE] = visitETSTypeReference + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART] = visitETSTypeReferencePart + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE] = visitETSModule + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION] = visitCallExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION] = visitFunctionDeclaration + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT] = visitBlockStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_EXPRESSION] = visitBlockExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_CHAIN_EXPRESSION] = visitChainExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT] = visitExpressionStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION] = visitETSStructDeclaration + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION] = visitClassDeclaration + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION] = visitClassDefinition + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION] = visitMethodDefinition + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION] = visitScriptFunction + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION] = visitETSParameterExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT] = visitSwitchStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT] = visitSwitchCaseStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_DECLARATION] = visitTSInterfaceDeclaration + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_BODY] = visitTSInterfaceBody + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT] = visitIfStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_CONDITIONAL_EXPRESSION] = visitConditionalExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION] = visitVariableDeclararion + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR] = visitVariableDeclarator + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION] = visitArrowFunctionExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT] = visitReturnStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_TS_AS_EXPRESSION] = visitTSAsExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL] = visitTemplateLiteral + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION] = visitTSTypeAliasDeclaration + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_TRY_STATEMENT] = visitTryStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION] = visitObjectExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION] = visitFunctionExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION] = visitArrayExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION] = visitAssignmentExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE] = visitETSTyple + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE] = visitETSUnionType + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE] = visitETSFunctionType + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY] = visitClassProperty + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY] = visitProperty + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION] = visitBinaryExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION] = visitETSNewClassInstanceExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_WHILE_STATEMENT] = visitWhileStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_DO_WHILE_STATEMENT] = visitDoWhileStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_FOR_UPDATE_STATEMENT] = visitForUpdateStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_FOR_IN_STATEMENT] = visitForInStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_FOR_OF_STATEMENT] = visitForOfStatement + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION] = visitETSImportDeclaration + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_TS_NON_NULL_EXPRESSION] = visitTSNonNullExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_UPDATE_EXPRESSION] = visitUpdateExpression + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION] = visitTSTypeParameterDeclaration + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION] = visitTSTypeParameterInstantiation + visitsTable[Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK] = visitClassStaticBlock +} + +export function visitEachChild( + node: AstNode, + visitor: Visitor +): AstNode { + global.profiler.nodeVisited() + const visit = visitsTable[node.astNodeType] + if (visit) { + return visit(node, visitor) + } + return node +} diff --git a/koala_tools/ui2abc/libarkts/src/arkts-api/wrapper-compat.ts b/koala_tools/ui2abc/libarkts/src/arkts-api/wrapper-compat.ts new file mode 100644 index 0000000000000000000000000000000000000000..15226e716af76a79737df6a4111917edc972fe45 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/arkts-api/wrapper-compat.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2022-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. + */ + +// koala-wrapper compatibility helpers + +import { KNativePointer } from "@koalaui/interop" +import { ETSModule } from "../generated" +import { createETSModuleFromContext } from "./utilities/public" +import { global } from "./static/global" + +export class EtsScript { + public static fromContext(): ETSModule { + return createETSModuleFromContext() + } +} + +export function destroyConfig(config: KNativePointer): void { + global.es2panda._DestroyConfig(config) + global.resetConfig() +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/src/checkSdk.ts b/koala_tools/ui2abc/libarkts/src/checkSdk.ts new file mode 100644 index 0000000000000000000000000000000000000000..545398eb3b66ca4d4def1c4455c0d2c641e35d00 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/checkSdk.ts @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as fs from "fs" +import * as path from "path" + +function reportErrorAndExit(message: string): never { + console.error(message) + process.exit(1) +} + +export function checkSDK() { + const panda = process.env.PANDA_SDK_PATH + if (!panda) + reportErrorAndExit(`Variable PANDA_SDK_PATH is not set, please fix`) + if (!fs.existsSync(path.join(panda, 'package.json'))) + reportErrorAndExit(`Variable PANDA_SDK_PATH not points to SDK`) + const packageJson = JSON.parse(fs.readFileSync(path.join(panda, 'package.json')).toString()) + const version = packageJson.version as string + if (!version) + reportErrorAndExit(`version is unknown`) + const packageJsonOur = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json')).toString()) + const expectedVersion = packageJsonOur.config.panda_sdk_version + if (expectedVersion && expectedVersion != "next" && version != expectedVersion) + console.log(`WARNING: Panda SDK version "${version}" doesn't match expected "${expectedVersion}"`) + else + console.log(`Using Panda ${version}`) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/Es2pandaEnums.ts b/koala_tools/ui2abc/libarkts/src/generated/Es2pandaEnums.ts new file mode 100644 index 0000000000000000000000000000000000000000..421883a7e38b1ad846fac31e059b38755c0ccc84 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/Es2pandaEnums.ts @@ -0,0 +1,1350 @@ +/* + * 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + + +export enum Es2pandaContextState { + ES2PANDA_STATE_NEW = 0, + ES2PANDA_STATE_PARSED = 1, + ES2PANDA_STATE_BOUND = 2, + ES2PANDA_STATE_CHECKED = 3, + ES2PANDA_STATE_LOWERED = 4, + ES2PANDA_STATE_ASM_GENERATED = 5, + ES2PANDA_STATE_BIN_GENERATED = 6, + ES2PANDA_STATE_ERROR = 7 +} +export enum Es2pandaPluginDiagnosticType { + ES2PANDA_PLUGIN_WARNING = 0, + ES2PANDA_PLUGIN_ERROR = 1, + ES2PANDA_PLUGIN_SUGGESTION = 2 +} +export enum Es2pandaAstNodeType { + AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION = 0, + AST_NODE_TYPE_ANNOTATION_DECLARATION = 1, + AST_NODE_TYPE_ANNOTATION_USAGE = 2, + AST_NODE_TYPE_ASSERT_STATEMENT = 3, + AST_NODE_TYPE_AWAIT_EXPRESSION = 4, + AST_NODE_TYPE_BIGINT_LITERAL = 5, + AST_NODE_TYPE_BINARY_EXPRESSION = 6, + AST_NODE_TYPE_BLOCK_STATEMENT = 7, + AST_NODE_TYPE_BOOLEAN_LITERAL = 8, + AST_NODE_TYPE_BREAK_STATEMENT = 9, + AST_NODE_TYPE_CALL_EXPRESSION = 10, + AST_NODE_TYPE_CATCH_CLAUSE = 11, + AST_NODE_TYPE_CHAIN_EXPRESSION = 12, + AST_NODE_TYPE_CHAR_LITERAL = 13, + AST_NODE_TYPE_CLASS_DEFINITION = 14, + AST_NODE_TYPE_CLASS_DECLARATION = 15, + AST_NODE_TYPE_CLASS_EXPRESSION = 16, + AST_NODE_TYPE_CLASS_PROPERTY = 17, + AST_NODE_TYPE_CLASS_STATIC_BLOCK = 18, + AST_NODE_TYPE_CONDITIONAL_EXPRESSION = 19, + AST_NODE_TYPE_CONTINUE_STATEMENT = 20, + AST_NODE_TYPE_DEBUGGER_STATEMENT = 21, + AST_NODE_TYPE_DECORATOR = 22, + AST_NODE_TYPE_DIRECT_EVAL = 23, + AST_NODE_TYPE_DO_WHILE_STATEMENT = 24, + AST_NODE_TYPE_EMPTY_STATEMENT = 25, + AST_NODE_TYPE_EXPORT_ALL_DECLARATION = 26, + AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION = 27, + AST_NODE_TYPE_EXPORT_NAMED_DECLARATION = 28, + AST_NODE_TYPE_EXPORT_SPECIFIER = 29, + AST_NODE_TYPE_EXPRESSION_STATEMENT = 30, + AST_NODE_TYPE_FOR_IN_STATEMENT = 31, + AST_NODE_TYPE_FOR_OF_STATEMENT = 32, + AST_NODE_TYPE_FOR_UPDATE_STATEMENT = 33, + AST_NODE_TYPE_FUNCTION_DECLARATION = 34, + AST_NODE_TYPE_FUNCTION_EXPRESSION = 35, + AST_NODE_TYPE_IDENTIFIER = 36, + AST_NODE_TYPE_DUMMYNODE = 37, + AST_NODE_TYPE_IF_STATEMENT = 38, + AST_NODE_TYPE_IMPORT_DECLARATION = 39, + AST_NODE_TYPE_IMPORT_EXPRESSION = 40, + AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER = 41, + AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER = 42, + AST_NODE_TYPE_IMPORT_SPECIFIER = 43, + AST_NODE_TYPE_LABELLED_STATEMENT = 44, + AST_NODE_TYPE_MEMBER_EXPRESSION = 45, + AST_NODE_TYPE_META_PROPERTY_EXPRESSION = 46, + AST_NODE_TYPE_METHOD_DEFINITION = 47, + AST_NODE_TYPE_NAMED_TYPE = 48, + AST_NODE_TYPE_NEW_EXPRESSION = 49, + AST_NODE_TYPE_NULL_LITERAL = 50, + AST_NODE_TYPE_UNDEFINED_LITERAL = 51, + AST_NODE_TYPE_NUMBER_LITERAL = 52, + AST_NODE_TYPE_OMITTED_EXPRESSION = 53, + AST_NODE_TYPE_OVERLOAD_DECLARATION = 54, + AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION = 55, + AST_NODE_TYPE_PROPERTY = 56, + AST_NODE_TYPE_REGEXP_LITERAL = 57, + AST_NODE_TYPE_REEXPORT_STATEMENT = 58, + AST_NODE_TYPE_RETURN_STATEMENT = 59, + AST_NODE_TYPE_SCRIPT_FUNCTION = 60, + AST_NODE_TYPE_SEQUENCE_EXPRESSION = 61, + AST_NODE_TYPE_STRING_LITERAL = 62, + AST_NODE_TYPE_ETS_NON_NULLISH_TYPE = 63, + AST_NODE_TYPE_ETS_NULL_TYPE = 64, + AST_NODE_TYPE_ETS_UNDEFINED_TYPE = 65, + AST_NODE_TYPE_ETS_NEVER_TYPE = 66, + AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE = 67, + AST_NODE_TYPE_ETS_INTRINSIC_NODE_TYPE = 68, + AST_NODE_TYPE_ETS_FUNCTION_TYPE = 69, + AST_NODE_TYPE_ETS_WILDCARD_TYPE = 70, + AST_NODE_TYPE_ETS_PRIMITIVE_TYPE = 71, + AST_NODE_TYPE_ETS_PACKAGE_DECLARATION = 72, + AST_NODE_TYPE_ETS_CLASS_LITERAL = 73, + AST_NODE_TYPE_ETS_TYPE_REFERENCE = 74, + AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART = 75, + AST_NODE_TYPE_ETS_UNION_TYPE = 76, + AST_NODE_TYPE_ETS_KEYOF_TYPE = 77, + AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION = 78, + AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION = 79, + AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION = 80, + AST_NODE_TYPE_ETS_IMPORT_DECLARATION = 81, + AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION = 82, + AST_NODE_TYPE_ETS_TUPLE = 83, + AST_NODE_TYPE_ETS_MODULE = 84, + AST_NODE_TYPE_SUPER_EXPRESSION = 85, + AST_NODE_TYPE_STRUCT_DECLARATION = 86, + AST_NODE_TYPE_SWITCH_CASE_STATEMENT = 87, + AST_NODE_TYPE_SWITCH_STATEMENT = 88, + AST_NODE_TYPE_TS_ENUM_DECLARATION = 89, + AST_NODE_TYPE_TS_ENUM_MEMBER = 90, + AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE = 91, + AST_NODE_TYPE_TS_NUMBER_KEYWORD = 92, + AST_NODE_TYPE_TS_ANY_KEYWORD = 93, + AST_NODE_TYPE_TS_STRING_KEYWORD = 94, + AST_NODE_TYPE_TS_BOOLEAN_KEYWORD = 95, + AST_NODE_TYPE_TS_VOID_KEYWORD = 96, + AST_NODE_TYPE_TS_UNDEFINED_KEYWORD = 97, + AST_NODE_TYPE_TS_UNKNOWN_KEYWORD = 98, + AST_NODE_TYPE_TS_OBJECT_KEYWORD = 99, + AST_NODE_TYPE_TS_BIGINT_KEYWORD = 100, + AST_NODE_TYPE_TS_NEVER_KEYWORD = 101, + AST_NODE_TYPE_TS_NON_NULL_EXPRESSION = 102, + AST_NODE_TYPE_TS_NULL_KEYWORD = 103, + AST_NODE_TYPE_TS_ARRAY_TYPE = 104, + AST_NODE_TYPE_TS_UNION_TYPE = 105, + AST_NODE_TYPE_TS_TYPE_LITERAL = 106, + AST_NODE_TYPE_TS_PROPERTY_SIGNATURE = 107, + AST_NODE_TYPE_TS_METHOD_SIGNATURE = 108, + AST_NODE_TYPE_TS_SIGNATURE_DECLARATION = 109, + AST_NODE_TYPE_TS_PARENT_TYPE = 110, + AST_NODE_TYPE_TS_LITERAL_TYPE = 111, + AST_NODE_TYPE_TS_INFER_TYPE = 112, + AST_NODE_TYPE_TS_CONDITIONAL_TYPE = 113, + AST_NODE_TYPE_TS_IMPORT_TYPE = 114, + AST_NODE_TYPE_TS_INTERSECTION_TYPE = 115, + AST_NODE_TYPE_TS_MAPPED_TYPE = 116, + AST_NODE_TYPE_TS_MODULE_BLOCK = 117, + AST_NODE_TYPE_TS_THIS_TYPE = 118, + AST_NODE_TYPE_TS_TYPE_OPERATOR = 119, + AST_NODE_TYPE_TS_TYPE_PARAMETER = 120, + AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION = 121, + AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION = 122, + AST_NODE_TYPE_TS_TYPE_PREDICATE = 123, + AST_NODE_TYPE_TS_PARAMETER_PROPERTY = 124, + AST_NODE_TYPE_TS_MODULE_DECLARATION = 125, + AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION = 126, + AST_NODE_TYPE_TS_FUNCTION_TYPE = 127, + AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE = 128, + AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION = 129, + AST_NODE_TYPE_TS_TYPE_REFERENCE = 130, + AST_NODE_TYPE_TS_QUALIFIED_NAME = 131, + AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE = 132, + AST_NODE_TYPE_TS_INTERFACE_DECLARATION = 133, + AST_NODE_TYPE_TS_INTERFACE_BODY = 134, + AST_NODE_TYPE_TS_INTERFACE_HERITAGE = 135, + AST_NODE_TYPE_TS_TUPLE_TYPE = 136, + AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER = 137, + AST_NODE_TYPE_TS_INDEX_SIGNATURE = 138, + AST_NODE_TYPE_TS_TYPE_QUERY = 139, + AST_NODE_TYPE_TS_AS_EXPRESSION = 140, + AST_NODE_TYPE_TS_CLASS_IMPLEMENTS = 141, + AST_NODE_TYPE_TS_TYPE_ASSERTION = 142, + AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION = 143, + AST_NODE_TYPE_TEMPLATE_ELEMENT = 144, + AST_NODE_TYPE_TEMPLATE_LITERAL = 145, + AST_NODE_TYPE_THIS_EXPRESSION = 146, + AST_NODE_TYPE_TYPEOF_EXPRESSION = 147, + AST_NODE_TYPE_THROW_STATEMENT = 148, + AST_NODE_TYPE_TRY_STATEMENT = 149, + AST_NODE_TYPE_UNARY_EXPRESSION = 150, + AST_NODE_TYPE_UPDATE_EXPRESSION = 151, + AST_NODE_TYPE_VARIABLE_DECLARATION = 152, + AST_NODE_TYPE_VARIABLE_DECLARATOR = 153, + AST_NODE_TYPE_WHILE_STATEMENT = 154, + AST_NODE_TYPE_YIELD_EXPRESSION = 155, + AST_NODE_TYPE_OPAQUE_TYPE_NODE = 156, + AST_NODE_TYPE_BLOCK_EXPRESSION = 157, + AST_NODE_TYPE_BROKEN_TYPE_NODE = 158, + AST_NODE_TYPE_ARRAY_EXPRESSION = 159, + AST_NODE_TYPE_ARRAY_PATTERN = 160, + AST_NODE_TYPE_ASSIGNMENT_EXPRESSION = 161, + AST_NODE_TYPE_ASSIGNMENT_PATTERN = 162, + AST_NODE_TYPE_OBJECT_EXPRESSION = 163, + AST_NODE_TYPE_OBJECT_PATTERN = 164, + AST_NODE_TYPE_SPREAD_ELEMENT = 165, + AST_NODE_TYPE_REST_ELEMENT = 166 +} +export enum Es2pandaScopeType { + SCOPE_TYPE_PARAM = 0, + SCOPE_TYPE_CATCH_PARAM = 1, + SCOPE_TYPE_FUNCTION_PARAM = 2, + SCOPE_TYPE_CATCH = 3, + SCOPE_TYPE_CLASS = 4, + SCOPE_TYPE_ANNOTATION = 5, + SCOPE_TYPE_ANNOTATIONPARAMSCOPE = 6, + SCOPE_TYPE_LOCAL = 7, + SCOPE_TYPE_LOOP = 8, + SCOPE_TYPE_LOOP_DECL = 9, + SCOPE_TYPE_FUNCTION = 10, + SCOPE_TYPE_GLOBAL = 11, + SCOPE_TYPE_MODULE = 12 +} +export enum Es2pandaDeclType { + DECL_TYPE_NONE = 0, + DECL_TYPE_VAR = 1, + DECL_TYPE_LET = 2, + DECL_TYPE_CONST = 3, + DECL_TYPE_LABEL = 4, + DECL_TYPE_READONLY = 5, + DECL_TYPE_FUNC = 6, + DECL_TYPE_PARAM = 7, + DECL_TYPE_IMPORT = 8, + DECL_TYPE_DYNAMIC_IMPORT = 9, + DECL_TYPE_EXPORT = 10, + DECL_TYPE_ANNOTATIONDECL = 11, + DECL_TYPE_ANNOTATIONUSAGE = 12, + DECL_TYPE_TYPE_ALIAS = 13, + DECL_TYPE_NAMESPACE = 14, + DECL_TYPE_INTERFACE = 15, + DECL_TYPE_ENUM_LITERAL = 16, + DECL_TYPE_TYPE_PARAMETER = 17, + DECL_TYPE_PROPERTY = 18, + DECL_TYPE_CLASS = 19, + DECL_TYPE_METHOD = 20, + DECL_TYPE_ENUM = 21 +} +export enum Es2pandaResolveBindingOptions { + RESOLVE_BINDING_OPTIONS_BINDINGS = 0, + RESOLVE_BINDING_OPTIONS_INTERFACES = 1, + RESOLVE_BINDING_OPTIONS_VARIABLES = 2, + RESOLVE_BINDING_OPTIONS_METHODS = 4, + RESOLVE_BINDING_OPTIONS_DECLARATION = 8, + RESOLVE_BINDING_OPTIONS_STATIC_VARIABLES = 16, + RESOLVE_BINDING_OPTIONS_STATIC_METHODS = 32, + RESOLVE_BINDING_OPTIONS_STATIC_DECLARATION = 64, + RESOLVE_BINDING_OPTIONS_TYPE_ALIASES = 128, + RESOLVE_BINDING_OPTIONS_ALL = 256, + RESOLVE_BINDING_OPTIONS_ALL_VARIABLES = 18, + RESOLVE_BINDING_OPTIONS_ALL_METHOD = 36, + RESOLVE_BINDING_OPTIONS_ALL_DECLARATION = 72, + RESOLVE_BINDING_OPTIONS_ALL_STATIC = 112, + RESOLVE_BINDING_OPTIONS_ALL_NON_STATIC = 14, + RESOLVE_BINDING_OPTIONS_LAST = 128 +} +export enum Es2pandaVariableKind { + VARIABLE_KIND_NONE = 0, + VARIABLE_KIND_VAR = 1, + VARIABLE_KIND_LEXICAL = 2, + VARIABLE_KIND_FUNCTION = 3, + VARIABLE_KIND_MODULE = 4 +} +export enum Es2pandaLetOrConstStatus { + LET_OR_CONST_STATUS_INITIALIZED = 0, + LET_OR_CONST_STATUS_UNINITIALIZED = 1 +} +export enum Es2pandaScopeFlags { + SCOPE_FLAGS_NONE = 0, + SCOPE_FLAGS_SET_LEXICAL_FUNCTION = 1, + SCOPE_FLAGS_USE_ARGS = 2, + SCOPE_FLAGS_USE_SUPER = 4, + SCOPE_FLAGS_INNER_ARROW = 8, + SCOPE_FLAGS_NO_REG_STORE = 16, + SCOPE_FLAGS_DECL_SCOPE = 32, + SCOPE_FLAGS_FIELD_SCOPE = 64, + SCOPE_FLAGS_METHOD_SCOPE = 128, + SCOPE_FLAGS_STATIC = 256, + SCOPE_FLAGS_TYPE_ALIAS = 512, + SCOPE_FLAGS_LOOP_SCOPE = 1024, + SCOPE_FLAGS_STATIC_DECL_SCOPE = 288, + SCOPE_FLAGS_STATIC_FIELD_SCOPE = 320, + SCOPE_FLAGS_STATIC_METHOD_SCOPE = 384 +} +export enum Es2pandaEnum { + ENUM_NODE_HAS_PARENT = 0, + ENUM_NODE_HAS_SOURCE_RANGE = 1, + ENUM_EVERY_CHILD_HAS_VALID_PARENT = 2, + ENUM_EVERY_CHILD_IN_PARENT_RANGE = 3, + ENUM_CHECK_STRUCT_DECLARATION = 4, + ENUM_VARIABLE_HAS_SCOPE = 5, + ENUM_NODE_HAS_TYPE = 6, + ENUM_NO_PRIMITIVE_TYPES = 7, + ENUM_IDENTIFIER_HAS_VARIABLE = 8, + ENUM_REFERENCE_TYPE_ANNOTATION_IS_NULL = 9, + ENUM_ARITHMETIC_OPERATION_VALID = 10, + ENUM_SEQUENCE_EXPRESSION_HAS_LAST_TYPE = 11, + ENUM_FOR_LOOP_CORRECTLY_INITIALIZED = 12, + ENUM_VARIABLE_HAS_ENCLOSING_SCOPE = 13, + ENUM_MODIFIER_ACCESS_VALID = 14, + ENUM_VARIABLE_NAME_IDENTIFIER_NAME_SAME = 15, + ENUM_CHECK_ABSTRACT_METHOD = 16, + ENUM_GETTER_SETTER_VALIDATION = 17, + ENUM_CHECK_SCOPE_DECLARATION = 18, + ENUM_CHECK_CONST_PROPERTIES = 19, + ENUM_COUNT = 20, + ENUM_BASE_FIRST = 0, + ENUM_BASE_LAST = 3, + ENUM_AFTER_PLUGINS_AFTER_PARSE_FIRST = 4, + ENUM_AFTER_PLUGINS_AFTER_PARSE_LAST = 4, + ENUM_AFTER_SCOPES_INIT_PHASE_FIRST = 5, + ENUM_AFTER_SCOPES_INIT_PHASE_LAST = 5, + ENUM_AFTER_CHECKER_PHASE_FIRST = 6, + ENUM_AFTER_CHECKER_PHASE_LAST = 19, + ENUM_FIRST = 0, + ENUM_LAST = 19, + ENUM_INVALID = 20 +} +export enum Es2pandaRegExpFlags { + REG_EXP_FLAGS_EMPTY = 0, + REG_EXP_FLAGS_GLOBAL = 1, + REG_EXP_FLAGS_IGNORE_CASE = 2, + REG_EXP_FLAGS_MULTILINE = 4, + REG_EXP_FLAGS_DOTALL = 8, + REG_EXP_FLAGS_UNICODE = 16, + REG_EXP_FLAGS_STICKY = 32 +} +export enum Es2pandaId { + ID_AS = 0, + ID_JS = 1, + ID_TS = 2, + ID_ETS = 3, + ID_COUNT = 4 +} +export enum Es2pandaTokenType { + TOKEN_TYPE_EOS = 0, + TOKEN_TYPE_LITERAL_IDENT = 1, + TOKEN_TYPE_LITERAL_STRING = 2, + TOKEN_TYPE_LITERAL_CHAR = 3, + TOKEN_TYPE_LITERAL_NUMBER = 4, + TOKEN_TYPE_LITERAL_REGEXP = 5, + TOKEN_TYPE_PUNCTUATOR_BITWISE_AND = 6, + TOKEN_TYPE_PUNCTUATOR_BITWISE_OR = 7, + TOKEN_TYPE_PUNCTUATOR_MULTIPLY = 8, + TOKEN_TYPE_PUNCTUATOR_DIVIDE = 9, + TOKEN_TYPE_PUNCTUATOR_MINUS = 10, + TOKEN_TYPE_PUNCTUATOR_EXCLAMATION_MARK = 11, + TOKEN_TYPE_PUNCTUATOR_TILDE = 12, + TOKEN_TYPE_PUNCTUATOR_MINUS_MINUS = 13, + TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT = 14, + TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT = 15, + TOKEN_TYPE_PUNCTUATOR_LESS_THAN_EQUAL = 16, + TOKEN_TYPE_PUNCTUATOR_GREATER_THAN_EQUAL = 17, + TOKEN_TYPE_PUNCTUATOR_MOD = 18, + TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR = 19, + TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION = 20, + TOKEN_TYPE_PUNCTUATOR_MULTIPLY_EQUAL = 21, + TOKEN_TYPE_PUNCTUATOR_EXPONENTIATION_EQUAL = 22, + TOKEN_TYPE_PUNCTUATOR_ARROW = 23, + TOKEN_TYPE_PUNCTUATOR_BACK_TICK = 24, + TOKEN_TYPE_PUNCTUATOR_HASH_MARK = 25, + TOKEN_TYPE_PUNCTUATOR_DIVIDE_EQUAL = 26, + TOKEN_TYPE_PUNCTUATOR_MOD_EQUAL = 27, + TOKEN_TYPE_PUNCTUATOR_MINUS_EQUAL = 28, + TOKEN_TYPE_PUNCTUATOR_LEFT_SHIFT_EQUAL = 29, + TOKEN_TYPE_PUNCTUATOR_RIGHT_SHIFT_EQUAL = 30, + TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT = 31, + TOKEN_TYPE_PUNCTUATOR_UNSIGNED_RIGHT_SHIFT_EQUAL = 32, + TOKEN_TYPE_PUNCTUATOR_BITWISE_AND_EQUAL = 33, + TOKEN_TYPE_PUNCTUATOR_BITWISE_OR_EQUAL = 34, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND_EQUAL = 35, + TOKEN_TYPE_PUNCTUATOR_NULLISH_COALESCING = 36, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR_EQUAL = 37, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_NULLISH_EQUAL = 38, + TOKEN_TYPE_PUNCTUATOR_BITWISE_XOR_EQUAL = 39, + TOKEN_TYPE_PUNCTUATOR_PLUS = 40, + TOKEN_TYPE_PUNCTUATOR_PLUS_PLUS = 41, + TOKEN_TYPE_PUNCTUATOR_PLUS_EQUAL = 42, + TOKEN_TYPE_PUNCTUATOR_LESS_THAN = 43, + TOKEN_TYPE_PUNCTUATOR_GREATER_THAN = 44, + TOKEN_TYPE_PUNCTUATOR_EQUAL = 45, + TOKEN_TYPE_PUNCTUATOR_NOT_EQUAL = 46, + TOKEN_TYPE_PUNCTUATOR_STRICT_EQUAL = 47, + TOKEN_TYPE_PUNCTUATOR_NOT_STRICT_EQUAL = 48, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_AND = 49, + TOKEN_TYPE_PUNCTUATOR_LOGICAL_OR = 50, + TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION = 51, + TOKEN_TYPE_PUNCTUATOR_QUESTION_MARK = 52, + TOKEN_TYPE_PUNCTUATOR_QUESTION_DOT = 53, + TOKEN_TYPE_PUNCTUATOR_AT = 54, + TOKEN_TYPE_PUNCTUATOR_FORMAT = 55, + TOKEN_TYPE_PUNCTUATOR_RIGHT_PARENTHESIS = 56, + TOKEN_TYPE_PUNCTUATOR_LEFT_PARENTHESIS = 57, + TOKEN_TYPE_PUNCTUATOR_RIGHT_SQUARE_BRACKET = 58, + TOKEN_TYPE_PUNCTUATOR_LEFT_SQUARE_BRACKET = 59, + TOKEN_TYPE_PUNCTUATOR_RIGHT_BRACE = 60, + TOKEN_TYPE_PUNCTUATOR_PERIOD = 61, + TOKEN_TYPE_PUNCTUATOR_PERIOD_PERIOD_PERIOD = 62, + TOKEN_TYPE_PUNCTUATOR_PERIOD_QUESTION = 63, + TOKEN_TYPE_PUNCTUATOR_LEFT_BRACE = 64, + TOKEN_TYPE_PUNCTUATOR_SEMI_COLON = 65, + TOKEN_TYPE_PUNCTUATOR_COLON = 66, + TOKEN_TYPE_PUNCTUATOR_COMMA = 67, + TOKEN_TYPE_KEYW_ABSTRACT = 68, + TOKEN_TYPE_KEYW_ANY = 69, + TOKEN_TYPE_KEYW_BUILTIN_ANY = 70, + TOKEN_TYPE_KEYW_ANYREF = 71, + TOKEN_TYPE_KEYW_ARGUMENTS = 72, + TOKEN_TYPE_KEYW_AS = 73, + TOKEN_TYPE_KEYW_ASSERTS = 74, + TOKEN_TYPE_KEYW_ASYNC = 75, + TOKEN_TYPE_KEYW_AWAIT = 76, + TOKEN_TYPE_KEYW_BIGINT = 77, + TOKEN_TYPE_KEYW_BUILTIN_BIGINT = 78, + TOKEN_TYPE_KEYW_BOOLEAN = 79, + TOKEN_TYPE_KEYW_BUILTIN_BOOLEAN = 80, + TOKEN_TYPE_KEYW_BREAK = 81, + TOKEN_TYPE_KEYW_BYTE = 82, + TOKEN_TYPE_KEYW_BUILTIN_BYTE = 83, + TOKEN_TYPE_KEYW_CASE = 84, + TOKEN_TYPE_KEYW_CATCH = 85, + TOKEN_TYPE_KEYW_CHAR = 86, + TOKEN_TYPE_KEYW_BUILTIN_CHAR = 87, + TOKEN_TYPE_KEYW_CLASS = 88, + TOKEN_TYPE_KEYW_CONST = 89, + TOKEN_TYPE_KEYW_CONSTRUCTOR = 90, + TOKEN_TYPE_KEYW_CONTINUE = 91, + TOKEN_TYPE_KEYW_DATAREF = 92, + TOKEN_TYPE_KEYW_DEBUGGER = 93, + TOKEN_TYPE_KEYW_DECLARE = 94, + TOKEN_TYPE_KEYW_DEFAULT = 95, + TOKEN_TYPE_KEYW_DELETE = 96, + TOKEN_TYPE_KEYW_DO = 97, + TOKEN_TYPE_KEYW_DOUBLE = 98, + TOKEN_TYPE_KEYW_BUILTIN_DOUBLE = 99, + TOKEN_TYPE_KEYW_ELSE = 100, + TOKEN_TYPE_KEYW_ENUM = 101, + TOKEN_TYPE_KEYW_EQREF = 102, + TOKEN_TYPE_KEYW_EVAL = 103, + TOKEN_TYPE_KEYW_EXPORT = 104, + TOKEN_TYPE_KEYW_EXTENDS = 105, + TOKEN_TYPE_KEYW_EXTERNREF = 106, + TOKEN_TYPE_KEYW_F32 = 107, + TOKEN_TYPE_KEYW_F64 = 108, + TOKEN_TYPE_LITERAL_FALSE = 109, + TOKEN_TYPE_KEYW_FINALLY = 110, + TOKEN_TYPE_KEYW_FLOAT = 111, + TOKEN_TYPE_KEYW_BUILTIN_FLOAT = 112, + TOKEN_TYPE_KEYW_FOR = 113, + TOKEN_TYPE_KEYW_FROM = 114, + TOKEN_TYPE_KEYW_FUNCREF = 115, + TOKEN_TYPE_KEYW_FUNCTION = 116, + TOKEN_TYPE_KEYW_GET = 117, + TOKEN_TYPE_KEYW_GLOBAL = 118, + TOKEN_TYPE_KEYW_I8 = 119, + TOKEN_TYPE_KEYW_I16 = 120, + TOKEN_TYPE_KEYW_I31REF = 121, + TOKEN_TYPE_KEYW_I32 = 122, + TOKEN_TYPE_KEYW_I64 = 123, + TOKEN_TYPE_KEYW_IF = 124, + TOKEN_TYPE_KEYW_IMPLEMENTS = 125, + TOKEN_TYPE_KEYW_IMPORT = 126, + TOKEN_TYPE_KEYW_IN = 127, + TOKEN_TYPE_KEYW_INFER = 128, + TOKEN_TYPE_KEYW_INIT_MODULE = 129, + TOKEN_TYPE_KEYW_INSTANCEOF = 130, + TOKEN_TYPE_KEYW_INT = 131, + TOKEN_TYPE_KEYW_BUILTIN_INT = 132, + TOKEN_TYPE_KEYW_INTERFACE = 133, + TOKEN_TYPE_KEYW_IS = 134, + TOKEN_TYPE_KEYW_ISIZE = 135, + TOKEN_TYPE_KEYW_KEYOF = 136, + TOKEN_TYPE_KEYW_LET = 137, + TOKEN_TYPE_KEYW_LONG = 138, + TOKEN_TYPE_KEYW_BUILTIN_LONG = 139, + TOKEN_TYPE_KEYW_META = 140, + TOKEN_TYPE_KEYW_MODULE = 141, + TOKEN_TYPE_KEYW_NAMESPACE = 142, + TOKEN_TYPE_KEYW_NATIVE = 143, + TOKEN_TYPE_KEYW_NEVER = 144, + TOKEN_TYPE_KEYW_NEW = 145, + TOKEN_TYPE_KEYW_NON_NULLABLE = 146, + TOKEN_TYPE_LITERAL_NULL = 147, + TOKEN_TYPE_KEYW_NUMBER = 148, + TOKEN_TYPE_KEYW_OBJECT = 149, + TOKEN_TYPE_KEYW_BUILTIN_OBJECT = 150, + TOKEN_TYPE_KEYW_OF = 151, + TOKEN_TYPE_KEYW_FINAL = 152, + TOKEN_TYPE_KEYW_OUT = 153, + TOKEN_TYPE_KEYW_OVERLOAD = 154, + TOKEN_TYPE_KEYW_OVERRIDE = 155, + TOKEN_TYPE_KEYW_PACKAGE = 156, + TOKEN_TYPE_KEYW_INTERNAL = 157, + TOKEN_TYPE_KEYW_PRIVATE = 158, + TOKEN_TYPE_KEYW_PROTECTED = 159, + TOKEN_TYPE_KEYW_PUBLIC = 160, + TOKEN_TYPE_KEYW_READONLY = 161, + TOKEN_TYPE_KEYW_RETURN = 162, + TOKEN_TYPE_KEYW_REQUIRE = 163, + TOKEN_TYPE_KEYW_SET = 164, + TOKEN_TYPE_KEYW_SHORT = 165, + TOKEN_TYPE_KEYW_BUILTIN_SHORT = 166, + TOKEN_TYPE_KEYW_STATIC = 167, + TOKEN_TYPE_KEYW_STRING = 168, + TOKEN_TYPE_KEYW_BUILTIN_STRING = 169, + TOKEN_TYPE_KEYW_STRUCT = 170, + TOKEN_TYPE_KEYW_SUPER = 171, + TOKEN_TYPE_KEYW_SWITCH = 172, + TOKEN_TYPE_KEYW_TARGET = 173, + TOKEN_TYPE_KEYW_THIS = 174, + TOKEN_TYPE_KEYW_THROW = 175, + TOKEN_TYPE_LITERAL_TRUE = 176, + TOKEN_TYPE_KEYW_TRY = 177, + TOKEN_TYPE_KEYW_TYPE = 178, + TOKEN_TYPE_KEYW_TYPEOF = 179, + TOKEN_TYPE_KEYW_U8 = 180, + TOKEN_TYPE_KEYW_U16 = 181, + TOKEN_TYPE_KEYW_U32 = 182, + TOKEN_TYPE_KEYW_U64 = 183, + TOKEN_TYPE_KEYW_UNDEFINED = 184, + TOKEN_TYPE_KEYW_UNKNOWN = 185, + TOKEN_TYPE_KEYW_USIZE = 186, + TOKEN_TYPE_KEYW_V128 = 187, + TOKEN_TYPE_KEYW_VAR = 188, + TOKEN_TYPE_KEYW_VOID = 189, + TOKEN_TYPE_KEYW_WHILE = 190, + TOKEN_TYPE_KEYW_WITH = 191, + TOKEN_TYPE_KEYW_YIELD = 192, + TOKEN_TYPE_FIRST_PUNCTUATOR = 6, + TOKEN_TYPE_FIRST_KEYW = 68 +} +export enum Es2pandaAstNodeFlags { + AST_NODE_FLAGS_NO_OPTS = 0, + AST_NODE_FLAGS_CHECKCAST = 1, + AST_NODE_FLAGS_ALLOW_REQUIRED_INSTANTIATION = 2, + AST_NODE_FLAGS_HAS_EXPORT_ALIAS = 4, + AST_NODE_FLAGS_GENERATE_VALUE_OF = 8, + AST_NODE_FLAGS_RECHECK = 16, + AST_NODE_FLAGS_NOCLEANUP = 32, + AST_NODE_FLAGS_RESIZABLE_REST = 64, + AST_NODE_FLAGS_TMP_CONVERT_PRIMITIVE_CAST_METHOD_CALL = 128, + AST_NODE_FLAGS_IS_GROUPED = 256 +} +export enum Es2pandaModifierFlags { + MODIFIER_FLAGS_NONE = 0, + MODIFIER_FLAGS_STATIC = 1, + MODIFIER_FLAGS_ASYNC = 2, + MODIFIER_FLAGS_PUBLIC = 4, + MODIFIER_FLAGS_PROTECTED = 8, + MODIFIER_FLAGS_PRIVATE = 16, + MODIFIER_FLAGS_DECLARE = 32, + MODIFIER_FLAGS_READONLY = 64, + MODIFIER_FLAGS_OPTIONAL = 128, + MODIFIER_FLAGS_DEFINITE = 256, + MODIFIER_FLAGS_ABSTRACT = 512, + MODIFIER_FLAGS_CONST = 1024, + MODIFIER_FLAGS_FINAL = 2048, + MODIFIER_FLAGS_NATIVE = 4096, + MODIFIER_FLAGS_OVERRIDE = 8192, + MODIFIER_FLAGS_CONSTRUCTOR = 16384, + MODIFIER_FLAGS_SYNCHRONIZED = 32768, + MODIFIER_FLAGS_FUNCTIONAL = 65536, + MODIFIER_FLAGS_IN = 131072, + MODIFIER_FLAGS_OUT = 262144, + MODIFIER_FLAGS_INTERNAL = 524288, + MODIFIER_FLAGS_EXPORT = 1048576, + MODIFIER_FLAGS_GETTER = 2097152, + MODIFIER_FLAGS_SETTER = 4194304, + MODIFIER_FLAGS_DEFAULT_EXPORT = 8388608, + MODIFIER_FLAGS_EXPORT_TYPE = 16777216, + MODIFIER_FLAGS_SUPER_OWNER = 33554432, + MODIFIER_FLAGS_ANNOTATION_DECLARATION = 67108864, + MODIFIER_FLAGS_ANNOTATION_USAGE = 134217728, + MODIFIER_FLAGS_READONLY_PARAMETER = 268435456, + MODIFIER_FLAGS_ARRAY_SETTER = 536870912, + MODIFIER_FLAGS_DEFAULT = 1073741824, + MODIFIER_FLAGS_ACCESS = 524316, + MODIFIER_FLAGS_ALL = 524927, + MODIFIER_FLAGS_ALLOWED_IN_CTOR_PARAMETER = 524380, + MODIFIER_FLAGS_INTERNAL_PROTECTED = 524296, + MODIFIER_FLAGS_ACCESSOR_MODIFIERS = 2560, + MODIFIER_FLAGS_GETTER_SETTER = 6291456, + MODIFIER_FLAGS_EXPORTED = 26214400 +} +export enum Es2pandaPrivateFieldKind { + PRIVATE_FIELD_KIND_FIELD = 0, + PRIVATE_FIELD_KIND_METHOD = 1, + PRIVATE_FIELD_KIND_GET = 2, + PRIVATE_FIELD_KIND_SET = 3, + PRIVATE_FIELD_KIND_STATIC_FIELD = 4, + PRIVATE_FIELD_KIND_STATIC_METHOD = 5, + PRIVATE_FIELD_KIND_STATIC_GET = 6, + PRIVATE_FIELD_KIND_STATIC_SET = 7, + PRIVATE_FIELD_KIND_OVERLOAD = 8, + PRIVATE_FIELD_KIND_STATIC_OVERLOAD = 9 +} +export enum Es2pandaScriptFunctionFlags { + SCRIPT_FUNCTION_FLAGS_NONE = 0, + SCRIPT_FUNCTION_FLAGS_GENERATOR = 1, + SCRIPT_FUNCTION_FLAGS_ASYNC = 2, + SCRIPT_FUNCTION_FLAGS_ARROW = 4, + SCRIPT_FUNCTION_FLAGS_EXPRESSION = 8, + SCRIPT_FUNCTION_FLAGS_OVERLOAD = 16, + SCRIPT_FUNCTION_FLAGS_CONSTRUCTOR = 32, + SCRIPT_FUNCTION_FLAGS_METHOD = 64, + SCRIPT_FUNCTION_FLAGS_STATIC_BLOCK = 128, + SCRIPT_FUNCTION_FLAGS_HIDDEN = 256, + SCRIPT_FUNCTION_FLAGS_IMPLICIT_SUPER_CALL_NEEDED = 512, + SCRIPT_FUNCTION_FLAGS_ENUM = 1024, + SCRIPT_FUNCTION_FLAGS_EXTERNAL = 2048, + SCRIPT_FUNCTION_FLAGS_PROXY = 4096, + SCRIPT_FUNCTION_FLAGS_THROWS = 8192, + SCRIPT_FUNCTION_FLAGS_RETHROWS = 16384, + SCRIPT_FUNCTION_FLAGS_GETTER = 32768, + SCRIPT_FUNCTION_FLAGS_SETTER = 65536, + SCRIPT_FUNCTION_FLAGS_ENTRY_POINT = 131072, + SCRIPT_FUNCTION_FLAGS_HAS_RETURN = 262144, + SCRIPT_FUNCTION_FLAGS_ASYNC_IMPL = 524288, + SCRIPT_FUNCTION_FLAGS_EXTERNAL_OVERLOAD = 1048576, + SCRIPT_FUNCTION_FLAGS_HAS_THROW = 2097152, + SCRIPT_FUNCTION_FLAGS_IN_RECORD = 4194304, + SCRIPT_FUNCTION_FLAGS_TRAILING_LAMBDA = 8388608, + SCRIPT_FUNCTION_FLAGS_SYNTHETIC = 16777216 +} +export enum Es2pandaTSOperatorType { + TS_OPERATOR_TYPE_READONLY = 0, + TS_OPERATOR_TYPE_KEYOF = 1, + TS_OPERATOR_TYPE_UNIQUE = 2 +} +export enum Es2pandaMappedOption { + MAPPED_OPTION_NO_OPTS = 0, + MAPPED_OPTION_PLUS = 1, + MAPPED_OPTION_MINUS = 2 +} +export enum Es2pandaClassDefinitionModifiers { + CLASS_DEFINITION_MODIFIERS_NONE = 0, + CLASS_DEFINITION_MODIFIERS_DECLARATION = 1, + CLASS_DEFINITION_MODIFIERS_ID_REQUIRED = 2, + CLASS_DEFINITION_MODIFIERS_GLOBAL = 4, + CLASS_DEFINITION_MODIFIERS_HAS_SUPER = 8, + CLASS_DEFINITION_MODIFIERS_SET_CTOR_ID = 16, + CLASS_DEFINITION_MODIFIERS_EXTERN = 32, + CLASS_DEFINITION_MODIFIERS_ANONYMOUS = 64, + CLASS_DEFINITION_MODIFIERS_GLOBAL_INITIALIZED = 128, + CLASS_DEFINITION_MODIFIERS_CLASS_DECL = 256, + CLASS_DEFINITION_MODIFIERS_INNER = 512, + CLASS_DEFINITION_MODIFIERS_FROM_EXTERNAL = 1024, + CLASS_DEFINITION_MODIFIERS_LOCAL = 2048, + CLASS_DEFINITION_MODIFIERS_CLASSDEFINITION_CHECKED = 4096, + CLASS_DEFINITION_MODIFIERS_NAMESPACE_TRANSFORMED = 8192, + CLASS_DEFINITION_MODIFIERS_STRING_ENUM_TRANSFORMED = 16384, + CLASS_DEFINITION_MODIFIERS_INT_ENUM_TRANSFORMED = 32768, + CLASS_DEFINITION_MODIFIERS_FROM_STRUCT = 65536, + CLASS_DEFINITION_MODIFIERS_FUNCTIONAL_REFERENCE = 131072, + CLASS_DEFINITION_MODIFIERS_LAZY_IMPORT_OBJECT_CLASS = 262144, + CLASS_DEFINITION_MODIFIERS_INIT_IN_CCTOR = 524288, + CLASS_DEFINITION_MODIFIERS_DECLARATION_ID_REQUIRED = 3, + CLASS_DEFINITION_MODIFIERS_ETS_MODULE = 8196 +} +export enum Es2pandaOperandKind { + OPERAND_KIND_SRC_VREG = 0, + OPERAND_KIND_DST_VREG = 1, + OPERAND_KIND_SRC_DST_VREG = 2, + OPERAND_KIND_IMM = 3, + OPERAND_KIND_ID = 4, + OPERAND_KIND_STRING_ID = 5, + OPERAND_KIND_LABEL = 6 +} +export enum Es2pandaOperandType { + OPERAND_TYPE_REF = 0, + OPERAND_TYPE_B32 = 1, + OPERAND_TYPE_B64 = 2, + OPERAND_TYPE_ANY = 3, + OPERAND_TYPE_NONE = 4 +} +export enum Es2pandaTypeRelationFlag { + TYPE_RELATION_FLAG_NONE = 0, + TYPE_RELATION_FLAG_WIDENING = 1, + TYPE_RELATION_FLAG_BOXING = 2, + TYPE_RELATION_FLAG_UNBOXING = 4, + TYPE_RELATION_FLAG_CAPTURE = 8, + TYPE_RELATION_FLAG_STRING = 16, + TYPE_RELATION_FLAG_VALUE_SET = 32, + TYPE_RELATION_FLAG_UNCHECKED = 64, + TYPE_RELATION_FLAG_NO_THROW = 128, + TYPE_RELATION_FLAG_SELF_REFERENCE = 256, + TYPE_RELATION_FLAG_NO_RETURN_TYPE_CHECK = 512, + TYPE_RELATION_FLAG_DIRECT_RETURN = 1024, + TYPE_RELATION_FLAG_NO_WIDENING = 2048, + TYPE_RELATION_FLAG_NO_BOXING = 4096, + TYPE_RELATION_FLAG_NO_UNBOXING = 8192, + TYPE_RELATION_FLAG_ONLY_CHECK_WIDENING = 16384, + TYPE_RELATION_FLAG_ONLY_CHECK_BOXING_UNBOXING = 32768, + TYPE_RELATION_FLAG_IN_ASSIGNMENT_CONTEXT = 65536, + TYPE_RELATION_FLAG_IN_CASTING_CONTEXT = 131072, + TYPE_RELATION_FLAG_UNCHECKED_CAST = 262144, + TYPE_RELATION_FLAG_IGNORE_TYPE_PARAMETERS = 524288, + TYPE_RELATION_FLAG_CHECK_PROXY = 1048576, + TYPE_RELATION_FLAG_NO_CHECK_TRAILING_LAMBDA = 2097152, + TYPE_RELATION_FLAG_NO_THROW_GENERIC_TYPEALIAS = 4194304, + TYPE_RELATION_FLAG_OVERRIDING_CONTEXT = 8388608, + TYPE_RELATION_FLAG_IGNORE_REST_PARAM = 16777216, + TYPE_RELATION_FLAG_STRING_TO_CHAR = 33554432, + TYPE_RELATION_FLAG_OVERLOADING_CONTEXT = 67108864, + TYPE_RELATION_FLAG_NO_SUBSTITUTION_NEEDED = 134217728, + TYPE_RELATION_FLAG_ASSIGNMENT_CONTEXT = 7, + TYPE_RELATION_FLAG_BRIDGE_CHECK = 8912896, + TYPE_RELATION_FLAG_CASTING_CONTEXT = 262151 +} +export enum Es2pandaRelationResult { + RELATION_RESULT_TRUE = 0, + RELATION_RESULT_FALSE = 1, + RELATION_RESULT_UNKNOWN = 2, + RELATION_RESULT_MAYBE = 3, + RELATION_RESULT_CACHE_MISS = 4, + RELATION_RESULT_ERROR = 5 +} +export enum Es2pandaRelationType { + RELATION_TYPE_COMPARABLE = 0, + RELATION_TYPE_ASSIGNABLE = 1, + RELATION_TYPE_IDENTICAL = 2, + RELATION_TYPE_UNCHECKED_CASTABLE = 3, + RELATION_TYPE_SUPERTYPE = 4 +} +export enum Es2pandaVarianceFlag { + VARIANCE_FLAG_COVARIANT = 0, + VARIANCE_FLAG_CONTRAVARIANT = 1, + VARIANCE_FLAG_INVARIANT = 2 +} +export enum Es2pandaImportKinds { + IMPORT_KINDS_ALL = 0, + IMPORT_KINDS_TYPES = 1 +} +export enum Es2pandaPropertyKind { + PROPERTY_KIND_INIT = 0, + PROPERTY_KIND_GET = 1, + PROPERTY_KIND_SET = 2, + PROPERTY_KIND_PROTO = 3 +} +export enum Es2pandaConstant { + CONSTANT_PROP_NULL = 0, + CONSTANT_PROP_UNDEFINED = 1, + CONSTANT_EMPTY_ARRAY = 2 +} +export enum Es2pandaTSSignatureDeclarationKind { + TS_SIGNATURE_DECLARATION_KIND_CALL_SIGNATURE = 0, + TS_SIGNATURE_DECLARATION_KIND_CONSTRUCT_SIGNATURE = 1 +} +export enum Es2pandaInitMode { + INIT_MODE_NONE = 0, + INIT_MODE_IMMEDIATE_INIT = 1, + INIT_MODE_NEED_INIT_IN_STATIC_BLOCK = 2 +} +export enum Es2pandaTSIndexSignatureKind { + TS_INDEX_SIGNATURE_KIND_NUMBER = 0, + TS_INDEX_SIGNATURE_KIND_STRING = 1 +} +export enum Es2pandaEnumLiteralTypeKind { + ENUM_LITERAL_TYPE_KIND_NUMERIC = 0, + ENUM_LITERAL_TYPE_KIND_LITERAL = 1 +} +export enum Es2pandaIdentifierFlags { + IDENTIFIER_FLAGS_NONE = 0, + IDENTIFIER_FLAGS_OPTIONAL = 1, + IDENTIFIER_FLAGS_TDZ = 2, + IDENTIFIER_FLAGS_PRIVATE = 4, + IDENTIFIER_FLAGS_GET = 8, + IDENTIFIER_FLAGS_SET = 16, + IDENTIFIER_FLAGS_IGNORE_BOX = 32, + IDENTIFIER_FLAGS_ANNOTATIONDECL = 64, + IDENTIFIER_FLAGS_ANNOTATIONUSAGE = 128, + IDENTIFIER_FLAGS_ERROR_PLACEHOLDER = 256 +} +export enum Es2pandaMemberExpressionKind { + MEMBER_EXPRESSION_KIND_NONE = 0, + MEMBER_EXPRESSION_KIND_ELEMENT_ACCESS = 1, + MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS = 2, + MEMBER_EXPRESSION_KIND_GETTER = 4, + MEMBER_EXPRESSION_KIND_SETTER = 8, + MEMBER_EXPRESSION_KIND_EXTENSION_ACCESSOR = 16 +} +export enum Es2pandaTSTupleKind { + TS_TUPLE_KIND_NONE = 0, + TS_TUPLE_KIND_NAMED = 1, + TS_TUPLE_KIND_DEFAULT = 2 +} +export enum Es2pandaMetaPropertyKind { + META_PROPERTY_KIND_NEW_TARGET = 0, + META_PROPERTY_KIND_IMPORT_META = 1 +} +export enum Es2pandaModuleFlag { + MODULE_FLAG_NONE = 0, + MODULE_FLAG_ETSSCRIPT = 1, + MODULE_FLAG_NAMESPACE = 2, + MODULE_FLAG_NAMESPACE_CHAIN_LAST_NODE = 4 +} +export enum Es2pandaElementFlags { + ELEMENT_FLAGS_NO_OPTS = 0, + ELEMENT_FLAGS_REQUIRED = 1, + ELEMENT_FLAGS_OPTIONAL = 2, + ELEMENT_FLAGS_REST = 4, + ELEMENT_FLAGS_VARIADIC = 8, + ELEMENT_FLAGS_FIXED = 3, + ELEMENT_FLAGS_VARIABLE = 12, + ELEMENT_FLAGS_NON_REQUIRED = 14, + ELEMENT_FLAGS_NON_REST = 11 +} +export enum Es2pandaSignatureFlags { + SIGNATURE_FLAGS_NO_OPTS = 0, + SIGNATURE_FLAGS_ABSTRACT = 1, + SIGNATURE_FLAGS_CALL = 2, + SIGNATURE_FLAGS_CONSTRUCT = 4, + SIGNATURE_FLAGS_PUBLIC = 8, + SIGNATURE_FLAGS_PROTECTED = 16, + SIGNATURE_FLAGS_PRIVATE = 32, + SIGNATURE_FLAGS_STATIC = 64, + SIGNATURE_FLAGS_FINAL = 128, + SIGNATURE_FLAGS_CONSTRUCTOR = 256, + SIGNATURE_FLAGS_PROXY = 512, + SIGNATURE_FLAGS_INTERNAL = 1024, + SIGNATURE_FLAGS_NEED_RETURN_TYPE = 2048, + SIGNATURE_FLAGS_INFERRED_RETURN_TYPE = 4096, + SIGNATURE_FLAGS_THIS_RETURN_TYPE = 8192, + SIGNATURE_FLAGS_GETTER = 16384, + SIGNATURE_FLAGS_SETTER = 32768, + SIGNATURE_FLAGS_THROWS = 65536, + SIGNATURE_FLAGS_RETHROWS = 131072, + SIGNATURE_FLAGS_EXTENSION_FUNCTION = 262144, + SIGNATURE_FLAGS_DUPLICATE_ASM = 524288, + SIGNATURE_FLAGS_BRIDGE = 1048576, + SIGNATURE_FLAGS_DEFAULT = 2097152, + SIGNATURE_FLAGS_INTERNAL_PROTECTED = 1040, + SIGNATURE_FLAGS_GETTER_OR_SETTER = 49152, + SIGNATURE_FLAGS_THROWING = 196608 +} +export enum Es2pandaPrimitiveType { + PRIMITIVE_TYPE_BYTE = 0, + PRIMITIVE_TYPE_INT = 1, + PRIMITIVE_TYPE_LONG = 2, + PRIMITIVE_TYPE_SHORT = 3, + PRIMITIVE_TYPE_FLOAT = 4, + PRIMITIVE_TYPE_DOUBLE = 5, + PRIMITIVE_TYPE_BOOLEAN = 6, + PRIMITIVE_TYPE_CHAR = 7, + PRIMITIVE_TYPE_VOID = 8 +} +export enum Es2pandaIntrinsicNodeType { + INTRINSIC_NODE_TYPE_NONE = 0, + INTRINSIC_NODE_TYPE_TYPE_REFERENCE = 1 +} +export enum Es2pandaObjectFlags { + OBJECT_FLAGS_NO_OPTS = 0, + OBJECT_FLAGS_CHECK_EXCESS_PROPS = 1, + OBJECT_FLAGS_RESOLVED_MEMBERS = 2, + OBJECT_FLAGS_RESOLVED_BASE_TYPES = 4, + OBJECT_FLAGS_RESOLVED_DECLARED_MEMBERS = 8 +} +export enum Es2pandaObjectTypeKind { + OBJECT_TYPE_KIND_LITERAL = 0, + OBJECT_TYPE_KIND_CLASS = 1, + OBJECT_TYPE_KIND_INTERFACE = 2, + OBJECT_TYPE_KIND_TUPLE = 3, + OBJECT_TYPE_KIND_FUNCTION = 4 +} +export enum Es2pandaVariableDeclaratorFlag { + VARIABLE_DECLARATOR_FLAG_LET = 0, + VARIABLE_DECLARATOR_FLAG_CONST = 1, + VARIABLE_DECLARATOR_FLAG_VAR = 2, + VARIABLE_DECLARATOR_FLAG_UNKNOWN = 3 +} +export enum Es2pandaTypeFacts { + TYPE_FACTS_NONE = 0, + TYPE_FACTS_TYPEOF_EQ_STRING = 1, + TYPE_FACTS_TYPEOF_EQ_NUMBER = 2, + TYPE_FACTS_TYPEOF_EQ_BIGINT = 4, + TYPE_FACTS_TYPEOF_EQ_BOOLEAN = 8, + TYPE_FACTS_TYPEOF_EQ_SYMBOL = 16, + TYPE_FACTS_TYPEOF_EQ_OBJECT = 32, + TYPE_FACTS_TYPEOF_EQ_FUNCTION = 64, + TYPE_FACTS_TYPEOF_EQ_HOST_OBJECT = 128, + TYPE_FACTS_TYPEOF_NE_STRING = 256, + TYPE_FACTS_TYPEOF_NE_NUMBER = 512, + TYPE_FACTS_TYPEOF_NE_BIGINT = 1024, + TYPE_FACTS_TYPEOF_NE_BOOLEAN = 2048, + TYPE_FACTS_TYPEOF_NE_SYMBOL = 4096, + TYPE_FACTS_TYPEOF_NE_OBJECT = 8192, + TYPE_FACTS_TYPEOF_NE_FUNCTION = 16384, + TYPE_FACTS_TYPEOF_NE_HOST_OBJECT = 32768, + TYPE_FACTS_EQ_UNDEFINED = 65536, + TYPE_FACTS_EQ_NULL = 131072, + TYPE_FACTS_EQ_UNDEFINED_OR_NULL = 262144, + TYPE_FACTS_NE_UNDEFINED = 524288, + TYPE_FACTS_NE_NULL = 1048576, + TYPE_FACTS_NE_UNDEFINED_OR_NULL = 2097152, + TYPE_FACTS_TRUTHY = 4194304, + TYPE_FACTS_FALSY = 8388608, + TYPE_FACTS_ALL = 16777216, + TYPE_FACTS_LAST = 8388608, + TYPE_FACTS_BASE_NUMBER_STRICT_FACTS = 3734786, + TYPE_FACTS_BASE_NUMBER_FACTS = 12582146, + TYPE_FACTS_NUMBER_FACTS = 16776450, + TYPE_FACTS_ZERO_NUMBER_STRICT_FACTS = 12123394, + TYPE_FACTS_ZERO_NUMBER_FACTS = 12582146, + TYPE_FACTS_NON_ZERO_NUMBER_FACTS = 16776450, + TYPE_FACTS_BASE_STRING_STRICT_FACTS = 3735041, + TYPE_FACTS_BASE_STRING_FACTS = 12582401, + TYPE_FACTS_STRING_FACTS = 16776705, + TYPE_FACTS_EMPTY_STRING_STRICT_FACTS = 16317953, + TYPE_FACTS_EMPTY_STRING_FACTS = 12582401, + TYPE_FACTS_NON_EMPTY_STRING_FACTS = 16776705, + TYPE_FACTS_BASE_BIGINT_STRICT_FACTS = 3734276, + TYPE_FACTS_BASE_BIGINT_FACTS = 12581636, + TYPE_FACTS_BIGINT_FACTS = 16775940, + TYPE_FACTS_ZERO_BIGINT_STRICT_FACTS = 12122884, + TYPE_FACTS_ZERO_BIGINT_FACTS = 12581636, + TYPE_FACTS_NON_ZERO_BIGINT_FACTS = 16775940, + TYPE_FACTS_BASE_BOOLEAN_STRICT_FACTS = 3733256, + TYPE_FACTS_BASE_BOOLEAN_FACTS = 12580616, + TYPE_FACTS_BOOLEAN_FACTS = 16774920, + TYPE_FACTS_FALSE_STRICT_FACTS = 12121864, + TYPE_FACTS_FALSE_FACTS = 12580616, + TYPE_FACTS_TRUE_STRICT_FACTS = 7927560, + TYPE_FACTS_TRUE_FACTS = 16774920, + TYPE_FACTS_OBJECT_STRICT_FACTS = 7888800, + TYPE_FACTS_OBJECT_FACTS = 16736160, + TYPE_FACTS_EMPTY_OBJECT_FACTS = 16777216, + TYPE_FACTS_FUNCTION_STRICT_FACTS = 7880640, + TYPE_FACTS_FUNCTION_FACTS = 16728000, + TYPE_FACTS_UNDEFINED_FACTS = 9830144, + TYPE_FACTS_NULL_FACTS = 9363232 +} +export enum Es2pandaGlobalTypeId { + GLOBAL_TYPE_ID_NUMBER = 0, + GLOBAL_TYPE_ID_ANY = 1, + GLOBAL_TYPE_ID_STRING = 2, + GLOBAL_TYPE_ID_BOOLEAN = 3, + GLOBAL_TYPE_ID_VOID = 4, + GLOBAL_TYPE_ID_NULL_ID = 5, + GLOBAL_TYPE_ID_UNDEFINED = 6, + GLOBAL_TYPE_ID_UNKNOWN = 7, + GLOBAL_TYPE_ID_NEVER = 8, + GLOBAL_TYPE_ID_NON_PRIMITIVE = 9, + GLOBAL_TYPE_ID_BIGINT = 10, + GLOBAL_TYPE_ID_FALSE_ID = 11, + GLOBAL_TYPE_ID_TRUE_ID = 12, + GLOBAL_TYPE_ID_NUMBER_OR_BIGINT = 13, + GLOBAL_TYPE_ID_STRING_OR_NUMBER = 14, + GLOBAL_TYPE_ID_ZERO = 15, + GLOBAL_TYPE_ID_EMPTY_STRING = 16, + GLOBAL_TYPE_ID_ZERO_BIGINT = 17, + GLOBAL_TYPE_ID_PRIMITIVE = 18, + GLOBAL_TYPE_ID_EMPTY_TUPLE = 19, + GLOBAL_TYPE_ID_EMPTY_OBJECT = 20, + GLOBAL_TYPE_ID_RESOLVING_RETURN_TYPE = 21, + GLOBAL_TYPE_ID_ERROR_TYPE = 22, + GLOBAL_TYPE_ID_BYTE = 23, + GLOBAL_TYPE_ID_SHORT = 24, + GLOBAL_TYPE_ID_INT = 25, + GLOBAL_TYPE_ID_LONG = 26, + GLOBAL_TYPE_ID_FLOAT = 27, + GLOBAL_TYPE_ID_DOUBLE = 28, + GLOBAL_TYPE_ID_CHAR = 29, + GLOBAL_TYPE_ID_ETS_BOOLEAN = 30, + GLOBAL_TYPE_ID_ETS_STRING = 31, + GLOBAL_TYPE_ID_ETS_VOID = 32, + GLOBAL_TYPE_ID_ETS_OBJECT_BUILTIN = 33, + GLOBAL_TYPE_ID_ETS_NULL = 34, + GLOBAL_TYPE_ID_ETS_UNDEFINED = 35, + GLOBAL_TYPE_ID_ETS_UNION_UNDEFINED_NULL = 36, + GLOBAL_TYPE_ID_ETS_ANY = 37, + GLOBAL_TYPE_ID_ETS_RELAXED_ANY = 38, + GLOBAL_TYPE_ID_ETS_NEVER = 39, + GLOBAL_TYPE_ID_ETS_UNION_UNDEFINED_NULL_OBJECT = 40, + GLOBAL_TYPE_ID_ETS_WILDCARD = 41, + GLOBAL_TYPE_ID_ETS_BOOLEAN_BUILTIN = 42, + GLOBAL_TYPE_ID_ETS_BYTE_BUILTIN = 43, + GLOBAL_TYPE_ID_ETS_CLASS_BUILTIN = 44, + GLOBAL_TYPE_ID_ETS_CHAR_BUILTIN = 45, + GLOBAL_TYPE_ID_ETS_COMPARABLE_BUILTIN = 46, + GLOBAL_TYPE_ID_ETS_CONSOLE_BUILTIN = 47, + GLOBAL_TYPE_ID_ETS_DATE_BUILTIN = 48, + GLOBAL_TYPE_ID_ETS_DOUBLE_BUILTIN = 49, + GLOBAL_TYPE_ID_ETS_EXCEPTION_BUILTIN = 50, + GLOBAL_TYPE_ID_ETS_FLOAT_BUILTIN = 51, + GLOBAL_TYPE_ID_ETS_FLOATING_BUILTIN = 52, + GLOBAL_TYPE_ID_ETS_INT_BUILTIN = 53, + GLOBAL_TYPE_ID_ETS_INTEGRAL_BUILTIN = 54, + GLOBAL_TYPE_ID_ETS_LONG_BUILTIN = 55, + GLOBAL_TYPE_ID_ETS_NUMERIC_BUILTIN = 56, + GLOBAL_TYPE_ID_ETS_MAP_BUILTIN = 57, + GLOBAL_TYPE_ID_ETS_RECORD_BUILTIN = 58, + GLOBAL_TYPE_ID_ETS_ERROR_BUILTIN = 59, + GLOBAL_TYPE_ID_ETS_RUNTIME_BUILTIN = 60, + GLOBAL_TYPE_ID_ETS_RUNTIME_LINKER_BUILTIN = 61, + GLOBAL_TYPE_ID_ETS_SET_BUILTIN = 62, + GLOBAL_TYPE_ID_ETS_SHORT_BUILTIN = 63, + GLOBAL_TYPE_ID_ETS_STACK_TRACE_ELEMENT_BUILTIN = 64, + GLOBAL_TYPE_ID_ETS_STACK_TRACE_BUILTIN = 65, + GLOBAL_TYPE_ID_ETS_ARRAY_INDEX_OUT_OF_BOUNDS_ERROR_BUILTIN = 66, + GLOBAL_TYPE_ID_ETS_ARITHMETIC_ERROR_BUILTIN = 67, + GLOBAL_TYPE_ID_ETS_CLASS_CAST_ERROR_BUILTIN = 68, + GLOBAL_TYPE_ID_ETS_ASSERTION_ERROR_BUILTIN = 69, + GLOBAL_TYPE_ID_ETS_DIVIDE_BY_ZERO_ERROR_BUILTIN = 70, + GLOBAL_TYPE_ID_ETS_NULL_POINTER_ERROR_BUILTIN = 71, + GLOBAL_TYPE_ID_ETS_UNCAUGHT_EXCEPTION_ERROR_BUILTIN = 72, + GLOBAL_TYPE_ID_ETS_STRING_BUILTIN = 73, + GLOBAL_TYPE_ID_ETS_STRING_BUILDER_BUILTIN = 74, + GLOBAL_TYPE_ID_ETS_TYPE_BUILTIN = 75, + GLOBAL_TYPE_ID_ETS_TYPES_BUILTIN = 76, + GLOBAL_TYPE_ID_ETS_PROMISE_BUILTIN = 77, + GLOBAL_TYPE_ID_ETS_FUNCTION_BUILTIN = 78, + GLOBAL_TYPE_ID_ETS_REGEXP_BUILTIN = 79, + GLOBAL_TYPE_ID_ETS_ARRAY_BUILTIN = 80, + GLOBAL_TYPE_ID_ETS_INTEROP_JSRUNTIME_BUILTIN = 81, + GLOBAL_TYPE_ID_ETS_INTEROP_JSVALUE_BUILTIN = 82, + GLOBAL_TYPE_ID_ETS_BOX_BUILTIN = 83, + GLOBAL_TYPE_ID_ETS_BOOLEAN_BOX_BUILTIN = 84, + GLOBAL_TYPE_ID_ETS_BYTE_BOX_BUILTIN = 85, + GLOBAL_TYPE_ID_ETS_CHAR_BOX_BUILTIN = 86, + GLOBAL_TYPE_ID_ETS_SHORT_BOX_BUILTIN = 87, + GLOBAL_TYPE_ID_ETS_INT_BOX_BUILTIN = 88, + GLOBAL_TYPE_ID_ETS_LONG_BOX_BUILTIN = 89, + GLOBAL_TYPE_ID_ETS_FLOAT_BOX_BUILTIN = 90, + GLOBAL_TYPE_ID_ETS_DOUBLE_BOX_BUILTIN = 91, + GLOBAL_TYPE_ID_ETS_BIG_INT_BUILTIN = 92, + GLOBAL_TYPE_ID_ETS_BIG_INT = 93, + GLOBAL_TYPE_ID_ETS_ARRAY = 94, + GLOBAL_TYPE_ID_ETS_READONLY_ARRAY = 95, + GLOBAL_TYPE_ID_ETS_FUNCTION0_CLASS = 96, + GLOBAL_TYPE_ID_ETS_FUNCTION1_CLASS = 97, + GLOBAL_TYPE_ID_ETS_FUNCTION2_CLASS = 98, + GLOBAL_TYPE_ID_ETS_FUNCTION3_CLASS = 99, + GLOBAL_TYPE_ID_ETS_FUNCTION4_CLASS = 100, + GLOBAL_TYPE_ID_ETS_FUNCTION5_CLASS = 101, + GLOBAL_TYPE_ID_ETS_FUNCTION6_CLASS = 102, + GLOBAL_TYPE_ID_ETS_FUNCTION7_CLASS = 103, + GLOBAL_TYPE_ID_ETS_FUNCTION8_CLASS = 104, + GLOBAL_TYPE_ID_ETS_FUNCTION9_CLASS = 105, + GLOBAL_TYPE_ID_ETS_FUNCTION10_CLASS = 106, + GLOBAL_TYPE_ID_ETS_FUNCTION11_CLASS = 107, + GLOBAL_TYPE_ID_ETS_FUNCTION12_CLASS = 108, + GLOBAL_TYPE_ID_ETS_FUNCTION13_CLASS = 109, + GLOBAL_TYPE_ID_ETS_FUNCTION14_CLASS = 110, + GLOBAL_TYPE_ID_ETS_FUNCTION15_CLASS = 111, + GLOBAL_TYPE_ID_ETS_FUNCTION16_CLASS = 112, + GLOBAL_TYPE_ID_ETS_FUNCTIONN_CLASS = 113, + GLOBAL_TYPE_ID_ETS_LAMBDA0_CLASS = 114, + GLOBAL_TYPE_ID_ETS_LAMBDA1_CLASS = 115, + GLOBAL_TYPE_ID_ETS_LAMBDA2_CLASS = 116, + GLOBAL_TYPE_ID_ETS_LAMBDA3_CLASS = 117, + GLOBAL_TYPE_ID_ETS_LAMBDA4_CLASS = 118, + GLOBAL_TYPE_ID_ETS_LAMBDA5_CLASS = 119, + GLOBAL_TYPE_ID_ETS_LAMBDA6_CLASS = 120, + GLOBAL_TYPE_ID_ETS_LAMBDA7_CLASS = 121, + GLOBAL_TYPE_ID_ETS_LAMBDA8_CLASS = 122, + GLOBAL_TYPE_ID_ETS_LAMBDA9_CLASS = 123, + GLOBAL_TYPE_ID_ETS_LAMBDA10_CLASS = 124, + GLOBAL_TYPE_ID_ETS_LAMBDA11_CLASS = 125, + GLOBAL_TYPE_ID_ETS_LAMBDA12_CLASS = 126, + GLOBAL_TYPE_ID_ETS_LAMBDA13_CLASS = 127, + GLOBAL_TYPE_ID_ETS_LAMBDA14_CLASS = 128, + GLOBAL_TYPE_ID_ETS_LAMBDA15_CLASS = 129, + GLOBAL_TYPE_ID_ETS_LAMBDA16_CLASS = 130, + GLOBAL_TYPE_ID_ETS_LAMBDAN_CLASS = 131, + GLOBAL_TYPE_ID_ETS_FUNCTIONR0_CLASS = 132, + GLOBAL_TYPE_ID_ETS_FUNCTIONR1_CLASS = 133, + GLOBAL_TYPE_ID_ETS_FUNCTIONR2_CLASS = 134, + GLOBAL_TYPE_ID_ETS_FUNCTIONR3_CLASS = 135, + GLOBAL_TYPE_ID_ETS_FUNCTIONR4_CLASS = 136, + GLOBAL_TYPE_ID_ETS_FUNCTIONR5_CLASS = 137, + GLOBAL_TYPE_ID_ETS_FUNCTIONR6_CLASS = 138, + GLOBAL_TYPE_ID_ETS_FUNCTIONR7_CLASS = 139, + GLOBAL_TYPE_ID_ETS_FUNCTIONR8_CLASS = 140, + GLOBAL_TYPE_ID_ETS_FUNCTIONR9_CLASS = 141, + GLOBAL_TYPE_ID_ETS_FUNCTIONR10_CLASS = 142, + GLOBAL_TYPE_ID_ETS_FUNCTIONR11_CLASS = 143, + GLOBAL_TYPE_ID_ETS_FUNCTIONR12_CLASS = 144, + GLOBAL_TYPE_ID_ETS_FUNCTIONR13_CLASS = 145, + GLOBAL_TYPE_ID_ETS_FUNCTIONR14_CLASS = 146, + GLOBAL_TYPE_ID_ETS_FUNCTIONR15_CLASS = 147, + GLOBAL_TYPE_ID_ETS_FUNCTIONR16_CLASS = 148, + GLOBAL_TYPE_ID_ETS_LAMBDAR0_CLASS = 149, + GLOBAL_TYPE_ID_ETS_LAMBDAR1_CLASS = 150, + GLOBAL_TYPE_ID_ETS_LAMBDAR2_CLASS = 151, + GLOBAL_TYPE_ID_ETS_LAMBDAR3_CLASS = 152, + GLOBAL_TYPE_ID_ETS_LAMBDAR4_CLASS = 153, + GLOBAL_TYPE_ID_ETS_LAMBDAR5_CLASS = 154, + GLOBAL_TYPE_ID_ETS_LAMBDAR6_CLASS = 155, + GLOBAL_TYPE_ID_ETS_LAMBDAR7_CLASS = 156, + GLOBAL_TYPE_ID_ETS_LAMBDAR8_CLASS = 157, + GLOBAL_TYPE_ID_ETS_LAMBDAR9_CLASS = 158, + GLOBAL_TYPE_ID_ETS_LAMBDAR10_CLASS = 159, + GLOBAL_TYPE_ID_ETS_LAMBDAR11_CLASS = 160, + GLOBAL_TYPE_ID_ETS_LAMBDAR12_CLASS = 161, + GLOBAL_TYPE_ID_ETS_LAMBDAR13_CLASS = 162, + GLOBAL_TYPE_ID_ETS_LAMBDAR14_CLASS = 163, + GLOBAL_TYPE_ID_ETS_LAMBDAR15_CLASS = 164, + GLOBAL_TYPE_ID_ETS_LAMBDAR16_CLASS = 165, + GLOBAL_TYPE_ID_ETS_TUPLE0_CLASS = 166, + GLOBAL_TYPE_ID_ETS_TUPLE1_CLASS = 167, + GLOBAL_TYPE_ID_ETS_TUPLE2_CLASS = 168, + GLOBAL_TYPE_ID_ETS_TUPLE3_CLASS = 169, + GLOBAL_TYPE_ID_ETS_TUPLE4_CLASS = 170, + GLOBAL_TYPE_ID_ETS_TUPLE5_CLASS = 171, + GLOBAL_TYPE_ID_ETS_TUPLE6_CLASS = 172, + GLOBAL_TYPE_ID_ETS_TUPLE7_CLASS = 173, + GLOBAL_TYPE_ID_ETS_TUPLE8_CLASS = 174, + GLOBAL_TYPE_ID_ETS_TUPLE9_CLASS = 175, + GLOBAL_TYPE_ID_ETS_TUPLE10_CLASS = 176, + GLOBAL_TYPE_ID_ETS_TUPLE11_CLASS = 177, + GLOBAL_TYPE_ID_ETS_TUPLE12_CLASS = 178, + GLOBAL_TYPE_ID_ETS_TUPLE13_CLASS = 179, + GLOBAL_TYPE_ID_ETS_TUPLE14_CLASS = 180, + GLOBAL_TYPE_ID_ETS_TUPLE15_CLASS = 181, + GLOBAL_TYPE_ID_ETS_TUPLE16_CLASS = 182, + GLOBAL_TYPE_ID_ETS_TUPLEN_CLASS = 183, + GLOBAL_TYPE_ID_TYPE_ERROR = 184, + GLOBAL_TYPE_ID_COUNT = 185 +} +export enum Es2pandaMethodDefinitionKind { + METHOD_DEFINITION_KIND_NONE = 0, + METHOD_DEFINITION_KIND_CONSTRUCTOR = 1, + METHOD_DEFINITION_KIND_METHOD = 2, + METHOD_DEFINITION_KIND_EXTENSION_METHOD = 3, + METHOD_DEFINITION_KIND_GET = 4, + METHOD_DEFINITION_KIND_SET = 5, + METHOD_DEFINITION_KIND_EXTENSION_GET = 6, + METHOD_DEFINITION_KIND_EXTENSION_SET = 7 +} +export enum Es2pandaOverloadDeclFlags { + OVERLOAD_DECL_FLAGS_NONE = 0, + OVERLOAD_DECL_FLAGS_FUNCTION = 1, + OVERLOAD_DECL_FLAGS_CLASS_METHOD = 2, + OVERLOAD_DECL_FLAGS_INTERFACE_METHOD = 4 +} +export enum Es2pandaPropertySearchFlags { + PROPERTY_SEARCH_FLAGS_NO_OPTS = 0, + PROPERTY_SEARCH_FLAGS_SEARCH_INSTANCE_METHOD = 1, + PROPERTY_SEARCH_FLAGS_SEARCH_INSTANCE_FIELD = 2, + PROPERTY_SEARCH_FLAGS_SEARCH_INSTANCE_DECL = 4, + PROPERTY_SEARCH_FLAGS_SEARCH_STATIC_METHOD = 8, + PROPERTY_SEARCH_FLAGS_SEARCH_STATIC_FIELD = 16, + PROPERTY_SEARCH_FLAGS_SEARCH_STATIC_DECL = 32, + PROPERTY_SEARCH_FLAGS_SEARCH_IN_BASE = 64, + PROPERTY_SEARCH_FLAGS_SEARCH_IN_INTERFACES = 128, + PROPERTY_SEARCH_FLAGS_IGNORE_ABSTRACT = 256, + PROPERTY_SEARCH_FLAGS_ALLOW_FUNCTIONAL_INTERFACE = 512, + PROPERTY_SEARCH_FLAGS_DISALLOW_SYNTHETIC_METHOD_CREATION = 1024, + PROPERTY_SEARCH_FLAGS_IS_SETTER = 2048, + PROPERTY_SEARCH_FLAGS_IS_GETTER = 4096, + PROPERTY_SEARCH_FLAGS_IGNORE_OVERLOAD = 8192, + PROPERTY_SEARCH_FLAGS_SEARCH_INSTANCE = 7, + PROPERTY_SEARCH_FLAGS_SEARCH_STATIC = 56, + PROPERTY_SEARCH_FLAGS_SEARCH_METHOD = 9, + PROPERTY_SEARCH_FLAGS_SEARCH_FIELD = 18, + PROPERTY_SEARCH_FLAGS_SEARCH_DECL = 36, + PROPERTY_SEARCH_FLAGS_SEARCH_ALL = 63 +} +export enum Es2pandaPropertyType { + PROPERTY_TYPE_INSTANCE_METHOD = 0, + PROPERTY_TYPE_INSTANCE_FIELD = 1, + PROPERTY_TYPE_INSTANCE_DECL = 2, + PROPERTY_TYPE_STATIC_METHOD = 3, + PROPERTY_TYPE_STATIC_FIELD = 4, + PROPERTY_TYPE_STATIC_DECL = 5, + PROPERTY_TYPE_COUNT = 6 +} +export enum Es2pandaVariableDeclarationKind { + VARIABLE_DECLARATION_KIND_CONST = 0, + VARIABLE_DECLARATION_KIND_LET = 1, + VARIABLE_DECLARATION_KIND_VAR = 2 +} +export enum Es2pandaAccessibilityOption { + ACCESSIBILITY_OPTION_NO_OPTS = 0, + ACCESSIBILITY_OPTION_PUBLIC = 1, + ACCESSIBILITY_OPTION_PRIVATE = 2, + ACCESSIBILITY_OPTION_PROTECTED = 3 +} +export enum Es2pandaRetentionPolicy { + RETENTION_POLICY_SOURCE = 0, + RETENTION_POLICY_BYTECODE = 1, + RETENTION_POLICY_RUNTIME = 2 +} +export enum Es2pandaRecordTableFlags { + RECORD_TABLE_FLAGS_NONE = 0, + RECORD_TABLE_FLAGS_EXTERNAL = 1 +} +export enum Es2pandaCheckerStatus { + CHECKER_STATUS_NO_OPTS = 0, + CHECKER_STATUS_FORCE_TUPLE = 1, + CHECKER_STATUS_IN_CONST_CONTEXT = 2, + CHECKER_STATUS_KEEP_LITERAL_TYPE = 4, + CHECKER_STATUS_IN_PARAMETER = 8, + CHECKER_STATUS_IN_CLASS = 16, + CHECKER_STATUS_IN_INTERFACE = 32, + CHECKER_STATUS_IN_ABSTRACT = 64, + CHECKER_STATUS_IN_STATIC_CONTEXT = 128, + CHECKER_STATUS_IN_CONSTRUCTOR = 256, + CHECKER_STATUS_IN_STATIC_BLOCK = 512, + CHECKER_STATUS_INNER_CLASS = 1024, + CHECKER_STATUS_IN_ENUM = 2048, + CHECKER_STATUS_BUILTINS_INITIALIZED = 4096, + CHECKER_STATUS_IN_LAMBDA = 8192, + CHECKER_STATUS_IGNORE_VISIBILITY = 16384, + CHECKER_STATUS_IN_EXTENSION_METHOD = 32768, + CHECKER_STATUS_IN_LOCAL_CLASS = 65536, + CHECKER_STATUS_IN_INSTANCEOF_CONTEXT = 131072, + CHECKER_STATUS_IN_TEST_EXPRESSION = 262144, + CHECKER_STATUS_IN_LOOP = 524288, + CHECKER_STATUS_MEET_RETURN = 1048576, + CHECKER_STATUS_MEET_BREAK = 2097152, + CHECKER_STATUS_MEET_CONTINUE = 4194304, + CHECKER_STATUS_MEET_THROW = 8388608, + CHECKER_STATUS_IN_EXTERNAL = 16777216, + CHECKER_STATUS_IN_BRIDGE_TEST = 33554432, + CHECKER_STATUS_IN_GETTER = 67108864, + CHECKER_STATUS_IN_SETTER = 134217728, + CHECKER_STATUS_IN_EXTENSION_ACCESSOR_CHECK = 268435456, + CHECKER_STATUS_IN_TYPE_INFER = 536870912 +} +export enum Es2pandaOverrideErrorCode { + OVERRIDE_ERROR_CODE_NO_ERROR = 0, + OVERRIDE_ERROR_CODE_OVERRIDDEN_FINAL = 1, + OVERRIDE_ERROR_CODE_INCOMPATIBLE_RETURN = 2, + OVERRIDE_ERROR_CODE_INCOMPATIBLE_TYPEPARAM = 3, + OVERRIDE_ERROR_CODE_OVERRIDDEN_WEAKER = 4, + OVERRIDE_ERROR_CODE_OVERRIDDEN_INTERNAL = 5, + OVERRIDE_ERROR_CODE_ABSTRACT_OVERRIDES_CONCRETE = 6 +} +export enum Es2pandaResolvedKind { + RESOLVED_KIND_PROPERTY = 0, + RESOLVED_KIND_EXTENSION_FUNCTION = 1, + RESOLVED_KIND_EXTENSION_ACCESSOR = 2 +} +export enum Es2pandaLexicalScopeType { + LEXICAL_SCOPE_TYPE_BLOCK = 0, + LEXICAL_SCOPE_TYPE_STRICT_BLOCK = 1, + LEXICAL_SCOPE_TYPE_CATCH = 2, + LEXICAL_SCOPE_TYPE_FUNCTION_PARAM = 3, + LEXICAL_SCOPE_TYPE_TS_TYPE_LITERAL = 4 +} +export enum Es2pandaVariableParsingFlags { + VARIABLE_PARSING_FLAGS_NO_OPTS = 0, + VARIABLE_PARSING_FLAGS_NO_SKIP_VAR_KIND = 1, + VARIABLE_PARSING_FLAGS_ACCEPT_CONST_NO_INIT = 2, + VARIABLE_PARSING_FLAGS_DISALLOW_INIT = 4, + VARIABLE_PARSING_FLAGS_VAR = 8, + VARIABLE_PARSING_FLAGS_LET = 16, + VARIABLE_PARSING_FLAGS_CONST = 32, + VARIABLE_PARSING_FLAGS_STOP_AT_IN = 64, + VARIABLE_PARSING_FLAGS_IN_FOR = 128, + VARIABLE_PARSING_FLAGS_FOR_OF = 256 +} +export enum Es2pandaExpressionParseFlags { + EXPRESSION_PARSE_FLAGS_NO_OPTS = 0, + EXPRESSION_PARSE_FLAGS_ACCEPT_COMMA = 1, + EXPRESSION_PARSE_FLAGS_ACCEPT_REST = 2, + EXPRESSION_PARSE_FLAGS_EXP_DISALLOW_AS = 4, + EXPRESSION_PARSE_FLAGS_DISALLOW_ASSIGNMENT = 8, + EXPRESSION_PARSE_FLAGS_DISALLOW_YIELD = 16, + EXPRESSION_PARSE_FLAGS_STOP_AT_IN = 32, + EXPRESSION_PARSE_FLAGS_MUST_BE_PATTERN = 64, + EXPRESSION_PARSE_FLAGS_POTENTIALLY_IN_PATTERN = 128, + EXPRESSION_PARSE_FLAGS_OBJECT_PATTERN = 256, + EXPRESSION_PARSE_FLAGS_IN_REST = 512, + EXPRESSION_PARSE_FLAGS_IMPORT = 1024, + EXPRESSION_PARSE_FLAGS_POTENTIAL_CLASS_LITERAL = 2048, + EXPRESSION_PARSE_FLAGS_IN_FOR = 4096, + EXPRESSION_PARSE_FLAGS_INSTANCEOF = 8192, + EXPRESSION_PARSE_FLAGS_POTENTIAL_NEW_ARRAY = 16384 +} +export enum Es2pandaStatementParsingFlags { + STATEMENT_PARSING_FLAGS_NONE = 0, + STATEMENT_PARSING_FLAGS_ALLOW_LEXICAL = 1, + STATEMENT_PARSING_FLAGS_GLOBAL = 2, + STATEMENT_PARSING_FLAGS_IF_ELSE = 4, + STATEMENT_PARSING_FLAGS_LABELLED = 8, + STATEMENT_PARSING_FLAGS_INIT_MODULE = 16, + STATEMENT_PARSING_FLAGS_STMT_LEXICAL_SCOPE_NEEDED = 12, + STATEMENT_PARSING_FLAGS_STMT_GLOBAL_LEXICAL = 3 +} +export enum Es2pandaForStatementKind { + FOR_STATEMENT_KIND_UPDATE = 0, + FOR_STATEMENT_KIND_IN = 1, + FOR_STATEMENT_KIND_OF = 2 +} +export enum Es2pandaTypeAnnotationParsingOptions { + TYPE_ANNOTATION_PARSING_OPTIONS_NO_OPTS = 0, + TYPE_ANNOTATION_PARSING_OPTIONS_IN_UNION = 1, + TYPE_ANNOTATION_PARSING_OPTIONS_ALLOW_CONST = 2, + TYPE_ANNOTATION_PARSING_OPTIONS_IN_INTERSECTION = 4, + TYPE_ANNOTATION_PARSING_OPTIONS_RESTRICT_EXTENDS = 8, + TYPE_ANNOTATION_PARSING_OPTIONS_REPORT_ERROR = 16, + TYPE_ANNOTATION_PARSING_OPTIONS_CAN_BE_TS_TYPE_PREDICATE = 32, + TYPE_ANNOTATION_PARSING_OPTIONS_BREAK_AT_NEW_LINE = 64, + TYPE_ANNOTATION_PARSING_OPTIONS_RETURN_TYPE = 128, + TYPE_ANNOTATION_PARSING_OPTIONS_POTENTIAL_CLASS_LITERAL = 256, + TYPE_ANNOTATION_PARSING_OPTIONS_ALLOW_INTERSECTION = 512, + TYPE_ANNOTATION_PARSING_OPTIONS_ADD_TYPE_PARAMETER_BINDING = 1024, + TYPE_ANNOTATION_PARSING_OPTIONS_DISALLOW_PRIMARY_TYPE = 2048, + TYPE_ANNOTATION_PARSING_OPTIONS_ALLOW_WILDCARD = 4096, + TYPE_ANNOTATION_PARSING_OPTIONS_IGNORE_FUNCTION_TYPE = 8192, + TYPE_ANNOTATION_PARSING_OPTIONS_ALLOW_DECLARATION_SITE_VARIANCE = 16384, + TYPE_ANNOTATION_PARSING_OPTIONS_DISALLOW_UNION = 32768, + TYPE_ANNOTATION_PARSING_OPTIONS_POTENTIAL_NEW_ARRAY = 65536, + TYPE_ANNOTATION_PARSING_OPTIONS_ANNOTATION_NOT_ALLOW = 131072, + TYPE_ANNOTATION_PARSING_OPTIONS_INSTANCEOF = 262144, + TYPE_ANNOTATION_PARSING_OPTIONS_TYPE_ALIAS_CONTEXT = 524288 +} +export enum Es2pandaScriptKind { + SCRIPT_KIND_SCRIPT = 0, + SCRIPT_KIND_MODULE = 1, + SCRIPT_KIND_STDLIB = 2, + SCRIPT_KIND_GENEXTERNAL = 3 +} +export enum Es2pandaProgramFlags { + PROGRAM_FLAGS_NONE = 0, + PROGRAM_FLAGS_AST_CHECKED = 1, + PROGRAM_FLAGS_AST_CHECK_PROCESSED = 2, + PROGRAM_FLAGS_AST_ENUM_LOWERED = 4, + PROGRAM_FLAGS_AST_BOXED_TYPE_LOWERED = 8, + PROGRAM_FLAGS_AST_CONSTANT_EXPRESSION_LOWERED = 16, + PROGRAM_FLAGS_AST_STRING_CONSTANT_LOWERED = 32, + PROGRAM_FLAGS_AST_IDENTIFIER_ANALYZED = 64, + PROGRAM_FLAGS_AST_HAS_SCOPES_INITIALIZED = 128, + PROGRAM_FLAGS_AST_HAS_OPTIONAL_PARAMETER_ANNOTATION = 256 +} +export enum Es2pandaCompilationMode { + COMPILATION_MODE_GEN_STD_LIB = 0, + COMPILATION_MODE_PROJECT = 1, + COMPILATION_MODE_SINGLE_FILE = 2, + COMPILATION_MODE_GEN_ABC_FOR_EXTERNAL_SOURCE = 3 +} +export enum Es2pandaImportFlags { + IMPORT_FLAGS_NONE = 0, + IMPORT_FLAGS_DEFAULT_IMPORT = 1, + IMPORT_FLAGS_IMPLICIT_PACKAGE_IMPORT = 2, + IMPORT_FLAGS_EXTERNAL_BINARY_IMPORT = 4, + IMPORT_FLAGS_EXTERNAL_SOURCE_IMPORT = 8 +} +export enum Es2pandaModuleKind { + MODULE_KIND_MODULE = 0, + MODULE_KIND_DECLARATION = 1, + MODULE_KIND_PACKAGE = 2 +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/Es2pandaNativeModule.ts b/koala_tools/ui2abc/libarkts/src/generated/Es2pandaNativeModule.ts new file mode 100644 index 0000000000000000000000000000000000000000..7edba643d667acac1b2db21b6ae18473bfee47fa --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/Es2pandaNativeModule.ts @@ -0,0 +1,5192 @@ +/* + * 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + KNativePointer, + KStringPtr, + KUInt, + KInt, + KBoolean, + KDouble, + KFloat, + KLong +} from "@koalaui/interop" + +// Improve: this type should be in interop +export type KNativePointerArray = BigUint64Array + +export class Es2pandaNativeModule { + _GetAllErrorMessages(context: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProceedToState(context: KNativePointer, state: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ContextState(context: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ContextErrorMessage(context: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ContextProgram(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateSourcePosition(context: KNativePointer, index: KUInt, line: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateSourceRange(context: KNativePointer, start: KNativePointer, end: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SourcePositionIndex(context: KNativePointer, position: KNativePointer): KUInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _SourcePositionLine(context: KNativePointer, position: KNativePointer): KUInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _SourceRangeStart(context: KNativePointer, range: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SourceRangeEnd(context: KNativePointer, range: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _LogDiagnosticWithSuggestion(context: KNativePointer, diagnosticInfo: KNativePointer, suggestionInfo: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsAnyError(context: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeRecheck(context: KNativePointer, node: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _Es2pandaEnumFromString(context: KNativePointer, str: KStringPtr): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _Es2pandaEnumToString(context: KNativePointer, id: KInt): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _DeclarationFromIdentifier(context: KNativePointer, node: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsImportTypeKind(context: KNativePointer, node: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _JsdocStringFromDeclaration(context: KNativePointer, node: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _GetLicenseFromRootNode(context: KNativePointer, node: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _FirstDeclarationByNameFromNode(context: KNativePointer, node: KNativePointer, name: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FirstDeclarationByNameFromProgram(context: KNativePointer, program: KNativePointer, name: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AllDeclarationsByNameFromNode(context: KNativePointer, node: KNativePointer, name: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AllDeclarationsByNameFromProgram(context: KNativePointer, program: KNativePointer, name: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _InsertETSImportDeclarationAndParse(context: KNativePointer, program: KNativePointer, node: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _GenerateStaticDeclarationsFromContext(context: KNativePointer, outputPath: KStringPtr): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsArrowFunctionExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsAnnotationDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsAnnotationUsage(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsAssertStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsAwaitExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsBigIntLiteral(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsBinaryExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsBlockStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsBooleanLiteral(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsBreakStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsCallExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsCatchClause(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsChainExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsCharLiteral(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsClassDefinition(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsClassDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsClassExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsClassProperty(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsClassStaticBlock(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsConditionalExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsContinueStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsDebuggerStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsDecorator(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsDirectEvalExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsDoWhileStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsEmptyStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsExportAllDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsExportDefaultDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsExportNamedDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsExportSpecifier(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsExpressionStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsForInStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsForOfStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsForUpdateStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsFunctionDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsFunctionExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsIdentifier(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsDummyNode(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsIfStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsImportDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsImportExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsImportDefaultSpecifier(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsImportNamespaceSpecifier(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsImportSpecifier(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsLabelledStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsMemberExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsMetaProperty(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsMethodDefinition(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsNamedType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsNewExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsNullLiteral(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsUndefinedLiteral(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsNumberLiteral(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsOmittedExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsOverloadDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsPrefixAssertionExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsProperty(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsRegExpLiteral(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSReExportDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsReturnStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsScriptFunction(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsSequenceExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsStringLiteral(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSNonNullishTypeNode(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSNullType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSUndefinedType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSNeverType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSStringLiteralType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSIntrinsicNode(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSFunctionType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSWildcardType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSPrimitiveType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSPackageDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSClassLiteral(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSTypeReference(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSTypeReferencePart(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSUnionType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSKeyofType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSNewArrayInstanceExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSNewMultiDimArrayInstanceExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSNewClassInstanceExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSImportDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSParameterExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSTuple(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSModule(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsSuperExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsETSStructDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsSwitchCaseStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsSwitchStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSEnumDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSEnumMember(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSExternalModuleReference(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSNumberKeyword(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSAnyKeyword(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSStringKeyword(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSBooleanKeyword(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSVoidKeyword(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSUndefinedKeyword(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSUnknownKeyword(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSObjectKeyword(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSBigintKeyword(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSNeverKeyword(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSNonNullExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSNullKeyword(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSArrayType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSUnionType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSTypeLiteral(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSPropertySignature(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSMethodSignature(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSSignatureDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSParenthesizedType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSLiteralType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSInferType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSConditionalType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSImportType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSIntersectionType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSMappedType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSModuleBlock(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSThisType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSTypeOperator(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSTypeParameter(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSTypeParameterDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSTypeParameterInstantiation(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSTypePredicate(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSParameterProperty(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSModuleDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSImportEqualsDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSFunctionType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSConstructorType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSTypeAliasDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSTypeReference(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSQualifiedName(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSIndexedAccessType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSInterfaceDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSInterfaceBody(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSInterfaceHeritage(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSTupleType(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSNamedTupleMember(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSIndexSignature(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSTypeQuery(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSAsExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSClassImplements(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTSTypeAssertion(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTaggedTemplateExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTemplateElement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTemplateLiteral(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsThisExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTypeofExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsThrowStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsTryStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsUnaryExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsUpdateExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsVariableDeclaration(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsVariableDeclarator(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsWhileStatement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsYieldExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsOpaqueTypeNode(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsBlockExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsBrokenTypeNode(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsArrayExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsArrayPattern(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsAssignmentExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsAssignmentPattern(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsObjectExpression(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsObjectPattern(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsSpreadElement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IsRestElement(ast: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeName(ast: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateNumberLiteral(context: KNativePointer, value: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateNumberLiteral1(context: KNativePointer, value: KLong): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateNumberLiteral2(context: KNativePointer, value: KDouble): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateNumberLiteral3(context: KNativePointer, value: KFloat): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateNumberLiteral(context: KNativePointer, original: KNativePointer, value: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateNumberLiteral1(context: KNativePointer, original: KNativePointer, value: KLong): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateNumberLiteral2(context: KNativePointer, original: KNativePointer, value: KDouble): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateNumberLiteral3(context: KNativePointer, original: KNativePointer, value: KFloat): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _NumberLiteralStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateLabelledStatement(context: KNativePointer, ident: KNativePointer, body: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateLabelledStatement(context: KNativePointer, original: KNativePointer, ident: KNativePointer, body: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _LabelledStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _LabelledStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _LabelledStatementIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _LabelledStatementIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _LabelledStatementGetReferencedStatementConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateThrowStatement(context: KNativePointer, argument: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateThrowStatement(context: KNativePointer, original: KNativePointer, argument: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ThrowStatementArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateClassProperty(context: KNativePointer, key: KNativePointer, value: KNativePointer, typeAnnotation: KNativePointer, modifiers: KInt, isComputed: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateClassProperty(context: KNativePointer, original: KNativePointer, key: KNativePointer, value: KNativePointer, typeAnnotation: KNativePointer, modifiers: KInt, isComputed: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyIsDefaultAccessModifierConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertySetDefaultAccessModifier(context: KNativePointer, receiver: KNativePointer, isDefault: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertySetTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyNeedInitInStaticBlockConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertySetNeedInitInStaticBlock(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyIsImmediateInitConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertySetIsImmediateInit(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertyAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertySetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassPropertySetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSVoidKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSVoidKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSFunctionType(context: KNativePointer, signature: KNativePointer, funcFlags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSFunctionType(context: KNativePointer, original: KNativePointer, signature: KNativePointer, funcFlags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeSetParams(context: KNativePointer, receiver: KNativePointer, paramsList: BigUint64Array, paramsListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeReturnTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeReturnType(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeFunctionalInterface(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeFunctionalInterfaceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeSetFunctionalInterface(context: KNativePointer, receiver: KNativePointer, functionalInterface: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeFlags(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeFlagsConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSFunctionTypeIsExtensionFunctionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypeOperator(context: KNativePointer, type: KNativePointer, operatorType: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypeOperator(context: KNativePointer, original: KNativePointer, type: KNativePointer, operatorType: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeOperatorTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeOperatorIsReadonlyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeOperatorIsKeyofConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeOperatorIsUniqueConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateIfStatement(context: KNativePointer, test: KNativePointer, consequent: KNativePointer, alternate: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateIfStatement(context: KNativePointer, original: KNativePointer, test: KNativePointer, consequent: KNativePointer, alternate: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IfStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IfStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IfStatementSetTest(context: KNativePointer, receiver: KNativePointer, test: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _IfStatementConsequentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IfStatementConsequent(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IfStatementAlternate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IfStatementAlternateConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IfStatementSetAlternate(context: KNativePointer, receiver: KNativePointer, alternate: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSConstructorType(context: KNativePointer, signature: KNativePointer, abstract: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSConstructorType(context: KNativePointer, original: KNativePointer, signature: KNativePointer, abstract: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSConstructorTypeTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSConstructorTypeTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSConstructorTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSConstructorTypeReturnTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSConstructorTypeReturnType(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSConstructorTypeAbstractConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateDecorator(context: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateDecorator(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _DecoratorExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSEnumDeclaration(context: KNativePointer, key: KNativePointer, members: BigUint64Array, membersSequenceLength: KUInt, isConst: KBoolean, isStatic: KBoolean, isDeclare: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSEnumDeclaration(context: KNativePointer, original: KNativePointer, key: KNativePointer, members: BigUint64Array, membersSequenceLength: KUInt, isConst: KBoolean, isStatic: KBoolean, isDeclare: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSEnumDeclaration1(context: KNativePointer, key: KNativePointer, members: BigUint64Array, membersSequenceLength: KUInt, isConst: KBoolean, isStatic: KBoolean, isDeclare: KBoolean, typeNode: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSEnumDeclaration1(context: KNativePointer, original: KNativePointer, key: KNativePointer, members: BigUint64Array, membersSequenceLength: KUInt, isConst: KBoolean, isStatic: KBoolean, isDeclare: KBoolean, typeNode: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationTypeNodes(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationMembersConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationInternalNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationSetInternalName(context: KNativePointer, receiver: KNativePointer, internalName: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationBoxedClassConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationSetBoxedClass(context: KNativePointer, receiver: KNativePointer, boxedClass: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationIsConstConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationEmplaceMembers(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationClearMembers(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationSetValueMembers(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumDeclarationMembersForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSNeverKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSNeverKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateImportDefaultSpecifier(context: KNativePointer, local: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateImportDefaultSpecifier(context: KNativePointer, original: KNativePointer, local: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDefaultSpecifierLocalConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDefaultSpecifierLocal(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateObjectExpression(context: KNativePointer, nodeType: KInt, properties: BigUint64Array, propertiesSequenceLength: KUInt, trailingComma: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateObjectExpression(context: KNativePointer, original: KNativePointer, nodeType: KInt, properties: BigUint64Array, propertiesSequenceLength: KUInt, trailingComma: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ObjectExpressionPropertiesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ObjectExpressionIsDeclarationConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ObjectExpressionIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ObjectExpressionValidateExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ObjectExpressionConvertibleToObjectPattern(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ObjectExpressionSetDeclaration(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ObjectExpressionSetOptional(context: KNativePointer, receiver: KNativePointer, optional_arg: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ObjectExpressionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ObjectExpressionSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateImportSpecifier(context: KNativePointer, imported: KNativePointer, local: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateImportSpecifier(context: KNativePointer, original: KNativePointer, imported: KNativePointer, local: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportSpecifierImported(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportSpecifierImportedConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportSpecifierLocal(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportSpecifierLocalConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportSpecifierIsRemovableConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportSpecifierSetRemovable(context: KNativePointer, receiver: KNativePointer, isRemovable: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateConditionalExpression(context: KNativePointer, test: KNativePointer, consequent: KNativePointer, alternate: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateConditionalExpression(context: KNativePointer, original: KNativePointer, test: KNativePointer, consequent: KNativePointer, alternate: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ConditionalExpressionTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ConditionalExpressionTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ConditionalExpressionSetTest(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ConditionalExpressionConsequentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ConditionalExpressionConsequent(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ConditionalExpressionSetConsequent(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ConditionalExpressionAlternateConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ConditionalExpressionAlternate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ConditionalExpressionSetAlternate(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateCallExpression(context: KNativePointer, callee: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt, typeParams: KNativePointer, optional_arg: KBoolean, trailingComma: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateCallExpression1(context: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateCallExpression1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionCalleeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionCallee(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionSetCallee(context: KNativePointer, receiver: KNativePointer, callee: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionArgumentsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionArguments(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionSetArguments(context: KNativePointer, receiver: KNativePointer, argumentsList: BigUint64Array, argumentsListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionHasTrailingCommaConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionSetTypeParams(context: KNativePointer, receiver: KNativePointer, typeParams: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionSetTrailingBlock(context: KNativePointer, receiver: KNativePointer, block: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionIsExtensionAccessorCall(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionTrailingBlockConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionSetIsTrailingBlockInNewLine(context: KNativePointer, receiver: KNativePointer, isNewLine: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionIsTrailingBlockInNewLineConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionSetIsTrailingCall(context: KNativePointer, receiver: KNativePointer, isTrailingCall: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionIsTrailingCallConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionIsETSConstructorCallConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CallExpressionIsDynamicCallConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateBigIntLiteral(context: KNativePointer, src: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateBigIntLiteral(context: KNativePointer, original: KNativePointer, src: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BigIntLiteralStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementId(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementValue(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementSetValue(context: KNativePointer, receiver: KNativePointer, value: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementValueConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementOriginEnumMemberConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementSetOrigEnumMember(context: KNativePointer, receiver: KNativePointer, enumMember: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementIsPrivateElementConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementIsComputedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassElementToPrivateFieldKindConst(context: KNativePointer, receiver: KNativePointer, isStatic: KBoolean): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSImportType(context: KNativePointer, param: KNativePointer, typeParams: KNativePointer, qualifier: KNativePointer, isTypeof: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSImportType(context: KNativePointer, original: KNativePointer, param: KNativePointer, typeParams: KNativePointer, qualifier: KNativePointer, isTypeof: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSImportTypeParamConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSImportTypeTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSImportTypeQualifierConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSImportTypeIsTypeofConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTaggedTemplateExpression(context: KNativePointer, tag: KNativePointer, quasi: KNativePointer, typeParams: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTaggedTemplateExpression(context: KNativePointer, original: KNativePointer, tag: KNativePointer, quasi: KNativePointer, typeParams: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TaggedTemplateExpressionTagConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TaggedTemplateExpressionQuasiConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TaggedTemplateExpressionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateFunctionDeclaration(context: KNativePointer, func: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt, isAnonymous: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateFunctionDeclaration(context: KNativePointer, original: KNativePointer, func: KNativePointer, annotations: BigUint64Array, annotationsSequenceLength: KUInt, isAnonymous: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateFunctionDeclaration1(context: KNativePointer, func: KNativePointer, isAnonymous: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateFunctionDeclaration1(context: KNativePointer, original: KNativePointer, func: KNativePointer, isAnonymous: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationFunction(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationIsAnonymousConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationFunctionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionDeclarationSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSTypeReference(context: KNativePointer, part: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSTypeReference(context: KNativePointer, original: KNativePointer, part: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePart(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePartConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferenceBaseNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypeReference(context: KNativePointer, typeName: KNativePointer, typeParams: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypeReference(context: KNativePointer, original: KNativePointer, typeName: KNativePointer, typeParams: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeReferenceTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeReferenceTypeNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeReferenceBaseNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateNamedType(context: KNativePointer, name: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateNamedType(context: KNativePointer, original: KNativePointer, name: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _NamedTypeNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _NamedTypeTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _NamedTypeIsNullableConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _NamedTypeSetNullable(context: KNativePointer, receiver: KNativePointer, nullable: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _NamedTypeSetNext(context: KNativePointer, receiver: KNativePointer, next: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _NamedTypeSetTypeParams(context: KNativePointer, receiver: KNativePointer, typeParams: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSFunctionType(context: KNativePointer, signature: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSFunctionType(context: KNativePointer, original: KNativePointer, signature: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSFunctionTypeTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSFunctionTypeTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSFunctionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSFunctionTypeReturnTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSFunctionTypeReturnType(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSFunctionTypeSetNullable(context: KNativePointer, receiver: KNativePointer, nullable: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTemplateElement(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTemplateElement(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTemplateElement1(context: KNativePointer, raw: KStringPtr, cooked: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTemplateElement1(context: KNativePointer, original: KNativePointer, raw: KStringPtr, cooked: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TemplateElementRawConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _TemplateElementCookedConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSInterfaceDeclaration(context: KNativePointer, _extends: BigUint64Array, _extendsSequenceLength: KUInt, id: KNativePointer, typeParams: KNativePointer, body: KNativePointer, isStatic: KBoolean, isExternal: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSInterfaceDeclaration(context: KNativePointer, original: KNativePointer, _extends: BigUint64Array, _extendsSequenceLength: KUInt, id: KNativePointer, typeParams: KNativePointer, body: KNativePointer, isStatic: KBoolean, isExternal: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationId(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationInternalNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationSetInternalName(context: KNativePointer, receiver: KNativePointer, internalName: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationIsStaticConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationIsFromExternalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationExtends(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationExtendsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationExtendsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationGetAnonClass(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationGetAnonClassConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationSetAnonClass(context: KNativePointer, receiver: KNativePointer, anonClass: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationEmplaceExtends(context: KNativePointer, receiver: KNativePointer, _extends: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationClearExtends(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationSetValueExtends(context: KNativePointer, receiver: KNativePointer, _extends: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceDeclarationSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateVariableDeclaration(context: KNativePointer, kind: KInt, declarators: BigUint64Array, declaratorsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateVariableDeclaration(context: KNativePointer, original: KNativePointer, kind: KInt, declarators: BigUint64Array, declaratorsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationDeclaratorsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationDeclarators(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationDeclaratorsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationKindConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationGetDeclaratorByNameConst(context: KNativePointer, receiver: KNativePointer, name: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclarationSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateUndefinedLiteral(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateUndefinedLiteral(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateMemberExpression(context: KNativePointer, object_arg: KNativePointer, property: KNativePointer, kind: KInt, computed: KBoolean, optional_arg: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateMemberExpression(context: KNativePointer, original: KNativePointer, object_arg: KNativePointer, property: KNativePointer, kind: KInt, computed: KBoolean, optional_arg: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionObject(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionObjectConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionSetObject(context: KNativePointer, receiver: KNativePointer, object_arg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionSetProperty(context: KNativePointer, receiver: KNativePointer, prop: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionProperty(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionPropertyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionIsComputedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionKindConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionAddMemberKind(context: KNativePointer, receiver: KNativePointer, kind: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionHasMemberKindConst(context: KNativePointer, receiver: KNativePointer, kind: KInt): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionRemoveMemberKind(context: KNativePointer, receiver: KNativePointer, kind: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionIsIgnoreBoxConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionSetIgnoreBox(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionIsPrivateReferenceConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionCompileToRegConst(context: KNativePointer, receiver: KNativePointer, pg: KNativePointer, objReg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MemberExpressionCompileToRegsConst(context: KNativePointer, receiver: KNativePointer, pg: KNativePointer, object_arg: KNativePointer, property: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSClassImplements(context: KNativePointer, expression: KNativePointer, typeParameters: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSClassImplements(context: KNativePointer, original: KNativePointer, expression: KNativePointer, typeParameters: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSClassImplements1(context: KNativePointer, expression: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSClassImplements1(context: KNativePointer, original: KNativePointer, expression: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSClassImplementsExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSClassImplementsExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSClassImplementsTypeParametersConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSObjectKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSObjectKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSUnionType(context: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSUnionType(context: KNativePointer, original: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSUnionTypeTypesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSUnionTypeSetValueTypesConst(context: KNativePointer, receiver: KNativePointer, type: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSKeyofType(context: KNativePointer, type: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSKeyofType(context: KNativePointer, original: KNativePointer, type: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSKeyofTypeGetTypeRefConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSPropertySignature(context: KNativePointer, key: KNativePointer, typeAnnotation: KNativePointer, computed: KBoolean, optional_arg: KBoolean, readonly_arg: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSPropertySignature(context: KNativePointer, original: KNativePointer, key: KNativePointer, typeAnnotation: KNativePointer, computed: KBoolean, optional_arg: KBoolean, readonly_arg: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSPropertySignatureKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSPropertySignatureKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSPropertySignatureComputedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSPropertySignatureOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSPropertySignatureReadonlyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSPropertySignatureTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSPropertySignatureSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSConditionalType(context: KNativePointer, checkType: KNativePointer, extendsType: KNativePointer, trueType: KNativePointer, falseType: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSConditionalType(context: KNativePointer, original: KNativePointer, checkType: KNativePointer, extendsType: KNativePointer, trueType: KNativePointer, falseType: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSConditionalTypeCheckTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSConditionalTypeExtendsTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSConditionalTypeTrueTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSConditionalTypeFalseTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSLiteralType(context: KNativePointer, literal: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSLiteralType(context: KNativePointer, original: KNativePointer, literal: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSLiteralTypeLiteralConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypeAliasDeclaration(context: KNativePointer, id: KNativePointer, typeParams: KNativePointer, typeAnnotation: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypeAliasDeclaration(context: KNativePointer, original: KNativePointer, id: KNativePointer, typeParams: KNativePointer, typeAnnotation: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypeAliasDeclaration1(context: KNativePointer, id: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypeAliasDeclaration1(context: KNativePointer, original: KNativePointer, id: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationId(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationSetTypeParameters(context: KNativePointer, receiver: KNativePointer, typeParams: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationClearTypeParamterTypes(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAliasDeclarationSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateDebuggerStatement(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateDebuggerStatement(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateReturnStatement(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateReturnStatement(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateReturnStatement1(context: KNativePointer, argument: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateReturnStatement1(context: KNativePointer, original: KNativePointer, argument: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ReturnStatementArgument(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ReturnStatementArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ReturnStatementSetArgument(context: KNativePointer, receiver: KNativePointer, arg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ReturnStatementIsAsyncImplReturnConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateExportDefaultDeclaration(context: KNativePointer, decl: KNativePointer, exportEquals: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateExportDefaultDeclaration(context: KNativePointer, original: KNativePointer, decl: KNativePointer, exportEquals: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportDefaultDeclarationDecl(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportDefaultDeclarationDeclConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportDefaultDeclarationIsExportEqualsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateScriptFunction(context: KNativePointer, databody: KNativePointer, datasignature: KNativePointer, datafuncFlags: KInt, dataflags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateScriptFunction(context: KNativePointer, original: KNativePointer, databody: KNativePointer, datasignature: KNativePointer, datafuncFlags: KInt, dataflags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionId(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionReturnStatementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionReturnStatements(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionReturnStatementsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionAddReturnStatement(context: KNativePointer, receiver: KNativePointer, returnStatement: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetBody(context: KNativePointer, receiver: KNativePointer, body: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionReturnTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionReturnTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetReturnTypeAnnotation(context: KNativePointer, receiver: KNativePointer, node: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsEntryPointConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsGeneratorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsAsyncFuncConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsAsyncImplFuncConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsArrowConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsOverloadConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsExternalOverloadConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsConstructorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsGetterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsSetterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsExtensionAccessorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsProxyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsStaticBlockConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsEnumConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsHiddenConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsExternalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsImplicitSuperCallNeededConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionHasBodyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionHasRestParameterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionHasReturnStatementConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionHasThrowStatementConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsTrailingLambdaConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsSyntheticConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsDynamicConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionIsExtensionMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionFlagsConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionHasReceiverConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetIdent(context: KNativePointer, receiver: KNativePointer, id: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionAddFlag(context: KNativePointer, receiver: KNativePointer, flags: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionClearFlag(context: KNativePointer, receiver: KNativePointer, flags: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionFormalParamsLengthConst(context: KNativePointer, receiver: KNativePointer): KUInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetAsyncPairMethod(context: KNativePointer, receiver: KNativePointer, asyncPairFunction: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionAsyncPairMethodConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionAsyncPairMethod(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionEmplaceReturnStatements(context: KNativePointer, receiver: KNativePointer, returnStatements: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionClearReturnStatements(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetValueReturnStatements(context: KNativePointer, receiver: KNativePointer, returnStatements: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionEmplaceParams(context: KNativePointer, receiver: KNativePointer, params: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetParams(context: KNativePointer, receiver: KNativePointer, paramsList: BigUint64Array, paramsListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionClearParams(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetValueParams(context: KNativePointer, receiver: KNativePointer, params: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionParamsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ScriptFunctionSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateClassDefinition(context: KNativePointer, ident: KNativePointer, typeParams: KNativePointer, superTypeParams: KNativePointer, _implements: BigUint64Array, _implementsSequenceLength: KUInt, ctor: KNativePointer, superClass: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt, modifiers: KInt, flags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateClassDefinition(context: KNativePointer, original: KNativePointer, ident: KNativePointer, typeParams: KNativePointer, superTypeParams: KNativePointer, _implements: BigUint64Array, _implementsSequenceLength: KUInt, ctor: KNativePointer, superClass: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt, modifiers: KInt, flags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateClassDefinition1(context: KNativePointer, ident: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt, modifiers: KInt, flags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateClassDefinition1(context: KNativePointer, original: KNativePointer, ident: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt, modifiers: KInt, flags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateClassDefinition2(context: KNativePointer, ident: KNativePointer, modifiers: KInt, flags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateClassDefinition2(context: KNativePointer, original: KNativePointer, ident: KNativePointer, modifiers: KInt, flags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetIdent(context: KNativePointer, receiver: KNativePointer, ident: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionInternalNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSuper(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSuperConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetSuper(context: KNativePointer, receiver: KNativePointer, superClass: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsGlobalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsLocalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsExternConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsFromExternalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsInnerConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsGlobalInitializedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsClassDefinitionCheckedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsAnonymousConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsIntEnumTransformedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsStringEnumTransformedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsEnumTransformedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsNamespaceTransformedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsLazyImportObjectClassConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsFromStructConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsInitInCctorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionIsModuleConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetGlobalInitialized(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetInnerModifier(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetClassDefinitionChecked(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetAnonymousModifier(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetNamespaceTransformed(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetLazyImportObjectClass(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetFromStructModifier(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetInitInCctor(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionModifiersConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionAddProperties(context: KNativePointer, receiver: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionCtor(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionImplementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSuperTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSuperTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionLocalTypeCounter(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionLocalIndexConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionFunctionalReferenceReferencedMethodConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetFunctionalReferenceReferencedMethod(context: KNativePointer, receiver: KNativePointer, functionalReferenceReferencedMethod: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionLocalPrefixConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionOrigEnumDeclConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionGetAnonClass(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionCtorConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionHasPrivateMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionHasNativeMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionHasComputedInstanceFieldConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionHasMatchingPrivateKeyConst(context: KNativePointer, receiver: KNativePointer, name: KStringPtr): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionAddToExportedClasses(context: KNativePointer, receiver: KNativePointer, cls: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetModifiers(context: KNativePointer, receiver: KNativePointer, modifiers: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionEmplaceBody(context: KNativePointer, receiver: KNativePointer, body: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionClearBody(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetValueBody(context: KNativePointer, receiver: KNativePointer, body: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionBodyForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionEmplaceImplements(context: KNativePointer, receiver: KNativePointer, _implements: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionClearImplements(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetValueImplements(context: KNativePointer, receiver: KNativePointer, _implements: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionImplements(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionImplementsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetCtor(context: KNativePointer, receiver: KNativePointer, ctor: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetTypeParams(context: KNativePointer, receiver: KNativePointer, typeParams: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetOrigEnumDecl(context: KNativePointer, receiver: KNativePointer, origEnumDecl: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetAnonClass(context: KNativePointer, receiver: KNativePointer, anonClass: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetInternalName(context: KNativePointer, receiver: KNativePointer, internalName: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDefinitionSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateArrayExpression(context: KNativePointer, elements: BigUint64Array, elementsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateArrayExpression(context: KNativePointer, original: KNativePointer, elements: BigUint64Array, elementsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateArrayExpression1(context: KNativePointer, nodeType: KInt, elements: BigUint64Array, elementsSequenceLength: KUInt, trailingComma: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateArrayExpression1(context: KNativePointer, original: KNativePointer, nodeType: KInt, elements: BigUint64Array, elementsSequenceLength: KUInt, trailingComma: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionGetElementNodeAtIdxConst(context: KNativePointer, receiver: KNativePointer, idx: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionElementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionElements(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionSetElements(context: KNativePointer, receiver: KNativePointer, elements: BigUint64Array, elementsSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionIsDeclarationConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionSetDeclaration(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionSetOptional(context: KNativePointer, receiver: KNativePointer, optional_arg: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionClearPreferredType(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionConvertibleToArrayPattern(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionValidateExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionTrySetPreferredTypeForNestedArrayExprConst(context: KNativePointer, receiver: KNativePointer, nestedArrayExpr: KNativePointer, idx: KUInt): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrayExpressionSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSInterfaceBody(context: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSInterfaceBody(context: KNativePointer, original: KNativePointer, body: BigUint64Array, bodySequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceBodyBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceBodyBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypeQuery(context: KNativePointer, exprName: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypeQuery(context: KNativePointer, original: KNativePointer, exprName: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeQueryExprNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSBigintKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSBigintKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateProperty(context: KNativePointer, key: KNativePointer, value: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateProperty(context: KNativePointer, original: KNativePointer, key: KNativePointer, value: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateProperty1(context: KNativePointer, kind: KInt, key: KNativePointer, value: KNativePointer, isMethod: KBoolean, isComputed: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateProperty1(context: KNativePointer, original: KNativePointer, kind: KInt, key: KNativePointer, value: KNativePointer, isMethod: KBoolean, isComputed: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyValueConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyValue(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyKindConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyIsMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyIsShorthandConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyIsComputedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyIsAccessorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyIsAccessorKind(context: KNativePointer, receiver: KNativePointer, kind: KInt): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyConvertibleToPatternProperty(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _PropertyValidateExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateVariableDeclarator(context: KNativePointer, flag: KInt, ident: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateVariableDeclarator(context: KNativePointer, original: KNativePointer, flag: KInt, ident: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateVariableDeclarator1(context: KNativePointer, flag: KInt, ident: KNativePointer, init: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateVariableDeclarator1(context: KNativePointer, original: KNativePointer, flag: KInt, ident: KNativePointer, init: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclaratorInit(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclaratorInitConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclaratorSetInit(context: KNativePointer, receiver: KNativePointer, init: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclaratorId(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclaratorIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _VariableDeclaratorFlag(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateStringLiteral(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateStringLiteral(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateStringLiteral1(context: KNativePointer, str: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateStringLiteral1(context: KNativePointer, original: KNativePointer, str: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _StringLiteralStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypeAssertion(context: KNativePointer, typeAnnotation: KNativePointer, expression: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypeAssertion(context: KNativePointer, original: KNativePointer, typeAnnotation: KNativePointer, expression: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAssertionGetExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAssertionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeAssertionSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSExternalModuleReference(context: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSExternalModuleReference(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSExternalModuleReferenceExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSUndefinedKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSUndefinedKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSTuple(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSTuple(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSTuple1(context: KNativePointer, size: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSTuple1(context: KNativePointer, original: KNativePointer, size: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSTuple2(context: KNativePointer, typeList: BigUint64Array, typeListSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSTuple2(context: KNativePointer, original: KNativePointer, typeList: BigUint64Array, typeListSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTupleGetTupleSizeConst(context: KNativePointer, receiver: KNativePointer): KUInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTupleGetTupleTypeAnnotationsList(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTupleGetTupleTypeAnnotationsListConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTupleSetTypeAnnotationsList(context: KNativePointer, receiver: KNativePointer, typeNodeList: BigUint64Array, typeNodeListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSStringLiteralType(context: KNativePointer, value: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSStringLiteralType(context: KNativePointer, original: KNativePointer, value: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTryStatement(context: KNativePointer, block: KNativePointer, catchClauses: BigUint64Array, catchClausesSequenceLength: KUInt, finalizer: KNativePointer, finalizerInsertionsLabelPair: BigUint64Array, finalizerInsertionsLabelPairSequenceLength: KUInt, finalizerInsertionsStatement: BigUint64Array, finalizerInsertionsStatementSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTryStatement(context: KNativePointer, original: KNativePointer, block: KNativePointer, catchClauses: BigUint64Array, catchClausesSequenceLength: KUInt, finalizer: KNativePointer, finalizerInsertionsLabelPair: BigUint64Array, finalizerInsertionsLabelPairSequenceLength: KUInt, finalizerInsertionsStatement: BigUint64Array, finalizerInsertionsStatementSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTryStatement1(context: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTryStatement1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TryStatementFinallyBlockConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TryStatementBlockConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TryStatementHasFinalizerConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TryStatementHasDefaultCatchClauseConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TryStatementCatchClausesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TryStatementFinallyCanCompleteNormallyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TryStatementSetFinallyCanCompleteNormally(context: KNativePointer, receiver: KNativePointer, finallyCanCompleteNormally: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsProgramConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsStatementConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsExpressionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsTypedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAsTyped(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAsTypedConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsBrokenStatementConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAsExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAsExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAsStatement(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAsStatementConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeSetRange(context: KNativePointer, receiver: KNativePointer, loc: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeSetProgram(context: KNativePointer, receiver: KNativePointer, program: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeSetStart(context: KNativePointer, receiver: KNativePointer, start: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeSetEnd(context: KNativePointer, receiver: KNativePointer, end: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeProgramConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeStartConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeEndConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeRangeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeParent(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeParentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeSetParent(context: KNativePointer, receiver: KNativePointer, parent: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeDecoratorsPtrConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAddDecorators(context: KNativePointer, receiver: KNativePointer, decorators: BigUint64Array, decoratorsSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeCanHaveDecoratorConst(context: KNativePointer, receiver: KNativePointer, inTs: KBoolean): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsReadonlyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsReadonlyTypeConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsOptionalDeclarationConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsDefiniteConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsConstructorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsOverrideConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeSetOverride(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsAsyncConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsSynchronizedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsNativeConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsConstConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsStaticConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsFinalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsAbstractConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsPublicConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsProtectedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsPrivateConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsInternalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsExportedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsDefaultExportedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsExportedTypeConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsDeclareConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsInConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsOutConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsSetterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAddModifier(context: KNativePointer, receiver: KNativePointer, flags: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeClearModifier(context: KNativePointer, receiver: KNativePointer, flags: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeModifiers(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeModifiersConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeHasExportAliasConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAsClassElement(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAsClassElementConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsScopeBearerConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeClearScope(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeGetTopStatement(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeGetTopStatementConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeClone(context: KNativePointer, receiver: KNativePointer, parent: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeDumpJSONConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeDumpEtsSrcConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeDumpDeclConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeDumpConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeDumpConst1(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeCompileConst(context: KNativePointer, receiver: KNativePointer, pg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeCompileConst1(context: KNativePointer, receiver: KNativePointer, etsg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeSetTransformedNode(context: KNativePointer, receiver: KNativePointer, transformationName: KStringPtr, transformedNode: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeAccept(context: KNativePointer, receiver: KNativePointer, v: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeSetOriginalNode(context: KNativePointer, receiver: KNativePointer, originalNode: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeOriginalNodeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeCleanUp(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeShallowClone(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeIsValidInCurrentPhaseConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeGetHistoryNodeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeGetOrCreateHistoryNodeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstNodeCleanCheckInformation(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateUnaryExpression(context: KNativePointer, argument: KNativePointer, unaryOperator: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateUnaryExpression(context: KNativePointer, original: KNativePointer, argument: KNativePointer, unaryOperator: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UnaryExpressionOperatorTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _UnaryExpressionArgument(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UnaryExpressionArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UnaryExpressionSetArgument(context: KNativePointer, receiver: KNativePointer, arg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateForInStatement(context: KNativePointer, left: KNativePointer, right: KNativePointer, body: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateForInStatement(context: KNativePointer, original: KNativePointer, left: KNativePointer, right: KNativePointer, body: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForInStatementLeft(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForInStatementLeftConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForInStatementRight(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForInStatementRightConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForInStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForInStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateThisExpression(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateThisExpression(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSMethodSignature(context: KNativePointer, key: KNativePointer, signature: KNativePointer, computed: KBoolean, optional_arg: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSMethodSignature(context: KNativePointer, original: KNativePointer, key: KNativePointer, signature: KNativePointer, computed: KBoolean, optional_arg: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMethodSignatureKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMethodSignatureKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMethodSignatureTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMethodSignatureTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMethodSignatureParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMethodSignatureReturnTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMethodSignatureReturnTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMethodSignatureComputedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMethodSignatureOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateBinaryExpression(context: KNativePointer, left: KNativePointer, right: KNativePointer, operatorType: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateBinaryExpression(context: KNativePointer, original: KNativePointer, left: KNativePointer, right: KNativePointer, operatorType: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionLeftConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionLeft(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionRightConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionRight(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionResultConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionResult(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionOperatorTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionIsLogicalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionIsLogicalExtendedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionIsBitwiseConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionIsArithmeticConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionSetLeft(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionSetRight(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionSetResult(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionSetOperator(context: KNativePointer, receiver: KNativePointer, operatorType: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BinaryExpressionCompileOperandsConst(context: KNativePointer, receiver: KNativePointer, etsg: KNativePointer, lhs: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateSuperExpression(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateSuperExpression(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateAssertStatement(context: KNativePointer, test: KNativePointer, second: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateAssertStatement(context: KNativePointer, original: KNativePointer, test: KNativePointer, second: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssertStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssertStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssertStatementSecondConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSStringKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSStringKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateAssignmentExpression(context: KNativePointer, left: KNativePointer, right: KNativePointer, assignmentOperator: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateAssignmentExpression(context: KNativePointer, original: KNativePointer, left: KNativePointer, right: KNativePointer, assignmentOperator: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateAssignmentExpression1(context: KNativePointer, type: KInt, left: KNativePointer, right: KNativePointer, assignmentOperator: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateAssignmentExpression1(context: KNativePointer, original: KNativePointer, type: KInt, left: KNativePointer, right: KNativePointer, assignmentOperator: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionLeftConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionLeft(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionRight(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionRightConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionSetRight(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionSetLeft(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionResultConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionResult(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionOperatorTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionSetOperatorType(context: KNativePointer, receiver: KNativePointer, tokenType: KInt): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionSetResult(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionIsLogicalExtendedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionSetIgnoreConstAssign(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionIsIgnoreConstAssignConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionConvertibleToAssignmentPatternLeft(context: KNativePointer, receiver: KNativePointer, mustBePattern: KBoolean): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionConvertibleToAssignmentPatternRight(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionConvertibleToAssignmentPattern(context: KNativePointer, receiver: KNativePointer, mustBePattern: KBoolean): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AssignmentExpressionCompilePatternConst(context: KNativePointer, receiver: KNativePointer, pg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateExpressionStatement(context: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateExpressionStatement(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionStatementGetExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionStatementGetExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionStatementSetExpression(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSModule(context: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt, ident: KNativePointer, flag: KInt, program: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSModule(context: KNativePointer, original: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt, ident: KNativePointer, flag: KInt, program: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleProgram(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleGlobalClassConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleGlobalClass(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleSetGlobalClass(context: KNativePointer, receiver: KNativePointer, globalClass: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleIsETSScriptConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleIsNamespaceConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleIsNamespaceChainLastNodeConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleSetNamespaceChainLastNode(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleProgramConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSModuleSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateMetaProperty(context: KNativePointer, kind: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateMetaProperty(context: KNativePointer, original: KNativePointer, kind: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MetaPropertyKindConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSArrayType(context: KNativePointer, elementType: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSArrayType(context: KNativePointer, original: KNativePointer, elementType: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSArrayTypeElementTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSSignatureDeclaration(context: KNativePointer, kind: KInt, signature: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSSignatureDeclaration(context: KNativePointer, original: KNativePointer, kind: KInt, signature: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSSignatureDeclarationTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSSignatureDeclarationTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSSignatureDeclarationParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSSignatureDeclarationReturnTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSSignatureDeclarationReturnTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSSignatureDeclarationKindConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateExportAllDeclaration(context: KNativePointer, source: KNativePointer, exported: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateExportAllDeclaration(context: KNativePointer, original: KNativePointer, source: KNativePointer, exported: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportAllDeclarationSourceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportAllDeclarationExportedConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateExportSpecifier(context: KNativePointer, local: KNativePointer, exported: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateExportSpecifier(context: KNativePointer, original: KNativePointer, local: KNativePointer, exported: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportSpecifierLocalConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportSpecifierExportedConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportSpecifierSetDefault(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportSpecifierIsDefaultConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportSpecifierSetConstantExpression(context: KNativePointer, receiver: KNativePointer, constantExpression: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportSpecifierGetConstantExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTupleType(context: KNativePointer, elementTypes: BigUint64Array, elementTypesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTupleType(context: KNativePointer, original: KNativePointer, elementTypes: BigUint64Array, elementTypesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTupleTypeElementTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateFunctionExpression(context: KNativePointer, func: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateFunctionExpression(context: KNativePointer, original: KNativePointer, func: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateFunctionExpression1(context: KNativePointer, namedExpr: KNativePointer, func: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateFunctionExpression1(context: KNativePointer, original: KNativePointer, namedExpr: KNativePointer, func: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionExpressionFunctionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionExpressionFunction(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionExpressionIsAnonymousConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionExpressionId(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSIndexSignature(context: KNativePointer, param: KNativePointer, typeAnnotation: KNativePointer, readonly_arg: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSIndexSignature(context: KNativePointer, original: KNativePointer, param: KNativePointer, typeAnnotation: KNativePointer, readonly_arg: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSIndexSignatureParamConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSIndexSignatureTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSIndexSignatureReadonlyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSIndexSignatureKindConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSModuleDeclaration(context: KNativePointer, name: KNativePointer, body: KNativePointer, declare: KBoolean, _global: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSModuleDeclaration(context: KNativePointer, original: KNativePointer, name: KNativePointer, body: KNativePointer, declare: KBoolean, _global: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSModuleDeclarationNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSModuleDeclarationBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSModuleDeclarationGlobalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSModuleDeclarationIsExternalOrAmbientConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateImportDeclaration(context: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKinds: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateImportDeclaration(context: KNativePointer, original: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKinds: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDeclarationEmplaceSpecifiers(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDeclarationClearSpecifiers(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDeclarationSetValueSpecifiers(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDeclarationSpecifiersForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDeclarationSourceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDeclarationSource(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDeclarationSpecifiersConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportDeclarationIsTypeKindConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSParenthesizedType(context: KNativePointer, type: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSParenthesizedType(context: KNativePointer, original: KNativePointer, type: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSParenthesizedTypeTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _LiteralIsFoldedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _LiteralSetFolded(context: KNativePointer, receiver: KNativePointer, folded: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateCharLiteral(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateCharLiteral(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSIntrinsicNode(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSIntrinsicNode(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSIntrinsicNode1(context: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSIntrinsicNode1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSIntrinsicNode2(context: KNativePointer, type: KInt, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSIntrinsicNode2(context: KNativePointer, original: KNativePointer, type: KInt, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSIntrinsicNodeTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSIntrinsicNodeArgumentsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSPackageDeclaration(context: KNativePointer, name: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSPackageDeclaration(context: KNativePointer, original: KNativePointer, name: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSImportDeclaration(context: KNativePointer, importPath: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKinds: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSImportDeclaration(context: KNativePointer, original: KNativePointer, importPath: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt, importKinds: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationSetImportMetadata(context: KNativePointer, receiver: KNativePointer, importFlags: KInt, lang: KInt, resolvedSource: KStringPtr, declPath: KStringPtr, ohmUrl: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationDeclPathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationOhmUrlConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationIsValidConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationIsPureDynamicConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationSetAssemblerName(context: KNativePointer, receiver: KNativePointer, assemblerName: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationAssemblerNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSImportDeclarationResolvedSourceConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSStructDeclaration(context: KNativePointer, def: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSStructDeclaration(context: KNativePointer, original: KNativePointer, def: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSModuleBlock(context: KNativePointer, statements: BigUint64Array, statementsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSModuleBlock(context: KNativePointer, original: KNativePointer, statements: BigUint64Array, statementsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSModuleBlockStatementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSNewArrayInstanceExpression(context: KNativePointer, typeReference: KNativePointer, dimension: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSNewArrayInstanceExpression(context: KNativePointer, original: KNativePointer, typeReference: KNativePointer, dimension: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewArrayInstanceExpressionTypeReference(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewArrayInstanceExpressionTypeReferenceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewArrayInstanceExpressionDimension(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewArrayInstanceExpressionDimensionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewArrayInstanceExpressionSetDimension(context: KNativePointer, receiver: KNativePointer, dimension: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewArrayInstanceExpressionClearPreferredType(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateAnnotationDeclaration(context: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateAnnotationDeclaration(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateAnnotationDeclaration1(context: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateAnnotationDeclaration1(context: KNativePointer, original: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationInternalNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationSetInternalName(context: KNativePointer, receiver: KNativePointer, internalName: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationProperties(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationPropertiesForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationPropertiesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationAddProperties(context: KNativePointer, receiver: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationIsSourceRetentionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationIsBytecodeRetentionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationIsRuntimeRetentionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationSetSourceRetention(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationSetBytecodeRetention(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationSetRuntimeRetention(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationGetBaseNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationEmplaceProperties(context: KNativePointer, receiver: KNativePointer, properties: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationClearProperties(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationSetValueProperties(context: KNativePointer, receiver: KNativePointer, properties: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationDeclarationSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateAnnotationUsage(context: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateAnnotationUsage(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateAnnotationUsage1(context: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateAnnotationUsage1(context: KNativePointer, original: KNativePointer, expr: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationUsageExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationUsageProperties(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationUsagePropertiesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationUsageAddProperty(context: KNativePointer, receiver: KNativePointer, property: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationUsageSetProperties(context: KNativePointer, receiver: KNativePointer, properties: BigUint64Array, propertiesSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotationUsageGetBaseNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateEmptyStatement(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateEmptyStatement(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateEmptyStatement1(context: KNativePointer, isBrokenStatement: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateEmptyStatement1(context: KNativePointer, original: KNativePointer, isBrokenStatement: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _EmptyStatementIsBrokenStatement(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateWhileStatement(context: KNativePointer, test: KNativePointer, body: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateWhileStatement(context: KNativePointer, original: KNativePointer, test: KNativePointer, body: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _WhileStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _WhileStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _WhileStatementSetTest(context: KNativePointer, receiver: KNativePointer, test: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _WhileStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _WhileStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateFunctionSignature(context: KNativePointer, typeParams: KNativePointer, params: BigUint64Array, paramsSequenceLength: KUInt, returnTypeAnnotation: KNativePointer, hasReceiver: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionSignatureParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionSignatureParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionSignatureTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionSignatureTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionSignatureReturnType(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionSignatureSetReturnType(context: KNativePointer, receiver: KNativePointer, type: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionSignatureReturnTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionSignatureClone(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _FunctionSignatureHasReceiverConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateChainExpression(context: KNativePointer, expression: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateChainExpression(context: KNativePointer, original: KNativePointer, expression: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ChainExpressionGetExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ChainExpressionGetExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ChainExpressionCompileToRegConst(context: KNativePointer, receiver: KNativePointer, pg: KNativePointer, objReg: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSIntersectionType(context: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSIntersectionType(context: KNativePointer, original: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSIntersectionTypeTypesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateUpdateExpression(context: KNativePointer, argument: KNativePointer, updateOperator: KInt, isPrefix: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateUpdateExpression(context: KNativePointer, original: KNativePointer, argument: KNativePointer, updateOperator: KInt, isPrefix: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateExpressionOperatorTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateExpressionArgument(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateExpressionArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateExpressionIsPrefixConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateBlockExpression(context: KNativePointer, statements: BigUint64Array, statementsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateBlockExpression(context: KNativePointer, original: KNativePointer, statements: BigUint64Array, statementsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockExpressionStatementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockExpressionStatements(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockExpressionAddStatements(context: KNativePointer, receiver: KNativePointer, statements: BigUint64Array, statementsSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockExpressionAddStatement(context: KNativePointer, receiver: KNativePointer, statement: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypeLiteral(context: KNativePointer, members: BigUint64Array, membersSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypeLiteral(context: KNativePointer, original: KNativePointer, members: BigUint64Array, membersSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeLiteralMembersConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypeParameter(context: KNativePointer, name: KNativePointer, constraint: KNativePointer, defaultType: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypeParameter(context: KNativePointer, original: KNativePointer, name: KNativePointer, constraint: KNativePointer, defaultType: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypeParameter1(context: KNativePointer, name: KNativePointer, constraint: KNativePointer, defaultType: KNativePointer, flags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypeParameter1(context: KNativePointer, original: KNativePointer, name: KNativePointer, constraint: KNativePointer, defaultType: KNativePointer, flags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterName(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterConstraint(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterConstraintConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterSetConstraint(context: KNativePointer, receiver: KNativePointer, constraint: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterDefaultTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterSetDefaultType(context: KNativePointer, receiver: KNativePointer, defaultType: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSBooleanKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSBooleanKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateSpreadElement(context: KNativePointer, nodeType: KInt, argument: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateSpreadElement(context: KNativePointer, original: KNativePointer, nodeType: KInt, argument: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SpreadElementArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SpreadElementArgument(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SpreadElementIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _SpreadElementSetOptional(context: KNativePointer, receiver: KNativePointer, optional_arg: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SpreadElementValidateExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SpreadElementConvertibleToRest(context: KNativePointer, receiver: KNativePointer, isDeclaration: KBoolean, allowPattern: KBoolean): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _SpreadElementTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SpreadElementSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypePredicate(context: KNativePointer, parameterName: KNativePointer, typeAnnotation: KNativePointer, asserts: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypePredicate(context: KNativePointer, original: KNativePointer, parameterName: KNativePointer, typeAnnotation: KNativePointer, asserts: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypePredicateParameterNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypePredicateTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypePredicateAssertsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateImportNamespaceSpecifier(context: KNativePointer, local: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateImportNamespaceSpecifier(context: KNativePointer, original: KNativePointer, local: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportNamespaceSpecifierLocal(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportNamespaceSpecifierLocalConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateExportNamedDeclaration(context: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateExportNamedDeclaration(context: KNativePointer, original: KNativePointer, source: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateExportNamedDeclaration1(context: KNativePointer, decl: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateExportNamedDeclaration1(context: KNativePointer, original: KNativePointer, decl: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateExportNamedDeclaration2(context: KNativePointer, decl: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateExportNamedDeclaration2(context: KNativePointer, original: KNativePointer, decl: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportNamedDeclarationDeclConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportNamedDeclarationSourceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportNamedDeclarationSpecifiersConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExportNamedDeclarationReplaceSpecifiers(context: KNativePointer, receiver: KNativePointer, specifiers: BigUint64Array, specifiersSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSParameterExpression(context: KNativePointer, identOrSpread: KNativePointer, isOptional: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSParameterExpression(context: KNativePointer, original: KNativePointer, identOrSpread: KNativePointer, isOptional: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSParameterExpression1(context: KNativePointer, identOrSpread: KNativePointer, initializer: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSParameterExpression1(context: KNativePointer, original: KNativePointer, identOrSpread: KNativePointer, initializer: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetIdent(context: KNativePointer, receiver: KNativePointer, ident: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSpread(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSpreadConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetSpread(context: KNativePointer, receiver: KNativePointer, spread: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionRestParameterConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionRestParameter(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionInitializerConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionInitializer(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetLexerSaved(context: KNativePointer, receiver: KNativePointer, savedLexer: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionLexerSavedConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeNode: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetOptional(context: KNativePointer, receiver: KNativePointer, value: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetInitializer(context: KNativePointer, receiver: KNativePointer, initExpr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionIsRestParameterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionGetRequiredParamsConst(context: KNativePointer, receiver: KNativePointer): KUInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetRequiredParams(context: KNativePointer, receiver: KNativePointer, extraValue: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSParameterExpressionSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypeParameterInstantiation(context: KNativePointer, params: BigUint64Array, paramsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypeParameterInstantiation(context: KNativePointer, original: KNativePointer, params: BigUint64Array, paramsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterInstantiationParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateNullLiteral(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateNullLiteral(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSInferType(context: KNativePointer, typeParam: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSInferType(context: KNativePointer, original: KNativePointer, typeParam: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInferTypeTypeParamConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateSwitchCaseStatement(context: KNativePointer, test: KNativePointer, consequent: BigUint64Array, consequentSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateSwitchCaseStatement(context: KNativePointer, original: KNativePointer, test: KNativePointer, consequent: BigUint64Array, consequentSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SwitchCaseStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SwitchCaseStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SwitchCaseStatementSetTest(context: KNativePointer, receiver: KNativePointer, test: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SwitchCaseStatementConsequentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateYieldExpression(context: KNativePointer, argument: KNativePointer, isDelegate: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateYieldExpression(context: KNativePointer, original: KNativePointer, argument: KNativePointer, isDelegate: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _YieldExpressionHasDelegateConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _YieldExpressionArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSImportEqualsDeclaration(context: KNativePointer, id: KNativePointer, moduleReference: KNativePointer, isExport: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSImportEqualsDeclaration(context: KNativePointer, original: KNativePointer, id: KNativePointer, moduleReference: KNativePointer, isExport: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSImportEqualsDeclarationIdConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSImportEqualsDeclarationModuleReferenceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSImportEqualsDeclarationIsExportConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateBooleanLiteral(context: KNativePointer, value: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateBooleanLiteral(context: KNativePointer, original: KNativePointer, value: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BooleanLiteralValueConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSNumberKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSNumberKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateClassStaticBlock(context: KNativePointer, value: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateClassStaticBlock(context: KNativePointer, original: KNativePointer, value: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassStaticBlockFunction(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassStaticBlockFunctionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassStaticBlockNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSNonNullExpression(context: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSNonNullExpression(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSNonNullExpressionExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSNonNullExpressionExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSNonNullExpressionSetExpr(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreatePrefixAssertionExpression(context: KNativePointer, expr: KNativePointer, type: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdatePrefixAssertionExpression(context: KNativePointer, original: KNativePointer, expr: KNativePointer, type: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _PrefixAssertionExpressionExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _PrefixAssertionExpressionTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateClassExpression(context: KNativePointer, def: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateClassExpression(context: KNativePointer, original: KNativePointer, def: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassExpressionDefinitionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateForOfStatement(context: KNativePointer, left: KNativePointer, right: KNativePointer, body: KNativePointer, isAwait: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateForOfStatement(context: KNativePointer, original: KNativePointer, left: KNativePointer, right: KNativePointer, body: KNativePointer, isAwait: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForOfStatementLeft(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForOfStatementLeftConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForOfStatementRight(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForOfStatementRightConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForOfStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForOfStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForOfStatementIsAwaitConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTemplateLiteral(context: KNativePointer, quasis: BigUint64Array, quasisSequenceLength: KUInt, expressions: BigUint64Array, expressionsSequenceLength: KUInt, multilineString: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTemplateLiteral(context: KNativePointer, original: KNativePointer, quasis: BigUint64Array, quasisSequenceLength: KUInt, expressions: BigUint64Array, expressionsSequenceLength: KUInt, multilineString: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TemplateLiteralQuasisConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TemplateLiteralExpressionsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TemplateLiteralGetMultilineStringConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSUnionType(context: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSUnionType(context: KNativePointer, original: KNativePointer, types: BigUint64Array, typesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSUnionTypeTypesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSUnknownKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSUnknownKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateIdentifier(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateIdentifier(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateIdentifier1(context: KNativePointer, name: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateIdentifier1(context: KNativePointer, original: KNativePointer, name: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateIdentifier2(context: KNativePointer, name: KStringPtr, typeAnnotation: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateIdentifier2(context: KNativePointer, original: KNativePointer, name: KStringPtr, typeAnnotation: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierName(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierSetName(context: KNativePointer, receiver: KNativePointer, newName: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierIsErrorPlaceHolderConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierSetOptional(context: KNativePointer, receiver: KNativePointer, optional_arg: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierIsReferenceConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierIsTdzConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierSetTdz(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierSetAccessor(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierIsAccessorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierSetMutator(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierIsMutatorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierIsReceiverConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierIsPrivateIdentConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierSetPrivate(context: KNativePointer, receiver: KNativePointer, isPrivate: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierIsIgnoreBoxConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierSetIgnoreBox(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierIsAnnotationDeclConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierSetAnnotationDecl(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierIsAnnotationUsageConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierSetAnnotationUsage(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierCloneReference(context: KNativePointer, receiver: KNativePointer, parent: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierValidateExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _IdentifierSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateOpaqueTypeNode1(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateOpaqueTypeNode1(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateBlockStatement(context: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateBlockStatement(context: KNativePointer, original: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementStatementsForUpdates(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementStatements(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementStatementsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementSetStatements(context: KNativePointer, receiver: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementAddStatements(context: KNativePointer, receiver: KNativePointer, statementList: BigUint64Array, statementListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementClearStatements(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementAddStatement(context: KNativePointer, receiver: KNativePointer, statement: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementAddStatement1(context: KNativePointer, receiver: KNativePointer, idx: KUInt, statement: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementAddTrailingBlock(context: KNativePointer, receiver: KNativePointer, stmt: KNativePointer, trailingBlock: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _BlockStatementSearchStatementInTrailingBlock(context: KNativePointer, receiver: KNativePointer, item: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateDirectEvalExpression(context: KNativePointer, callee: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt, typeParams: KNativePointer, optional_arg: KBoolean, parserStatus: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateDirectEvalExpression(context: KNativePointer, original: KNativePointer, callee: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt, typeParams: KNativePointer, optional_arg: KBoolean, parserStatus: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSTypeParameterDeclaration(context: KNativePointer, params: BigUint64Array, paramsSequenceLength: KUInt, requiredParams: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSTypeParameterDeclaration(context: KNativePointer, original: KNativePointer, params: BigUint64Array, paramsSequenceLength: KUInt, requiredParams: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterDeclarationParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterDeclarationAddParam(context: KNativePointer, receiver: KNativePointer, param: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterDeclarationSetValueParams(context: KNativePointer, receiver: KNativePointer, source: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSTypeParameterDeclarationRequiredParamsConst(context: KNativePointer, receiver: KNativePointer): KUInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateMethodDefinition(context: KNativePointer, kind: KInt, key: KNativePointer, value: KNativePointer, modifiers: KInt, isComputed: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateMethodDefinition(context: KNativePointer, original: KNativePointer, kind: KInt, key: KNativePointer, value: KNativePointer, modifiers: KInt, isComputed: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionKindConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionIsConstructorConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionIsMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionIsExtensionMethodConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionIsGetterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionIsSetterConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionIsDefaultAccessModifierConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionSetDefaultAccessModifier(context: KNativePointer, receiver: KNativePointer, isDefault: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionOverloadsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionBaseOverloadMethodConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionBaseOverloadMethod(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionAsyncPairMethodConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionAsyncPairMethod(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionSetOverloads(context: KNativePointer, receiver: KNativePointer, overloads: BigUint64Array, overloadsSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionAddOverload(context: KNativePointer, receiver: KNativePointer, overload: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionSetBaseOverloadMethod(context: KNativePointer, receiver: KNativePointer, baseOverloadMethod: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionSetAsyncPairMethod(context: KNativePointer, receiver: KNativePointer, asyncPairMethod: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionHasOverload(context: KNativePointer, receiver: KNativePointer, overload: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionFunction(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionFunctionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionInitializeOverloadInfo(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionEmplaceOverloads(context: KNativePointer, receiver: KNativePointer, overloads: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionClearOverloads(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MethodDefinitionSetValueOverloads(context: KNativePointer, receiver: KNativePointer, overloads: KNativePointer, index: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateOverloadDeclaration(context: KNativePointer, key: KNativePointer, modifiers: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateOverloadDeclaration(context: KNativePointer, original: KNativePointer, key: KNativePointer, modifiers: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _OverloadDeclarationFlagConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _OverloadDeclarationOverloadedList(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _OverloadDeclarationSetOverloadedList(context: KNativePointer, receiver: KNativePointer, overloadedList: BigUint64Array, overloadedListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _OverloadDeclarationPushFront(context: KNativePointer, receiver: KNativePointer, overloadedExpression: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _OverloadDeclarationAddOverloadDeclFlag(context: KNativePointer, receiver: KNativePointer, overloadFlag: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _OverloadDeclarationHasOverloadDeclFlagConst(context: KNativePointer, receiver: KNativePointer, overloadFlag: KInt): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _OverloadDeclarationIsConstructorOverloadDeclaration(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _OverloadDeclarationIsFunctionOverloadDeclaration(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _OverloadDeclarationIsClassMethodOverloadDeclaration(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _OverloadDeclarationIsInterfaceMethodOverloadDeclaration(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _OverloadDeclarationDumpModifierConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSNullKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSNullKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSInterfaceHeritage(context: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSInterfaceHeritage(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceHeritageExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSInterfaceHeritageExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionIsGroupedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionSetGrouped(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionAsLiteralConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionAsLiteral(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionIsLiteralConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionIsTypeNodeConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionIsAnnotatedExpressionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionAsTypeNode(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionAsTypeNodeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionAsAnnotatedExpression(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionAsAnnotatedExpressionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionIsBrokenExpressionConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ExpressionToStringConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotatedExpressionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AnnotatedExpressionSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _MaybeOptionalExpressionIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _MaybeOptionalExpressionClearOptional(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateSrcDumper(context: KNativePointer, node: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateSrcDumper1(context: KNativePointer, node: KNativePointer, isDeclgen: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperAdd(context: KNativePointer, receiver: KNativePointer, str: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperAdd1(context: KNativePointer, receiver: KNativePointer, i: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperAdd2(context: KNativePointer, receiver: KNativePointer, i: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperAdd3(context: KNativePointer, receiver: KNativePointer, i: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperAdd4(context: KNativePointer, receiver: KNativePointer, l: KLong): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperAdd5(context: KNativePointer, receiver: KNativePointer, f: KFloat): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperAdd6(context: KNativePointer, receiver: KNativePointer, d: KDouble): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperIncrIndent(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperDecrIndent(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperEndl(context: KNativePointer, receiver: KNativePointer, num: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperIsDeclgenConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperDumpNode(context: KNativePointer, receiver: KNativePointer, key: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperRemoveNode(context: KNativePointer, receiver: KNativePointer, key: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperIsIndirectDepPhaseConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _SrcDumperRun(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSClassLiteral(context: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSClassLiteral(context: KNativePointer, original: KNativePointer, expr: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSClassLiteralExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateBreakStatement(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateBreakStatement(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateBreakStatement1(context: KNativePointer, ident: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateBreakStatement1(context: KNativePointer, original: KNativePointer, ident: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BreakStatementIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BreakStatementIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BreakStatementTargetConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _BreakStatementHasTargetConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _BreakStatementSetTarget(context: KNativePointer, receiver: KNativePointer, target: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateRegExpLiteral(context: KNativePointer, pattern: KStringPtr, flags: KInt, flagsStr: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateRegExpLiteral(context: KNativePointer, original: KNativePointer, pattern: KStringPtr, flags: KInt, flagsStr: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _RegExpLiteralPatternConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _RegExpLiteralFlagsConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSMappedType(context: KNativePointer, typeParameter: KNativePointer, typeAnnotation: KNativePointer, readonly_arg: KInt, optional_arg: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSMappedType(context: KNativePointer, original: KNativePointer, typeParameter: KNativePointer, typeAnnotation: KNativePointer, readonly_arg: KInt, optional_arg: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMappedTypeTypeParameter(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMappedTypeTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMappedTypeReadonly(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSMappedTypeOptional(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSAnyKeyword(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSAnyKeyword(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateClassDeclaration(context: KNativePointer, def: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateClassDeclaration(context: KNativePointer, original: KNativePointer, def: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDeclarationDefinition(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDeclarationDefinitionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ClassDeclarationSetDefinition(context: KNativePointer, receiver: KNativePointer, def: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSIndexedAccessType(context: KNativePointer, objectType: KNativePointer, indexType: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSIndexedAccessType(context: KNativePointer, original: KNativePointer, objectType: KNativePointer, indexType: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSIndexedAccessTypeObjectTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSIndexedAccessTypeIndexTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSQualifiedName(context: KNativePointer, left: KNativePointer, right: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSQualifiedName(context: KNativePointer, original: KNativePointer, left: KNativePointer, right: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSQualifiedNameLeftConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSQualifiedNameLeft(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSQualifiedNameRightConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSQualifiedNameRight(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSQualifiedNameNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSQualifiedNameResolveLeftMostQualifiedName(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSQualifiedNameResolveLeftMostQualifiedNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateAwaitExpression(context: KNativePointer, argument: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateAwaitExpression(context: KNativePointer, original: KNativePointer, argument: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AwaitExpressionArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateValidationInfo(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateValidationInfo1(context: KNativePointer, m: KStringPtr, p: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ValidationInfoFailConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateContinueStatement(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateContinueStatement(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateContinueStatement1(context: KNativePointer, ident: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateContinueStatement1(context: KNativePointer, original: KNativePointer, ident: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ContinueStatementIdentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ContinueStatementIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ContinueStatementTargetConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ContinueStatementHasTargetConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ContinueStatementSetTarget(context: KNativePointer, receiver: KNativePointer, target: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSNewMultiDimArrayInstanceExpression(context: KNativePointer, typeReference: KNativePointer, dimensions: BigUint64Array, dimensionsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSNewMultiDimArrayInstanceExpression(context: KNativePointer, original: KNativePointer, typeReference: KNativePointer, dimensions: BigUint64Array, dimensionsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSNewMultiDimArrayInstanceExpression1(context: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSNewMultiDimArrayInstanceExpression1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewMultiDimArrayInstanceExpressionTypeReference(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewMultiDimArrayInstanceExpressionTypeReferenceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewMultiDimArrayInstanceExpressionDimensions(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewMultiDimArrayInstanceExpressionDimensionsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewMultiDimArrayInstanceExpressionClearPreferredType(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSNamedTupleMember(context: KNativePointer, label: KNativePointer, elementType: KNativePointer, optional_arg: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSNamedTupleMember(context: KNativePointer, original: KNativePointer, label: KNativePointer, elementType: KNativePointer, optional_arg: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSNamedTupleMemberLabelConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSNamedTupleMemberElementType(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSNamedTupleMemberElementTypeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSNamedTupleMemberIsOptionalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateImportExpression(context: KNativePointer, source: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateImportExpression(context: KNativePointer, original: KNativePointer, source: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportExpressionSource(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ImportExpressionSourceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateAstDumper(context: KNativePointer, node: KNativePointer, sourceCode: KStringPtr): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstDumperModifierToString(context: KNativePointer, receiver: KNativePointer, flags: KInt): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstDumperTypeOperatorToString(context: KNativePointer, receiver: KNativePointer, operatorType: KInt): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _AstDumperStrConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSNullType(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSNullType(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSUndefinedType(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSUndefinedType(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTypeofExpression(context: KNativePointer, argument: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTypeofExpression(context: KNativePointer, original: KNativePointer, argument: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeofExpressionArgumentConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSEnumMember(context: KNativePointer, key: KNativePointer, init: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSEnumMember(context: KNativePointer, original: KNativePointer, key: KNativePointer, init: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSEnumMember1(context: KNativePointer, key: KNativePointer, init: KNativePointer, isGenerated: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSEnumMember1(context: KNativePointer, original: KNativePointer, key: KNativePointer, init: KNativePointer, isGenerated: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumMemberKeyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumMemberKey(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumMemberInitConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumMemberInit(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumMemberIsGeneratedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSEnumMemberNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateSwitchStatement(context: KNativePointer, discriminant: KNativePointer, cases: BigUint64Array, casesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateSwitchStatement(context: KNativePointer, original: KNativePointer, discriminant: KNativePointer, cases: BigUint64Array, casesSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SwitchStatementDiscriminantConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SwitchStatementDiscriminant(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SwitchStatementSetDiscriminant(context: KNativePointer, receiver: KNativePointer, discriminant: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _SwitchStatementCasesConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SwitchStatementCases(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateDoWhileStatement(context: KNativePointer, body: KNativePointer, test: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateDoWhileStatement(context: KNativePointer, original: KNativePointer, body: KNativePointer, test: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _DoWhileStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _DoWhileStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _DoWhileStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _DoWhileStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateCatchClause(context: KNativePointer, param: KNativePointer, body: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateCatchClause(context: KNativePointer, original: KNativePointer, param: KNativePointer, body: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateCatchClause1(context: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateCatchClause1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CatchClauseParam(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CatchClauseParamConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CatchClauseBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CatchClauseBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CatchClauseIsDefaultCatchClauseConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateSequenceExpression(context: KNativePointer, sequence_arg: BigUint64Array, sequence_argSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateSequenceExpression(context: KNativePointer, original: KNativePointer, sequence_arg: BigUint64Array, sequence_argSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SequenceExpressionSequenceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _SequenceExpressionSequence(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateArrowFunctionExpression(context: KNativePointer, func: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateArrowFunctionExpression(context: KNativePointer, original: KNativePointer, func: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateArrowFunctionExpression1(context: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateArrowFunctionExpression1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionFunctionConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionFunction(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionCreateTypeAnnotation(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArrowFunctionExpressionSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateOmittedExpression(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateOmittedExpression(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSNewClassInstanceExpression(context: KNativePointer, typeReference: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSNewClassInstanceExpression(context: KNativePointer, original: KNativePointer, typeReference: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSNewClassInstanceExpression1(context: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSNewClassInstanceExpression1(context: KNativePointer, original: KNativePointer, other: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewClassInstanceExpressionGetTypeRefConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewClassInstanceExpressionGetArguments(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewClassInstanceExpressionGetArgumentsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewClassInstanceExpressionSetArguments(context: KNativePointer, receiver: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSNewClassInstanceExpressionAddToArgumentsFront(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSAsExpression(context: KNativePointer, expression: KNativePointer, typeAnnotation: KNativePointer, isConst: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSAsExpression(context: KNativePointer, original: KNativePointer, expression: KNativePointer, typeAnnotation: KNativePointer, isConst: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSAsExpressionExprConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSAsExpressionExpr(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSAsExpressionSetExpr(context: KNativePointer, receiver: KNativePointer, expr: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSAsExpressionIsConstConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSAsExpressionSetUncheckedCast(context: KNativePointer, receiver: KNativePointer, isUncheckedCast: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSAsExpressionTypeAnnotationConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSAsExpressionSetTsTypeAnnotation(context: KNativePointer, receiver: KNativePointer, typeAnnotation: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateForUpdateStatement(context: KNativePointer, init: KNativePointer, test: KNativePointer, update: KNativePointer, body: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForUpdateStatementInit(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForUpdateStatementInitConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForUpdateStatementTest(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForUpdateStatementTestConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForUpdateStatementUpdateConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForUpdateStatementBody(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ForUpdateStatementBodyConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSTypeReferencePart(context: KNativePointer, name: KNativePointer, typeParams: KNativePointer, prev: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSTypeReferencePart(context: KNativePointer, original: KNativePointer, name: KNativePointer, typeParams: KNativePointer, prev: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSTypeReferencePart1(context: KNativePointer, name: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSTypeReferencePart1(context: KNativePointer, original: KNativePointer, name: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePartPrevious(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePartPreviousConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePartName(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePartTypeParams(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePartTypeParamsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePartNameConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSTypeReferencePartGetIdent(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSReExportDeclarationGetETSImportDeclarationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSReExportDeclarationGetETSImportDeclarations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSReExportDeclarationGetProgramPathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSPrimitiveType(context: KNativePointer, type: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSPrimitiveType(context: KNativePointer, original: KNativePointer, type: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSPrimitiveTypeGetPrimitiveTypeConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeHasAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeEmplaceAnnotation(context: KNativePointer, receiver: KNativePointer, source: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeClearAnnotations(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeDumpAnnotationsConst(context: KNativePointer, receiver: KNativePointer, dumper: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeAnnotationsForUpdate(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeAnnotations(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeAnnotationsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeSetAnnotations(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _TypeNodeSetAnnotations1(context: KNativePointer, receiver: KNativePointer, annotationList: BigUint64Array, annotationListSequenceLength: KUInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateNewExpression(context: KNativePointer, callee: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateNewExpression(context: KNativePointer, original: KNativePointer, callee: KNativePointer, _arguments: BigUint64Array, _argumentsSequenceLength: KUInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _NewExpressionCalleeConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _NewExpressionArgumentsConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSParameterProperty(context: KNativePointer, accessibility: KInt, parameter: KNativePointer, readonly_arg: KBoolean, isStatic: KBoolean, isExport: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSParameterProperty(context: KNativePointer, original: KNativePointer, accessibility: KInt, parameter: KNativePointer, readonly_arg: KBoolean, isStatic: KBoolean, isExport: KBoolean): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSParameterPropertyAccessibilityConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSParameterPropertyReadonlyConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSParameterPropertyIsStaticConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSParameterPropertyIsExportConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _TSParameterPropertyParameterConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateETSWildcardType(context: KNativePointer, typeReference: KNativePointer, flags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateETSWildcardType(context: KNativePointer, original: KNativePointer, typeReference: KNativePointer, flags: KInt): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSWildcardTypeTypeReference(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ETSWildcardTypeTypeReferenceConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateTSThisType(context: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _UpdateTSThisType(context: KNativePointer, original: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetKind(context: KNativePointer, receiver: KNativePointer, kind: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramPushVarBinder(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramPushChecker(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramKindConst(context: KNativePointer, receiver: KNativePointer): KInt { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSourceCodeConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSourceFilePathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSourceFileFolderConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramFileNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramFileNameWithExtensionConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramAbsoluteNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramResolvedFilePathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramRelativeFilePathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetRelativeFilePath(context: KNativePointer, receiver: KNativePointer, relPath: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramAst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramAstConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetAst(context: KNativePointer, receiver: KNativePointer, ast: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramGlobalClass(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramGlobalClassConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetGlobalClass(context: KNativePointer, receiver: KNativePointer, globalClass: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramPackageStartConst(context: KNativePointer, receiver: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetPackageStart(context: KNativePointer, receiver: KNativePointer, start: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetSource(context: KNativePointer, receiver: KNativePointer, sourceCode: KStringPtr, sourceFilePath: KStringPtr, sourceFileFolder: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetPackageInfo(context: KNativePointer, receiver: KNativePointer, name: KStringPtr, kind: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramModuleNameConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramModulePrefixConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsSeparateModuleConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsDeclarationModuleConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsPackageConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsDeclForDynamicStaticInteropConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetFlag(context: KNativePointer, receiver: KNativePointer, flag: KInt): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramGetFlagConst(context: KNativePointer, receiver: KNativePointer, flag: KInt): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetASTChecked(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramRemoveAstChecked(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsASTChecked(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramMarkASTAsLowered(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsASTLoweredConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsStdLibConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsGenAbcForExternalConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramSetGenAbcForExternalSources(context: KNativePointer, receiver: KNativePointer, genAbc: KBoolean): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramDumpConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramDumpSilentConst(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramIsDiedConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } + _ProgramAddFileDependencies(context: KNativePointer, receiver: KNativePointer, file: KStringPtr, depFile: KStringPtr): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _CreateArkTsConfig(context: KNativePointer, configPath: KStringPtr, de: KNativePointer): KNativePointer { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigResolveAllDependenciesInArkTsConfig(context: KNativePointer, receiver: KNativePointer): void { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigConfigPathConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigPackageConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigBaseUrlConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigRootDirConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigOutDirConst(context: KNativePointer, receiver: KNativePointer): KStringPtr { + throw new Error("This methods was not overloaded by native module initialization") + } + _ArkTsConfigUseUrlConst(context: KNativePointer, receiver: KNativePointer): KBoolean { + throw new Error("This methods was not overloaded by native module initialization") + } +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/factory.ts b/koala_tools/ui2abc/libarkts/src/generated/factory.ts new file mode 100644 index 0000000000000000000000000000000000000000..530293ff5dec7fc3e1868b22ffc1ad3a09b69569 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/factory.ts @@ -0,0 +1,1287 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + isSameNativeObject, + unpackString, + updateNodeByNode +} from "../reexport-for-generated" + +import { AnnotationDeclaration } from "./peers/AnnotationDeclaration" +import { AnnotationUsage } from "./peers/AnnotationUsage" +import { ArrowFunctionExpression } from "./peers/ArrowFunctionExpression" +import { AssertStatement } from "./peers/AssertStatement" +import { AwaitExpression } from "./peers/AwaitExpression" +import { BigIntLiteral } from "./peers/BigIntLiteral" +import { BinaryExpression } from "./peers/BinaryExpression" +import { BlockExpression } from "./peers/BlockExpression" +import { BlockStatement } from "./peers/BlockStatement" +import { BooleanLiteral } from "./peers/BooleanLiteral" +import { BreakStatement } from "./peers/BreakStatement" +import { CatchClause } from "./peers/CatchClause" +import { ChainExpression } from "./peers/ChainExpression" +import { CharLiteral } from "./peers/CharLiteral" +import { ClassDeclaration } from "./peers/ClassDeclaration" +import { ClassDefinition } from "./peers/ClassDefinition" +import { ClassExpression } from "./peers/ClassExpression" +import { ConditionalExpression } from "./peers/ConditionalExpression" +import { ContinueStatement } from "./peers/ContinueStatement" +import { DebuggerStatement } from "./peers/DebuggerStatement" +import { Decorator } from "./peers/Decorator" +import { DoWhileStatement } from "./peers/DoWhileStatement" +import { ETSClassLiteral } from "./peers/ETSClassLiteral" +import { ETSIntrinsicNode } from "./peers/ETSIntrinsicNode" +import { ETSKeyofType } from "./peers/ETSKeyofType" +import { ETSNewArrayInstanceExpression } from "./peers/ETSNewArrayInstanceExpression" +import { ETSNewClassInstanceExpression } from "./peers/ETSNewClassInstanceExpression" +import { ETSNewMultiDimArrayInstanceExpression } from "./peers/ETSNewMultiDimArrayInstanceExpression" +import { ETSNullType } from "./peers/ETSNullType" +import { ETSPrimitiveType } from "./peers/ETSPrimitiveType" +import { ETSTypeReference } from "./peers/ETSTypeReference" +import { ETSTypeReferencePart } from "./peers/ETSTypeReferencePart" +import { ETSUndefinedType } from "./peers/ETSUndefinedType" +import { ETSUnionType } from "./peers/ETSUnionType" +import { EmptyStatement } from "./peers/EmptyStatement" +import { Es2pandaIntrinsicNodeType } from "./Es2pandaEnums" +import { Es2pandaMetaPropertyKind } from "./Es2pandaEnums" +import { Es2pandaModifierFlags } from "./Es2pandaEnums" +import { Es2pandaPrimitiveType } from "./Es2pandaEnums" +import { Es2pandaPropertyKind } from "./Es2pandaEnums" +import { Es2pandaTokenType } from "./Es2pandaEnums" +import { Es2pandaVariableDeclarationKind } from "./Es2pandaEnums" +import { ExportAllDeclaration } from "./peers/ExportAllDeclaration" +import { ExportDefaultDeclaration } from "./peers/ExportDefaultDeclaration" +import { ExportSpecifier } from "./peers/ExportSpecifier" +import { Expression } from "./peers/Expression" +import { ExpressionStatement } from "./peers/ExpressionStatement" +import { ForInStatement } from "./peers/ForInStatement" +import { ForOfStatement } from "./peers/ForOfStatement" +import { ForUpdateStatement } from "./peers/ForUpdateStatement" +import { FunctionDeclaration } from "./peers/FunctionDeclaration" +import { FunctionExpression } from "./peers/FunctionExpression" +import { FunctionSignature } from "./peers/FunctionSignature" +import { Identifier } from "./peers/Identifier" +import { IfStatement } from "./peers/IfStatement" +import { ImportDefaultSpecifier } from "./peers/ImportDefaultSpecifier" +import { ImportExpression } from "./peers/ImportExpression" +import { ImportNamespaceSpecifier } from "./peers/ImportNamespaceSpecifier" +import { ImportSpecifier } from "./peers/ImportSpecifier" +import { LabelledStatement } from "./peers/LabelledStatement" +import { MetaProperty } from "./peers/MetaProperty" +import { NamedType } from "./peers/NamedType" +import { NewExpression } from "./peers/NewExpression" +import { NullLiteral } from "./peers/NullLiteral" +import { OmittedExpression } from "./peers/OmittedExpression" +import { OpaqueTypeNode } from "./peers/OpaqueTypeNode" +import { PrefixAssertionExpression } from "./peers/PrefixAssertionExpression" +import { Property } from "./peers/Property" +import { ReturnStatement } from "./peers/ReturnStatement" +import { ScriptFunction } from "./peers/ScriptFunction" +import { SequenceExpression } from "./peers/SequenceExpression" +import { Statement } from "./peers/Statement" +import { StringLiteral } from "./peers/StringLiteral" +import { SuperExpression } from "./peers/SuperExpression" +import { SwitchCaseStatement } from "./peers/SwitchCaseStatement" +import { SwitchStatement } from "./peers/SwitchStatement" +import { TSAnyKeyword } from "./peers/TSAnyKeyword" +import { TSArrayType } from "./peers/TSArrayType" +import { TSAsExpression } from "./peers/TSAsExpression" +import { TSBigintKeyword } from "./peers/TSBigintKeyword" +import { TSBooleanKeyword } from "./peers/TSBooleanKeyword" +import { TSClassImplements } from "./peers/TSClassImplements" +import { TSConditionalType } from "./peers/TSConditionalType" +import { TSEnumMember } from "./peers/TSEnumMember" +import { TSExternalModuleReference } from "./peers/TSExternalModuleReference" +import { TSImportEqualsDeclaration } from "./peers/TSImportEqualsDeclaration" +import { TSImportType } from "./peers/TSImportType" +import { TSIndexSignature } from "./peers/TSIndexSignature" +import { TSIndexedAccessType } from "./peers/TSIndexedAccessType" +import { TSInferType } from "./peers/TSInferType" +import { TSInterfaceBody } from "./peers/TSInterfaceBody" +import { TSInterfaceHeritage } from "./peers/TSInterfaceHeritage" +import { TSIntersectionType } from "./peers/TSIntersectionType" +import { TSLiteralType } from "./peers/TSLiteralType" +import { TSModuleBlock } from "./peers/TSModuleBlock" +import { TSNamedTupleMember } from "./peers/TSNamedTupleMember" +import { TSNeverKeyword } from "./peers/TSNeverKeyword" +import { TSNonNullExpression } from "./peers/TSNonNullExpression" +import { TSNullKeyword } from "./peers/TSNullKeyword" +import { TSNumberKeyword } from "./peers/TSNumberKeyword" +import { TSObjectKeyword } from "./peers/TSObjectKeyword" +import { TSQualifiedName } from "./peers/TSQualifiedName" +import { TSStringKeyword } from "./peers/TSStringKeyword" +import { TSThisType } from "./peers/TSThisType" +import { TSTupleType } from "./peers/TSTupleType" +import { TSTypeAliasDeclaration } from "./peers/TSTypeAliasDeclaration" +import { TSTypeAssertion } from "./peers/TSTypeAssertion" +import { TSTypeLiteral } from "./peers/TSTypeLiteral" +import { TSTypeParameter } from "./peers/TSTypeParameter" +import { TSTypeParameterDeclaration } from "./peers/TSTypeParameterDeclaration" +import { TSTypeParameterInstantiation } from "./peers/TSTypeParameterInstantiation" +import { TSTypePredicate } from "./peers/TSTypePredicate" +import { TSTypeQuery } from "./peers/TSTypeQuery" +import { TSTypeReference } from "./peers/TSTypeReference" +import { TSUndefinedKeyword } from "./peers/TSUndefinedKeyword" +import { TSUnionType } from "./peers/TSUnionType" +import { TSUnknownKeyword } from "./peers/TSUnknownKeyword" +import { TSVoidKeyword } from "./peers/TSVoidKeyword" +import { TaggedTemplateExpression } from "./peers/TaggedTemplateExpression" +import { TemplateElement } from "./peers/TemplateElement" +import { TemplateLiteral } from "./peers/TemplateLiteral" +import { ThisExpression } from "./peers/ThisExpression" +import { ThrowStatement } from "./peers/ThrowStatement" +import { TypeNode } from "./peers/TypeNode" +import { TypeofExpression } from "./peers/TypeofExpression" +import { UnaryExpression } from "./peers/UnaryExpression" +import { UndefinedLiteral } from "./peers/UndefinedLiteral" +import { UpdateExpression } from "./peers/UpdateExpression" +import { VariableDeclaration } from "./peers/VariableDeclaration" +import { VariableDeclarator } from "./peers/VariableDeclarator" +import { WhileStatement } from "./peers/WhileStatement" +import { YieldExpression } from "./peers/YieldExpression" + +export const factory = { + createLabelledStatement(ident?: Identifier, body?: Statement): LabelledStatement { + return LabelledStatement.createLabelledStatement(ident, body) + } + , + updateLabelledStatement(original: LabelledStatement, ident?: Identifier, body?: Statement): LabelledStatement { + if (isSameNativeObject(ident, original.ident) && isSameNativeObject(body, original.body)) + return original + return updateNodeByNode(LabelledStatement.createLabelledStatement(ident, body), original) + } + , + createThrowStatement(argument?: Expression): ThrowStatement { + return ThrowStatement.createThrowStatement(argument) + } + , + updateThrowStatement(original: ThrowStatement, argument?: Expression): ThrowStatement { + if (isSameNativeObject(argument, original.argument)) + return original + return updateNodeByNode(ThrowStatement.createThrowStatement(argument), original) + } + , + createTSVoidKeyword(): TSVoidKeyword { + return TSVoidKeyword.createTSVoidKeyword() + } + , + updateTSVoidKeyword(original: TSVoidKeyword): TSVoidKeyword { + return updateNodeByNode(TSVoidKeyword.createTSVoidKeyword(), original) + } + , + createIfStatement(test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement { + return IfStatement.createIfStatement(test, consequent, alternate) + } + , + updateIfStatement(original: IfStatement, test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement { + if (isSameNativeObject(test, original.test) && isSameNativeObject(consequent, original.consequent) && isSameNativeObject(alternate, original.alternate)) + return original + return updateNodeByNode(IfStatement.createIfStatement(test, consequent, alternate), original) + } + , + createDecorator(expr?: Expression): Decorator { + return Decorator.createDecorator(expr) + } + , + updateDecorator(original: Decorator, expr?: Expression): Decorator { + if (isSameNativeObject(expr, original.expr)) + return original + return updateNodeByNode(Decorator.createDecorator(expr), original) + } + , + createTSNeverKeyword(): TSNeverKeyword { + return TSNeverKeyword.createTSNeverKeyword() + } + , + updateTSNeverKeyword(original: TSNeverKeyword): TSNeverKeyword { + return updateNodeByNode(TSNeverKeyword.createTSNeverKeyword(), original) + } + , + createImportDefaultSpecifier(local?: Identifier): ImportDefaultSpecifier { + return ImportDefaultSpecifier.createImportDefaultSpecifier(local) + } + , + updateImportDefaultSpecifier(original: ImportDefaultSpecifier, local?: Identifier): ImportDefaultSpecifier { + if (isSameNativeObject(local, original.local)) + return original + return updateNodeByNode(ImportDefaultSpecifier.createImportDefaultSpecifier(local), original) + } + , + createImportSpecifier(imported?: Identifier, local?: Identifier): ImportSpecifier { + return ImportSpecifier.createImportSpecifier(imported, local) + } + , + updateImportSpecifier(original: ImportSpecifier, imported?: Identifier, local?: Identifier): ImportSpecifier { + if (isSameNativeObject(imported, original.imported) && isSameNativeObject(local, original.local)) + return original + return updateNodeByNode(ImportSpecifier.createImportSpecifier(imported, local), original) + } + , + createConditionalExpression(test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression { + return ConditionalExpression.createConditionalExpression(test, consequent, alternate) + } + , + updateConditionalExpression(original: ConditionalExpression, test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression { + if (isSameNativeObject(test, original.test) && isSameNativeObject(consequent, original.consequent) && isSameNativeObject(alternate, original.alternate)) + return original + return updateNodeByNode(ConditionalExpression.createConditionalExpression(test, consequent, alternate), original) + } + , + createBigIntLiteral(str: string): BigIntLiteral { + return BigIntLiteral.createBigIntLiteral(str) + } + , + updateBigIntLiteral(original: BigIntLiteral, str: string): BigIntLiteral { + if (isSameNativeObject(str, original.str)) + return original + return updateNodeByNode(BigIntLiteral.createBigIntLiteral(str), original) + } + , + createTSImportType(param: Expression | undefined, typeParams: TSTypeParameterInstantiation | undefined, qualifier: Expression | undefined, isTypeof: boolean): TSImportType { + return TSImportType.createTSImportType(param, typeParams, qualifier, isTypeof) + } + , + updateTSImportType(original: TSImportType, param: Expression | undefined, typeParams: TSTypeParameterInstantiation | undefined, qualifier: Expression | undefined, isTypeof: boolean): TSImportType { + if (isSameNativeObject(param, original.param) && isSameNativeObject(typeParams, original.typeParams) && isSameNativeObject(qualifier, original.qualifier) && isSameNativeObject(isTypeof, original.isTypeof)) + return original + return updateNodeByNode(TSImportType.createTSImportType(param, typeParams, qualifier, isTypeof), original) + } + , + createTaggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression { + return TaggedTemplateExpression.createTaggedTemplateExpression(tag, quasi, typeParams) + } + , + updateTaggedTemplateExpression(original: TaggedTemplateExpression, tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression { + if (isSameNativeObject(tag, original.tag) && isSameNativeObject(quasi, original.quasi) && isSameNativeObject(typeParams, original.typeParams)) + return original + return updateNodeByNode(TaggedTemplateExpression.createTaggedTemplateExpression(tag, quasi, typeParams), original) + } + , + createFunctionDeclaration(_function: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration { + return FunctionDeclaration.createFunctionDeclaration(_function, annotations, isAnonymous) + } + , + updateFunctionDeclaration(original: FunctionDeclaration, _function: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration { + if (isSameNativeObject(_function, original.function) && isSameNativeObject(annotations, original.annotations) && isSameNativeObject(isAnonymous, original.isAnonymous)) + return original + return updateNodeByNode(FunctionDeclaration.createFunctionDeclaration(_function, annotations, isAnonymous), original) + } + , + createETSTypeReference(part?: ETSTypeReferencePart): ETSTypeReference { + return ETSTypeReference.createETSTypeReference(part) + } + , + updateETSTypeReference(original: ETSTypeReference, part?: ETSTypeReferencePart): ETSTypeReference { + if (isSameNativeObject(part, original.part)) + return original + return updateNodeByNode(ETSTypeReference.createETSTypeReference(part), original) + } + , + createTSTypeReference(typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference { + return TSTypeReference.createTSTypeReference(typeName, typeParams) + } + , + updateTSTypeReference(original: TSTypeReference, typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference { + if (isSameNativeObject(typeName, original.typeName) && isSameNativeObject(typeParams, original.typeParams)) + return original + return updateNodeByNode(TSTypeReference.createTSTypeReference(typeName, typeParams), original) + } + , + createNamedType(name?: Identifier): NamedType { + return NamedType.createNamedType(name) + } + , + updateNamedType(original: NamedType, name?: Identifier): NamedType { + if (isSameNativeObject(name, original.name)) + return original + return updateNodeByNode(NamedType.createNamedType(name), original) + } + , + createTemplateElement(raw: string, cooked: string): TemplateElement { + return TemplateElement.create1TemplateElement(raw, cooked) + } + , + updateTemplateElement(original: TemplateElement, raw: string, cooked: string): TemplateElement { + if (isSameNativeObject(raw, original.raw) && isSameNativeObject(cooked, original.cooked)) + return original + return updateNodeByNode(TemplateElement.create1TemplateElement(raw, cooked), original) + } + , + createVariableDeclaration(kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[], annotations?: readonly AnnotationUsage[]): VariableDeclaration { + return VariableDeclaration.createVariableDeclaration(kind, declarators, annotations) + } + , + updateVariableDeclaration(original: VariableDeclaration, kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[], annotations?: readonly AnnotationUsage[]): VariableDeclaration { + if (isSameNativeObject(kind, original.kind) && isSameNativeObject(declarators, original.declarators) && isSameNativeObject(annotations, original.annotations)) + return original + return updateNodeByNode(VariableDeclaration.createVariableDeclaration(kind, declarators, annotations), original) + } + , + createUndefinedLiteral(): UndefinedLiteral { + return UndefinedLiteral.createUndefinedLiteral() + } + , + updateUndefinedLiteral(original: UndefinedLiteral): UndefinedLiteral { + return updateNodeByNode(UndefinedLiteral.createUndefinedLiteral(), original) + } + , + createTSClassImplements(expr?: Expression, typeParameters?: TSTypeParameterInstantiation): TSClassImplements { + return TSClassImplements.createTSClassImplements(expr, typeParameters) + } + , + updateTSClassImplements(original: TSClassImplements, expr?: Expression, typeParameters?: TSTypeParameterInstantiation): TSClassImplements { + if (isSameNativeObject(expr, original.expr) && isSameNativeObject(typeParameters, original.typeParameters)) + return original + return updateNodeByNode(TSClassImplements.createTSClassImplements(expr, typeParameters), original) + } + , + createTSObjectKeyword(): TSObjectKeyword { + return TSObjectKeyword.createTSObjectKeyword() + } + , + updateTSObjectKeyword(original: TSObjectKeyword): TSObjectKeyword { + return updateNodeByNode(TSObjectKeyword.createTSObjectKeyword(), original) + } + , + createETSUnionType(types: readonly TypeNode[], annotations?: readonly AnnotationUsage[]): ETSUnionType { + return ETSUnionType.createETSUnionType(types, annotations) + } + , + updateETSUnionType(original: ETSUnionType, types: readonly TypeNode[], annotations?: readonly AnnotationUsage[]): ETSUnionType { + if (isSameNativeObject(types, original.types) && isSameNativeObject(annotations, original.annotations)) + return original + return updateNodeByNode(ETSUnionType.createETSUnionType(types, annotations), original) + } + , + createETSKeyofType(typeRef?: TypeNode): ETSKeyofType { + return ETSKeyofType.createETSKeyofType(typeRef) + } + , + updateETSKeyofType(original: ETSKeyofType, typeRef?: TypeNode): ETSKeyofType { + if (isSameNativeObject(typeRef, original.typeRef)) + return original + return updateNodeByNode(ETSKeyofType.createETSKeyofType(typeRef), original) + } + , + createTSConditionalType(checkType?: Expression, extendsType?: Expression, trueType?: Expression, falseType?: Expression): TSConditionalType { + return TSConditionalType.createTSConditionalType(checkType, extendsType, trueType, falseType) + } + , + updateTSConditionalType(original: TSConditionalType, checkType?: Expression, extendsType?: Expression, trueType?: Expression, falseType?: Expression): TSConditionalType { + if (isSameNativeObject(checkType, original.checkType) && isSameNativeObject(extendsType, original.extendsType) && isSameNativeObject(trueType, original.trueType) && isSameNativeObject(falseType, original.falseType)) + return original + return updateNodeByNode(TSConditionalType.createTSConditionalType(checkType, extendsType, trueType, falseType), original) + } + , + createTSLiteralType(literal?: Expression): TSLiteralType { + return TSLiteralType.createTSLiteralType(literal) + } + , + updateTSLiteralType(original: TSLiteralType, literal?: Expression): TSLiteralType { + if (isSameNativeObject(literal, original.literal)) + return original + return updateNodeByNode(TSLiteralType.createTSLiteralType(literal), original) + } + , + createTSTypeAliasDeclaration(id: Identifier | undefined, typeParams: TSTypeParameterDeclaration | undefined, typeAnnotation: TypeNode, annotations?: readonly AnnotationUsage[], modifierFlags?: Es2pandaModifierFlags): TSTypeAliasDeclaration { + return TSTypeAliasDeclaration.createTSTypeAliasDeclaration(id, typeParams, typeAnnotation, annotations, modifierFlags) + } + , + updateTSTypeAliasDeclaration(original: TSTypeAliasDeclaration, id: Identifier | undefined, typeParams: TSTypeParameterDeclaration | undefined, typeAnnotation: TypeNode, annotations?: readonly AnnotationUsage[], modifierFlags?: Es2pandaModifierFlags): TSTypeAliasDeclaration { + if (isSameNativeObject(id, original.id) && isSameNativeObject(typeParams, original.typeParams) && isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(annotations, original.annotations) && isSameNativeObject(modifierFlags, original.modifierFlags)) + return original + return updateNodeByNode(TSTypeAliasDeclaration.createTSTypeAliasDeclaration(id, typeParams, typeAnnotation, annotations, modifierFlags), original) + } + , + createDebuggerStatement(): DebuggerStatement { + return DebuggerStatement.createDebuggerStatement() + } + , + updateDebuggerStatement(original: DebuggerStatement): DebuggerStatement { + return updateNodeByNode(DebuggerStatement.createDebuggerStatement(), original) + } + , + createReturnStatement(argument?: Expression): ReturnStatement { + return ReturnStatement.create1ReturnStatement(argument) + } + , + updateReturnStatement(original: ReturnStatement, argument?: Expression): ReturnStatement { + if (isSameNativeObject(argument, original.argument)) + return original + return updateNodeByNode(ReturnStatement.create1ReturnStatement(argument), original) + } + , + createExportDefaultDeclaration(decl: AstNode | undefined, isExportEquals: boolean): ExportDefaultDeclaration { + return ExportDefaultDeclaration.createExportDefaultDeclaration(decl, isExportEquals) + } + , + updateExportDefaultDeclaration(original: ExportDefaultDeclaration, decl: AstNode | undefined, isExportEquals: boolean): ExportDefaultDeclaration { + if (isSameNativeObject(decl, original.decl) && isSameNativeObject(isExportEquals, original.isExportEquals)) + return original + return updateNodeByNode(ExportDefaultDeclaration.createExportDefaultDeclaration(decl, isExportEquals), original) + } + , + createTSInterfaceBody(body: readonly AstNode[]): TSInterfaceBody { + return TSInterfaceBody.createTSInterfaceBody(body) + } + , + updateTSInterfaceBody(original: TSInterfaceBody, body: readonly AstNode[]): TSInterfaceBody { + if (isSameNativeObject(body, original.body)) + return original + return updateNodeByNode(TSInterfaceBody.createTSInterfaceBody(body), original) + } + , + createTSTypeQuery(exprName?: Expression): TSTypeQuery { + return TSTypeQuery.createTSTypeQuery(exprName) + } + , + updateTSTypeQuery(original: TSTypeQuery, exprName?: Expression): TSTypeQuery { + if (isSameNativeObject(exprName, original.exprName)) + return original + return updateNodeByNode(TSTypeQuery.createTSTypeQuery(exprName), original) + } + , + createTSBigintKeyword(): TSBigintKeyword { + return TSBigintKeyword.createTSBigintKeyword() + } + , + updateTSBigintKeyword(original: TSBigintKeyword): TSBigintKeyword { + return updateNodeByNode(TSBigintKeyword.createTSBigintKeyword(), original) + } + , + createProperty(kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property { + return Property.create1Property(kind, key, value, isMethod, isComputed) + } + , + updateProperty(original: Property, kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property { + if (isSameNativeObject(kind, original.kind) && isSameNativeObject(key, original.key) && isSameNativeObject(value, original.value) && isSameNativeObject(isMethod, original.isMethod) && isSameNativeObject(isComputed, original.isComputed)) + return original + return updateNodeByNode(Property.create1Property(kind, key, value, isMethod, isComputed), original) + } + , + createStringLiteral(str: string): StringLiteral { + return StringLiteral.create1StringLiteral(str) + } + , + updateStringLiteral(original: StringLiteral, str: string): StringLiteral { + if (isSameNativeObject(str, original.str)) + return original + return updateNodeByNode(StringLiteral.create1StringLiteral(str), original) + } + , + createTSTypeAssertion(typeAnnotation?: TypeNode, expression?: Expression): TSTypeAssertion { + return TSTypeAssertion.createTSTypeAssertion(typeAnnotation, expression) + } + , + updateTSTypeAssertion(original: TSTypeAssertion, typeAnnotation?: TypeNode, expression?: Expression): TSTypeAssertion { + if (isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(expression, original.expression)) + return original + return updateNodeByNode(TSTypeAssertion.createTSTypeAssertion(typeAnnotation, expression), original) + } + , + createTSExternalModuleReference(expr?: Expression): TSExternalModuleReference { + return TSExternalModuleReference.createTSExternalModuleReference(expr) + } + , + updateTSExternalModuleReference(original: TSExternalModuleReference, expr?: Expression): TSExternalModuleReference { + if (isSameNativeObject(expr, original.expr)) + return original + return updateNodeByNode(TSExternalModuleReference.createTSExternalModuleReference(expr), original) + } + , + createTSUndefinedKeyword(): TSUndefinedKeyword { + return TSUndefinedKeyword.createTSUndefinedKeyword() + } + , + updateTSUndefinedKeyword(original: TSUndefinedKeyword): TSUndefinedKeyword { + return updateNodeByNode(TSUndefinedKeyword.createTSUndefinedKeyword(), original) + } + , + createUnaryExpression(argument: Expression | undefined, operatorType: Es2pandaTokenType): UnaryExpression { + return UnaryExpression.createUnaryExpression(argument, operatorType) + } + , + updateUnaryExpression(original: UnaryExpression, argument: Expression | undefined, operatorType: Es2pandaTokenType): UnaryExpression { + if (isSameNativeObject(argument, original.argument) && isSameNativeObject(operatorType, original.operatorType)) + return original + return updateNodeByNode(UnaryExpression.createUnaryExpression(argument, operatorType), original) + } + , + createForInStatement(left?: AstNode, right?: Expression, body?: Statement): ForInStatement { + return ForInStatement.createForInStatement(left, right, body) + } + , + updateForInStatement(original: ForInStatement, left?: AstNode, right?: Expression, body?: Statement): ForInStatement { + if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right) && isSameNativeObject(body, original.body)) + return original + return updateNodeByNode(ForInStatement.createForInStatement(left, right, body), original) + } + , + createThisExpression(): ThisExpression { + return ThisExpression.createThisExpression() + } + , + updateThisExpression(original: ThisExpression): ThisExpression { + return updateNodeByNode(ThisExpression.createThisExpression(), original) + } + , + createBinaryExpression(left: Expression | undefined, right: Expression | undefined, operatorType: Es2pandaTokenType): BinaryExpression { + return BinaryExpression.createBinaryExpression(left, right, operatorType) + } + , + updateBinaryExpression(original: BinaryExpression, left: Expression | undefined, right: Expression | undefined, operatorType: Es2pandaTokenType): BinaryExpression { + if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right) && isSameNativeObject(operatorType, original.operatorType)) + return original + return updateNodeByNode(BinaryExpression.createBinaryExpression(left, right, operatorType), original) + } + , + createSuperExpression(): SuperExpression { + return SuperExpression.createSuperExpression() + } + , + updateSuperExpression(original: SuperExpression): SuperExpression { + return updateNodeByNode(SuperExpression.createSuperExpression(), original) + } + , + createAssertStatement(test?: Expression, second?: Expression): AssertStatement { + return AssertStatement.createAssertStatement(test, second) + } + , + updateAssertStatement(original: AssertStatement, test?: Expression, second?: Expression): AssertStatement { + if (isSameNativeObject(test, original.test) && isSameNativeObject(second, original.second)) + return original + return updateNodeByNode(AssertStatement.createAssertStatement(test, second), original) + } + , + createTSStringKeyword(): TSStringKeyword { + return TSStringKeyword.createTSStringKeyword() + } + , + updateTSStringKeyword(original: TSStringKeyword): TSStringKeyword { + return updateNodeByNode(TSStringKeyword.createTSStringKeyword(), original) + } + , + createExpressionStatement(expression?: Expression): ExpressionStatement { + return ExpressionStatement.createExpressionStatement(expression) + } + , + updateExpressionStatement(original: ExpressionStatement, expression?: Expression): ExpressionStatement { + if (isSameNativeObject(expression, original.expression)) + return original + return updateNodeByNode(ExpressionStatement.createExpressionStatement(expression), original) + } + , + createMetaProperty(kind: Es2pandaMetaPropertyKind): MetaProperty { + return MetaProperty.createMetaProperty(kind) + } + , + updateMetaProperty(original: MetaProperty, kind: Es2pandaMetaPropertyKind): MetaProperty { + if (isSameNativeObject(kind, original.kind)) + return original + return updateNodeByNode(MetaProperty.createMetaProperty(kind), original) + } + , + createTSArrayType(elementType?: TypeNode): TSArrayType { + return TSArrayType.createTSArrayType(elementType) + } + , + updateTSArrayType(original: TSArrayType, elementType?: TypeNode): TSArrayType { + if (isSameNativeObject(elementType, original.elementType)) + return original + return updateNodeByNode(TSArrayType.createTSArrayType(elementType), original) + } + , + createExportAllDeclaration(source?: StringLiteral, exported?: Identifier): ExportAllDeclaration { + return ExportAllDeclaration.createExportAllDeclaration(source, exported) + } + , + updateExportAllDeclaration(original: ExportAllDeclaration, source?: StringLiteral, exported?: Identifier): ExportAllDeclaration { + if (isSameNativeObject(source, original.source) && isSameNativeObject(exported, original.exported)) + return original + return updateNodeByNode(ExportAllDeclaration.createExportAllDeclaration(source, exported), original) + } + , + createExportSpecifier(local?: Identifier, exported?: Identifier): ExportSpecifier { + return ExportSpecifier.createExportSpecifier(local, exported) + } + , + updateExportSpecifier(original: ExportSpecifier, local?: Identifier, exported?: Identifier): ExportSpecifier { + if (isSameNativeObject(local, original.local) && isSameNativeObject(exported, original.exported)) + return original + return updateNodeByNode(ExportSpecifier.createExportSpecifier(local, exported), original) + } + , + createTSTupleType(elementType: readonly TypeNode[]): TSTupleType { + return TSTupleType.createTSTupleType(elementType) + } + , + updateTSTupleType(original: TSTupleType, elementType: readonly TypeNode[]): TSTupleType { + if (isSameNativeObject(elementType, original.elementType)) + return original + return updateNodeByNode(TSTupleType.createTSTupleType(elementType), original) + } + , + createFunctionExpression(id?: Identifier, _function?: ScriptFunction): FunctionExpression { + return FunctionExpression.create1FunctionExpression(id, _function) + } + , + updateFunctionExpression(original: FunctionExpression, id?: Identifier, _function?: ScriptFunction): FunctionExpression { + if (isSameNativeObject(id, original.id) && isSameNativeObject(_function, original.function)) + return original + return updateNodeByNode(FunctionExpression.create1FunctionExpression(id, _function), original) + } + , + createTSIndexSignature(param: Expression | undefined, typeAnnotation: TypeNode | undefined, readonly: boolean): TSIndexSignature { + return TSIndexSignature.createTSIndexSignature(param, typeAnnotation, readonly) + } + , + updateTSIndexSignature(original: TSIndexSignature, param: Expression | undefined, typeAnnotation: TypeNode | undefined, readonly: boolean): TSIndexSignature { + if (isSameNativeObject(param, original.param) && isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(readonly, original.readonly)) + return original + return updateNodeByNode(TSIndexSignature.createTSIndexSignature(param, typeAnnotation, readonly), original) + } + , + createCharLiteral(): CharLiteral { + return CharLiteral.createCharLiteral() + } + , + updateCharLiteral(original: CharLiteral): CharLiteral { + return updateNodeByNode(CharLiteral.createCharLiteral(), original) + } + , + createETSIntrinsicNode(type: Es2pandaIntrinsicNodeType, _arguments: readonly Expression[]): ETSIntrinsicNode { + return ETSIntrinsicNode.create2ETSIntrinsicNode(type, _arguments) + } + , + updateETSIntrinsicNode(original: ETSIntrinsicNode, type: Es2pandaIntrinsicNodeType, _arguments: readonly Expression[]): ETSIntrinsicNode { + if (isSameNativeObject(type, original.type) && isSameNativeObject(_arguments, original.arguments)) + return original + return updateNodeByNode(ETSIntrinsicNode.create2ETSIntrinsicNode(type, _arguments), original) + } + , + createTSModuleBlock(statements: readonly Statement[]): TSModuleBlock { + return TSModuleBlock.createTSModuleBlock(statements) + } + , + updateTSModuleBlock(original: TSModuleBlock, statements: readonly Statement[]): TSModuleBlock { + if (isSameNativeObject(statements, original.statements)) + return original + return updateNodeByNode(TSModuleBlock.createTSModuleBlock(statements), original) + } + , + createETSNewArrayInstanceExpression(typeReference?: TypeNode, dimension?: Expression): ETSNewArrayInstanceExpression { + return ETSNewArrayInstanceExpression.createETSNewArrayInstanceExpression(typeReference, dimension) + } + , + updateETSNewArrayInstanceExpression(original: ETSNewArrayInstanceExpression, typeReference?: TypeNode, dimension?: Expression): ETSNewArrayInstanceExpression { + if (isSameNativeObject(typeReference, original.typeReference) && isSameNativeObject(dimension, original.dimension)) + return original + return updateNodeByNode(ETSNewArrayInstanceExpression.createETSNewArrayInstanceExpression(typeReference, dimension), original) + } + , + createAnnotationDeclaration(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationDeclaration { + return AnnotationDeclaration.create1AnnotationDeclaration(expr, properties) + } + , + updateAnnotationDeclaration(original: AnnotationDeclaration, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationDeclaration { + if (isSameNativeObject(expr, original.expr) && isSameNativeObject(properties, original.properties)) + return original + return updateNodeByNode(AnnotationDeclaration.create1AnnotationDeclaration(expr, properties), original) + } + , + createAnnotationUsage(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage { + return AnnotationUsage.create1AnnotationUsage(expr, properties) + } + , + updateAnnotationUsage(original: AnnotationUsage, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage { + if (isSameNativeObject(expr, original.expr) && isSameNativeObject(properties, original.properties)) + return original + return updateNodeByNode(AnnotationUsage.create1AnnotationUsage(expr, properties), original) + } + , + createEmptyStatement(isBrokenStatement: boolean): EmptyStatement { + return EmptyStatement.create1EmptyStatement(isBrokenStatement) + } + , + updateEmptyStatement(original: EmptyStatement, isBrokenStatement: boolean): EmptyStatement { + if (isSameNativeObject(isBrokenStatement, original.isBrokenStatement)) + return original + return updateNodeByNode(EmptyStatement.create1EmptyStatement(isBrokenStatement), original) + } + , + createWhileStatement(test?: Expression, body?: Statement): WhileStatement { + return WhileStatement.createWhileStatement(test, body) + } + , + updateWhileStatement(original: WhileStatement, test?: Expression, body?: Statement): WhileStatement { + if (isSameNativeObject(test, original.test) && isSameNativeObject(body, original.body)) + return original + return updateNodeByNode(WhileStatement.createWhileStatement(test, body), original) + } + , + createFunctionSignature(typeParams: TSTypeParameterDeclaration | undefined, params: readonly Expression[], returnType: TypeNode | undefined, hasReceiver: boolean): FunctionSignature { + return FunctionSignature.createFunctionSignature(typeParams, params, returnType, hasReceiver) + } + , + updateFunctionSignature(original: FunctionSignature, typeParams: TSTypeParameterDeclaration | undefined, params: readonly Expression[], returnType: TypeNode | undefined, hasReceiver: boolean): FunctionSignature { + if (isSameNativeObject(typeParams, original.typeParams) && isSameNativeObject(params, original.params) && isSameNativeObject(returnType, original.returnType) && isSameNativeObject(hasReceiver, original.hasReceiver)) + return original + return updateNodeByNode(FunctionSignature.createFunctionSignature(typeParams, params, returnType, hasReceiver), original) + } + , + createChainExpression(expression?: Expression): ChainExpression { + return ChainExpression.createChainExpression(expression) + } + , + updateChainExpression(original: ChainExpression, expression?: Expression): ChainExpression { + if (isSameNativeObject(expression, original.expression)) + return original + return updateNodeByNode(ChainExpression.createChainExpression(expression), original) + } + , + createTSIntersectionType(types: readonly Expression[]): TSIntersectionType { + return TSIntersectionType.createTSIntersectionType(types) + } + , + updateTSIntersectionType(original: TSIntersectionType, types: readonly Expression[]): TSIntersectionType { + if (isSameNativeObject(types, original.types)) + return original + return updateNodeByNode(TSIntersectionType.createTSIntersectionType(types), original) + } + , + createUpdateExpression(argument: Expression | undefined, operatorType: Es2pandaTokenType, isPrefix: boolean): UpdateExpression { + return UpdateExpression.createUpdateExpression(argument, operatorType, isPrefix) + } + , + updateUpdateExpression(original: UpdateExpression, argument: Expression | undefined, operatorType: Es2pandaTokenType, isPrefix: boolean): UpdateExpression { + if (isSameNativeObject(argument, original.argument) && isSameNativeObject(operatorType, original.operatorType) && isSameNativeObject(isPrefix, original.isPrefix)) + return original + return updateNodeByNode(UpdateExpression.createUpdateExpression(argument, operatorType, isPrefix), original) + } + , + createBlockExpression(statements: readonly Statement[]): BlockExpression { + return BlockExpression.createBlockExpression(statements) + } + , + updateBlockExpression(original: BlockExpression, statements: readonly Statement[]): BlockExpression { + if (isSameNativeObject(statements, original.statements)) + return original + return updateNodeByNode(BlockExpression.createBlockExpression(statements), original) + } + , + createTSTypeLiteral(members: readonly AstNode[]): TSTypeLiteral { + return TSTypeLiteral.createTSTypeLiteral(members) + } + , + updateTSTypeLiteral(original: TSTypeLiteral, members: readonly AstNode[]): TSTypeLiteral { + if (isSameNativeObject(members, original.members)) + return original + return updateNodeByNode(TSTypeLiteral.createTSTypeLiteral(members), original) + } + , + createTSBooleanKeyword(): TSBooleanKeyword { + return TSBooleanKeyword.createTSBooleanKeyword() + } + , + updateTSBooleanKeyword(original: TSBooleanKeyword): TSBooleanKeyword { + return updateNodeByNode(TSBooleanKeyword.createTSBooleanKeyword(), original) + } + , + createTSTypePredicate(parameterName: Expression | undefined, typeAnnotation: TypeNode | undefined, asserts: boolean): TSTypePredicate { + return TSTypePredicate.createTSTypePredicate(parameterName, typeAnnotation, asserts) + } + , + updateTSTypePredicate(original: TSTypePredicate, parameterName: Expression | undefined, typeAnnotation: TypeNode | undefined, asserts: boolean): TSTypePredicate { + if (isSameNativeObject(parameterName, original.parameterName) && isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(asserts, original.asserts)) + return original + return updateNodeByNode(TSTypePredicate.createTSTypePredicate(parameterName, typeAnnotation, asserts), original) + } + , + createImportNamespaceSpecifier(local?: Identifier): ImportNamespaceSpecifier { + return ImportNamespaceSpecifier.createImportNamespaceSpecifier(local) + } + , + updateImportNamespaceSpecifier(original: ImportNamespaceSpecifier, local?: Identifier): ImportNamespaceSpecifier { + if (isSameNativeObject(local, original.local)) + return original + return updateNodeByNode(ImportNamespaceSpecifier.createImportNamespaceSpecifier(local), original) + } + , + createTSTypeParameterInstantiation(params: readonly TypeNode[]): TSTypeParameterInstantiation { + return TSTypeParameterInstantiation.createTSTypeParameterInstantiation(params) + } + , + updateTSTypeParameterInstantiation(original: TSTypeParameterInstantiation, params: readonly TypeNode[]): TSTypeParameterInstantiation { + if (isSameNativeObject(params, original.params)) + return original + return updateNodeByNode(TSTypeParameterInstantiation.createTSTypeParameterInstantiation(params), original) + } + , + createNullLiteral(): NullLiteral { + return NullLiteral.createNullLiteral() + } + , + updateNullLiteral(original: NullLiteral): NullLiteral { + return updateNodeByNode(NullLiteral.createNullLiteral(), original) + } + , + createTSInferType(typeParam?: TSTypeParameter): TSInferType { + return TSInferType.createTSInferType(typeParam) + } + , + updateTSInferType(original: TSInferType, typeParam?: TSTypeParameter): TSInferType { + if (isSameNativeObject(typeParam, original.typeParam)) + return original + return updateNodeByNode(TSInferType.createTSInferType(typeParam), original) + } + , + createSwitchCaseStatement(test: Expression | undefined, consequent: readonly Statement[]): SwitchCaseStatement { + return SwitchCaseStatement.createSwitchCaseStatement(test, consequent) + } + , + updateSwitchCaseStatement(original: SwitchCaseStatement, test: Expression | undefined, consequent: readonly Statement[]): SwitchCaseStatement { + if (isSameNativeObject(test, original.test) && isSameNativeObject(consequent, original.consequent)) + return original + return updateNodeByNode(SwitchCaseStatement.createSwitchCaseStatement(test, consequent), original) + } + , + createYieldExpression(argument: Expression | undefined, hasDelegate: boolean): YieldExpression { + return YieldExpression.createYieldExpression(argument, hasDelegate) + } + , + updateYieldExpression(original: YieldExpression, argument: Expression | undefined, hasDelegate: boolean): YieldExpression { + if (isSameNativeObject(argument, original.argument) && isSameNativeObject(hasDelegate, original.hasDelegate)) + return original + return updateNodeByNode(YieldExpression.createYieldExpression(argument, hasDelegate), original) + } + , + createTSImportEqualsDeclaration(id: Identifier | undefined, moduleReference: Expression | undefined, isExport: boolean): TSImportEqualsDeclaration { + return TSImportEqualsDeclaration.createTSImportEqualsDeclaration(id, moduleReference, isExport) + } + , + updateTSImportEqualsDeclaration(original: TSImportEqualsDeclaration, id: Identifier | undefined, moduleReference: Expression | undefined, isExport: boolean): TSImportEqualsDeclaration { + if (isSameNativeObject(id, original.id) && isSameNativeObject(moduleReference, original.moduleReference) && isSameNativeObject(isExport, original.isExport)) + return original + return updateNodeByNode(TSImportEqualsDeclaration.createTSImportEqualsDeclaration(id, moduleReference, isExport), original) + } + , + createBooleanLiteral(value: boolean): BooleanLiteral { + return BooleanLiteral.createBooleanLiteral(value) + } + , + updateBooleanLiteral(original: BooleanLiteral, value: boolean): BooleanLiteral { + if (isSameNativeObject(value, original.value)) + return original + return updateNodeByNode(BooleanLiteral.createBooleanLiteral(value), original) + } + , + createTSNumberKeyword(): TSNumberKeyword { + return TSNumberKeyword.createTSNumberKeyword() + } + , + updateTSNumberKeyword(original: TSNumberKeyword): TSNumberKeyword { + return updateNodeByNode(TSNumberKeyword.createTSNumberKeyword(), original) + } + , + createTSNonNullExpression(expr?: Expression): TSNonNullExpression { + return TSNonNullExpression.createTSNonNullExpression(expr) + } + , + updateTSNonNullExpression(original: TSNonNullExpression, expr?: Expression): TSNonNullExpression { + if (isSameNativeObject(expr, original.expr)) + return original + return updateNodeByNode(TSNonNullExpression.createTSNonNullExpression(expr), original) + } + , + createPrefixAssertionExpression(expr?: Expression, type?: TypeNode): PrefixAssertionExpression { + return PrefixAssertionExpression.createPrefixAssertionExpression(expr, type) + } + , + updatePrefixAssertionExpression(original: PrefixAssertionExpression, expr?: Expression, type?: TypeNode): PrefixAssertionExpression { + if (isSameNativeObject(expr, original.expr) && isSameNativeObject(type, original.type)) + return original + return updateNodeByNode(PrefixAssertionExpression.createPrefixAssertionExpression(expr, type), original) + } + , + createClassExpression(definition?: ClassDefinition): ClassExpression { + return ClassExpression.createClassExpression(definition) + } + , + updateClassExpression(original: ClassExpression, definition?: ClassDefinition): ClassExpression { + if (isSameNativeObject(definition, original.definition)) + return original + return updateNodeByNode(ClassExpression.createClassExpression(definition), original) + } + , + createForOfStatement(left: AstNode | undefined, right: Expression | undefined, body: Statement | undefined, isAwait: boolean): ForOfStatement { + return ForOfStatement.createForOfStatement(left, right, body, isAwait) + } + , + updateForOfStatement(original: ForOfStatement, left: AstNode | undefined, right: Expression | undefined, body: Statement | undefined, isAwait: boolean): ForOfStatement { + if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right) && isSameNativeObject(body, original.body) && isSameNativeObject(isAwait, original.isAwait)) + return original + return updateNodeByNode(ForOfStatement.createForOfStatement(left, right, body, isAwait), original) + } + , + createTemplateLiteral(quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral { + return TemplateLiteral.createTemplateLiteral(quasis, expressions, multilineString) + } + , + updateTemplateLiteral(original: TemplateLiteral, quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral { + if (isSameNativeObject(quasis, original.quasis) && isSameNativeObject(expressions, original.expressions) && isSameNativeObject(multilineString, original.multilineString)) + return original + return updateNodeByNode(TemplateLiteral.createTemplateLiteral(quasis, expressions, multilineString), original) + } + , + createTSUnionType(types: readonly TypeNode[]): TSUnionType { + return TSUnionType.createTSUnionType(types) + } + , + updateTSUnionType(original: TSUnionType, types: readonly TypeNode[]): TSUnionType { + if (isSameNativeObject(types, original.types)) + return original + return updateNodeByNode(TSUnionType.createTSUnionType(types), original) + } + , + createTSUnknownKeyword(): TSUnknownKeyword { + return TSUnknownKeyword.createTSUnknownKeyword() + } + , + updateTSUnknownKeyword(original: TSUnknownKeyword): TSUnknownKeyword { + return updateNodeByNode(TSUnknownKeyword.createTSUnknownKeyword(), original) + } + , + createIdentifier(name: string, typeAnnotation?: TypeNode): Identifier { + return Identifier.create2Identifier(name, typeAnnotation) + } + , + updateIdentifier(original: Identifier, name: string, typeAnnotation?: TypeNode): Identifier { + if (isSameNativeObject(name, original.name) && isSameNativeObject(typeAnnotation, original.typeAnnotation)) + return original + return updateNodeByNode(Identifier.create2Identifier(name, typeAnnotation), original) + } + , + createOpaqueTypeNode(): OpaqueTypeNode { + return OpaqueTypeNode.create1OpaqueTypeNode() + } + , + updateOpaqueTypeNode(original: OpaqueTypeNode): OpaqueTypeNode { + return updateNodeByNode(OpaqueTypeNode.create1OpaqueTypeNode(), original) + } + , + createTSTypeParameterDeclaration(params: readonly TSTypeParameter[], requiredParams: number): TSTypeParameterDeclaration { + return TSTypeParameterDeclaration.createTSTypeParameterDeclaration(params, requiredParams) + } + , + updateTSTypeParameterDeclaration(original: TSTypeParameterDeclaration, params: readonly TSTypeParameter[], requiredParams: number): TSTypeParameterDeclaration { + if (isSameNativeObject(params, original.params) && isSameNativeObject(requiredParams, original.requiredParams)) + return original + return updateNodeByNode(TSTypeParameterDeclaration.createTSTypeParameterDeclaration(params, requiredParams), original) + } + , + createTSNullKeyword(): TSNullKeyword { + return TSNullKeyword.createTSNullKeyword() + } + , + updateTSNullKeyword(original: TSNullKeyword): TSNullKeyword { + return updateNodeByNode(TSNullKeyword.createTSNullKeyword(), original) + } + , + createTSInterfaceHeritage(expr?: TypeNode): TSInterfaceHeritage { + return TSInterfaceHeritage.createTSInterfaceHeritage(expr) + } + , + updateTSInterfaceHeritage(original: TSInterfaceHeritage, expr?: TypeNode): TSInterfaceHeritage { + if (isSameNativeObject(expr, original.expr)) + return original + return updateNodeByNode(TSInterfaceHeritage.createTSInterfaceHeritage(expr), original) + } + , + createETSClassLiteral(expr?: TypeNode): ETSClassLiteral { + return ETSClassLiteral.createETSClassLiteral(expr) + } + , + updateETSClassLiteral(original: ETSClassLiteral, expr?: TypeNode): ETSClassLiteral { + if (isSameNativeObject(expr, original.expr)) + return original + return updateNodeByNode(ETSClassLiteral.createETSClassLiteral(expr), original) + } + , + createBreakStatement(ident?: Identifier): BreakStatement { + return BreakStatement.create1BreakStatement(ident) + } + , + updateBreakStatement(original: BreakStatement, ident?: Identifier): BreakStatement { + if (isSameNativeObject(ident, original.ident)) + return original + return updateNodeByNode(BreakStatement.create1BreakStatement(ident), original) + } + , + createTSAnyKeyword(): TSAnyKeyword { + return TSAnyKeyword.createTSAnyKeyword() + } + , + updateTSAnyKeyword(original: TSAnyKeyword): TSAnyKeyword { + return updateNodeByNode(TSAnyKeyword.createTSAnyKeyword(), original) + } + , + createClassDeclaration(definition: ClassDefinition, modifierFlags?: Es2pandaModifierFlags): ClassDeclaration { + return ClassDeclaration.createClassDeclaration(definition, modifierFlags) + } + , + updateClassDeclaration(original: ClassDeclaration, definition: ClassDefinition, modifierFlags?: Es2pandaModifierFlags): ClassDeclaration { + if (isSameNativeObject(definition, original.definition) && isSameNativeObject(modifierFlags, original.modifierFlags)) + return original + return updateNodeByNode(ClassDeclaration.createClassDeclaration(definition, modifierFlags), original) + } + , + createTSIndexedAccessType(objectType?: TypeNode, indexType?: TypeNode): TSIndexedAccessType { + return TSIndexedAccessType.createTSIndexedAccessType(objectType, indexType) + } + , + updateTSIndexedAccessType(original: TSIndexedAccessType, objectType?: TypeNode, indexType?: TypeNode): TSIndexedAccessType { + if (isSameNativeObject(objectType, original.objectType) && isSameNativeObject(indexType, original.indexType)) + return original + return updateNodeByNode(TSIndexedAccessType.createTSIndexedAccessType(objectType, indexType), original) + } + , + createTSQualifiedName(left?: Expression, right?: Identifier): TSQualifiedName { + return TSQualifiedName.createTSQualifiedName(left, right) + } + , + updateTSQualifiedName(original: TSQualifiedName, left?: Expression, right?: Identifier): TSQualifiedName { + if (isSameNativeObject(left, original.left) && isSameNativeObject(right, original.right)) + return original + return updateNodeByNode(TSQualifiedName.createTSQualifiedName(left, right), original) + } + , + createAwaitExpression(argument?: Expression): AwaitExpression { + return AwaitExpression.createAwaitExpression(argument) + } + , + updateAwaitExpression(original: AwaitExpression, argument?: Expression): AwaitExpression { + if (isSameNativeObject(argument, original.argument)) + return original + return updateNodeByNode(AwaitExpression.createAwaitExpression(argument), original) + } + , + createContinueStatement(ident?: Identifier): ContinueStatement { + return ContinueStatement.create1ContinueStatement(ident) + } + , + updateContinueStatement(original: ContinueStatement, ident?: Identifier): ContinueStatement { + if (isSameNativeObject(ident, original.ident)) + return original + return updateNodeByNode(ContinueStatement.create1ContinueStatement(ident), original) + } + , + createETSNewMultiDimArrayInstanceExpression(typeReference: TypeNode | undefined, dimensions: readonly Expression[]): ETSNewMultiDimArrayInstanceExpression { + return ETSNewMultiDimArrayInstanceExpression.createETSNewMultiDimArrayInstanceExpression(typeReference, dimensions) + } + , + updateETSNewMultiDimArrayInstanceExpression(original: ETSNewMultiDimArrayInstanceExpression, typeReference: TypeNode | undefined, dimensions: readonly Expression[]): ETSNewMultiDimArrayInstanceExpression { + if (isSameNativeObject(typeReference, original.typeReference) && isSameNativeObject(dimensions, original.dimensions)) + return original + return updateNodeByNode(ETSNewMultiDimArrayInstanceExpression.createETSNewMultiDimArrayInstanceExpression(typeReference, dimensions), original) + } + , + createTSNamedTupleMember(label: Expression | undefined, elementType: TypeNode | undefined, isOptional: boolean): TSNamedTupleMember { + return TSNamedTupleMember.createTSNamedTupleMember(label, elementType, isOptional) + } + , + updateTSNamedTupleMember(original: TSNamedTupleMember, label: Expression | undefined, elementType: TypeNode | undefined, isOptional: boolean): TSNamedTupleMember { + if (isSameNativeObject(label, original.label) && isSameNativeObject(elementType, original.elementType) && isSameNativeObject(isOptional, original.isOptional)) + return original + return updateNodeByNode(TSNamedTupleMember.createTSNamedTupleMember(label, elementType, isOptional), original) + } + , + createImportExpression(source?: Expression): ImportExpression { + return ImportExpression.createImportExpression(source) + } + , + updateImportExpression(original: ImportExpression, source?: Expression): ImportExpression { + if (isSameNativeObject(source, original.source)) + return original + return updateNodeByNode(ImportExpression.createImportExpression(source), original) + } + , + createETSNullType(): ETSNullType { + return ETSNullType.createETSNullType() + } + , + updateETSNullType(original: ETSNullType): ETSNullType { + return updateNodeByNode(ETSNullType.createETSNullType(), original) + } + , + createETSUndefinedType(): ETSUndefinedType { + return ETSUndefinedType.createETSUndefinedType() + } + , + updateETSUndefinedType(original: ETSUndefinedType): ETSUndefinedType { + return updateNodeByNode(ETSUndefinedType.createETSUndefinedType(), original) + } + , + createTypeofExpression(argument?: Expression): TypeofExpression { + return TypeofExpression.createTypeofExpression(argument) + } + , + updateTypeofExpression(original: TypeofExpression, argument?: Expression): TypeofExpression { + if (isSameNativeObject(argument, original.argument)) + return original + return updateNodeByNode(TypeofExpression.createTypeofExpression(argument), original) + } + , + createTSEnumMember(key: Expression | undefined, init: Expression | undefined, isGenerated: boolean): TSEnumMember { + return TSEnumMember.create1TSEnumMember(key, init, isGenerated) + } + , + updateTSEnumMember(original: TSEnumMember, key: Expression | undefined, init: Expression | undefined, isGenerated: boolean): TSEnumMember { + if (isSameNativeObject(key, original.key) && isSameNativeObject(init, original.init) && isSameNativeObject(isGenerated, original.isGenerated)) + return original + return updateNodeByNode(TSEnumMember.create1TSEnumMember(key, init, isGenerated), original) + } + , + createSwitchStatement(discriminant: Expression | undefined, cases: readonly SwitchCaseStatement[]): SwitchStatement { + return SwitchStatement.createSwitchStatement(discriminant, cases) + } + , + updateSwitchStatement(original: SwitchStatement, discriminant: Expression | undefined, cases: readonly SwitchCaseStatement[]): SwitchStatement { + if (isSameNativeObject(discriminant, original.discriminant) && isSameNativeObject(cases, original.cases)) + return original + return updateNodeByNode(SwitchStatement.createSwitchStatement(discriminant, cases), original) + } + , + createDoWhileStatement(body?: Statement, test?: Expression): DoWhileStatement { + return DoWhileStatement.createDoWhileStatement(body, test) + } + , + updateDoWhileStatement(original: DoWhileStatement, body?: Statement, test?: Expression): DoWhileStatement { + if (isSameNativeObject(body, original.body) && isSameNativeObject(test, original.test)) + return original + return updateNodeByNode(DoWhileStatement.createDoWhileStatement(body, test), original) + } + , + createCatchClause(param?: Expression, body?: BlockStatement): CatchClause { + return CatchClause.createCatchClause(param, body) + } + , + updateCatchClause(original: CatchClause, param?: Expression, body?: BlockStatement): CatchClause { + if (isSameNativeObject(param, original.param) && isSameNativeObject(body, original.body)) + return original + return updateNodeByNode(CatchClause.createCatchClause(param, body), original) + } + , + createSequenceExpression(sequence: readonly Expression[]): SequenceExpression { + return SequenceExpression.createSequenceExpression(sequence) + } + , + updateSequenceExpression(original: SequenceExpression, sequence: readonly Expression[]): SequenceExpression { + if (isSameNativeObject(sequence, original.sequence)) + return original + return updateNodeByNode(SequenceExpression.createSequenceExpression(sequence), original) + } + , + createArrowFunctionExpression(_function?: ScriptFunction, annotations?: readonly AnnotationUsage[]): ArrowFunctionExpression { + return ArrowFunctionExpression.createArrowFunctionExpression(_function, annotations) + } + , + updateArrowFunctionExpression(original: ArrowFunctionExpression, _function?: ScriptFunction, annotations?: readonly AnnotationUsage[]): ArrowFunctionExpression { + if (isSameNativeObject(_function, original.function) && isSameNativeObject(annotations, original.annotations)) + return original + return updateNodeByNode(ArrowFunctionExpression.createArrowFunctionExpression(_function, annotations), original) + } + , + createOmittedExpression(): OmittedExpression { + return OmittedExpression.createOmittedExpression() + } + , + updateOmittedExpression(original: OmittedExpression): OmittedExpression { + return updateNodeByNode(OmittedExpression.createOmittedExpression(), original) + } + , + createETSNewClassInstanceExpression(typeRef: Expression | undefined, _arguments: readonly Expression[]): ETSNewClassInstanceExpression { + return ETSNewClassInstanceExpression.createETSNewClassInstanceExpression(typeRef, _arguments) + } + , + updateETSNewClassInstanceExpression(original: ETSNewClassInstanceExpression, typeRef: Expression | undefined, _arguments: readonly Expression[]): ETSNewClassInstanceExpression { + if (isSameNativeObject(typeRef, original.typeRef) && isSameNativeObject(_arguments, original.arguments)) + return original + return updateNodeByNode(ETSNewClassInstanceExpression.createETSNewClassInstanceExpression(typeRef, _arguments), original) + } + , + createTSAsExpression(expr: Expression | undefined, typeAnnotation: TypeNode | undefined, isConst: boolean): TSAsExpression { + return TSAsExpression.createTSAsExpression(expr, typeAnnotation, isConst) + } + , + updateTSAsExpression(original: TSAsExpression, expr: Expression | undefined, typeAnnotation: TypeNode | undefined, isConst: boolean): TSAsExpression { + if (isSameNativeObject(expr, original.expr) && isSameNativeObject(typeAnnotation, original.typeAnnotation) && isSameNativeObject(isConst, original.isConst)) + return original + return updateNodeByNode(TSAsExpression.createTSAsExpression(expr, typeAnnotation, isConst), original) + } + , + createForUpdateStatement(init?: AstNode, test?: Expression, update?: Expression, body?: Statement): ForUpdateStatement { + return ForUpdateStatement.createForUpdateStatement(init, test, update, body) + } + , + updateForUpdateStatement(original: ForUpdateStatement, init?: AstNode, test?: Expression, update?: Expression, body?: Statement): ForUpdateStatement { + if (isSameNativeObject(init, original.init) && isSameNativeObject(test, original.test) && isSameNativeObject(update, original.update) && isSameNativeObject(body, original.body)) + return original + return updateNodeByNode(ForUpdateStatement.createForUpdateStatement(init, test, update, body), original) + } + , + createETSPrimitiveType(primitiveType: Es2pandaPrimitiveType): ETSPrimitiveType { + return ETSPrimitiveType.createETSPrimitiveType(primitiveType) + } + , + updateETSPrimitiveType(original: ETSPrimitiveType, primitiveType: Es2pandaPrimitiveType): ETSPrimitiveType { + if (isSameNativeObject(primitiveType, original.primitiveType)) + return original + return updateNodeByNode(ETSPrimitiveType.createETSPrimitiveType(primitiveType), original) + } + , + createNewExpression(callee: Expression | undefined, _arguments: readonly Expression[]): NewExpression { + return NewExpression.createNewExpression(callee, _arguments) + } + , + updateNewExpression(original: NewExpression, callee: Expression | undefined, _arguments: readonly Expression[]): NewExpression { + if (isSameNativeObject(callee, original.callee) && isSameNativeObject(_arguments, original.arguments)) + return original + return updateNodeByNode(NewExpression.createNewExpression(callee, _arguments), original) + } + , + createTSThisType(): TSThisType { + return TSThisType.createTSThisType() + } + , + updateTSThisType(original: TSThisType): TSThisType { + return updateNodeByNode(TSThisType.createTSThisType(), original) + } + , +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/index.ts b/koala_tools/ui2abc/libarkts/src/generated/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..0f83da4c6f2c9f632a3d5f129159f6db9134b076 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/index.ts @@ -0,0 +1,222 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + + +export * from "./peers/SourcePosition" +export * from "./peers/SourceRange" +export * from "./peers/SrcDumper" +export * from "./peers/AstDumper" +export * from "./peers/LabelPair" +export * from "./peers/ScriptFunctionData" +export * from "./peers/ImportSource" +export * from "./peers/SignatureInfo" +export * from "./peers/ValidationInfo" +export * from "./peers/IndexInfo" +export * from "./peers/ObjectDescriptor" +export * from "./peers/ScopeFindResult" +export * from "./peers/BindingProps" +export * from "./peers/Declaration" +export * from "./peers/AstVisitor" +export * from "./peers/AstVerifier" +export * from "./peers/VerifierMessage" +export * from "./peers/CodeGen" +export * from "./peers/VReg" +export * from "./peers/IRNode" +export * from "./peers/ErrorLogger" +export * from "./peers/VerificationContext" +export * from "./peers/DynamicImportData" +export * from "./peers/SuggestionInfo" +export * from "./peers/DiagnosticInfo" +export * from "./peers/NumberLiteral" +export * from "./peers/TypedAstNode" +export * from "./peers/AnnotatedAstNode" +export * from "./peers/TypedStatement" +export * from "./peers/AnnotatedStatement" +export * from "./peers/LabelledStatement" +export * from "./peers/ThrowStatement" +export * from "./peers/ClassProperty" +export * from "./peers/TSVoidKeyword" +export * from "./peers/ETSFunctionType" +export * from "./peers/TSTypeOperator" +export * from "./peers/IfStatement" +export * from "./peers/TSConstructorType" +export * from "./peers/Decorator" +export * from "./peers/TSEnumDeclaration" +export * from "./peers/TSNeverKeyword" +export * from "./peers/ImportDefaultSpecifier" +export * from "./peers/ObjectExpression" +export * from "./peers/ImportSpecifier" +export * from "./peers/ConditionalExpression" +export * from "./peers/CallExpression" +export * from "./peers/BigIntLiteral" +export * from "./peers/ClassElement" +export * from "./peers/TSImportType" +export * from "./peers/TaggedTemplateExpression" +export * from "./peers/FunctionDeclaration" +export * from "./peers/ETSTypeReference" +export * from "./peers/TSTypeReference" +export * from "./peers/NamedType" +export * from "./peers/TSFunctionType" +export * from "./peers/TemplateElement" +export * from "./peers/TSInterfaceDeclaration" +export * from "./peers/VariableDeclaration" +export * from "./peers/UndefinedLiteral" +export * from "./peers/MemberExpression" +export * from "./peers/TSClassImplements" +export * from "./peers/TSObjectKeyword" +export * from "./peers/ETSUnionType" +export * from "./peers/ETSKeyofType" +export * from "./peers/TSPropertySignature" +export * from "./peers/TSConditionalType" +export * from "./peers/TSLiteralType" +export * from "./peers/TSTypeAliasDeclaration" +export * from "./peers/DebuggerStatement" +export * from "./peers/ReturnStatement" +export * from "./peers/ExportDefaultDeclaration" +export * from "./peers/ScriptFunction" +export * from "./peers/ClassDefinition" +export * from "./peers/ArrayExpression" +export * from "./peers/TSInterfaceBody" +export * from "./peers/TSTypeQuery" +export * from "./peers/TSBigintKeyword" +export * from "./peers/Property" +export * from "./peers/VariableDeclarator" +export * from "./peers/StringLiteral" +export * from "./peers/TSTypeAssertion" +export * from "./peers/TSExternalModuleReference" +export * from "./peers/TSUndefinedKeyword" +export * from "./peers/ETSTuple" +export * from "./peers/ETSStringLiteralType" +export * from "./peers/TryStatement" +export * from "./peers/UnaryExpression" +export * from "./peers/ForInStatement" +export * from "./peers/ThisExpression" +export * from "./peers/TSMethodSignature" +export * from "./peers/BinaryExpression" +export * from "./peers/SuperExpression" +export * from "./peers/AssertStatement" +export * from "./peers/TSStringKeyword" +export * from "./peers/AssignmentExpression" +export * from "./peers/ExpressionStatement" +export * from "./peers/ETSModule" +export * from "./peers/MetaProperty" +export * from "./peers/TSArrayType" +export * from "./peers/TSSignatureDeclaration" +export * from "./peers/ExportAllDeclaration" +export * from "./peers/ExportSpecifier" +export * from "./peers/TSTupleType" +export * from "./peers/FunctionExpression" +export * from "./peers/TSIndexSignature" +export * from "./peers/TSModuleDeclaration" +export * from "./peers/ImportDeclaration" +export * from "./peers/TSParenthesizedType" +export * from "./peers/Literal" +export * from "./peers/CharLiteral" +export * from "./peers/ETSIntrinsicNode" +export * from "./peers/ETSPackageDeclaration" +export * from "./peers/ETSImportDeclaration" +export * from "./peers/ETSStructDeclaration" +export * from "./peers/TSModuleBlock" +export * from "./peers/ETSNewArrayInstanceExpression" +export * from "./peers/LoopStatement" +export * from "./peers/AnnotationDeclaration" +export * from "./peers/AnnotationUsage" +export * from "./peers/EmptyStatement" +export * from "./peers/WhileStatement" +export * from "./peers/FunctionSignature" +export * from "./peers/ChainExpression" +export * from "./peers/TSIntersectionType" +export * from "./peers/UpdateExpression" +export * from "./peers/BlockExpression" +export * from "./peers/TSTypeLiteral" +export * from "./peers/TSTypeParameter" +export * from "./peers/TSBooleanKeyword" +export * from "./peers/SpreadElement" +export * from "./peers/TSTypePredicate" +export * from "./peers/ImportNamespaceSpecifier" +export * from "./peers/ExportNamedDeclaration" +export * from "./peers/ETSParameterExpression" +export * from "./peers/TSTypeParameterInstantiation" +export * from "./peers/NullLiteral" +export * from "./peers/TSInferType" +export * from "./peers/SwitchCaseStatement" +export * from "./peers/YieldExpression" +export * from "./peers/TSImportEqualsDeclaration" +export * from "./peers/BooleanLiteral" +export * from "./peers/TSNumberKeyword" +export * from "./peers/ClassStaticBlock" +export * from "./peers/TSNonNullExpression" +export * from "./peers/PrefixAssertionExpression" +export * from "./peers/ClassExpression" +export * from "./peers/ForOfStatement" +export * from "./peers/TemplateLiteral" +export * from "./peers/TSUnionType" +export * from "./peers/TSUnknownKeyword" +export * from "./peers/Identifier" +export * from "./peers/OpaqueTypeNode" +export * from "./peers/BlockStatement" +export * from "./peers/Statement" +export * from "./peers/DirectEvalExpression" +export * from "./peers/TSTypeParameterDeclaration" +export * from "./peers/MethodDefinition" +export * from "./peers/OverloadDeclaration" +export * from "./peers/TSNullKeyword" +export * from "./peers/TSInterfaceHeritage" +export * from "./peers/Expression" +export * from "./peers/AnnotatedExpression" +export * from "./peers/MaybeOptionalExpression" +export * from "./peers/SrcDumper" +export * from "./peers/ETSClassLiteral" +export * from "./peers/BreakStatement" +export * from "./peers/RegExpLiteral" +export * from "./peers/TSMappedType" +export * from "./peers/TSAnyKeyword" +export * from "./peers/ClassDeclaration" +export * from "./peers/TSIndexedAccessType" +export * from "./peers/TSQualifiedName" +export * from "./peers/AwaitExpression" +export * from "./peers/ValidationInfo" +export * from "./peers/ContinueStatement" +export * from "./peers/ETSNewMultiDimArrayInstanceExpression" +export * from "./peers/TSNamedTupleMember" +export * from "./peers/ImportExpression" +export * from "./peers/AstDumper" +export * from "./peers/ETSNullType" +export * from "./peers/ETSUndefinedType" +export * from "./peers/TypeofExpression" +export * from "./peers/TSEnumMember" +export * from "./peers/SwitchStatement" +export * from "./peers/DoWhileStatement" +export * from "./peers/CatchClause" +export * from "./peers/SequenceExpression" +export * from "./peers/ArrowFunctionExpression" +export * from "./peers/OmittedExpression" +export * from "./peers/ETSNewClassInstanceExpression" +export * from "./peers/TSAsExpression" +export * from "./peers/ForUpdateStatement" +export * from "./peers/ETSTypeReferencePart" +export * from "./peers/ETSReExportDeclaration" +export * from "./peers/ETSPrimitiveType" +export * from "./peers/TypeNode" +export * from "./peers/NewExpression" +export * from "./peers/TSParameterProperty" +export * from "./peers/ETSWildcardType" +export * from "./peers/TSThisType" +export * from "./peers/Program" +export * from "./peers/ArkTsConfig" diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotatedAstNode.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotatedAstNode.ts new file mode 100644 index 0000000000000000000000000000000000000000..930b7293f3b26a52c23a5c915b050087ab1a6f55 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotatedAstNode.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" + +export class AnnotatedAstNode extends AstNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + protected readonly brandAnnotatedAstNode: undefined +} +export function isAnnotatedAstNode(node: object | undefined): node is AnnotatedAstNode { + return node instanceof AnnotatedAstNode +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotatedExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotatedExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..4a0171c62d593cc8aaef245a2b79c2e527d46850 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotatedExpression.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class AnnotatedExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._AnnotatedExpressionTypeAnnotationConst(global.context, this.peer)) + } + /** @deprecated */ + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { + global.generatedEs2panda._AnnotatedExpressionSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) + return this + } + protected readonly brandAnnotatedExpression: undefined +} +export function isAnnotatedExpression(node: object | undefined): node is AnnotatedExpression { + return node instanceof AnnotatedExpression +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotatedStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotatedStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..6757c3a8509ed2c47ad6bac15ea4910b94b0c381 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotatedStatement.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Statement } from "./Statement" + +export class AnnotatedStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + protected readonly brandAnnotatedStatement: undefined +} +export function isAnnotatedStatement(node: object | undefined): node is AnnotatedStatement { + return node instanceof AnnotatedStatement +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotationDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotationDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..3dc9a1e2b13bfa6ed125e727a234ffa7f68fae17 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotationDeclaration.ts @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { SrcDumper } from "./SrcDumper" +import { Statement } from "./Statement" + +export class AnnotationDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1AnnotationDeclaration(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationDeclaration { + const result: AnnotationDeclaration = new AnnotationDeclaration(global.generatedEs2panda._CreateAnnotationDeclaration1(global.context, passNode(expr), passNodeArray(properties), properties.length), Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateAnnotationDeclaration(original?: AnnotationDeclaration, expr?: Expression): AnnotationDeclaration { + const result: AnnotationDeclaration = new AnnotationDeclaration(global.generatedEs2panda._UpdateAnnotationDeclaration(global.context, passNode(original), passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION) + result.setChildrenParentPtr() + return result + } + static update1AnnotationDeclaration(original: AnnotationDeclaration | undefined, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationDeclaration { + const result: AnnotationDeclaration = new AnnotationDeclaration(global.generatedEs2panda._UpdateAnnotationDeclaration1(global.context, passNode(original), passNode(expr), passNodeArray(properties), properties.length), Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION) + result.setChildrenParentPtr() + return result + } + get internalName(): string { + return unpackString(global.generatedEs2panda._AnnotationDeclarationInternalNameConst(global.context, this.peer)) + } + /** @deprecated */ + setInternalName(internalName: string): this { + global.generatedEs2panda._AnnotationDeclarationSetInternalName(global.context, this.peer, internalName) + return this + } + get expr(): Expression | undefined { + return unpackNode(global.generatedEs2panda._AnnotationDeclarationExpr(global.context, this.peer)) + } + get properties(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationProperties(global.context, this.peer)) + } + get propertiesForUpdate(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationPropertiesForUpdate(global.context, this.peer)) + } + /** @deprecated */ + addProperties(properties: readonly AstNode[]): this { + global.generatedEs2panda._AnnotationDeclarationAddProperties(global.context, this.peer, passNodeArray(properties), properties.length) + return this + } + get isSourceRetention(): boolean { + return global.generatedEs2panda._AnnotationDeclarationIsSourceRetentionConst(global.context, this.peer) + } + get isBytecodeRetention(): boolean { + return global.generatedEs2panda._AnnotationDeclarationIsBytecodeRetentionConst(global.context, this.peer) + } + get isRuntimeRetention(): boolean { + return global.generatedEs2panda._AnnotationDeclarationIsRuntimeRetentionConst(global.context, this.peer) + } + /** @deprecated */ + setSourceRetention(): this { + global.generatedEs2panda._AnnotationDeclarationSetSourceRetention(global.context, this.peer) + return this + } + /** @deprecated */ + setBytecodeRetention(): this { + global.generatedEs2panda._AnnotationDeclarationSetBytecodeRetention(global.context, this.peer) + return this + } + /** @deprecated */ + setRuntimeRetention(): this { + global.generatedEs2panda._AnnotationDeclarationSetRuntimeRetention(global.context, this.peer) + return this + } + get baseName(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._AnnotationDeclarationGetBaseNameConst(global.context, this.peer)) + } + /** @deprecated */ + emplaceProperties(properties?: AstNode): this { + global.generatedEs2panda._AnnotationDeclarationEmplaceProperties(global.context, this.peer, passNode(properties)) + return this + } + /** @deprecated */ + clearProperties(): this { + global.generatedEs2panda._AnnotationDeclarationClearProperties(global.context, this.peer) + return this + } + /** @deprecated */ + setValueProperties(properties: AstNode | undefined, index: number): this { + global.generatedEs2panda._AnnotationDeclarationSetValueProperties(global.context, this.peer, passNode(properties), index) + return this + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._AnnotationDeclarationHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._AnnotationDeclarationEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._AnnotationDeclarationClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._AnnotationDeclarationDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._AnnotationDeclarationAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._AnnotationDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._AnnotationDeclarationSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + protected readonly brandAnnotationDeclaration: undefined +} +export function isAnnotationDeclaration(node: object | undefined): node is AnnotationDeclaration { + return node instanceof AnnotationDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION, (peer: KNativePointer) => new AnnotationDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotationUsage.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotationUsage.ts new file mode 100644 index 0000000000000000000000000000000000000000..0803bc29221058eae2b1bd064f021dbdad9bd279 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/AnnotationUsage.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { Statement } from "./Statement" + +export class AnnotationUsage extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1AnnotationUsage(expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage { + const result: AnnotationUsage = new AnnotationUsage(global.generatedEs2panda._CreateAnnotationUsage1(global.context, passNode(expr), passNodeArray(properties), properties.length), Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE) + result.setChildrenParentPtr() + return result + } + static updateAnnotationUsage(original?: AnnotationUsage, expr?: Expression): AnnotationUsage { + const result: AnnotationUsage = new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsage(global.context, passNode(original), passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE) + result.setChildrenParentPtr() + return result + } + static update1AnnotationUsage(original: AnnotationUsage | undefined, expr: Expression | undefined, properties: readonly AstNode[]): AnnotationUsage { + const result: AnnotationUsage = new AnnotationUsage(global.generatedEs2panda._UpdateAnnotationUsage1(global.context, passNode(original), passNode(expr), passNodeArray(properties), properties.length), Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE) + result.setChildrenParentPtr() + return result + } + get expr(): Expression | undefined { + return unpackNode(global.generatedEs2panda._AnnotationUsageExpr(global.context, this.peer)) + } + get properties(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._AnnotationUsageProperties(global.context, this.peer)) + } + /** @deprecated */ + addProperty(property?: AstNode): this { + global.generatedEs2panda._AnnotationUsageAddProperty(global.context, this.peer, passNode(property)) + return this + } + /** @deprecated */ + setProperties(properties: readonly AstNode[]): this { + global.generatedEs2panda._AnnotationUsageSetProperties(global.context, this.peer, passNodeArray(properties), properties.length) + return this + } + get baseName(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._AnnotationUsageGetBaseNameConst(global.context, this.peer)) + } + protected readonly brandAnnotationUsage: undefined +} +export function isAnnotationUsage(node: object | undefined): node is AnnotationUsage { + return node instanceof AnnotationUsage +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE, (peer: KNativePointer) => new AnnotationUsage(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ANNOTATION_USAGE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ArkTsConfig.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ArkTsConfig.ts new file mode 100644 index 0000000000000000000000000000000000000000..b4e6d4def0012ef6d79cf4bc93db92bf8fb65230 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ArkTsConfig.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { ErrorLogger } from "./ErrorLogger" + +export class ArkTsConfig extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + static createArkTsConfig(configPath: string, de?: ErrorLogger): ArkTsConfig { + return new ArkTsConfig(global.generatedEs2panda._CreateArkTsConfig(global.context, configPath, passNode(de))) + } + /** @deprecated */ + resolveAllDependenciesInArkTsConfig(): this { + global.generatedEs2panda._ArkTsConfigResolveAllDependenciesInArkTsConfig(global.context, this.peer) + return this + } + get configPath(): string { + return unpackString(global.generatedEs2panda._ArkTsConfigConfigPathConst(global.context, this.peer)) + } + get package(): string { + return unpackString(global.generatedEs2panda._ArkTsConfigPackageConst(global.context, this.peer)) + } + get baseUrl(): string { + return unpackString(global.generatedEs2panda._ArkTsConfigBaseUrlConst(global.context, this.peer)) + } + get rootDir(): string { + return unpackString(global.generatedEs2panda._ArkTsConfigRootDirConst(global.context, this.peer)) + } + get outDir(): string { + return unpackString(global.generatedEs2panda._ArkTsConfigOutDirConst(global.context, this.peer)) + } + get useUrl(): boolean { + return global.generatedEs2panda._ArkTsConfigUseUrlConst(global.context, this.peer) + } + protected readonly brandArkTsConfig: undefined +} +export function isArkTsConfig(node: object | undefined): node is ArkTsConfig { + return node instanceof ArkTsConfig +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ArrayExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ArrayExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..f95fc212239f25c87f3759163dbc9171e343a010 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ArrayExpression.ts @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotatedExpression } from "./AnnotatedExpression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" +import { ValidationInfo } from "./ValidationInfo" + +export class ArrayExpression extends AnnotatedExpression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1ArrayExpression(nodeType: Es2pandaAstNodeType, elements: readonly Expression[], trailingComma: boolean): ArrayExpression { + const result: ArrayExpression = new ArrayExpression(global.generatedEs2panda._CreateArrayExpression1(global.context, nodeType, passNodeArray(elements), elements.length, trailingComma), Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateArrayExpression(original: ArrayExpression | undefined, elements: readonly Expression[]): ArrayExpression { + const result: ArrayExpression = new ArrayExpression(global.generatedEs2panda._UpdateArrayExpression(global.context, passNode(original), passNodeArray(elements), elements.length), Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static update1ArrayExpression(original: ArrayExpression | undefined, nodeType: Es2pandaAstNodeType, elements: readonly Expression[], trailingComma: boolean): ArrayExpression { + const result: ArrayExpression = new ArrayExpression(global.generatedEs2panda._UpdateArrayExpression1(global.context, passNode(original), nodeType, passNodeArray(elements), elements.length, trailingComma), Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get elements(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._ArrayExpressionElements(global.context, this.peer)) + } + /** @deprecated */ + setElements(elements: readonly Expression[]): this { + global.generatedEs2panda._ArrayExpressionSetElements(global.context, this.peer, passNodeArray(elements), elements.length) + return this + } + get isDeclaration(): boolean { + return global.generatedEs2panda._ArrayExpressionIsDeclarationConst(global.context, this.peer) + } + get isOptional(): boolean { + return global.generatedEs2panda._ArrayExpressionIsOptionalConst(global.context, this.peer) + } + /** @deprecated */ + setDeclaration(): this { + global.generatedEs2panda._ArrayExpressionSetDeclaration(global.context, this.peer) + return this + } + /** @deprecated */ + setOptional(optional_arg: boolean): this { + global.generatedEs2panda._ArrayExpressionSetOptional(global.context, this.peer, optional_arg) + return this + } + /** @deprecated */ + clearPreferredType(): this { + global.generatedEs2panda._ArrayExpressionClearPreferredType(global.context, this.peer) + return this + } + get convertibleToArrayPattern(): boolean { + return global.generatedEs2panda._ArrayExpressionConvertibleToArrayPattern(global.context, this.peer) + } + get validateExpression(): ValidationInfo | undefined { + return new ValidationInfo(global.generatedEs2panda._ArrayExpressionValidateExpression(global.context, this.peer)) + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ArrayExpressionTypeAnnotationConst(global.context, this.peer)) + } + /** @deprecated */ + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { + global.generatedEs2panda._ArrayExpressionSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) + return this + } + protected readonly brandArrayExpression: undefined +} +export function isArrayExpression(node: object | undefined): node is ArrayExpression { + return node instanceof ArrayExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION, (peer: KNativePointer) => new ArrayExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ARRAY_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ArrowFunctionExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ArrowFunctionExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..cffde5648dbfcf6bf04af9e8e00b4d6dc8d42e14 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ArrowFunctionExpression.ts @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { ScriptFunction } from "./ScriptFunction" +import { SrcDumper } from "./SrcDumper" +import { TypeNode } from "./TypeNode" + +export class ArrowFunctionExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createArrowFunctionExpression(func?: ScriptFunction, annotations?: readonly AnnotationUsage[]): ArrowFunctionExpression { + const result: ArrowFunctionExpression = new ArrowFunctionExpression(global.generatedEs2panda._CreateArrowFunctionExpression(global.context, passNode(func)), Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static updateArrowFunctionExpression(original?: ArrowFunctionExpression, func?: ScriptFunction, annotations?: readonly AnnotationUsage[]): ArrowFunctionExpression { + const result: ArrowFunctionExpression = new ArrowFunctionExpression(global.generatedEs2panda._UpdateArrowFunctionExpression(global.context, passNode(original), passNode(func)), Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static update1ArrowFunctionExpression(original?: ArrowFunctionExpression, other?: ArrowFunctionExpression, annotations?: readonly AnnotationUsage[]): ArrowFunctionExpression { + const result: ArrowFunctionExpression = new ArrowFunctionExpression(global.generatedEs2panda._UpdateArrowFunctionExpression1(global.context, passNode(original), passNode(other)), Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + get function(): ScriptFunction | undefined { + return unpackNode(global.generatedEs2panda._ArrowFunctionExpressionFunction(global.context, this.peer)) + } + get createTypeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ArrowFunctionExpressionCreateTypeAnnotation(global.context, this.peer)) + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._ArrowFunctionExpressionHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._ArrowFunctionExpressionEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._ArrowFunctionExpressionClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._ArrowFunctionExpressionDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ArrowFunctionExpressionAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ArrowFunctionExpressionAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ArrowFunctionExpressionSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ArrowFunctionExpressionSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + protected readonly brandArrowFunctionExpression: undefined +} +export function isArrowFunctionExpression(node: object | undefined): node is ArrowFunctionExpression { + return node instanceof ArrowFunctionExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION, (peer: KNativePointer) => new ArrowFunctionExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/AssertStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/AssertStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..57f68ff13dfd78163962e051f9855d14a6664340 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/AssertStatement.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" + +export class AssertStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createAssertStatement(test?: Expression, second?: Expression): AssertStatement { + const result: AssertStatement = new AssertStatement(global.generatedEs2panda._CreateAssertStatement(global.context, passNode(test), passNode(second)), Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateAssertStatement(original?: AssertStatement, test?: Expression, second?: Expression): AssertStatement { + const result: AssertStatement = new AssertStatement(global.generatedEs2panda._UpdateAssertStatement(global.context, passNode(original), passNode(test), passNode(second)), Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT) + result.setChildrenParentPtr() + return result + } + get test(): Expression | undefined { + return unpackNode(global.generatedEs2panda._AssertStatementTest(global.context, this.peer)) + } + get second(): Expression | undefined { + return unpackNode(global.generatedEs2panda._AssertStatementSecondConst(global.context, this.peer)) + } + protected readonly brandAssertStatement: undefined +} +export function isAssertStatement(node: object | undefined): node is AssertStatement { + return node instanceof AssertStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT, (peer: KNativePointer) => new AssertStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ASSERT_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/AssignmentExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/AssignmentExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..1464e887f0db62d910ad27c85a2339d512998495 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/AssignmentExpression.ts @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { CodeGen } from "./CodeGen" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaTokenType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class AssignmentExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1AssignmentExpression(type: Es2pandaAstNodeType, left: Expression | undefined, right: Expression | undefined, assignmentOperator: Es2pandaTokenType): AssignmentExpression { + const result: AssignmentExpression = new AssignmentExpression(global.generatedEs2panda._CreateAssignmentExpression1(global.context, type, passNode(left), passNode(right), assignmentOperator), Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateAssignmentExpression(original: AssignmentExpression | undefined, left: Expression | undefined, right: Expression | undefined, assignmentOperator: Es2pandaTokenType): AssignmentExpression { + const result: AssignmentExpression = new AssignmentExpression(global.generatedEs2panda._UpdateAssignmentExpression(global.context, passNode(original), passNode(left), passNode(right), assignmentOperator), Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static update1AssignmentExpression(original: AssignmentExpression | undefined, type: Es2pandaAstNodeType, left: Expression | undefined, right: Expression | undefined, assignmentOperator: Es2pandaTokenType): AssignmentExpression { + const result: AssignmentExpression = new AssignmentExpression(global.generatedEs2panda._UpdateAssignmentExpression1(global.context, passNode(original), type, passNode(left), passNode(right), assignmentOperator), Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get left(): Expression | undefined { + return unpackNode(global.generatedEs2panda._AssignmentExpressionLeft(global.context, this.peer)) + } + get right(): Expression | undefined { + return unpackNode(global.generatedEs2panda._AssignmentExpressionRight(global.context, this.peer)) + } + /** @deprecated */ + setRight(expr?: Expression): this { + global.generatedEs2panda._AssignmentExpressionSetRight(global.context, this.peer, passNode(expr)) + return this + } + /** @deprecated */ + setLeft(expr?: Expression): this { + global.generatedEs2panda._AssignmentExpressionSetLeft(global.context, this.peer, passNode(expr)) + return this + } + get result(): Expression | undefined { + return unpackNode(global.generatedEs2panda._AssignmentExpressionResult(global.context, this.peer)) + } + get operatorType(): Es2pandaTokenType { + return global.generatedEs2panda._AssignmentExpressionOperatorTypeConst(global.context, this.peer) + } + /** @deprecated */ + setResult(expr?: Expression): this { + global.generatedEs2panda._AssignmentExpressionSetResult(global.context, this.peer, passNode(expr)) + return this + } + get isLogicalExtended(): boolean { + return global.generatedEs2panda._AssignmentExpressionIsLogicalExtendedConst(global.context, this.peer) + } + /** @deprecated */ + setIgnoreConstAssign(): this { + global.generatedEs2panda._AssignmentExpressionSetIgnoreConstAssign(global.context, this.peer) + return this + } + get isIgnoreConstAssign(): boolean { + return global.generatedEs2panda._AssignmentExpressionIsIgnoreConstAssignConst(global.context, this.peer) + } + get convertibleToAssignmentPatternRight(): boolean { + return global.generatedEs2panda._AssignmentExpressionConvertibleToAssignmentPatternRight(global.context, this.peer) + } + /** @deprecated */ + compilePattern(pg?: CodeGen): this { + global.generatedEs2panda._AssignmentExpressionCompilePatternConst(global.context, this.peer, passNode(pg)) + return this + } + protected readonly brandAssignmentExpression: undefined +} +export function isAssignmentExpression(node: object | undefined): node is AssignmentExpression { + return node instanceof AssignmentExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION, (peer: KNativePointer) => new AssignmentExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ASSIGNMENT_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/AstDumper.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/AstDumper.ts new file mode 100644 index 0000000000000000000000000000000000000000..f96bc54b36ef1747025d4b3ca80cce472a5ebc65 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/AstDumper.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class AstDumper extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + static createAstDumper(node: AstNode | undefined, sourceCode: string): AstDumper { + return new AstDumper(global.generatedEs2panda._CreateAstDumper(global.context, passNode(node), sourceCode)) + } + get str(): string { + return unpackString(global.generatedEs2panda._AstDumperStrConst(global.context, this.peer)) + } + protected readonly brandAstDumper: undefined +} +export function isAstDumper(node: object | undefined): node is AstDumper { + return node instanceof AstDumper +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/AstVerifier.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/AstVerifier.ts new file mode 100644 index 0000000000000000000000000000000000000000..c25f66d6da935286fc91046064a26063500c2a07 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/AstVerifier.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class AstVerifier extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandAstVerifier: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/AstVisitor.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/AstVisitor.ts new file mode 100644 index 0000000000000000000000000000000000000000..ea1fb832a415a5619190614ee0668870715719cd --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/AstVisitor.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class AstVisitor extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandAstVisitor: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/AwaitExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/AwaitExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..5212918326f98a29a5629504d09659cff7886b30 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/AwaitExpression.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class AwaitExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createAwaitExpression(argument?: Expression): AwaitExpression { + const result: AwaitExpression = new AwaitExpression(global.generatedEs2panda._CreateAwaitExpression(global.context, passNode(argument)), Es2pandaAstNodeType.AST_NODE_TYPE_AWAIT_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateAwaitExpression(original?: AwaitExpression, argument?: Expression): AwaitExpression { + const result: AwaitExpression = new AwaitExpression(global.generatedEs2panda._UpdateAwaitExpression(global.context, passNode(original), passNode(argument)), Es2pandaAstNodeType.AST_NODE_TYPE_AWAIT_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get argument(): Expression | undefined { + return unpackNode(global.generatedEs2panda._AwaitExpressionArgumentConst(global.context, this.peer)) + } + protected readonly brandAwaitExpression: undefined +} +export function isAwaitExpression(node: object | undefined): node is AwaitExpression { + return node instanceof AwaitExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_AWAIT_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_AWAIT_EXPRESSION, (peer: KNativePointer) => new AwaitExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_AWAIT_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/BigIntLiteral.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/BigIntLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..58794ab003583dde63288270b40fc916d98f9cdf --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/BigIntLiteral.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Literal } from "./Literal" + +export class BigIntLiteral extends Literal { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createBigIntLiteral(src: string): BigIntLiteral { + const result: BigIntLiteral = new BigIntLiteral(global.generatedEs2panda._CreateBigIntLiteral(global.context, src), Es2pandaAstNodeType.AST_NODE_TYPE_BIGINT_LITERAL) + result.setChildrenParentPtr() + return result + } + static updateBigIntLiteral(original: BigIntLiteral | undefined, src: string): BigIntLiteral { + const result: BigIntLiteral = new BigIntLiteral(global.generatedEs2panda._UpdateBigIntLiteral(global.context, passNode(original), src), Es2pandaAstNodeType.AST_NODE_TYPE_BIGINT_LITERAL) + result.setChildrenParentPtr() + return result + } + get str(): string { + return unpackString(global.generatedEs2panda._BigIntLiteralStrConst(global.context, this.peer)) + } + protected readonly brandBigIntLiteral: undefined +} +export function isBigIntLiteral(node: object | undefined): node is BigIntLiteral { + return node instanceof BigIntLiteral +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BIGINT_LITERAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BIGINT_LITERAL, (peer: KNativePointer) => new BigIntLiteral(peer, Es2pandaAstNodeType.AST_NODE_TYPE_BIGINT_LITERAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/BinaryExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/BinaryExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..84cf5664c3605687b03bff124035be0f045c4bde --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/BinaryExpression.ts @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { CodeGen } from "./CodeGen" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaTokenType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { VReg } from "./VReg" + +export class BinaryExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createBinaryExpression(left: Expression | undefined, right: Expression | undefined, operatorType: Es2pandaTokenType): BinaryExpression { + const result: BinaryExpression = new BinaryExpression(global.generatedEs2panda._CreateBinaryExpression(global.context, passNode(left), passNode(right), operatorType), Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateBinaryExpression(original: BinaryExpression | undefined, left: Expression | undefined, right: Expression | undefined, operatorType: Es2pandaTokenType): BinaryExpression { + const result: BinaryExpression = new BinaryExpression(global.generatedEs2panda._UpdateBinaryExpression(global.context, passNode(original), passNode(left), passNode(right), operatorType), Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get left(): Expression | undefined { + return unpackNode(global.generatedEs2panda._BinaryExpressionLeft(global.context, this.peer)) + } + get right(): Expression | undefined { + return unpackNode(global.generatedEs2panda._BinaryExpressionRight(global.context, this.peer)) + } + get result(): Expression | undefined { + return unpackNode(global.generatedEs2panda._BinaryExpressionResult(global.context, this.peer)) + } + get operatorType(): Es2pandaTokenType { + return global.generatedEs2panda._BinaryExpressionOperatorTypeConst(global.context, this.peer) + } + get isLogical(): boolean { + return global.generatedEs2panda._BinaryExpressionIsLogicalConst(global.context, this.peer) + } + get isLogicalExtended(): boolean { + return global.generatedEs2panda._BinaryExpressionIsLogicalExtendedConst(global.context, this.peer) + } + get isBitwise(): boolean { + return global.generatedEs2panda._BinaryExpressionIsBitwiseConst(global.context, this.peer) + } + get isArithmetic(): boolean { + return global.generatedEs2panda._BinaryExpressionIsArithmeticConst(global.context, this.peer) + } + /** @deprecated */ + setLeft(expr?: Expression): this { + global.generatedEs2panda._BinaryExpressionSetLeft(global.context, this.peer, passNode(expr)) + return this + } + /** @deprecated */ + setRight(expr?: Expression): this { + global.generatedEs2panda._BinaryExpressionSetRight(global.context, this.peer, passNode(expr)) + return this + } + /** @deprecated */ + setResult(expr?: Expression): this { + global.generatedEs2panda._BinaryExpressionSetResult(global.context, this.peer, passNode(expr)) + return this + } + /** @deprecated */ + setOperator(operatorType: Es2pandaTokenType): this { + global.generatedEs2panda._BinaryExpressionSetOperator(global.context, this.peer, operatorType) + return this + } + /** @deprecated */ + compileOperands(etsg?: CodeGen, lhs?: VReg): this { + global.generatedEs2panda._BinaryExpressionCompileOperandsConst(global.context, this.peer, passNode(etsg), passNode(lhs)) + return this + } + protected readonly brandBinaryExpression: undefined +} +export function isBinaryExpression(node: object | undefined): node is BinaryExpression { + return node instanceof BinaryExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION, (peer: KNativePointer) => new BinaryExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/BindingProps.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/BindingProps.ts new file mode 100644 index 0000000000000000000000000000000000000000..f401c83d3d4deff075e0d01bcb6ffa7842a8b9fe --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/BindingProps.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class BindingProps extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandBindingProps: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/BlockExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/BlockExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..d6f1760c432fc76a0c5d8945f9492442ea5ec73f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/BlockExpression.ts @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" + +export class BlockExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createBlockExpression(statements: readonly Statement[]): BlockExpression { + const result: BlockExpression = new BlockExpression(global.generatedEs2panda._CreateBlockExpression(global.context, passNodeArray(statements), statements.length), Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateBlockExpression(original: BlockExpression | undefined, statements: readonly Statement[]): BlockExpression { + const result: BlockExpression = new BlockExpression(global.generatedEs2panda._UpdateBlockExpression(global.context, passNode(original), passNodeArray(statements), statements.length), Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get statements(): readonly Statement[] { + return unpackNodeArray(global.generatedEs2panda._BlockExpressionStatements(global.context, this.peer)) + } + /** @deprecated */ + addStatements(statements: readonly Statement[]): this { + global.generatedEs2panda._BlockExpressionAddStatements(global.context, this.peer, passNodeArray(statements), statements.length) + return this + } + /** @deprecated */ + addStatement(statement?: Statement): this { + global.generatedEs2panda._BlockExpressionAddStatement(global.context, this.peer, passNode(statement)) + return this + } + protected readonly brandBlockExpression: undefined +} +export function isBlockExpression(node: object | undefined): node is BlockExpression { + return node instanceof BlockExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_EXPRESSION, (peer: KNativePointer) => new BlockExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/BlockStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/BlockStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..f1c1990f83ddc5002317aa5f046e329f2f7de685 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/BlockStatement.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Statement } from "./Statement" + +export class BlockStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createBlockStatement(statementList: readonly Statement[]): BlockStatement { + const result: BlockStatement = new BlockStatement(global.generatedEs2panda._CreateBlockStatement(global.context, passNodeArray(statementList), statementList.length), Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateBlockStatement(original: BlockStatement | undefined, statementList: readonly Statement[]): BlockStatement { + const result: BlockStatement = new BlockStatement(global.generatedEs2panda._UpdateBlockStatement(global.context, passNode(original), passNodeArray(statementList), statementList.length), Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT) + result.setChildrenParentPtr() + return result + } + get statementsForUpdates(): readonly Statement[] { + return unpackNodeArray(global.generatedEs2panda._BlockStatementStatementsForUpdates(global.context, this.peer)) + } + get statements(): readonly Statement[] { + return unpackNodeArray(global.generatedEs2panda._BlockStatementStatements(global.context, this.peer)) + } + /** @deprecated */ + setStatements(statementList: readonly Statement[]): this { + global.generatedEs2panda._BlockStatementSetStatements(global.context, this.peer, passNodeArray(statementList), statementList.length) + return this + } + /** @deprecated */ + addStatements(statementList: readonly Statement[]): this { + global.generatedEs2panda._BlockStatementAddStatements(global.context, this.peer, passNodeArray(statementList), statementList.length) + return this + } + /** @deprecated */ + clearStatements(): this { + global.generatedEs2panda._BlockStatementClearStatements(global.context, this.peer) + return this + } + /** @deprecated */ + addStatement(statement?: Statement): this { + global.generatedEs2panda._BlockStatementAddStatement(global.context, this.peer, passNode(statement)) + return this + } + /** @deprecated */ + addStatement1(idx: number, statement?: Statement): this { + global.generatedEs2panda._BlockStatementAddStatement1(global.context, this.peer, idx, passNode(statement)) + return this + } + /** @deprecated */ + addTrailingBlock(stmt?: AstNode, trailingBlock?: BlockStatement): this { + global.generatedEs2panda._BlockStatementAddTrailingBlock(global.context, this.peer, passNode(stmt), passNode(trailingBlock)) + return this + } + protected readonly brandBlockStatement: undefined +} +export function isBlockStatement(node: object | undefined): node is BlockStatement { + return node instanceof BlockStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT, (peer: KNativePointer) => new BlockStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/BooleanLiteral.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/BooleanLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..491b4230248c5abe495d6720be16e589a4e1d873 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/BooleanLiteral.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Literal } from "./Literal" + +export class BooleanLiteral extends Literal { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createBooleanLiteral(value: boolean): BooleanLiteral { + const result: BooleanLiteral = new BooleanLiteral(global.generatedEs2panda._CreateBooleanLiteral(global.context, value), Es2pandaAstNodeType.AST_NODE_TYPE_BOOLEAN_LITERAL) + result.setChildrenParentPtr() + return result + } + static updateBooleanLiteral(original: BooleanLiteral | undefined, value: boolean): BooleanLiteral { + const result: BooleanLiteral = new BooleanLiteral(global.generatedEs2panda._UpdateBooleanLiteral(global.context, passNode(original), value), Es2pandaAstNodeType.AST_NODE_TYPE_BOOLEAN_LITERAL) + result.setChildrenParentPtr() + return result + } + get value(): boolean { + return global.generatedEs2panda._BooleanLiteralValueConst(global.context, this.peer) + } + protected readonly brandBooleanLiteral: undefined +} +export function isBooleanLiteral(node: object | undefined): node is BooleanLiteral { + return node instanceof BooleanLiteral +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BOOLEAN_LITERAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BOOLEAN_LITERAL, (peer: KNativePointer) => new BooleanLiteral(peer, Es2pandaAstNodeType.AST_NODE_TYPE_BOOLEAN_LITERAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/BreakStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/BreakStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..98030c2ff0ee58a5b0f1e1bee1c19b79d8ff1ac5 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/BreakStatement.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { Statement } from "./Statement" + +export class BreakStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1BreakStatement(ident?: Identifier): BreakStatement { + const result: BreakStatement = new BreakStatement(global.generatedEs2panda._CreateBreakStatement1(global.context, passNode(ident)), Es2pandaAstNodeType.AST_NODE_TYPE_BREAK_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateBreakStatement(original?: BreakStatement): BreakStatement { + const result: BreakStatement = new BreakStatement(global.generatedEs2panda._UpdateBreakStatement(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_BREAK_STATEMENT) + result.setChildrenParentPtr() + return result + } + static update1BreakStatement(original?: BreakStatement, ident?: Identifier): BreakStatement { + const result: BreakStatement = new BreakStatement(global.generatedEs2panda._UpdateBreakStatement1(global.context, passNode(original), passNode(ident)), Es2pandaAstNodeType.AST_NODE_TYPE_BREAK_STATEMENT) + result.setChildrenParentPtr() + return result + } + get ident(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._BreakStatementIdent(global.context, this.peer)) + } + get target(): AstNode | undefined { + return unpackNode(global.generatedEs2panda._BreakStatementTargetConst(global.context, this.peer)) + } + get hasTarget(): boolean { + return global.generatedEs2panda._BreakStatementHasTargetConst(global.context, this.peer) + } + /** @deprecated */ + setTarget(target?: AstNode): this { + global.generatedEs2panda._BreakStatementSetTarget(global.context, this.peer, passNode(target)) + return this + } + protected readonly brandBreakStatement: undefined +} +export function isBreakStatement(node: object | undefined): node is BreakStatement { + return node instanceof BreakStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_BREAK_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_BREAK_STATEMENT, (peer: KNativePointer) => new BreakStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_BREAK_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/CallExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/CallExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..34bc1619a5293745921aee81b7a19e880e6d95dd --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/CallExpression.ts @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { BlockStatement } from "./BlockStatement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { MaybeOptionalExpression } from "./MaybeOptionalExpression" +import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" + +export class CallExpression extends MaybeOptionalExpression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createCallExpression(callee: Expression | undefined, _arguments: readonly Expression[], typeParams: TSTypeParameterInstantiation | undefined, optional_arg: boolean, trailingComma: boolean, trailingBlock?: BlockStatement): CallExpression { + const result: CallExpression = new CallExpression(global.generatedEs2panda._CreateCallExpression(global.context, passNode(callee), passNodeArray(_arguments), _arguments.length, passNode(typeParams), optional_arg, trailingComma), Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION) + if (trailingBlock) + { + result.setTrailingBlock(trailingBlock) + } + result.setChildrenParentPtr() + return result + } + static update1CallExpression(original?: CallExpression, other?: CallExpression, trailingBlock?: BlockStatement): CallExpression { + const result: CallExpression = new CallExpression(global.generatedEs2panda._UpdateCallExpression1(global.context, passNode(original), passNode(other)), Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION) + if (trailingBlock) + { + result.setTrailingBlock(trailingBlock) + } + result.setChildrenParentPtr() + return result + } + get callee(): Expression | undefined { + return unpackNode(global.generatedEs2panda._CallExpressionCallee(global.context, this.peer)) + } + /** @deprecated */ + setCallee(callee?: Expression): this { + global.generatedEs2panda._CallExpressionSetCallee(global.context, this.peer, passNode(callee)) + return this + } + get typeParams(): TSTypeParameterInstantiation | undefined { + return unpackNode(global.generatedEs2panda._CallExpressionTypeParams(global.context, this.peer)) + } + get arguments(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._CallExpressionArguments(global.context, this.peer)) + } + /** @deprecated */ + setArguments(argumentsList: readonly Expression[]): this { + global.generatedEs2panda._CallExpressionSetArguments(global.context, this.peer, passNodeArray(argumentsList), argumentsList.length) + return this + } + get hasTrailingComma(): boolean { + return global.generatedEs2panda._CallExpressionHasTrailingCommaConst(global.context, this.peer) + } + /** @deprecated */ + setTypeParams(typeParams?: TSTypeParameterInstantiation): this { + global.generatedEs2panda._CallExpressionSetTypeParams(global.context, this.peer, passNode(typeParams)) + return this + } + /** @deprecated */ + setTrailingBlock(block?: BlockStatement): this { + global.generatedEs2panda._CallExpressionSetTrailingBlock(global.context, this.peer, passNode(block)) + return this + } + get isExtensionAccessorCall(): boolean { + return global.generatedEs2panda._CallExpressionIsExtensionAccessorCall(global.context, this.peer) + } + get trailingBlock(): BlockStatement | undefined { + return unpackNode(global.generatedEs2panda._CallExpressionTrailingBlockConst(global.context, this.peer)) + } + /** @deprecated */ + setIsTrailingBlockInNewLine(isNewLine: boolean): this { + global.generatedEs2panda._CallExpressionSetIsTrailingBlockInNewLine(global.context, this.peer, isNewLine) + return this + } + get isTrailingBlockInNewLine(): boolean { + return global.generatedEs2panda._CallExpressionIsTrailingBlockInNewLineConst(global.context, this.peer) + } + /** @deprecated */ + setIsTrailingCall(isTrailingCall: boolean): this { + global.generatedEs2panda._CallExpressionSetIsTrailingCall(global.context, this.peer, isTrailingCall) + return this + } + get isTrailingCall(): boolean { + return global.generatedEs2panda._CallExpressionIsTrailingCallConst(global.context, this.peer) + } + get isETSConstructorCall(): boolean { + return global.generatedEs2panda._CallExpressionIsETSConstructorCallConst(global.context, this.peer) + } + get isDynamicCall(): boolean { + return global.generatedEs2panda._CallExpressionIsDynamicCallConst(global.context, this.peer) + } + protected readonly brandCallExpression: undefined +} +export function isCallExpression(node: object | undefined): node is CallExpression { + return node instanceof CallExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION, (peer: KNativePointer) => new CallExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/CatchClause.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/CatchClause.ts new file mode 100644 index 0000000000000000000000000000000000000000..f81f34df8ad45e5446a3f7d0c60c70627c9694f7 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/CatchClause.ts @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { BlockStatement } from "./BlockStatement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypedStatement } from "./TypedStatement" + +export class CatchClause extends TypedStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createCatchClause(param?: Expression, body?: BlockStatement): CatchClause { + const result: CatchClause = new CatchClause(global.generatedEs2panda._CreateCatchClause(global.context, passNode(param), passNode(body)), Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE) + result.setChildrenParentPtr() + return result + } + static updateCatchClause(original?: CatchClause, param?: Expression, body?: BlockStatement): CatchClause { + const result: CatchClause = new CatchClause(global.generatedEs2panda._UpdateCatchClause(global.context, passNode(original), passNode(param), passNode(body)), Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE) + result.setChildrenParentPtr() + return result + } + static update1CatchClause(original?: CatchClause, other?: CatchClause): CatchClause { + const result: CatchClause = new CatchClause(global.generatedEs2panda._UpdateCatchClause1(global.context, passNode(original), passNode(other)), Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE) + result.setChildrenParentPtr() + return result + } + get param(): Expression | undefined { + return unpackNode(global.generatedEs2panda._CatchClauseParam(global.context, this.peer)) + } + get body(): BlockStatement | undefined { + return unpackNode(global.generatedEs2panda._CatchClauseBody(global.context, this.peer)) + } + get isDefaultCatchClause(): boolean { + return global.generatedEs2panda._CatchClauseIsDefaultCatchClauseConst(global.context, this.peer) + } + protected readonly brandCatchClause: undefined +} +export function isCatchClause(node: object | undefined): node is CatchClause { + return node instanceof CatchClause +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE, (peer: KNativePointer) => new CatchClause(peer, Es2pandaAstNodeType.AST_NODE_TYPE_CATCH_CLAUSE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ChainExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ChainExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..58ef313cf13a79b902e17571b6549fd6ae5a59bb --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ChainExpression.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { CodeGen } from "./CodeGen" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { VReg } from "./VReg" + +export class ChainExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createChainExpression(expression?: Expression): ChainExpression { + const result: ChainExpression = new ChainExpression(global.generatedEs2panda._CreateChainExpression(global.context, passNode(expression)), Es2pandaAstNodeType.AST_NODE_TYPE_CHAIN_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateChainExpression(original?: ChainExpression, expression?: Expression): ChainExpression { + const result: ChainExpression = new ChainExpression(global.generatedEs2panda._UpdateChainExpression(global.context, passNode(original), passNode(expression)), Es2pandaAstNodeType.AST_NODE_TYPE_CHAIN_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get expression(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ChainExpressionGetExpression(global.context, this.peer)) + } + /** @deprecated */ + compileToReg(pg?: CodeGen, objReg?: VReg): this { + global.generatedEs2panda._ChainExpressionCompileToRegConst(global.context, this.peer, passNode(pg), passNode(objReg)) + return this + } + protected readonly brandChainExpression: undefined +} +export function isChainExpression(node: object | undefined): node is ChainExpression { + return node instanceof ChainExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CHAIN_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CHAIN_EXPRESSION, (peer: KNativePointer) => new ChainExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_CHAIN_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/CharLiteral.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/CharLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..94abf277f8aac5bf5fc2b7e7dd22ae0543997348 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/CharLiteral.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Literal } from "./Literal" + +export class CharLiteral extends Literal { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createCharLiteral(): CharLiteral { + const result: CharLiteral = new CharLiteral(global.generatedEs2panda._CreateCharLiteral(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_CHAR_LITERAL) + result.setChildrenParentPtr() + return result + } + static updateCharLiteral(original?: CharLiteral): CharLiteral { + const result: CharLiteral = new CharLiteral(global.generatedEs2panda._UpdateCharLiteral(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_CHAR_LITERAL) + result.setChildrenParentPtr() + return result + } + protected readonly brandCharLiteral: undefined +} +export function isCharLiteral(node: object | undefined): node is CharLiteral { + return node instanceof CharLiteral +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CHAR_LITERAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CHAR_LITERAL, (peer: KNativePointer) => new CharLiteral(peer, Es2pandaAstNodeType.AST_NODE_TYPE_CHAR_LITERAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ClassDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..29c0de6c356b065bdaf529f78ea367153c7a3cae --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassDeclaration.ts @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { ClassDefinition } from "./ClassDefinition" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { Statement } from "./Statement" + +export class ClassDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createClassDeclaration(def?: ClassDefinition, modifierFlags?: Es2pandaModifierFlags): ClassDeclaration { + const result: ClassDeclaration = new ClassDeclaration(global.generatedEs2panda._CreateClassDeclaration(global.context, passNode(def)), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION) + if (modifierFlags) + { + result.modifierFlags = modifierFlags + } + result.setChildrenParentPtr() + return result + } + static updateClassDeclaration(original?: ClassDeclaration, def?: ClassDefinition, modifierFlags?: Es2pandaModifierFlags): ClassDeclaration { + const result: ClassDeclaration = new ClassDeclaration(global.generatedEs2panda._UpdateClassDeclaration(global.context, passNode(original), passNode(def)), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION) + if (modifierFlags) + { + result.modifierFlags = modifierFlags + } + result.setChildrenParentPtr() + return result + } + get definition(): ClassDefinition { + return unpackNonNullableNode(global.generatedEs2panda._ClassDeclarationDefinition(global.context, this.peer)) + } + /** @deprecated */ + setDefinition(def?: ClassDefinition): this { + global.generatedEs2panda._ClassDeclarationSetDefinition(global.context, this.peer, passNode(def)) + return this + } + protected readonly brandClassDeclaration: undefined +} +export function isClassDeclaration(node: object | undefined): node is ClassDeclaration { + return node instanceof ClassDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION, (peer: KNativePointer) => new ClassDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ClassDefinition.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassDefinition.ts new file mode 100644 index 0000000000000000000000000000000000000000..976cb99ff3141d568264d1c368e83e33054df865 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassDefinition.ts @@ -0,0 +1,366 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { ClassDeclaration } from "./ClassDeclaration" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaClassDefinitionModifiers } from "./../Es2pandaEnums" +import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { MethodDefinition } from "./MethodDefinition" +import { SrcDumper } from "./SrcDumper" +import { TSClassImplements } from "./TSClassImplements" +import { TSEnumDeclaration } from "./TSEnumDeclaration" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TypedAstNode } from "./TypedAstNode" +import { extension_ClassDefinitionSetBody } from "./../../reexport-for-generated" + +export class ClassDefinition extends TypedAstNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createClassDefinition(ident: Identifier | undefined, typeParams: TSTypeParameterDeclaration | undefined, superTypeParams: TSTypeParameterInstantiation | undefined, _implements: readonly TSClassImplements[], ctor: MethodDefinition | undefined, superClass: Expression | undefined, body: readonly AstNode[], modifiers: Es2pandaClassDefinitionModifiers, flags: Es2pandaModifierFlags, annotations?: readonly AnnotationUsage[]): ClassDefinition { + const result: ClassDefinition = new ClassDefinition(global.generatedEs2panda._CreateClassDefinition(global.context, passNode(ident), passNode(typeParams), passNode(superTypeParams), passNodeArray(_implements), _implements.length, passNode(ctor), passNode(superClass), passNodeArray(body), body.length, modifiers, flags), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static updateClassDefinition(original: ClassDefinition | undefined, ident: Identifier | undefined, typeParams: TSTypeParameterDeclaration | undefined, superTypeParams: TSTypeParameterInstantiation | undefined, _implements: readonly TSClassImplements[], ctor: MethodDefinition | undefined, superClass: Expression | undefined, body: readonly AstNode[], modifiers: Es2pandaClassDefinitionModifiers, flags: Es2pandaModifierFlags, annotations?: readonly AnnotationUsage[]): ClassDefinition { + const result: ClassDefinition = new ClassDefinition(global.generatedEs2panda._UpdateClassDefinition(global.context, passNode(original), passNode(ident), passNode(typeParams), passNode(superTypeParams), passNodeArray(_implements), _implements.length, passNode(ctor), passNode(superClass), passNodeArray(body), body.length, modifiers, flags), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static update1ClassDefinition(original: ClassDefinition | undefined, ident: Identifier | undefined, body: readonly AstNode[], modifiers: Es2pandaClassDefinitionModifiers, flags: Es2pandaModifierFlags, annotations?: readonly AnnotationUsage[]): ClassDefinition { + const result: ClassDefinition = new ClassDefinition(global.generatedEs2panda._UpdateClassDefinition1(global.context, passNode(original), passNode(ident), passNodeArray(body), body.length, modifiers, flags), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static update2ClassDefinition(original: ClassDefinition | undefined, ident: Identifier | undefined, modifiers: Es2pandaClassDefinitionModifiers, flags: Es2pandaModifierFlags, annotations?: readonly AnnotationUsage[]): ClassDefinition { + const result: ClassDefinition = new ClassDefinition(global.generatedEs2panda._UpdateClassDefinition2(global.context, passNode(original), passNode(ident), modifiers, flags), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + get ident(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionIdent(global.context, this.peer)) + } + /** @deprecated */ + setIdent(ident?: Identifier): this { + global.generatedEs2panda._ClassDefinitionSetIdent(global.context, this.peer, passNode(ident)) + return this + } + get internalName(): string { + return unpackString(global.generatedEs2panda._ClassDefinitionInternalNameConst(global.context, this.peer)) + } + get super(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionSuper(global.context, this.peer)) + } + /** @deprecated */ + setSuper(superClass?: Expression): this { + global.generatedEs2panda._ClassDefinitionSetSuper(global.context, this.peer, passNode(superClass)) + return this + } + get isGlobal(): boolean { + return global.generatedEs2panda._ClassDefinitionIsGlobalConst(global.context, this.peer) + } + get isLocal(): boolean { + return global.generatedEs2panda._ClassDefinitionIsLocalConst(global.context, this.peer) + } + get isExtern(): boolean { + return global.generatedEs2panda._ClassDefinitionIsExternConst(global.context, this.peer) + } + get isFromExternal(): boolean { + return global.generatedEs2panda._ClassDefinitionIsFromExternalConst(global.context, this.peer) + } + get isInner(): boolean { + return global.generatedEs2panda._ClassDefinitionIsInnerConst(global.context, this.peer) + } + get isGlobalInitialized(): boolean { + return global.generatedEs2panda._ClassDefinitionIsGlobalInitializedConst(global.context, this.peer) + } + get isClassDefinitionChecked(): boolean { + return global.generatedEs2panda._ClassDefinitionIsClassDefinitionCheckedConst(global.context, this.peer) + } + get isAnonymous(): boolean { + return global.generatedEs2panda._ClassDefinitionIsAnonymousConst(global.context, this.peer) + } + get isIntEnumTransformed(): boolean { + return global.generatedEs2panda._ClassDefinitionIsIntEnumTransformedConst(global.context, this.peer) + } + get isStringEnumTransformed(): boolean { + return global.generatedEs2panda._ClassDefinitionIsStringEnumTransformedConst(global.context, this.peer) + } + get isEnumTransformed(): boolean { + return global.generatedEs2panda._ClassDefinitionIsEnumTransformedConst(global.context, this.peer) + } + get isNamespaceTransformed(): boolean { + return global.generatedEs2panda._ClassDefinitionIsNamespaceTransformedConst(global.context, this.peer) + } + get isLazyImportObjectClass(): boolean { + return global.generatedEs2panda._ClassDefinitionIsLazyImportObjectClassConst(global.context, this.peer) + } + get isFromStruct(): boolean { + return global.generatedEs2panda._ClassDefinitionIsFromStructConst(global.context, this.peer) + } + get isInitInCctor(): boolean { + return global.generatedEs2panda._ClassDefinitionIsInitInCctorConst(global.context, this.peer) + } + get isModule(): boolean { + return global.generatedEs2panda._ClassDefinitionIsModuleConst(global.context, this.peer) + } + /** @deprecated */ + setGlobalInitialized(): this { + global.generatedEs2panda._ClassDefinitionSetGlobalInitialized(global.context, this.peer) + return this + } + /** @deprecated */ + setInnerModifier(): this { + global.generatedEs2panda._ClassDefinitionSetInnerModifier(global.context, this.peer) + return this + } + /** @deprecated */ + setClassDefinitionChecked(): this { + global.generatedEs2panda._ClassDefinitionSetClassDefinitionChecked(global.context, this.peer) + return this + } + /** @deprecated */ + setAnonymousModifier(): this { + global.generatedEs2panda._ClassDefinitionSetAnonymousModifier(global.context, this.peer) + return this + } + /** @deprecated */ + setNamespaceTransformed(): this { + global.generatedEs2panda._ClassDefinitionSetNamespaceTransformed(global.context, this.peer) + return this + } + /** @deprecated */ + setLazyImportObjectClass(): this { + global.generatedEs2panda._ClassDefinitionSetLazyImportObjectClass(global.context, this.peer) + return this + } + /** @deprecated */ + setFromStructModifier(): this { + global.generatedEs2panda._ClassDefinitionSetFromStructModifier(global.context, this.peer) + return this + } + /** @deprecated */ + setInitInCctor(): this { + global.generatedEs2panda._ClassDefinitionSetInitInCctor(global.context, this.peer) + return this + } + get modifiers(): Es2pandaClassDefinitionModifiers { + return global.generatedEs2panda._ClassDefinitionModifiersConst(global.context, this.peer) + } + /** @deprecated */ + addProperties(body: readonly AstNode[]): this { + global.generatedEs2panda._ClassDefinitionAddProperties(global.context, this.peer, passNodeArray(body), body.length) + return this + } + get ctor(): MethodDefinition | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionCtor(global.context, this.peer)) + } + get typeParams(): TSTypeParameterDeclaration | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionTypeParams(global.context, this.peer)) + } + get superTypeParams(): TSTypeParameterInstantiation | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionSuperTypeParams(global.context, this.peer)) + } + get localTypeCounter(): number { + return global.generatedEs2panda._ClassDefinitionLocalTypeCounter(global.context, this.peer) + } + get localIndex(): number { + return global.generatedEs2panda._ClassDefinitionLocalIndexConst(global.context, this.peer) + } + get functionalReferenceReferencedMethod(): MethodDefinition | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionFunctionalReferenceReferencedMethodConst(global.context, this.peer)) + } + /** @deprecated */ + setFunctionalReferenceReferencedMethod(functionalReferenceReferencedMethod?: MethodDefinition): this { + global.generatedEs2panda._ClassDefinitionSetFunctionalReferenceReferencedMethod(global.context, this.peer, passNode(functionalReferenceReferencedMethod)) + return this + } + get localPrefix(): string { + return unpackString(global.generatedEs2panda._ClassDefinitionLocalPrefixConst(global.context, this.peer)) + } + get origEnumDecl(): TSEnumDeclaration | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionOrigEnumDeclConst(global.context, this.peer)) + } + get anonClass(): ClassDeclaration | undefined { + return unpackNode(global.generatedEs2panda._ClassDefinitionGetAnonClass(global.context, this.peer)) + } + get hasPrivateMethod(): boolean { + return global.generatedEs2panda._ClassDefinitionHasPrivateMethodConst(global.context, this.peer) + } + get hasNativeMethod(): boolean { + return global.generatedEs2panda._ClassDefinitionHasNativeMethodConst(global.context, this.peer) + } + get hasComputedInstanceField(): boolean { + return global.generatedEs2panda._ClassDefinitionHasComputedInstanceFieldConst(global.context, this.peer) + } + /** @deprecated */ + addToExportedClasses(cls?: ClassDeclaration): this { + global.generatedEs2panda._ClassDefinitionAddToExportedClasses(global.context, this.peer, passNode(cls)) + return this + } + /** @deprecated */ + setModifiers(modifiers: Es2pandaClassDefinitionModifiers): this { + global.generatedEs2panda._ClassDefinitionSetModifiers(global.context, this.peer, modifiers) + return this + } + /** @deprecated */ + emplaceBody(body?: AstNode): this { + global.generatedEs2panda._ClassDefinitionEmplaceBody(global.context, this.peer, passNode(body)) + return this + } + /** @deprecated */ + clearBody(): this { + global.generatedEs2panda._ClassDefinitionClearBody(global.context, this.peer) + return this + } + /** @deprecated */ + setValueBody(body: AstNode | undefined, index: number): this { + global.generatedEs2panda._ClassDefinitionSetValueBody(global.context, this.peer, passNode(body), index) + return this + } + get body(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionBody(global.context, this.peer)) + } + get bodyForUpdate(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionBodyForUpdate(global.context, this.peer)) + } + /** @deprecated */ + emplaceImplements(_implements?: TSClassImplements): this { + global.generatedEs2panda._ClassDefinitionEmplaceImplements(global.context, this.peer, passNode(_implements)) + return this + } + /** @deprecated */ + clearImplements(): this { + global.generatedEs2panda._ClassDefinitionClearImplements(global.context, this.peer) + return this + } + /** @deprecated */ + setValueImplements(_implements: TSClassImplements | undefined, index: number): this { + global.generatedEs2panda._ClassDefinitionSetValueImplements(global.context, this.peer, passNode(_implements), index) + return this + } + get implements(): readonly TSClassImplements[] { + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionImplements(global.context, this.peer)) + } + get implementsForUpdate(): readonly TSClassImplements[] { + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionImplementsForUpdate(global.context, this.peer)) + } + /** @deprecated */ + setCtor(ctor?: MethodDefinition): this { + global.generatedEs2panda._ClassDefinitionSetCtor(global.context, this.peer, passNode(ctor)) + return this + } + /** @deprecated */ + setTypeParams(typeParams?: TSTypeParameterDeclaration): this { + global.generatedEs2panda._ClassDefinitionSetTypeParams(global.context, this.peer, passNode(typeParams)) + return this + } + /** @deprecated */ + setOrigEnumDecl(origEnumDecl?: TSEnumDeclaration): this { + global.generatedEs2panda._ClassDefinitionSetOrigEnumDecl(global.context, this.peer, passNode(origEnumDecl)) + return this + } + /** @deprecated */ + setAnonClass(anonClass?: ClassDeclaration): this { + global.generatedEs2panda._ClassDefinitionSetAnonClass(global.context, this.peer, passNode(anonClass)) + return this + } + /** @deprecated */ + setInternalName(internalName: string): this { + global.generatedEs2panda._ClassDefinitionSetInternalName(global.context, this.peer, internalName) + return this + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._ClassDefinitionHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._ClassDefinitionEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._ClassDefinitionClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._ClassDefinitionDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ClassDefinitionAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ClassDefinitionSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ClassDefinitionSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + setBody = extension_ClassDefinitionSetBody + protected readonly brandClassDefinition: undefined +} +export function isClassDefinition(node: object | undefined): node is ClassDefinition { + return node instanceof ClassDefinition +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION, (peer: KNativePointer) => new ClassDefinition(peer, Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DEFINITION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ClassElement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassElement.ts new file mode 100644 index 0000000000000000000000000000000000000000..6108529adb414a7d37f5ae29368fac80a6222a10 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassElement.ts @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { TSEnumMember } from "./TSEnumMember" +import { TypedStatement } from "./TypedStatement" + +export class ClassElement extends TypedStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + get id(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ClassElementId(global.context, this.peer)) + } + get key(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ClassElementKey(global.context, this.peer)) + } + get value(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ClassElementValue(global.context, this.peer)) + } + /** @deprecated */ + setValue(value?: Expression): this { + global.generatedEs2panda._ClassElementSetValue(global.context, this.peer, passNode(value)) + return this + } + get originEnumMember(): TSEnumMember | undefined { + return unpackNode(global.generatedEs2panda._ClassElementOriginEnumMemberConst(global.context, this.peer)) + } + /** @deprecated */ + setOrigEnumMember(enumMember?: TSEnumMember): this { + global.generatedEs2panda._ClassElementSetOrigEnumMember(global.context, this.peer, passNode(enumMember)) + return this + } + get isPrivateElement(): boolean { + return global.generatedEs2panda._ClassElementIsPrivateElementConst(global.context, this.peer) + } + get isComputed(): boolean { + return global.generatedEs2panda._ClassElementIsComputedConst(global.context, this.peer) + } + protected readonly brandClassElement: undefined +} +export function isClassElement(node: object | undefined): node is ClassElement { + return node instanceof ClassElement +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ClassExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..3940738bc05fb4873e6a6f5b941259a3c8058419 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassExpression.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { ClassDefinition } from "./ClassDefinition" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class ClassExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createClassExpression(def?: ClassDefinition): ClassExpression { + const result: ClassExpression = new ClassExpression(global.generatedEs2panda._CreateClassExpression(global.context, passNode(def)), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateClassExpression(original?: ClassExpression, def?: ClassDefinition): ClassExpression { + const result: ClassExpression = new ClassExpression(global.generatedEs2panda._UpdateClassExpression(global.context, passNode(original), passNode(def)), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get definition(): ClassDefinition | undefined { + return unpackNode(global.generatedEs2panda._ClassExpressionDefinitionConst(global.context, this.peer)) + } + protected readonly brandClassExpression: undefined +} +export function isClassExpression(node: object | undefined): node is ClassExpression { + return node instanceof ClassExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_EXPRESSION, (peer: KNativePointer) => new ClassExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ClassProperty.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassProperty.ts new file mode 100644 index 0000000000000000000000000000000000000000..c686a277ac75a2405b0567c5b70a9f0ef5babf57 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassProperty.ts @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { ClassElement } from "./ClassElement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { SrcDumper } from "./SrcDumper" +import { TypeNode } from "./TypeNode" + +export class ClassProperty extends ClassElement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createClassProperty(key: Expression | undefined, value: Expression | undefined, typeAnnotation: TypeNode | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean, annotations?: readonly AnnotationUsage[]): ClassProperty { + const result: ClassProperty = new ClassProperty(global.generatedEs2panda._CreateClassProperty(global.context, passNode(key), passNode(value), passNode(typeAnnotation), modifiers, isComputed), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static updateClassProperty(original: ClassProperty | undefined, key: Expression | undefined, value: Expression | undefined, typeAnnotation: TypeNode | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean, annotations?: readonly AnnotationUsage[]): ClassProperty { + const result: ClassProperty = new ClassProperty(global.generatedEs2panda._UpdateClassProperty(global.context, passNode(original), passNode(key), passNode(value), passNode(typeAnnotation), modifiers, isComputed), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + get isDefaultAccessModifier(): boolean { + return global.generatedEs2panda._ClassPropertyIsDefaultAccessModifierConst(global.context, this.peer) + } + /** @deprecated */ + setDefaultAccessModifier(isDefault: boolean): this { + global.generatedEs2panda._ClassPropertySetDefaultAccessModifier(global.context, this.peer, isDefault) + return this + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ClassPropertyTypeAnnotationConst(global.context, this.peer)) + } + /** @deprecated */ + setTypeAnnotation(typeAnnotation?: TypeNode): this { + global.generatedEs2panda._ClassPropertySetTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) + return this + } + get needInitInStaticBlock(): boolean { + return global.generatedEs2panda._ClassPropertyNeedInitInStaticBlockConst(global.context, this.peer) + } + /** @deprecated */ + setNeedInitInStaticBlock(): this { + global.generatedEs2panda._ClassPropertySetNeedInitInStaticBlock(global.context, this.peer) + return this + } + get isImmediateInit(): boolean { + return global.generatedEs2panda._ClassPropertyIsImmediateInitConst(global.context, this.peer) + } + /** @deprecated */ + setIsImmediateInit(): this { + global.generatedEs2panda._ClassPropertySetIsImmediateInit(global.context, this.peer) + return this + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._ClassPropertyHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._ClassPropertyEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._ClassPropertyClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._ClassPropertyDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ClassPropertyAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ClassPropertyAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ClassPropertySetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ClassPropertySetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + protected readonly brandClassProperty: undefined +} +export function isClassProperty(node: object | undefined): node is ClassProperty { + return node instanceof ClassProperty +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY, (peer: KNativePointer) => new ClassProperty(peer, Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ClassStaticBlock.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassStaticBlock.ts new file mode 100644 index 0000000000000000000000000000000000000000..5798b8d49255a86b8bc28910201ab2200b35bea6 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ClassStaticBlock.ts @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { ClassElement } from "./ClassElement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { ScriptFunction } from "./ScriptFunction" + +export class ClassStaticBlock extends ClassElement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createClassStaticBlock(value?: Expression): ClassStaticBlock { + const result: ClassStaticBlock = new ClassStaticBlock(global.generatedEs2panda._CreateClassStaticBlock(global.context, passNode(value)), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK) + result.setChildrenParentPtr() + return result + } + static updateClassStaticBlock(original?: ClassStaticBlock, value?: Expression): ClassStaticBlock { + const result: ClassStaticBlock = new ClassStaticBlock(global.generatedEs2panda._UpdateClassStaticBlock(global.context, passNode(original), passNode(value)), Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK) + result.setChildrenParentPtr() + return result + } + get function(): ScriptFunction | undefined { + return unpackNode(global.generatedEs2panda._ClassStaticBlockFunction(global.context, this.peer)) + } + get name(): string { + return unpackString(global.generatedEs2panda._ClassStaticBlockNameConst(global.context, this.peer)) + } + protected readonly brandClassStaticBlock: undefined +} +export function isClassStaticBlock(node: object | undefined): node is ClassStaticBlock { + return node instanceof ClassStaticBlock +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK, (peer: KNativePointer) => new ClassStaticBlock(peer, Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/CodeGen.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/CodeGen.ts new file mode 100644 index 0000000000000000000000000000000000000000..4272a4ef4c7907f554ce4578f42b62384f1f04ea --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/CodeGen.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class CodeGen extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandCodeGen: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ConditionalExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ConditionalExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..aa8166872ab5810a6b5fce26e54f082746d6e4d0 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ConditionalExpression.ts @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class ConditionalExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createConditionalExpression(test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression { + const result: ConditionalExpression = new ConditionalExpression(global.generatedEs2panda._CreateConditionalExpression(global.context, passNode(test), passNode(consequent), passNode(alternate)), Es2pandaAstNodeType.AST_NODE_TYPE_CONDITIONAL_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateConditionalExpression(original?: ConditionalExpression, test?: Expression, consequent?: Expression, alternate?: Expression): ConditionalExpression { + const result: ConditionalExpression = new ConditionalExpression(global.generatedEs2panda._UpdateConditionalExpression(global.context, passNode(original), passNode(test), passNode(consequent), passNode(alternate)), Es2pandaAstNodeType.AST_NODE_TYPE_CONDITIONAL_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get test(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ConditionalExpressionTest(global.context, this.peer)) + } + /** @deprecated */ + setTest(expr?: Expression): this { + global.generatedEs2panda._ConditionalExpressionSetTest(global.context, this.peer, passNode(expr)) + return this + } + get consequent(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ConditionalExpressionConsequent(global.context, this.peer)) + } + /** @deprecated */ + setConsequent(expr?: Expression): this { + global.generatedEs2panda._ConditionalExpressionSetConsequent(global.context, this.peer, passNode(expr)) + return this + } + get alternate(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ConditionalExpressionAlternate(global.context, this.peer)) + } + /** @deprecated */ + setAlternate(expr?: Expression): this { + global.generatedEs2panda._ConditionalExpressionSetAlternate(global.context, this.peer, passNode(expr)) + return this + } + protected readonly brandConditionalExpression: undefined +} +export function isConditionalExpression(node: object | undefined): node is ConditionalExpression { + return node instanceof ConditionalExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CONDITIONAL_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CONDITIONAL_EXPRESSION, (peer: KNativePointer) => new ConditionalExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_CONDITIONAL_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ContinueStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ContinueStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..b17460e34beb7ccca930486c1d4350fb9ad17293 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ContinueStatement.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { Statement } from "./Statement" + +export class ContinueStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1ContinueStatement(ident?: Identifier): ContinueStatement { + const result: ContinueStatement = new ContinueStatement(global.generatedEs2panda._CreateContinueStatement1(global.context, passNode(ident)), Es2pandaAstNodeType.AST_NODE_TYPE_CONTINUE_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateContinueStatement(original?: ContinueStatement): ContinueStatement { + const result: ContinueStatement = new ContinueStatement(global.generatedEs2panda._UpdateContinueStatement(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_CONTINUE_STATEMENT) + result.setChildrenParentPtr() + return result + } + static update1ContinueStatement(original?: ContinueStatement, ident?: Identifier): ContinueStatement { + const result: ContinueStatement = new ContinueStatement(global.generatedEs2panda._UpdateContinueStatement1(global.context, passNode(original), passNode(ident)), Es2pandaAstNodeType.AST_NODE_TYPE_CONTINUE_STATEMENT) + result.setChildrenParentPtr() + return result + } + get ident(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ContinueStatementIdent(global.context, this.peer)) + } + get target(): AstNode | undefined { + return unpackNode(global.generatedEs2panda._ContinueStatementTargetConst(global.context, this.peer)) + } + get hasTarget(): boolean { + return global.generatedEs2panda._ContinueStatementHasTargetConst(global.context, this.peer) + } + /** @deprecated */ + setTarget(target?: AstNode): this { + global.generatedEs2panda._ContinueStatementSetTarget(global.context, this.peer, passNode(target)) + return this + } + protected readonly brandContinueStatement: undefined +} +export function isContinueStatement(node: object | undefined): node is ContinueStatement { + return node instanceof ContinueStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_CONTINUE_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_CONTINUE_STATEMENT, (peer: KNativePointer) => new ContinueStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_CONTINUE_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/DebuggerStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/DebuggerStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..c763d83060736c6bba94e806175e4d383ebf842d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/DebuggerStatement.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Statement } from "./Statement" + +export class DebuggerStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createDebuggerStatement(): DebuggerStatement { + const result: DebuggerStatement = new DebuggerStatement(global.generatedEs2panda._CreateDebuggerStatement(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_DEBUGGER_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateDebuggerStatement(original?: DebuggerStatement): DebuggerStatement { + const result: DebuggerStatement = new DebuggerStatement(global.generatedEs2panda._UpdateDebuggerStatement(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_DEBUGGER_STATEMENT) + result.setChildrenParentPtr() + return result + } + protected readonly brandDebuggerStatement: undefined +} +export function isDebuggerStatement(node: object | undefined): node is DebuggerStatement { + return node instanceof DebuggerStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DEBUGGER_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DEBUGGER_STATEMENT, (peer: KNativePointer) => new DebuggerStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_DEBUGGER_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/Declaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/Declaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..e4dd0dee221aff494700319818e353064f160f44 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/Declaration.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class Declaration extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandDeclaration: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/Decorator.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/Decorator.ts new file mode 100644 index 0000000000000000000000000000000000000000..ce79b6c68f8037ce98fb813ef5c7cc590689d4bc --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/Decorator.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" + +export class Decorator extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createDecorator(expr?: Expression): Decorator { + const result: Decorator = new Decorator(global.generatedEs2panda._CreateDecorator(global.context, passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_DECORATOR) + result.setChildrenParentPtr() + return result + } + static updateDecorator(original?: Decorator, expr?: Expression): Decorator { + const result: Decorator = new Decorator(global.generatedEs2panda._UpdateDecorator(global.context, passNode(original), passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_DECORATOR) + result.setChildrenParentPtr() + return result + } + get expr(): Expression | undefined { + return unpackNode(global.generatedEs2panda._DecoratorExprConst(global.context, this.peer)) + } + protected readonly brandDecorator: undefined +} +export function isDecorator(node: object | undefined): node is Decorator { + return node instanceof Decorator +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DECORATOR)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DECORATOR, (peer: KNativePointer) => new Decorator(peer, Es2pandaAstNodeType.AST_NODE_TYPE_DECORATOR)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/DiagnosticInfo.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/DiagnosticInfo.ts new file mode 100644 index 0000000000000000000000000000000000000000..92984570c81e91dc1a0897976d6884a5be018781 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/DiagnosticInfo.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class DiagnosticInfo extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandDiagnosticInfo: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/DirectEvalExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/DirectEvalExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..7e1e558f7eb64660be5cbd6a04bdaa74021a560d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/DirectEvalExpression.ts @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { CallExpression } from "./CallExpression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" + +export class DirectEvalExpression extends CallExpression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createDirectEvalExpression(callee: Expression | undefined, _arguments: readonly Expression[], typeParams: TSTypeParameterInstantiation | undefined, optional_arg: boolean, parserStatus: number): DirectEvalExpression { + const result: DirectEvalExpression = new DirectEvalExpression(global.generatedEs2panda._CreateDirectEvalExpression(global.context, passNode(callee), passNodeArray(_arguments), _arguments.length, passNode(typeParams), optional_arg, parserStatus), Es2pandaAstNodeType.AST_NODE_TYPE_DIRECT_EVAL) + result.setChildrenParentPtr() + return result + } + static updateDirectEvalExpression(original: DirectEvalExpression | undefined, callee: Expression | undefined, _arguments: readonly Expression[], typeParams: TSTypeParameterInstantiation | undefined, optional_arg: boolean, parserStatus: number): DirectEvalExpression { + const result: DirectEvalExpression = new DirectEvalExpression(global.generatedEs2panda._UpdateDirectEvalExpression(global.context, passNode(original), passNode(callee), passNodeArray(_arguments), _arguments.length, passNode(typeParams), optional_arg, parserStatus), Es2pandaAstNodeType.AST_NODE_TYPE_DIRECT_EVAL) + result.setChildrenParentPtr() + return result + } + protected readonly brandDirectEvalExpression: undefined +} +export function isDirectEvalExpression(node: object | undefined): node is DirectEvalExpression { + return node instanceof DirectEvalExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DIRECT_EVAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DIRECT_EVAL, (peer: KNativePointer) => new DirectEvalExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_DIRECT_EVAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/DoWhileStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/DoWhileStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..f33db91c4b18697bfd5f793e0cf9a74f34e52f83 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/DoWhileStatement.ts @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { LoopStatement } from "./LoopStatement" +import { Statement } from "./Statement" + +export class DoWhileStatement extends LoopStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createDoWhileStatement(body?: Statement, test?: Expression): DoWhileStatement { + const result: DoWhileStatement = new DoWhileStatement(global.generatedEs2panda._CreateDoWhileStatement(global.context, passNode(body), passNode(test)), Es2pandaAstNodeType.AST_NODE_TYPE_DO_WHILE_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateDoWhileStatement(original?: DoWhileStatement, body?: Statement, test?: Expression): DoWhileStatement { + const result: DoWhileStatement = new DoWhileStatement(global.generatedEs2panda._UpdateDoWhileStatement(global.context, passNode(original), passNode(body), passNode(test)), Es2pandaAstNodeType.AST_NODE_TYPE_DO_WHILE_STATEMENT) + result.setChildrenParentPtr() + return result + } + get body(): Statement | undefined { + return unpackNode(global.generatedEs2panda._DoWhileStatementBody(global.context, this.peer)) + } + get test(): Expression | undefined { + return unpackNode(global.generatedEs2panda._DoWhileStatementTest(global.context, this.peer)) + } + protected readonly brandDoWhileStatement: undefined +} +export function isDoWhileStatement(node: object | undefined): node is DoWhileStatement { + return node instanceof DoWhileStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_DO_WHILE_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_DO_WHILE_STATEMENT, (peer: KNativePointer) => new DoWhileStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_DO_WHILE_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/DynamicImportData.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/DynamicImportData.ts new file mode 100644 index 0000000000000000000000000000000000000000..83433099d013cf50c75c15ce02e2573e17b3d260 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/DynamicImportData.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class DynamicImportData extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandDynamicImportData: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSClassLiteral.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSClassLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..9a37f0a822bf50d96d8708216bd782487734af57 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSClassLiteral.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class ETSClassLiteral extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSClassLiteral(expr?: TypeNode): ETSClassLiteral { + const result: ETSClassLiteral = new ETSClassLiteral(global.generatedEs2panda._CreateETSClassLiteral(global.context, passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL) + result.setChildrenParentPtr() + return result + } + static updateETSClassLiteral(original?: ETSClassLiteral, expr?: TypeNode): ETSClassLiteral { + const result: ETSClassLiteral = new ETSClassLiteral(global.generatedEs2panda._UpdateETSClassLiteral(global.context, passNode(original), passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL) + result.setChildrenParentPtr() + return result + } + get expr(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ETSClassLiteralExprConst(global.context, this.peer)) + } + protected readonly brandETSClassLiteral: undefined +} +export function isETSClassLiteral(node: object | undefined): node is ETSClassLiteral { + return node instanceof ETSClassLiteral +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL, (peer: KNativePointer) => new ETSClassLiteral(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_CLASS_LITERAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSFunctionType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSFunctionType.ts new file mode 100644 index 0000000000000000000000000000000000000000..2ad4075e630321be6a1d3cae605c3b7126d05fb1 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSFunctionType.ts @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaScriptFunctionFlags } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { FunctionSignature } from "./FunctionSignature" +import { TSInterfaceDeclaration } from "./TSInterfaceDeclaration" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TypeNode } from "./TypeNode" + +export class ETSFunctionType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSFunctionType(signature: FunctionSignature | undefined, funcFlags: Es2pandaScriptFunctionFlags, annotations?: readonly AnnotationUsage[]): ETSFunctionType { + const result: ETSFunctionType = new ETSFunctionType(global.generatedEs2panda._CreateETSFunctionType(global.context, passNode(signature), funcFlags), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static updateETSFunctionType(original: ETSFunctionType | undefined, signature: FunctionSignature | undefined, funcFlags: Es2pandaScriptFunctionFlags, annotations?: readonly AnnotationUsage[]): ETSFunctionType { + const result: ETSFunctionType = new ETSFunctionType(global.generatedEs2panda._UpdateETSFunctionType(global.context, passNode(original), passNode(signature), funcFlags), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + get typeParams(): TSTypeParameterDeclaration | undefined { + return unpackNode(global.generatedEs2panda._ETSFunctionTypeTypeParams(global.context, this.peer)) + } + get params(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._ETSFunctionTypeParamsConst(global.context, this.peer)) + } + /** @deprecated */ + setParams(paramsList: readonly Expression[]): this { + global.generatedEs2panda._ETSFunctionTypeSetParams(global.context, this.peer, passNodeArray(paramsList), paramsList.length) + return this + } + get returnType(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ETSFunctionTypeReturnType(global.context, this.peer)) + } + get functionalInterface(): TSInterfaceDeclaration | undefined { + return unpackNode(global.generatedEs2panda._ETSFunctionTypeFunctionalInterface(global.context, this.peer)) + } + /** @deprecated */ + setFunctionalInterface(functionalInterface?: TSInterfaceDeclaration): this { + global.generatedEs2panda._ETSFunctionTypeSetFunctionalInterface(global.context, this.peer, passNode(functionalInterface)) + return this + } + get flags(): Es2pandaScriptFunctionFlags { + return global.generatedEs2panda._ETSFunctionTypeFlags(global.context, this.peer) + } + get isExtensionFunction(): boolean { + return global.generatedEs2panda._ETSFunctionTypeIsExtensionFunctionConst(global.context, this.peer) + } + protected readonly brandETSFunctionType: undefined +} +export function isETSFunctionType(node: object | undefined): node is ETSFunctionType { + return node instanceof ETSFunctionType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE, (peer: KNativePointer) => new ETSFunctionType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_FUNCTION_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSImportDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSImportDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..1e0c9117ad5bfeff656572a4c4a8de432d894743 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSImportDeclaration.ts @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaId } from "./../Es2pandaEnums" +import { Es2pandaImportFlags } from "./../Es2pandaEnums" +import { Es2pandaImportKinds } from "./../Es2pandaEnums" +import { ImportDeclaration } from "./ImportDeclaration" +import { StringLiteral } from "./StringLiteral" + +export class ETSImportDeclaration extends ImportDeclaration { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSImportDeclaration(importPath: StringLiteral | undefined, specifiers: readonly AstNode[], importKinds: Es2pandaImportKinds): ETSImportDeclaration { + const result: ETSImportDeclaration = new ETSImportDeclaration(global.generatedEs2panda._CreateETSImportDeclaration(global.context, passNode(importPath), passNodeArray(specifiers), specifiers.length, importKinds), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateETSImportDeclaration(original: ETSImportDeclaration | undefined, importPath: StringLiteral | undefined, specifiers: readonly AstNode[], importKinds: Es2pandaImportKinds): ETSImportDeclaration { + const result: ETSImportDeclaration = new ETSImportDeclaration(global.generatedEs2panda._UpdateETSImportDeclaration(global.context, passNode(original), passNode(importPath), passNodeArray(specifiers), specifiers.length, importKinds), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION) + result.setChildrenParentPtr() + return result + } + /** @deprecated */ + setImportMetadata(importFlags: Es2pandaImportFlags, lang: Es2pandaId, resolvedSource: string, declPath: string, ohmUrl: string): this { + global.generatedEs2panda._ETSImportDeclarationSetImportMetadata(global.context, this.peer, importFlags, lang, resolvedSource, declPath, ohmUrl) + return this + } + get declPath(): string { + return unpackString(global.generatedEs2panda._ETSImportDeclarationDeclPathConst(global.context, this.peer)) + } + get ohmUrl(): string { + return unpackString(global.generatedEs2panda._ETSImportDeclarationOhmUrlConst(global.context, this.peer)) + } + get isValid(): boolean { + return global.generatedEs2panda._ETSImportDeclarationIsValidConst(global.context, this.peer) + } + get isPureDynamic(): boolean { + return global.generatedEs2panda._ETSImportDeclarationIsPureDynamicConst(global.context, this.peer) + } + /** @deprecated */ + setAssemblerName(assemblerName: string): this { + global.generatedEs2panda._ETSImportDeclarationSetAssemblerName(global.context, this.peer, assemblerName) + return this + } + get assemblerName(): string { + return unpackString(global.generatedEs2panda._ETSImportDeclarationAssemblerNameConst(global.context, this.peer)) + } + get resolvedSource(): string { + return unpackString(global.generatedEs2panda._ETSImportDeclarationResolvedSourceConst(global.context, this.peer)) + } + protected readonly brandETSImportDeclaration: undefined +} +export function isETSImportDeclaration(node: object | undefined): node is ETSImportDeclaration { + return node instanceof ETSImportDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION, (peer: KNativePointer) => new ETSImportDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSIntrinsicNode.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSIntrinsicNode.ts new file mode 100644 index 0000000000000000000000000000000000000000..4852a83ab41df9aba36771efdbc671a580f7ab60 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSIntrinsicNode.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaIntrinsicNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class ETSIntrinsicNode extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create2ETSIntrinsicNode(type: Es2pandaIntrinsicNodeType, _arguments: readonly Expression[]): ETSIntrinsicNode { + const result: ETSIntrinsicNode = new ETSIntrinsicNode(global.generatedEs2panda._CreateETSIntrinsicNode2(global.context, type, passNodeArray(_arguments), _arguments.length), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_INTRINSIC_NODE_TYPE) + result.setChildrenParentPtr() + return result + } + static updateETSIntrinsicNode(original?: ETSIntrinsicNode): ETSIntrinsicNode { + const result: ETSIntrinsicNode = new ETSIntrinsicNode(global.generatedEs2panda._UpdateETSIntrinsicNode(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_INTRINSIC_NODE_TYPE) + result.setChildrenParentPtr() + return result + } + static update1ETSIntrinsicNode(original?: ETSIntrinsicNode, other?: ETSIntrinsicNode): ETSIntrinsicNode { + const result: ETSIntrinsicNode = new ETSIntrinsicNode(global.generatedEs2panda._UpdateETSIntrinsicNode1(global.context, passNode(original), passNode(other)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_INTRINSIC_NODE_TYPE) + result.setChildrenParentPtr() + return result + } + static update2ETSIntrinsicNode(original: ETSIntrinsicNode | undefined, type: Es2pandaIntrinsicNodeType, _arguments: readonly Expression[]): ETSIntrinsicNode { + const result: ETSIntrinsicNode = new ETSIntrinsicNode(global.generatedEs2panda._UpdateETSIntrinsicNode2(global.context, passNode(original), type, passNodeArray(_arguments), _arguments.length), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_INTRINSIC_NODE_TYPE) + result.setChildrenParentPtr() + return result + } + get type(): Es2pandaIntrinsicNodeType { + return global.generatedEs2panda._ETSIntrinsicNodeTypeConst(global.context, this.peer) + } + get arguments(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._ETSIntrinsicNodeArgumentsConst(global.context, this.peer)) + } + protected readonly brandETSIntrinsicNode: undefined +} +export function isETSIntrinsicNode(node: object | undefined): node is ETSIntrinsicNode { + return node instanceof ETSIntrinsicNode +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_INTRINSIC_NODE_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_INTRINSIC_NODE_TYPE, (peer: KNativePointer) => new ETSIntrinsicNode(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_INTRINSIC_NODE_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSKeyofType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSKeyofType.ts new file mode 100644 index 0000000000000000000000000000000000000000..c1f536a6ef559e187e70d6ab4ce99606795d7b87 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSKeyofType.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class ETSKeyofType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSKeyofType(type?: TypeNode): ETSKeyofType { + const result: ETSKeyofType = new ETSKeyofType(global.generatedEs2panda._CreateETSKeyofType(global.context, passNode(type)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE) + result.setChildrenParentPtr() + return result + } + static updateETSKeyofType(original?: ETSKeyofType, type?: TypeNode): ETSKeyofType { + const result: ETSKeyofType = new ETSKeyofType(global.generatedEs2panda._UpdateETSKeyofType(global.context, passNode(original), passNode(type)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE) + result.setChildrenParentPtr() + return result + } + get typeRef(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ETSKeyofTypeGetTypeRefConst(global.context, this.peer)) + } + protected readonly brandETSKeyofType: undefined +} +export function isETSKeyofType(node: object | undefined): node is ETSKeyofType { + return node instanceof ETSKeyofType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE, (peer: KNativePointer) => new ETSKeyofType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_KEYOF_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSModule.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSModule.ts new file mode 100644 index 0000000000000000000000000000000000000000..438cde1591a93d356323fd9a4868563e096e5e40 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSModule.ts @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { BlockStatement } from "./BlockStatement" +import { ClassDefinition } from "./ClassDefinition" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaModuleFlag } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { Program } from "./Program" +import { SrcDumper } from "./SrcDumper" +import { Statement } from "./Statement" +import { extension_ETSModuleGetNamespaceFlag } from "./../../reexport-for-generated" + +export class ETSModule extends BlockStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSModule(statementList: readonly Statement[], ident: Identifier | undefined, flag: Es2pandaModuleFlag, program?: Program): ETSModule { + const result: ETSModule = new ETSModule(global.generatedEs2panda._CreateETSModule(global.context, passNodeArray(statementList), statementList.length, passNode(ident), flag, passNode(program)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE) + result.setChildrenParentPtr() + return result + } + static updateETSModule(original: ETSModule | undefined, statementList: readonly Statement[], ident: Identifier | undefined, flag: Es2pandaModuleFlag, program?: Program): ETSModule { + const result: ETSModule = new ETSModule(global.generatedEs2panda._UpdateETSModule(global.context, passNode(original), passNodeArray(statementList), statementList.length, passNode(ident), flag, passNode(program)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE) + result.setChildrenParentPtr() + return result + } + get ident(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ETSModuleIdent(global.context, this.peer)) + } + get program(): Program | undefined { + return new Program(global.generatedEs2panda._ETSModuleProgram(global.context, this.peer)) + } + get globalClass(): ClassDefinition | undefined { + return unpackNode(global.generatedEs2panda._ETSModuleGlobalClass(global.context, this.peer)) + } + /** @deprecated */ + setGlobalClass(globalClass?: ClassDefinition): this { + global.generatedEs2panda._ETSModuleSetGlobalClass(global.context, this.peer, passNode(globalClass)) + return this + } + get isETSScript(): boolean { + return global.generatedEs2panda._ETSModuleIsETSScriptConst(global.context, this.peer) + } + get isNamespace(): boolean { + return global.generatedEs2panda._ETSModuleIsNamespaceConst(global.context, this.peer) + } + get isNamespaceChainLastNode(): boolean { + return global.generatedEs2panda._ETSModuleIsNamespaceChainLastNodeConst(global.context, this.peer) + } + /** @deprecated */ + setNamespaceChainLastNode(): this { + global.generatedEs2panda._ETSModuleSetNamespaceChainLastNode(global.context, this.peer) + return this + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._ETSModuleHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._ETSModuleEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._ETSModuleClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._ETSModuleDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ETSModuleAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ETSModuleAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ETSModuleSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ETSModuleSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + getNamespaceFlag = extension_ETSModuleGetNamespaceFlag + protected readonly brandETSModule: undefined +} +export function isETSModule(node: object | undefined): node is ETSModule { + return node instanceof ETSModule +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE, (peer: KNativePointer) => new ETSModule(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNewArrayInstanceExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNewArrayInstanceExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..ec6e899176f9494e5b14c39112a324cb7d6e2d2f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNewArrayInstanceExpression.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class ETSNewArrayInstanceExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSNewArrayInstanceExpression(typeReference?: TypeNode, dimension?: Expression): ETSNewArrayInstanceExpression { + const result: ETSNewArrayInstanceExpression = new ETSNewArrayInstanceExpression(global.generatedEs2panda._CreateETSNewArrayInstanceExpression(global.context, passNode(typeReference), passNode(dimension)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateETSNewArrayInstanceExpression(original?: ETSNewArrayInstanceExpression, typeReference?: TypeNode, dimension?: Expression): ETSNewArrayInstanceExpression { + const result: ETSNewArrayInstanceExpression = new ETSNewArrayInstanceExpression(global.generatedEs2panda._UpdateETSNewArrayInstanceExpression(global.context, passNode(original), passNode(typeReference), passNode(dimension)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get typeReference(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ETSNewArrayInstanceExpressionTypeReference(global.context, this.peer)) + } + get dimension(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ETSNewArrayInstanceExpressionDimension(global.context, this.peer)) + } + /** @deprecated */ + setDimension(dimension?: Expression): this { + global.generatedEs2panda._ETSNewArrayInstanceExpressionSetDimension(global.context, this.peer, passNode(dimension)) + return this + } + /** @deprecated */ + clearPreferredType(): this { + global.generatedEs2panda._ETSNewArrayInstanceExpressionClearPreferredType(global.context, this.peer) + return this + } + protected readonly brandETSNewArrayInstanceExpression: undefined +} +export function isETSNewArrayInstanceExpression(node: object | undefined): node is ETSNewArrayInstanceExpression { + return node instanceof ETSNewArrayInstanceExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION, (peer: KNativePointer) => new ETSNewArrayInstanceExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_ARRAY_INSTANCE_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNewClassInstanceExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNewClassInstanceExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..d515affd2a5c76a898f6e1ae9d7fc416041f79bd --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNewClassInstanceExpression.ts @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class ETSNewClassInstanceExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSNewClassInstanceExpression(typeReference: Expression | undefined, _arguments: readonly Expression[]): ETSNewClassInstanceExpression { + const result: ETSNewClassInstanceExpression = new ETSNewClassInstanceExpression(global.generatedEs2panda._CreateETSNewClassInstanceExpression(global.context, passNode(typeReference), passNodeArray(_arguments), _arguments.length), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateETSNewClassInstanceExpression(original: ETSNewClassInstanceExpression | undefined, typeReference: Expression | undefined, _arguments: readonly Expression[]): ETSNewClassInstanceExpression { + const result: ETSNewClassInstanceExpression = new ETSNewClassInstanceExpression(global.generatedEs2panda._UpdateETSNewClassInstanceExpression(global.context, passNode(original), passNode(typeReference), passNodeArray(_arguments), _arguments.length), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static update1ETSNewClassInstanceExpression(original?: ETSNewClassInstanceExpression, other?: ETSNewClassInstanceExpression): ETSNewClassInstanceExpression { + const result: ETSNewClassInstanceExpression = new ETSNewClassInstanceExpression(global.generatedEs2panda._UpdateETSNewClassInstanceExpression1(global.context, passNode(original), passNode(other)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get typeRef(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ETSNewClassInstanceExpressionGetTypeRefConst(global.context, this.peer)) + } + get arguments(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._ETSNewClassInstanceExpressionGetArguments(global.context, this.peer)) + } + /** @deprecated */ + setArguments(_arguments: readonly Expression[]): this { + global.generatedEs2panda._ETSNewClassInstanceExpressionSetArguments(global.context, this.peer, passNodeArray(_arguments), _arguments.length) + return this + } + /** @deprecated */ + addToArgumentsFront(expr?: Expression): this { + global.generatedEs2panda._ETSNewClassInstanceExpressionAddToArgumentsFront(global.context, this.peer, passNode(expr)) + return this + } + protected readonly brandETSNewClassInstanceExpression: undefined +} +export function isETSNewClassInstanceExpression(node: object | undefined): node is ETSNewClassInstanceExpression { + return node instanceof ETSNewClassInstanceExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION, (peer: KNativePointer) => new ETSNewClassInstanceExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_CLASS_INSTANCE_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..0ad0fced930c8ed699690eaf72c6cb1ce03f3fea --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNewMultiDimArrayInstanceExpression.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class ETSNewMultiDimArrayInstanceExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSNewMultiDimArrayInstanceExpression(typeReference: TypeNode | undefined, dimensions: readonly Expression[]): ETSNewMultiDimArrayInstanceExpression { + const result: ETSNewMultiDimArrayInstanceExpression = new ETSNewMultiDimArrayInstanceExpression(global.generatedEs2panda._CreateETSNewMultiDimArrayInstanceExpression(global.context, passNode(typeReference), passNodeArray(dimensions), dimensions.length), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateETSNewMultiDimArrayInstanceExpression(original: ETSNewMultiDimArrayInstanceExpression | undefined, typeReference: TypeNode | undefined, dimensions: readonly Expression[]): ETSNewMultiDimArrayInstanceExpression { + const result: ETSNewMultiDimArrayInstanceExpression = new ETSNewMultiDimArrayInstanceExpression(global.generatedEs2panda._UpdateETSNewMultiDimArrayInstanceExpression(global.context, passNode(original), passNode(typeReference), passNodeArray(dimensions), dimensions.length), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static update1ETSNewMultiDimArrayInstanceExpression(original?: ETSNewMultiDimArrayInstanceExpression, other?: ETSNewMultiDimArrayInstanceExpression): ETSNewMultiDimArrayInstanceExpression { + const result: ETSNewMultiDimArrayInstanceExpression = new ETSNewMultiDimArrayInstanceExpression(global.generatedEs2panda._UpdateETSNewMultiDimArrayInstanceExpression1(global.context, passNode(original), passNode(other)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get typeReference(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ETSNewMultiDimArrayInstanceExpressionTypeReference(global.context, this.peer)) + } + get dimensions(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._ETSNewMultiDimArrayInstanceExpressionDimensions(global.context, this.peer)) + } + /** @deprecated */ + clearPreferredType(): this { + global.generatedEs2panda._ETSNewMultiDimArrayInstanceExpressionClearPreferredType(global.context, this.peer) + return this + } + protected readonly brandETSNewMultiDimArrayInstanceExpression: undefined +} +export function isETSNewMultiDimArrayInstanceExpression(node: object | undefined): node is ETSNewMultiDimArrayInstanceExpression { + return node instanceof ETSNewMultiDimArrayInstanceExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION, (peer: KNativePointer) => new ETSNewMultiDimArrayInstanceExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NEW_MULTI_DIM_ARRAY_INSTANCE_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNullType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNullType.ts new file mode 100644 index 0000000000000000000000000000000000000000..35768af96dded3d33d29fca9fbbcbec6f688e2a0 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSNullType.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class ETSNullType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSNullType(): ETSNullType { + const result: ETSNullType = new ETSNullType(global.generatedEs2panda._CreateETSNullType(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE) + result.setChildrenParentPtr() + return result + } + static updateETSNullType(original?: ETSNullType): ETSNullType { + const result: ETSNullType = new ETSNullType(global.generatedEs2panda._UpdateETSNullType(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE) + result.setChildrenParentPtr() + return result + } + protected readonly brandETSNullType: undefined +} +export function isETSNullType(node: object | undefined): node is ETSNullType { + return node instanceof ETSNullType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE, (peer: KNativePointer) => new ETSNullType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_NULL_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSPackageDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSPackageDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..fa6f3f1b3c1d136cc6475081b7adc078cf30d548 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSPackageDeclaration.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" + +export class ETSPackageDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSPackageDeclaration(name?: Expression): ETSPackageDeclaration { + const result: ETSPackageDeclaration = new ETSPackageDeclaration(global.generatedEs2panda._CreateETSPackageDeclaration(global.context, passNode(name)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateETSPackageDeclaration(original?: ETSPackageDeclaration, name?: Expression): ETSPackageDeclaration { + const result: ETSPackageDeclaration = new ETSPackageDeclaration(global.generatedEs2panda._UpdateETSPackageDeclaration(global.context, passNode(original), passNode(name)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION) + result.setChildrenParentPtr() + return result + } + protected readonly brandETSPackageDeclaration: undefined +} +export function isETSPackageDeclaration(node: object | undefined): node is ETSPackageDeclaration { + return node instanceof ETSPackageDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION, (peer: KNativePointer) => new ETSPackageDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PACKAGE_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSParameterExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSParameterExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..bb3f3d713757adc0ff56e882cde6da55b6849b7c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSParameterExpression.ts @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotatedExpression } from "./AnnotatedExpression" +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { SpreadElement } from "./SpreadElement" +import { SrcDumper } from "./SrcDumper" +import { TypeNode } from "./TypeNode" + +export class ETSParameterExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSParameterExpression(identOrSpread: AnnotatedExpression | undefined, isOptional: boolean, annotations?: readonly AnnotationUsage[]): ETSParameterExpression { + const result: ETSParameterExpression = new ETSParameterExpression(global.generatedEs2panda._CreateETSParameterExpression(global.context, passNode(identOrSpread), isOptional), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static updateETSParameterExpression(original: ETSParameterExpression | undefined, identOrSpread: AnnotatedExpression | undefined, isOptional: boolean, annotations?: readonly AnnotationUsage[]): ETSParameterExpression { + const result: ETSParameterExpression = new ETSParameterExpression(global.generatedEs2panda._UpdateETSParameterExpression(global.context, passNode(original), passNode(identOrSpread), isOptional), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static create1ETSParameterExpression(identOrSpread?: AnnotatedExpression, initializer?: Expression, annotations?: readonly AnnotationUsage[]): ETSParameterExpression { + const result: ETSParameterExpression = new ETSParameterExpression(global.generatedEs2panda._CreateETSParameterExpression1(global.context, passNode(identOrSpread), passNode(initializer)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static update1ETSParameterExpression(original?: ETSParameterExpression, identOrSpread?: AnnotatedExpression, initializer?: Expression, annotations?: readonly AnnotationUsage[]): ETSParameterExpression { + const result: ETSParameterExpression = new ETSParameterExpression(global.generatedEs2panda._UpdateETSParameterExpression1(global.context, passNode(original), passNode(identOrSpread), passNode(initializer)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + get name(): string { + return unpackString(global.generatedEs2panda._ETSParameterExpressionNameConst(global.context, this.peer)) + } + get ident(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ETSParameterExpressionIdent(global.context, this.peer)) + } + /** @deprecated */ + setIdent(ident?: Identifier): this { + global.generatedEs2panda._ETSParameterExpressionSetIdent(global.context, this.peer, passNode(ident)) + return this + } + get spread(): SpreadElement | undefined { + return unpackNode(global.generatedEs2panda._ETSParameterExpressionSpread(global.context, this.peer)) + } + /** @deprecated */ + setSpread(spread?: SpreadElement): this { + global.generatedEs2panda._ETSParameterExpressionSetSpread(global.context, this.peer, passNode(spread)) + return this + } + get restParameter(): SpreadElement | undefined { + return unpackNode(global.generatedEs2panda._ETSParameterExpressionRestParameter(global.context, this.peer)) + } + get initializer(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ETSParameterExpressionInitializer(global.context, this.peer)) + } + /** @deprecated */ + setLexerSaved(savedLexer: string): this { + global.generatedEs2panda._ETSParameterExpressionSetLexerSaved(global.context, this.peer, savedLexer) + return this + } + get lexerSaved(): string { + return unpackString(global.generatedEs2panda._ETSParameterExpressionLexerSavedConst(global.context, this.peer)) + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ETSParameterExpressionTypeAnnotation(global.context, this.peer)) + } + /** @deprecated */ + setTypeAnnotation(typeNode?: TypeNode): this { + global.generatedEs2panda._ETSParameterExpressionSetTypeAnnotation(global.context, this.peer, passNode(typeNode)) + return this + } + get isOptional(): boolean { + return global.generatedEs2panda._ETSParameterExpressionIsOptionalConst(global.context, this.peer) + } + /** @deprecated */ + setOptional(value: boolean): this { + global.generatedEs2panda._ETSParameterExpressionSetOptional(global.context, this.peer, value) + return this + } + /** @deprecated */ + setInitializer(initExpr?: Expression): this { + global.generatedEs2panda._ETSParameterExpressionSetInitializer(global.context, this.peer, passNode(initExpr)) + return this + } + get isRestParameter(): boolean { + return global.generatedEs2panda._ETSParameterExpressionIsRestParameterConst(global.context, this.peer) + } + get requiredParams(): number { + return global.generatedEs2panda._ETSParameterExpressionGetRequiredParamsConst(global.context, this.peer) + } + /** @deprecated */ + setRequiredParams(extraValue: number): this { + global.generatedEs2panda._ETSParameterExpressionSetRequiredParams(global.context, this.peer, extraValue) + return this + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._ETSParameterExpressionHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._ETSParameterExpressionEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._ETSParameterExpressionClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._ETSParameterExpressionDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ETSParameterExpressionAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ETSParameterExpressionAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ETSParameterExpressionSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ETSParameterExpressionSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + protected readonly brandETSParameterExpression: undefined +} +export function isETSParameterExpression(node: object | undefined): node is ETSParameterExpression { + return node instanceof ETSParameterExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION, (peer: KNativePointer) => new ETSParameterExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSPrimitiveType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSPrimitiveType.ts new file mode 100644 index 0000000000000000000000000000000000000000..025d8f7f5d67405113a21a637a7897857bc35833 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSPrimitiveType.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaPrimitiveType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class ETSPrimitiveType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSPrimitiveType(type: Es2pandaPrimitiveType): ETSPrimitiveType { + const result: ETSPrimitiveType = new ETSPrimitiveType(global.generatedEs2panda._CreateETSPrimitiveType(global.context, type), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE) + result.setChildrenParentPtr() + return result + } + static updateETSPrimitiveType(original: ETSPrimitiveType | undefined, type: Es2pandaPrimitiveType): ETSPrimitiveType { + const result: ETSPrimitiveType = new ETSPrimitiveType(global.generatedEs2panda._UpdateETSPrimitiveType(global.context, passNode(original), type), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE) + result.setChildrenParentPtr() + return result + } + get primitiveType(): Es2pandaPrimitiveType { + return global.generatedEs2panda._ETSPrimitiveTypeGetPrimitiveTypeConst(global.context, this.peer) + } + protected readonly brandETSPrimitiveType: undefined +} +export function isETSPrimitiveType(node: object | undefined): node is ETSPrimitiveType { + return node instanceof ETSPrimitiveType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE, (peer: KNativePointer) => new ETSPrimitiveType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSReExportDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSReExportDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..95383709d6e1666ba7ba6b4d7d466a47be3f8b6d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSReExportDeclaration.ts @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { ETSImportDeclaration } from "./ETSImportDeclaration" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Statement } from "./Statement" + +export class ETSReExportDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + get eTSImportDeclarations(): ETSImportDeclaration | undefined { + return unpackNode(global.generatedEs2panda._ETSReExportDeclarationGetETSImportDeclarations(global.context, this.peer)) + } + get programPath(): string { + return unpackString(global.generatedEs2panda._ETSReExportDeclarationGetProgramPathConst(global.context, this.peer)) + } + protected readonly brandETSReExportDeclaration: undefined +} +export function isETSReExportDeclaration(node: object | undefined): node is ETSReExportDeclaration { + return node instanceof ETSReExportDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_REEXPORT_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_REEXPORT_STATEMENT, (peer: KNativePointer) => new ETSReExportDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_REEXPORT_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSStringLiteralType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSStringLiteralType.ts new file mode 100644 index 0000000000000000000000000000000000000000..e2e3ab49b0e7e0d0a65f1aaf72dc41c359f54c2d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSStringLiteralType.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class ETSStringLiteralType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSStringLiteralType(value: string): ETSStringLiteralType { + const result: ETSStringLiteralType = new ETSStringLiteralType(global.generatedEs2panda._CreateETSStringLiteralType(global.context, value), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE) + result.setChildrenParentPtr() + return result + } + static updateETSStringLiteralType(original: ETSStringLiteralType | undefined, value: string): ETSStringLiteralType { + const result: ETSStringLiteralType = new ETSStringLiteralType(global.generatedEs2panda._UpdateETSStringLiteralType(global.context, passNode(original), value), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE) + result.setChildrenParentPtr() + return result + } + protected readonly brandETSStringLiteralType: undefined +} +export function isETSStringLiteralType(node: object | undefined): node is ETSStringLiteralType { + return node instanceof ETSStringLiteralType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE, (peer: KNativePointer) => new ETSStringLiteralType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_STRING_LITERAL_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSStructDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSStructDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..f5f8537d7600a3eba7818407080fbe1c37e969d6 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSStructDeclaration.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { ClassDeclaration } from "./ClassDeclaration" +import { ClassDefinition } from "./ClassDefinition" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" + +export class ETSStructDeclaration extends ClassDeclaration { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSStructDeclaration(def?: ClassDefinition): ETSStructDeclaration { + const result: ETSStructDeclaration = new ETSStructDeclaration(global.generatedEs2panda._CreateETSStructDeclaration(global.context, passNode(def)), Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateETSStructDeclaration(original?: ETSStructDeclaration, def?: ClassDefinition): ETSStructDeclaration { + const result: ETSStructDeclaration = new ETSStructDeclaration(global.generatedEs2panda._UpdateETSStructDeclaration(global.context, passNode(original), passNode(def)), Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION) + result.setChildrenParentPtr() + return result + } + protected readonly brandETSStructDeclaration: undefined +} +export function isETSStructDeclaration(node: object | undefined): node is ETSStructDeclaration { + return node instanceof ETSStructDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION, (peer: KNativePointer) => new ETSStructDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_STRUCT_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSTuple.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSTuple.ts new file mode 100644 index 0000000000000000000000000000000000000000..31e503decc52439c374bd5708894b6fb47f44d81 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSTuple.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class ETSTuple extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSTuple(): ETSTuple { + const result: ETSTuple = new ETSTuple(global.generatedEs2panda._CreateETSTuple(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE) + result.setChildrenParentPtr() + return result + } + static updateETSTuple(original?: ETSTuple): ETSTuple { + const result: ETSTuple = new ETSTuple(global.generatedEs2panda._UpdateETSTuple(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE) + result.setChildrenParentPtr() + return result + } + static create1ETSTuple(size: number): ETSTuple { + const result: ETSTuple = new ETSTuple(global.generatedEs2panda._CreateETSTuple1(global.context, size), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE) + result.setChildrenParentPtr() + return result + } + static update1ETSTuple(original: ETSTuple | undefined, size: number): ETSTuple { + const result: ETSTuple = new ETSTuple(global.generatedEs2panda._UpdateETSTuple1(global.context, passNode(original), size), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE) + result.setChildrenParentPtr() + return result + } + static create2ETSTuple(typeList: readonly TypeNode[]): ETSTuple { + const result: ETSTuple = new ETSTuple(global.generatedEs2panda._CreateETSTuple2(global.context, passNodeArray(typeList), typeList.length), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE) + result.setChildrenParentPtr() + return result + } + static update2ETSTuple(original: ETSTuple | undefined, typeList: readonly TypeNode[]): ETSTuple { + const result: ETSTuple = new ETSTuple(global.generatedEs2panda._UpdateETSTuple2(global.context, passNode(original), passNodeArray(typeList), typeList.length), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE) + result.setChildrenParentPtr() + return result + } + get tupleSize(): number { + return global.generatedEs2panda._ETSTupleGetTupleSizeConst(global.context, this.peer) + } + get tupleTypeAnnotationsList(): readonly TypeNode[] { + return unpackNodeArray(global.generatedEs2panda._ETSTupleGetTupleTypeAnnotationsList(global.context, this.peer)) + } + /** @deprecated */ + setTypeAnnotationsList(typeNodeList: readonly TypeNode[]): this { + global.generatedEs2panda._ETSTupleSetTypeAnnotationsList(global.context, this.peer, passNodeArray(typeNodeList), typeNodeList.length) + return this + } + protected readonly brandETSTuple: undefined +} +export function isETSTuple(node: object | undefined): node is ETSTuple { + return node instanceof ETSTuple +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE, (peer: KNativePointer) => new ETSTuple(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TUPLE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSTypeReference.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSTypeReference.ts new file mode 100644 index 0000000000000000000000000000000000000000..172c570ef707a305362b1c6d7a560b187e59f623 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSTypeReference.ts @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { ETSTypeReferencePart } from "./ETSTypeReferencePart" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { TypeNode } from "./TypeNode" + +export class ETSTypeReference extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSTypeReference(part?: ETSTypeReferencePart): ETSTypeReference { + const result: ETSTypeReference = new ETSTypeReference(global.generatedEs2panda._CreateETSTypeReference(global.context, passNode(part)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE) + result.setChildrenParentPtr() + return result + } + static updateETSTypeReference(original?: ETSTypeReference, part?: ETSTypeReferencePart): ETSTypeReference { + const result: ETSTypeReference = new ETSTypeReference(global.generatedEs2panda._UpdateETSTypeReference(global.context, passNode(original), passNode(part)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE) + result.setChildrenParentPtr() + return result + } + get part(): ETSTypeReferencePart | undefined { + return unpackNode(global.generatedEs2panda._ETSTypeReferencePart(global.context, this.peer)) + } + get baseName(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ETSTypeReferenceBaseNameConst(global.context, this.peer)) + } + protected readonly brandETSTypeReference: undefined +} +export function isETSTypeReference(node: object | undefined): node is ETSTypeReference { + return node instanceof ETSTypeReference +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE, (peer: KNativePointer) => new ETSTypeReference(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSTypeReferencePart.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSTypeReferencePart.ts new file mode 100644 index 0000000000000000000000000000000000000000..070ff11e3f34baf8a10daa28f38dadd2305138b5 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSTypeReferencePart.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TypeNode } from "./TypeNode" + +export class ETSTypeReferencePart extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSTypeReferencePart(name?: Expression, typeParams?: TSTypeParameterInstantiation, prev?: ETSTypeReferencePart): ETSTypeReferencePart { + const result: ETSTypeReferencePart = new ETSTypeReferencePart(global.generatedEs2panda._CreateETSTypeReferencePart(global.context, passNode(name), passNode(typeParams), passNode(prev)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART) + result.setChildrenParentPtr() + return result + } + static updateETSTypeReferencePart(original?: ETSTypeReferencePart, name?: Expression, typeParams?: TSTypeParameterInstantiation, prev?: ETSTypeReferencePart): ETSTypeReferencePart { + const result: ETSTypeReferencePart = new ETSTypeReferencePart(global.generatedEs2panda._UpdateETSTypeReferencePart(global.context, passNode(original), passNode(name), passNode(typeParams), passNode(prev)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART) + result.setChildrenParentPtr() + return result + } + static update1ETSTypeReferencePart(original?: ETSTypeReferencePart, name?: Expression): ETSTypeReferencePart { + const result: ETSTypeReferencePart = new ETSTypeReferencePart(global.generatedEs2panda._UpdateETSTypeReferencePart1(global.context, passNode(original), passNode(name)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART) + result.setChildrenParentPtr() + return result + } + get previous(): ETSTypeReferencePart | undefined { + return unpackNode(global.generatedEs2panda._ETSTypeReferencePartPrevious(global.context, this.peer)) + } + get name(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ETSTypeReferencePartName(global.context, this.peer)) + } + get typeParams(): TSTypeParameterInstantiation | undefined { + return unpackNode(global.generatedEs2panda._ETSTypeReferencePartTypeParams(global.context, this.peer)) + } + get ident(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ETSTypeReferencePartGetIdent(global.context, this.peer)) + } + protected readonly brandETSTypeReferencePart: undefined +} +export function isETSTypeReferencePart(node: object | undefined): node is ETSTypeReferencePart { + return node instanceof ETSTypeReferencePart +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART, (peer: KNativePointer) => new ETSTypeReferencePart(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE_PART)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSUndefinedType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSUndefinedType.ts new file mode 100644 index 0000000000000000000000000000000000000000..245d5e6916ae80b430eee2e7fd35032c3f8212bc --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSUndefinedType.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class ETSUndefinedType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSUndefinedType(): ETSUndefinedType { + const result: ETSUndefinedType = new ETSUndefinedType(global.generatedEs2panda._CreateETSUndefinedType(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNDEFINED_TYPE) + result.setChildrenParentPtr() + return result + } + static updateETSUndefinedType(original?: ETSUndefinedType): ETSUndefinedType { + const result: ETSUndefinedType = new ETSUndefinedType(global.generatedEs2panda._UpdateETSUndefinedType(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNDEFINED_TYPE) + result.setChildrenParentPtr() + return result + } + protected readonly brandETSUndefinedType: undefined +} +export function isETSUndefinedType(node: object | undefined): node is ETSUndefinedType { + return node instanceof ETSUndefinedType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNDEFINED_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNDEFINED_TYPE, (peer: KNativePointer) => new ETSUndefinedType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNDEFINED_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSUnionType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSUnionType.ts new file mode 100644 index 0000000000000000000000000000000000000000..217c508434f7a45cac217a4a99326d27564ae083 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSUnionType.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class ETSUnionType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSUnionType(types: readonly TypeNode[], annotations?: readonly AnnotationUsage[]): ETSUnionType { + const result: ETSUnionType = new ETSUnionType(global.generatedEs2panda._CreateETSUnionType(global.context, passNodeArray(types), types.length), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static updateETSUnionType(original: ETSUnionType | undefined, types: readonly TypeNode[], annotations?: readonly AnnotationUsage[]): ETSUnionType { + const result: ETSUnionType = new ETSUnionType(global.generatedEs2panda._UpdateETSUnionType(global.context, passNode(original), passNodeArray(types), types.length), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + get types(): readonly TypeNode[] { + return unpackNodeArray(global.generatedEs2panda._ETSUnionTypeTypesConst(global.context, this.peer)) + } + /** @deprecated */ + setValueTypes(type: TypeNode | undefined, index: number): this { + global.generatedEs2panda._ETSUnionTypeSetValueTypesConst(global.context, this.peer, passNode(type), index) + return this + } + protected readonly brandETSUnionType: undefined +} +export function isETSUnionType(node: object | undefined): node is ETSUnionType { + return node instanceof ETSUnionType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE, (peer: KNativePointer) => new ETSUnionType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ETSWildcardType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSWildcardType.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3367060ea68be7e0fd5df22f24cd330e62246d6 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ETSWildcardType.ts @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { ETSTypeReference } from "./ETSTypeReference" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class ETSWildcardType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createETSWildcardType(typeReference: ETSTypeReference | undefined, flags: Es2pandaModifierFlags): ETSWildcardType { + const result: ETSWildcardType = new ETSWildcardType(global.generatedEs2panda._CreateETSWildcardType(global.context, passNode(typeReference), flags), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_WILDCARD_TYPE) + result.setChildrenParentPtr() + return result + } + static updateETSWildcardType(original: ETSWildcardType | undefined, typeReference: ETSTypeReference | undefined, flags: Es2pandaModifierFlags): ETSWildcardType { + const result: ETSWildcardType = new ETSWildcardType(global.generatedEs2panda._UpdateETSWildcardType(global.context, passNode(original), passNode(typeReference), flags), Es2pandaAstNodeType.AST_NODE_TYPE_ETS_WILDCARD_TYPE) + result.setChildrenParentPtr() + return result + } + get typeReference(): ETSTypeReference | undefined { + return unpackNode(global.generatedEs2panda._ETSWildcardTypeTypeReference(global.context, this.peer)) + } + protected readonly brandETSWildcardType: undefined +} +export function isETSWildcardType(node: object | undefined): node is ETSWildcardType { + return node instanceof ETSWildcardType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_WILDCARD_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_ETS_WILDCARD_TYPE, (peer: KNativePointer) => new ETSWildcardType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_ETS_WILDCARD_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/EmptyStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/EmptyStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..58fdc5fe4b9c28553eb01280d1058173abe82ce6 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/EmptyStatement.ts @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Statement } from "./Statement" + +export class EmptyStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1EmptyStatement(isBrokenStatement: boolean): EmptyStatement { + const result: EmptyStatement = new EmptyStatement(global.generatedEs2panda._CreateEmptyStatement1(global.context, isBrokenStatement), Es2pandaAstNodeType.AST_NODE_TYPE_EMPTY_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateEmptyStatement(original?: EmptyStatement): EmptyStatement { + const result: EmptyStatement = new EmptyStatement(global.generatedEs2panda._UpdateEmptyStatement(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_EMPTY_STATEMENT) + result.setChildrenParentPtr() + return result + } + static update1EmptyStatement(original: EmptyStatement | undefined, isBrokenStatement: boolean): EmptyStatement { + const result: EmptyStatement = new EmptyStatement(global.generatedEs2panda._UpdateEmptyStatement1(global.context, passNode(original), isBrokenStatement), Es2pandaAstNodeType.AST_NODE_TYPE_EMPTY_STATEMENT) + result.setChildrenParentPtr() + return result + } + get isBrokenStatement(): boolean { + return global.generatedEs2panda._EmptyStatementIsBrokenStatement(global.context, this.peer) + } + protected readonly brandEmptyStatement: undefined +} +export function isEmptyStatement(node: object | undefined): node is EmptyStatement { + return node instanceof EmptyStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EMPTY_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EMPTY_STATEMENT, (peer: KNativePointer) => new EmptyStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_EMPTY_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ErrorLogger.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ErrorLogger.ts new file mode 100644 index 0000000000000000000000000000000000000000..dc18c7ea1c668bde5f85ed70b2375ec65983f603 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ErrorLogger.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class ErrorLogger extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandErrorLogger: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ExportAllDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ExportAllDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..2a058bdc480546032af4337ba8fbd5f0357d36f4 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ExportAllDeclaration.ts @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { Statement } from "./Statement" +import { StringLiteral } from "./StringLiteral" + +export class ExportAllDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createExportAllDeclaration(source?: StringLiteral, exported?: Identifier): ExportAllDeclaration { + const result: ExportAllDeclaration = new ExportAllDeclaration(global.generatedEs2panda._CreateExportAllDeclaration(global.context, passNode(source), passNode(exported)), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_ALL_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateExportAllDeclaration(original?: ExportAllDeclaration, source?: StringLiteral, exported?: Identifier): ExportAllDeclaration { + const result: ExportAllDeclaration = new ExportAllDeclaration(global.generatedEs2panda._UpdateExportAllDeclaration(global.context, passNode(original), passNode(source), passNode(exported)), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_ALL_DECLARATION) + result.setChildrenParentPtr() + return result + } + get source(): StringLiteral | undefined { + return unpackNode(global.generatedEs2panda._ExportAllDeclarationSourceConst(global.context, this.peer)) + } + get exported(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ExportAllDeclarationExportedConst(global.context, this.peer)) + } + protected readonly brandExportAllDeclaration: undefined +} +export function isExportAllDeclaration(node: object | undefined): node is ExportAllDeclaration { + return node instanceof ExportAllDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_ALL_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_ALL_DECLARATION, (peer: KNativePointer) => new ExportAllDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_ALL_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ExportDefaultDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ExportDefaultDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..5328778584bc72555d235f99c504dde152d0e65c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ExportDefaultDeclaration.ts @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Statement } from "./Statement" + +export class ExportDefaultDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createExportDefaultDeclaration(decl: AstNode | undefined, exportEquals: boolean): ExportDefaultDeclaration { + const result: ExportDefaultDeclaration = new ExportDefaultDeclaration(global.generatedEs2panda._CreateExportDefaultDeclaration(global.context, passNode(decl), exportEquals), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateExportDefaultDeclaration(original: ExportDefaultDeclaration | undefined, decl: AstNode | undefined, exportEquals: boolean): ExportDefaultDeclaration { + const result: ExportDefaultDeclaration = new ExportDefaultDeclaration(global.generatedEs2panda._UpdateExportDefaultDeclaration(global.context, passNode(original), passNode(decl), exportEquals), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION) + result.setChildrenParentPtr() + return result + } + get decl(): AstNode | undefined { + return unpackNode(global.generatedEs2panda._ExportDefaultDeclarationDecl(global.context, this.peer)) + } + get isExportEquals(): boolean { + return global.generatedEs2panda._ExportDefaultDeclarationIsExportEqualsConst(global.context, this.peer) + } + protected readonly brandExportDefaultDeclaration: undefined +} +export function isExportDefaultDeclaration(node: object | undefined): node is ExportDefaultDeclaration { + return node instanceof ExportDefaultDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION, (peer: KNativePointer) => new ExportDefaultDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_DEFAULT_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ExportNamedDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ExportNamedDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..84436c8b42d318669644a47bd3dbe074f35e878a --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ExportNamedDeclaration.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { ExportSpecifier } from "./ExportSpecifier" +import { Statement } from "./Statement" +import { StringLiteral } from "./StringLiteral" + +export class ExportNamedDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createExportNamedDeclaration(source: StringLiteral | undefined, specifiers: readonly ExportSpecifier[]): ExportNamedDeclaration { + const result: ExportNamedDeclaration = new ExportNamedDeclaration(global.generatedEs2panda._CreateExportNamedDeclaration(global.context, passNode(source), passNodeArray(specifiers), specifiers.length), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateExportNamedDeclaration(original: ExportNamedDeclaration | undefined, source: StringLiteral | undefined, specifiers: readonly ExportSpecifier[]): ExportNamedDeclaration { + const result: ExportNamedDeclaration = new ExportNamedDeclaration(global.generatedEs2panda._UpdateExportNamedDeclaration(global.context, passNode(original), passNode(source), passNodeArray(specifiers), specifiers.length), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION) + result.setChildrenParentPtr() + return result + } + static create1ExportNamedDeclaration(decl: AstNode | undefined, specifiers: readonly ExportSpecifier[]): ExportNamedDeclaration { + const result: ExportNamedDeclaration = new ExportNamedDeclaration(global.generatedEs2panda._CreateExportNamedDeclaration1(global.context, passNode(decl), passNodeArray(specifiers), specifiers.length), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION) + result.setChildrenParentPtr() + return result + } + static update1ExportNamedDeclaration(original: ExportNamedDeclaration | undefined, decl: AstNode | undefined, specifiers: readonly ExportSpecifier[]): ExportNamedDeclaration { + const result: ExportNamedDeclaration = new ExportNamedDeclaration(global.generatedEs2panda._UpdateExportNamedDeclaration1(global.context, passNode(original), passNode(decl), passNodeArray(specifiers), specifiers.length), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION) + result.setChildrenParentPtr() + return result + } + static create2ExportNamedDeclaration(decl?: AstNode): ExportNamedDeclaration { + const result: ExportNamedDeclaration = new ExportNamedDeclaration(global.generatedEs2panda._CreateExportNamedDeclaration2(global.context, passNode(decl)), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION) + result.setChildrenParentPtr() + return result + } + static update2ExportNamedDeclaration(original?: ExportNamedDeclaration, decl?: AstNode): ExportNamedDeclaration { + const result: ExportNamedDeclaration = new ExportNamedDeclaration(global.generatedEs2panda._UpdateExportNamedDeclaration2(global.context, passNode(original), passNode(decl)), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION) + result.setChildrenParentPtr() + return result + } + get decl(): AstNode | undefined { + return unpackNode(global.generatedEs2panda._ExportNamedDeclarationDeclConst(global.context, this.peer)) + } + get source(): StringLiteral | undefined { + return unpackNode(global.generatedEs2panda._ExportNamedDeclarationSourceConst(global.context, this.peer)) + } + get specifiers(): readonly ExportSpecifier[] { + return unpackNodeArray(global.generatedEs2panda._ExportNamedDeclarationSpecifiersConst(global.context, this.peer)) + } + /** @deprecated */ + replaceSpecifiers(specifiers: readonly ExportSpecifier[]): this { + global.generatedEs2panda._ExportNamedDeclarationReplaceSpecifiers(global.context, this.peer, passNodeArray(specifiers), specifiers.length) + return this + } + protected readonly brandExportNamedDeclaration: undefined +} +export function isExportNamedDeclaration(node: object | undefined): node is ExportNamedDeclaration { + return node instanceof ExportNamedDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION, (peer: KNativePointer) => new ExportNamedDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_NAMED_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ExportSpecifier.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ExportSpecifier.ts new file mode 100644 index 0000000000000000000000000000000000000000..63f1b5c9265fd69e2aa932f16fd939318cc971db --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ExportSpecifier.ts @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { Statement } from "./Statement" + +export class ExportSpecifier extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createExportSpecifier(local?: Identifier, exported?: Identifier): ExportSpecifier { + const result: ExportSpecifier = new ExportSpecifier(global.generatedEs2panda._CreateExportSpecifier(global.context, passNode(local), passNode(exported)), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_SPECIFIER) + result.setChildrenParentPtr() + return result + } + static updateExportSpecifier(original?: ExportSpecifier, local?: Identifier, exported?: Identifier): ExportSpecifier { + const result: ExportSpecifier = new ExportSpecifier(global.generatedEs2panda._UpdateExportSpecifier(global.context, passNode(original), passNode(local), passNode(exported)), Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_SPECIFIER) + result.setChildrenParentPtr() + return result + } + get local(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ExportSpecifierLocalConst(global.context, this.peer)) + } + get exported(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ExportSpecifierExportedConst(global.context, this.peer)) + } + /** @deprecated */ + setDefault(): this { + global.generatedEs2panda._ExportSpecifierSetDefault(global.context, this.peer) + return this + } + get isDefault(): boolean { + return global.generatedEs2panda._ExportSpecifierIsDefaultConst(global.context, this.peer) + } + /** @deprecated */ + setConstantExpression(constantExpression?: Expression): this { + global.generatedEs2panda._ExportSpecifierSetConstantExpression(global.context, this.peer, passNode(constantExpression)) + return this + } + get constantExpression(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ExportSpecifierGetConstantExpressionConst(global.context, this.peer)) + } + protected readonly brandExportSpecifier: undefined +} +export function isExportSpecifier(node: object | undefined): node is ExportSpecifier { + return node instanceof ExportSpecifier +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_SPECIFIER)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_SPECIFIER, (peer: KNativePointer) => new ExportSpecifier(peer, Es2pandaAstNodeType.AST_NODE_TYPE_EXPORT_SPECIFIER)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/Expression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/Expression.ts new file mode 100644 index 0000000000000000000000000000000000000000..dde646264c282ee0b6d4fdb2d76ca7a6bd175f72 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/Expression.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotatedExpression } from "./AnnotatedExpression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Literal } from "./Literal" +import { TypeNode } from "./TypeNode" +import { TypedAstNode } from "./TypedAstNode" +import { extension_ExpressionGetPreferredTypePointer } from "./../../reexport-for-generated" +import { extension_ExpressionSetPreferredTypePointer } from "./../../reexport-for-generated" + +export class Expression extends TypedAstNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + get isGrouped(): boolean { + return global.generatedEs2panda._ExpressionIsGroupedConst(global.context, this.peer) + } + /** @deprecated */ + setGrouped(): this { + global.generatedEs2panda._ExpressionSetGrouped(global.context, this.peer) + return this + } + get asLiteral(): Literal | undefined { + return unpackNode(global.generatedEs2panda._ExpressionAsLiteral(global.context, this.peer)) + } + get isLiteral(): boolean { + return global.generatedEs2panda._ExpressionIsLiteralConst(global.context, this.peer) + } + get isTypeNode(): boolean { + return global.generatedEs2panda._ExpressionIsTypeNodeConst(global.context, this.peer) + } + get isAnnotatedExpression(): boolean { + return global.generatedEs2panda._ExpressionIsAnnotatedExpressionConst(global.context, this.peer) + } + get asTypeNode(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ExpressionAsTypeNode(global.context, this.peer)) + } + get asAnnotatedExpression(): AnnotatedExpression | undefined { + return unpackNode(global.generatedEs2panda._ExpressionAsAnnotatedExpression(global.context, this.peer)) + } + get isBrokenExpression(): boolean { + return global.generatedEs2panda._ExpressionIsBrokenExpressionConst(global.context, this.peer) + } + get toString(): string { + return unpackString(global.generatedEs2panda._ExpressionToStringConst(global.context, this.peer)) + } + getPreferredTypePointer = extension_ExpressionGetPreferredTypePointer + setPreferredTypePointer = extension_ExpressionSetPreferredTypePointer + protected readonly brandExpression: undefined +} +export function isExpression(node: object | undefined): node is Expression { + return node instanceof Expression +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ExpressionStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ExpressionStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..3565df7c24e7485793358787a88d2c941d239814 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ExpressionStatement.ts @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" + +export class ExpressionStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createExpressionStatement(expr?: Expression): ExpressionStatement { + const result: ExpressionStatement = new ExpressionStatement(global.generatedEs2panda._CreateExpressionStatement(global.context, passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateExpressionStatement(original?: ExpressionStatement, expr?: Expression): ExpressionStatement { + const result: ExpressionStatement = new ExpressionStatement(global.generatedEs2panda._UpdateExpressionStatement(global.context, passNode(original), passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT) + result.setChildrenParentPtr() + return result + } + get expression(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ExpressionStatementGetExpression(global.context, this.peer)) + } + /** @deprecated */ + setExpression(expr?: Expression): this { + global.generatedEs2panda._ExpressionStatementSetExpression(global.context, this.peer, passNode(expr)) + return this + } + protected readonly brandExpressionStatement: undefined +} +export function isExpressionStatement(node: object | undefined): node is ExpressionStatement { + return node instanceof ExpressionStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT, (peer: KNativePointer) => new ExpressionStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ForInStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ForInStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..a44658c764e67c31072225a8701174ca8c7cea4b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ForInStatement.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { LoopStatement } from "./LoopStatement" +import { Statement } from "./Statement" + +export class ForInStatement extends LoopStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createForInStatement(left?: AstNode, right?: Expression, body?: Statement): ForInStatement { + const result: ForInStatement = new ForInStatement(global.generatedEs2panda._CreateForInStatement(global.context, passNode(left), passNode(right), passNode(body)), Es2pandaAstNodeType.AST_NODE_TYPE_FOR_IN_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateForInStatement(original?: ForInStatement, left?: AstNode, right?: Expression, body?: Statement): ForInStatement { + const result: ForInStatement = new ForInStatement(global.generatedEs2panda._UpdateForInStatement(global.context, passNode(original), passNode(left), passNode(right), passNode(body)), Es2pandaAstNodeType.AST_NODE_TYPE_FOR_IN_STATEMENT) + result.setChildrenParentPtr() + return result + } + get left(): AstNode | undefined { + return unpackNode(global.generatedEs2panda._ForInStatementLeft(global.context, this.peer)) + } + get right(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ForInStatementRight(global.context, this.peer)) + } + get body(): Statement | undefined { + return unpackNode(global.generatedEs2panda._ForInStatementBody(global.context, this.peer)) + } + protected readonly brandForInStatement: undefined +} +export function isForInStatement(node: object | undefined): node is ForInStatement { + return node instanceof ForInStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_IN_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_IN_STATEMENT, (peer: KNativePointer) => new ForInStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_FOR_IN_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ForOfStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ForOfStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..bb54c37b21f2463961d0f11b6b835b528f2855a7 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ForOfStatement.ts @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { LoopStatement } from "./LoopStatement" +import { Statement } from "./Statement" + +export class ForOfStatement extends LoopStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createForOfStatement(left: AstNode | undefined, right: Expression | undefined, body: Statement | undefined, isAwait: boolean): ForOfStatement { + const result: ForOfStatement = new ForOfStatement(global.generatedEs2panda._CreateForOfStatement(global.context, passNode(left), passNode(right), passNode(body), isAwait), Es2pandaAstNodeType.AST_NODE_TYPE_FOR_OF_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateForOfStatement(original: ForOfStatement | undefined, left: AstNode | undefined, right: Expression | undefined, body: Statement | undefined, isAwait: boolean): ForOfStatement { + const result: ForOfStatement = new ForOfStatement(global.generatedEs2panda._UpdateForOfStatement(global.context, passNode(original), passNode(left), passNode(right), passNode(body), isAwait), Es2pandaAstNodeType.AST_NODE_TYPE_FOR_OF_STATEMENT) + result.setChildrenParentPtr() + return result + } + get left(): AstNode | undefined { + return unpackNode(global.generatedEs2panda._ForOfStatementLeft(global.context, this.peer)) + } + get right(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ForOfStatementRight(global.context, this.peer)) + } + get body(): Statement | undefined { + return unpackNode(global.generatedEs2panda._ForOfStatementBody(global.context, this.peer)) + } + get isAwait(): boolean { + return global.generatedEs2panda._ForOfStatementIsAwaitConst(global.context, this.peer) + } + protected readonly brandForOfStatement: undefined +} +export function isForOfStatement(node: object | undefined): node is ForOfStatement { + return node instanceof ForOfStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_OF_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_OF_STATEMENT, (peer: KNativePointer) => new ForOfStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_FOR_OF_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ForUpdateStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ForUpdateStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..660fe66086500ba90ca74cf0b63b64c6e8575a91 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ForUpdateStatement.ts @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { LoopStatement } from "./LoopStatement" +import { Statement } from "./Statement" + +export class ForUpdateStatement extends LoopStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createForUpdateStatement(init?: AstNode, test?: Expression, update?: Expression, body?: Statement): ForUpdateStatement { + const result: ForUpdateStatement = new ForUpdateStatement(global.generatedEs2panda._CreateForUpdateStatement(global.context, passNode(init), passNode(test), passNode(update), passNode(body)), Es2pandaAstNodeType.AST_NODE_TYPE_FOR_UPDATE_STATEMENT) + result.setChildrenParentPtr() + return result + } + get init(): AstNode | undefined { + return unpackNode(global.generatedEs2panda._ForUpdateStatementInit(global.context, this.peer)) + } + get test(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ForUpdateStatementTest(global.context, this.peer)) + } + get update(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ForUpdateStatementUpdateConst(global.context, this.peer)) + } + get body(): Statement | undefined { + return unpackNode(global.generatedEs2panda._ForUpdateStatementBody(global.context, this.peer)) + } + protected readonly brandForUpdateStatement: undefined +} +export function isForUpdateStatement(node: object | undefined): node is ForUpdateStatement { + return node instanceof ForUpdateStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_UPDATE_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FOR_UPDATE_STATEMENT, (peer: KNativePointer) => new ForUpdateStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_FOR_UPDATE_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/FunctionDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/FunctionDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..8b3d5fa9e1fb3b536deeaa5b0f0bad3ca31096ed --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/FunctionDeclaration.ts @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { ScriptFunction } from "./ScriptFunction" +import { SrcDumper } from "./SrcDumper" +import { Statement } from "./Statement" + +export class FunctionDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createFunctionDeclaration(func: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration { + const result: FunctionDeclaration = new FunctionDeclaration(global.generatedEs2panda._CreateFunctionDeclaration(global.context, passNode(func), passNodeArray(annotations), annotations.length, isAnonymous), Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateFunctionDeclaration(original: FunctionDeclaration | undefined, func: ScriptFunction | undefined, annotations: readonly AnnotationUsage[], isAnonymous: boolean): FunctionDeclaration { + const result: FunctionDeclaration = new FunctionDeclaration(global.generatedEs2panda._UpdateFunctionDeclaration(global.context, passNode(original), passNode(func), passNodeArray(annotations), annotations.length, isAnonymous), Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION) + result.setChildrenParentPtr() + return result + } + static update1FunctionDeclaration(original: FunctionDeclaration | undefined, func: ScriptFunction | undefined, isAnonymous: boolean): FunctionDeclaration { + const result: FunctionDeclaration = new FunctionDeclaration(global.generatedEs2panda._UpdateFunctionDeclaration1(global.context, passNode(original), passNode(func), isAnonymous), Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION) + result.setChildrenParentPtr() + return result + } + get function(): ScriptFunction | undefined { + return unpackNode(global.generatedEs2panda._FunctionDeclarationFunction(global.context, this.peer)) + } + get isAnonymous(): boolean { + return global.generatedEs2panda._FunctionDeclarationIsAnonymousConst(global.context, this.peer) + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._FunctionDeclarationHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._FunctionDeclarationEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._FunctionDeclarationClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._FunctionDeclarationDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._FunctionDeclarationAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._FunctionDeclarationAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._FunctionDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._FunctionDeclarationSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + protected readonly brandFunctionDeclaration: undefined +} +export function isFunctionDeclaration(node: object | undefined): node is FunctionDeclaration { + return node instanceof FunctionDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION, (peer: KNativePointer) => new FunctionDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/FunctionExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/FunctionExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..28d50892a226f23aacdc62795048ca1dadc68445 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/FunctionExpression.ts @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { ScriptFunction } from "./ScriptFunction" + +export class FunctionExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1FunctionExpression(namedExpr?: Identifier, func?: ScriptFunction): FunctionExpression { + const result: FunctionExpression = new FunctionExpression(global.generatedEs2panda._CreateFunctionExpression1(global.context, passNode(namedExpr), passNode(func)), Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateFunctionExpression(original?: FunctionExpression, func?: ScriptFunction): FunctionExpression { + const result: FunctionExpression = new FunctionExpression(global.generatedEs2panda._UpdateFunctionExpression(global.context, passNode(original), passNode(func)), Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static update1FunctionExpression(original?: FunctionExpression, namedExpr?: Identifier, func?: ScriptFunction): FunctionExpression { + const result: FunctionExpression = new FunctionExpression(global.generatedEs2panda._UpdateFunctionExpression1(global.context, passNode(original), passNode(namedExpr), passNode(func)), Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get function(): ScriptFunction | undefined { + return unpackNode(global.generatedEs2panda._FunctionExpressionFunction(global.context, this.peer)) + } + get isAnonymous(): boolean { + return global.generatedEs2panda._FunctionExpressionIsAnonymousConst(global.context, this.peer) + } + get id(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._FunctionExpressionId(global.context, this.peer)) + } + protected readonly brandFunctionExpression: undefined +} +export function isFunctionExpression(node: object | undefined): node is FunctionExpression { + return node instanceof FunctionExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION, (peer: KNativePointer) => new FunctionExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/FunctionSignature.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/FunctionSignature.ts new file mode 100644 index 0000000000000000000000000000000000000000..740fffa833d47553508622eaeb5d75ef8fd2370d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/FunctionSignature.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Expression } from "./Expression" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TypeNode } from "./TypeNode" + +export class FunctionSignature extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + static createFunctionSignature(typeParams: TSTypeParameterDeclaration | undefined, params: readonly Expression[], returnTypeAnnotation: TypeNode | undefined, hasReceiver: boolean): FunctionSignature { + return new FunctionSignature(global.generatedEs2panda._CreateFunctionSignature(global.context, passNode(typeParams), passNodeArray(params), params.length, passNode(returnTypeAnnotation), hasReceiver)) + } + get params(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._FunctionSignatureParams(global.context, this.peer)) + } + get typeParams(): TSTypeParameterDeclaration | undefined { + return unpackNode(global.generatedEs2panda._FunctionSignatureTypeParams(global.context, this.peer)) + } + get returnType(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._FunctionSignatureReturnType(global.context, this.peer)) + } + /** @deprecated */ + setReturnType(type?: TypeNode): this { + global.generatedEs2panda._FunctionSignatureSetReturnType(global.context, this.peer, passNode(type)) + return this + } + get clone(): FunctionSignature | undefined { + return new FunctionSignature(global.generatedEs2panda._FunctionSignatureClone(global.context, this.peer)) + } + get hasReceiver(): boolean { + return global.generatedEs2panda._FunctionSignatureHasReceiverConst(global.context, this.peer) + } + protected readonly brandFunctionSignature: undefined +} +export function isFunctionSignature(node: object | undefined): node is FunctionSignature { + return node instanceof FunctionSignature +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/IRNode.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/IRNode.ts new file mode 100644 index 0000000000000000000000000000000000000000..7de6aa46aca14bce0c3b8504e8207b4d4c20d005 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/IRNode.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class IRNode extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandIRNode: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/Identifier.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/Identifier.ts new file mode 100644 index 0000000000000000000000000000000000000000..130f284188ff7c72e092187008aae44ff47a969b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/Identifier.ts @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotatedExpression } from "./AnnotatedExpression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" +import { ValidationInfo } from "./ValidationInfo" + +export class Identifier extends AnnotatedExpression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create2Identifier(name: string, typeAnnotation?: TypeNode): Identifier { + const result: Identifier = new Identifier(global.generatedEs2panda._CreateIdentifier2(global.context, name, passNode(typeAnnotation)), Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER) + result.setChildrenParentPtr() + return result + } + static updateIdentifier(original?: Identifier): Identifier { + const result: Identifier = new Identifier(global.generatedEs2panda._UpdateIdentifier(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER) + result.setChildrenParentPtr() + return result + } + static update1Identifier(original: Identifier | undefined, name: string): Identifier { + const result: Identifier = new Identifier(global.generatedEs2panda._UpdateIdentifier1(global.context, passNode(original), name), Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER) + result.setChildrenParentPtr() + return result + } + static update2Identifier(original: Identifier | undefined, name: string, typeAnnotation?: TypeNode): Identifier { + const result: Identifier = new Identifier(global.generatedEs2panda._UpdateIdentifier2(global.context, passNode(original), name, passNode(typeAnnotation)), Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER) + result.setChildrenParentPtr() + return result + } + get name(): string { + return unpackString(global.generatedEs2panda._IdentifierName(global.context, this.peer)) + } + /** @deprecated */ + setName(newName: string): this { + global.generatedEs2panda._IdentifierSetName(global.context, this.peer, newName) + return this + } + get isErrorPlaceHolder(): boolean { + return global.generatedEs2panda._IdentifierIsErrorPlaceHolderConst(global.context, this.peer) + } + get isOptional(): boolean { + return global.generatedEs2panda._IdentifierIsOptionalConst(global.context, this.peer) + } + /** @deprecated */ + setOptional(optional_arg: boolean): this { + global.generatedEs2panda._IdentifierSetOptional(global.context, this.peer, optional_arg) + return this + } + get isReference(): boolean { + return global.generatedEs2panda._IdentifierIsReferenceConst(global.context, this.peer) + } + get isTdz(): boolean { + return global.generatedEs2panda._IdentifierIsTdzConst(global.context, this.peer) + } + /** @deprecated */ + setTdz(): this { + global.generatedEs2panda._IdentifierSetTdz(global.context, this.peer) + return this + } + /** @deprecated */ + setAccessor(): this { + global.generatedEs2panda._IdentifierSetAccessor(global.context, this.peer) + return this + } + get isAccessor(): boolean { + return global.generatedEs2panda._IdentifierIsAccessorConst(global.context, this.peer) + } + /** @deprecated */ + setMutator(): this { + global.generatedEs2panda._IdentifierSetMutator(global.context, this.peer) + return this + } + get isMutator(): boolean { + return global.generatedEs2panda._IdentifierIsMutatorConst(global.context, this.peer) + } + get isReceiver(): boolean { + return global.generatedEs2panda._IdentifierIsReceiverConst(global.context, this.peer) + } + get isPrivateIdent(): boolean { + return global.generatedEs2panda._IdentifierIsPrivateIdentConst(global.context, this.peer) + } + /** @deprecated */ + setPrivate(isPrivate: boolean): this { + global.generatedEs2panda._IdentifierSetPrivate(global.context, this.peer, isPrivate) + return this + } + get isIgnoreBox(): boolean { + return global.generatedEs2panda._IdentifierIsIgnoreBoxConst(global.context, this.peer) + } + /** @deprecated */ + setIgnoreBox(): this { + global.generatedEs2panda._IdentifierSetIgnoreBox(global.context, this.peer) + return this + } + get isAnnotationDecl(): boolean { + return global.generatedEs2panda._IdentifierIsAnnotationDeclConst(global.context, this.peer) + } + /** @deprecated */ + setAnnotationDecl(): this { + global.generatedEs2panda._IdentifierSetAnnotationDecl(global.context, this.peer) + return this + } + get isAnnotationUsage(): boolean { + return global.generatedEs2panda._IdentifierIsAnnotationUsageConst(global.context, this.peer) + } + /** @deprecated */ + setAnnotationUsage(): this { + global.generatedEs2panda._IdentifierSetAnnotationUsage(global.context, this.peer) + return this + } + get validateExpression(): ValidationInfo | undefined { + return new ValidationInfo(global.generatedEs2panda._IdentifierValidateExpression(global.context, this.peer)) + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._IdentifierTypeAnnotationConst(global.context, this.peer)) + } + /** @deprecated */ + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { + global.generatedEs2panda._IdentifierSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) + return this + } + protected readonly brandIdentifier: undefined +} +export function isIdentifier(node: object | undefined): node is Identifier { + return node instanceof Identifier +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER, (peer: KNativePointer) => new Identifier(peer, Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/IfStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/IfStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..3fb9854a539409ff9acc472a179aaba98f1ed50d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/IfStatement.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" + +export class IfStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createIfStatement(test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement { + const result: IfStatement = new IfStatement(global.generatedEs2panda._CreateIfStatement(global.context, passNode(test), passNode(consequent), passNode(alternate)), Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateIfStatement(original?: IfStatement, test?: Expression, consequent?: Statement, alternate?: Statement): IfStatement { + const result: IfStatement = new IfStatement(global.generatedEs2panda._UpdateIfStatement(global.context, passNode(original), passNode(test), passNode(consequent), passNode(alternate)), Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT) + result.setChildrenParentPtr() + return result + } + get test(): Expression | undefined { + return unpackNode(global.generatedEs2panda._IfStatementTest(global.context, this.peer)) + } + /** @deprecated */ + setTest(test?: Expression): this { + global.generatedEs2panda._IfStatementSetTest(global.context, this.peer, passNode(test)) + return this + } + get consequent(): Statement | undefined { + return unpackNode(global.generatedEs2panda._IfStatementConsequent(global.context, this.peer)) + } + get alternate(): Statement | undefined { + return unpackNode(global.generatedEs2panda._IfStatementAlternate(global.context, this.peer)) + } + /** @deprecated */ + setAlternate(alternate?: Statement): this { + global.generatedEs2panda._IfStatementSetAlternate(global.context, this.peer, passNode(alternate)) + return this + } + protected readonly brandIfStatement: undefined +} +export function isIfStatement(node: object | undefined): node is IfStatement { + return node instanceof IfStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT, (peer: KNativePointer) => new IfStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ImportDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..51d6943edb3251667afa744cb23608b840c261c8 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportDeclaration.ts @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaImportKinds } from "./../Es2pandaEnums" +import { Statement } from "./Statement" +import { StringLiteral } from "./StringLiteral" + +export class ImportDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createImportDeclaration(source: StringLiteral | undefined, specifiers: readonly AstNode[], importKinds: Es2pandaImportKinds): ImportDeclaration { + const result: ImportDeclaration = new ImportDeclaration(global.generatedEs2panda._CreateImportDeclaration(global.context, passNode(source), passNodeArray(specifiers), specifiers.length, importKinds), Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateImportDeclaration(original: ImportDeclaration | undefined, source: StringLiteral | undefined, specifiers: readonly AstNode[], importKinds: Es2pandaImportKinds): ImportDeclaration { + const result: ImportDeclaration = new ImportDeclaration(global.generatedEs2panda._UpdateImportDeclaration(global.context, passNode(original), passNode(source), passNodeArray(specifiers), specifiers.length, importKinds), Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DECLARATION) + result.setChildrenParentPtr() + return result + } + /** @deprecated */ + emplaceSpecifiers(source?: AstNode): this { + global.generatedEs2panda._ImportDeclarationEmplaceSpecifiers(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearSpecifiers(): this { + global.generatedEs2panda._ImportDeclarationClearSpecifiers(global.context, this.peer) + return this + } + /** @deprecated */ + setValueSpecifiers(source: AstNode | undefined, index: number): this { + global.generatedEs2panda._ImportDeclarationSetValueSpecifiers(global.context, this.peer, passNode(source), index) + return this + } + get specifiersForUpdate(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._ImportDeclarationSpecifiersForUpdate(global.context, this.peer)) + } + get source(): StringLiteral | undefined { + return unpackNode(global.generatedEs2panda._ImportDeclarationSource(global.context, this.peer)) + } + get specifiers(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._ImportDeclarationSpecifiersConst(global.context, this.peer)) + } + get isTypeKind(): boolean { + return global.generatedEs2panda._ImportDeclarationIsTypeKindConst(global.context, this.peer) + } + protected readonly brandImportDeclaration: undefined +} +export function isImportDeclaration(node: object | undefined): node is ImportDeclaration { + return node instanceof ImportDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DECLARATION, (peer: KNativePointer) => new ImportDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ImportDefaultSpecifier.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportDefaultSpecifier.ts new file mode 100644 index 0000000000000000000000000000000000000000..85ea5be32136e2beffd766c2ae2b356df55d79c8 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportDefaultSpecifier.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { Statement } from "./Statement" + +export class ImportDefaultSpecifier extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createImportDefaultSpecifier(local?: Identifier): ImportDefaultSpecifier { + const result: ImportDefaultSpecifier = new ImportDefaultSpecifier(global.generatedEs2panda._CreateImportDefaultSpecifier(global.context, passNode(local)), Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER) + result.setChildrenParentPtr() + return result + } + static updateImportDefaultSpecifier(original?: ImportDefaultSpecifier, local?: Identifier): ImportDefaultSpecifier { + const result: ImportDefaultSpecifier = new ImportDefaultSpecifier(global.generatedEs2panda._UpdateImportDefaultSpecifier(global.context, passNode(original), passNode(local)), Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER) + result.setChildrenParentPtr() + return result + } + get local(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ImportDefaultSpecifierLocal(global.context, this.peer)) + } + protected readonly brandImportDefaultSpecifier: undefined +} +export function isImportDefaultSpecifier(node: object | undefined): node is ImportDefaultSpecifier { + return node instanceof ImportDefaultSpecifier +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER, (peer: KNativePointer) => new ImportDefaultSpecifier(peer, Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_DEFAULT_SPECIFIER)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ImportExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..e10ea108baeb43ee56d9923340e34f24daa6a50b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportExpression.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class ImportExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createImportExpression(source?: Expression): ImportExpression { + const result: ImportExpression = new ImportExpression(global.generatedEs2panda._CreateImportExpression(global.context, passNode(source)), Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateImportExpression(original?: ImportExpression, source?: Expression): ImportExpression { + const result: ImportExpression = new ImportExpression(global.generatedEs2panda._UpdateImportExpression(global.context, passNode(original), passNode(source)), Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get source(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ImportExpressionSource(global.context, this.peer)) + } + protected readonly brandImportExpression: undefined +} +export function isImportExpression(node: object | undefined): node is ImportExpression { + return node instanceof ImportExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_EXPRESSION, (peer: KNativePointer) => new ImportExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ImportNamespaceSpecifier.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportNamespaceSpecifier.ts new file mode 100644 index 0000000000000000000000000000000000000000..72f6f5da23f161cbd354947ce2dd93f767fefe09 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportNamespaceSpecifier.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { Statement } from "./Statement" + +export class ImportNamespaceSpecifier extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createImportNamespaceSpecifier(local?: Identifier): ImportNamespaceSpecifier { + const result: ImportNamespaceSpecifier = new ImportNamespaceSpecifier(global.generatedEs2panda._CreateImportNamespaceSpecifier(global.context, passNode(local)), Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER) + result.setChildrenParentPtr() + return result + } + static updateImportNamespaceSpecifier(original?: ImportNamespaceSpecifier, local?: Identifier): ImportNamespaceSpecifier { + const result: ImportNamespaceSpecifier = new ImportNamespaceSpecifier(global.generatedEs2panda._UpdateImportNamespaceSpecifier(global.context, passNode(original), passNode(local)), Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER) + result.setChildrenParentPtr() + return result + } + get local(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ImportNamespaceSpecifierLocal(global.context, this.peer)) + } + protected readonly brandImportNamespaceSpecifier: undefined +} +export function isImportNamespaceSpecifier(node: object | undefined): node is ImportNamespaceSpecifier { + return node instanceof ImportNamespaceSpecifier +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER, (peer: KNativePointer) => new ImportNamespaceSpecifier(peer, Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_NAMESPACE_SPECIFIER)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ImportSource.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportSource.ts new file mode 100644 index 0000000000000000000000000000000000000000..f3a7c1dfb643712c436e42cbf8e3f3870adba289 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportSource.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class ImportSource extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandImportSource: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ImportSpecifier.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportSpecifier.ts new file mode 100644 index 0000000000000000000000000000000000000000..2d7dd40b0344d264b96bc04413ba4492756d5273 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ImportSpecifier.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { Statement } from "./Statement" + +export class ImportSpecifier extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createImportSpecifier(imported?: Identifier, local?: Identifier): ImportSpecifier { + const result: ImportSpecifier = new ImportSpecifier(global.generatedEs2panda._CreateImportSpecifier(global.context, passNode(imported), passNode(local)), Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_SPECIFIER) + result.setChildrenParentPtr() + return result + } + static updateImportSpecifier(original?: ImportSpecifier, imported?: Identifier, local?: Identifier): ImportSpecifier { + const result: ImportSpecifier = new ImportSpecifier(global.generatedEs2panda._UpdateImportSpecifier(global.context, passNode(original), passNode(imported), passNode(local)), Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_SPECIFIER) + result.setChildrenParentPtr() + return result + } + get imported(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ImportSpecifierImported(global.context, this.peer)) + } + get local(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ImportSpecifierLocal(global.context, this.peer)) + } + get isRemovable(): boolean { + return global.generatedEs2panda._ImportSpecifierIsRemovableConst(global.context, this.peer) + } + /** @deprecated */ + setRemovable(isRemovable: boolean): this { + global.generatedEs2panda._ImportSpecifierSetRemovable(global.context, this.peer, isRemovable) + return this + } + protected readonly brandImportSpecifier: undefined +} +export function isImportSpecifier(node: object | undefined): node is ImportSpecifier { + return node instanceof ImportSpecifier +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_SPECIFIER)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_SPECIFIER, (peer: KNativePointer) => new ImportSpecifier(peer, Es2pandaAstNodeType.AST_NODE_TYPE_IMPORT_SPECIFIER)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/IndexInfo.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/IndexInfo.ts new file mode 100644 index 0000000000000000000000000000000000000000..82407f68952cfdb7fda3ea57e1f4bab217552e16 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/IndexInfo.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class IndexInfo extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandIndexInfo: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/LabelPair.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/LabelPair.ts new file mode 100644 index 0000000000000000000000000000000000000000..4b472593c8fe9535f3ad947122bbea53ff075482 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/LabelPair.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class LabelPair extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandLabelPair: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/LabelledStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/LabelledStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..c5c441d3f099fd8a7fd4e9fbe4d84ee9793a2070 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/LabelledStatement.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { Statement } from "./Statement" + +export class LabelledStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createLabelledStatement(ident?: Identifier, body?: Statement): LabelledStatement { + const result: LabelledStatement = new LabelledStatement(global.generatedEs2panda._CreateLabelledStatement(global.context, passNode(ident), passNode(body)), Es2pandaAstNodeType.AST_NODE_TYPE_LABELLED_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateLabelledStatement(original?: LabelledStatement, ident?: Identifier, body?: Statement): LabelledStatement { + const result: LabelledStatement = new LabelledStatement(global.generatedEs2panda._UpdateLabelledStatement(global.context, passNode(original), passNode(ident), passNode(body)), Es2pandaAstNodeType.AST_NODE_TYPE_LABELLED_STATEMENT) + result.setChildrenParentPtr() + return result + } + get body(): Statement | undefined { + return unpackNode(global.generatedEs2panda._LabelledStatementBody(global.context, this.peer)) + } + get ident(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._LabelledStatementIdent(global.context, this.peer)) + } + get referencedStatement(): AstNode | undefined { + return unpackNode(global.generatedEs2panda._LabelledStatementGetReferencedStatementConst(global.context, this.peer)) + } + protected readonly brandLabelledStatement: undefined +} +export function isLabelledStatement(node: object | undefined): node is LabelledStatement { + return node instanceof LabelledStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_LABELLED_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_LABELLED_STATEMENT, (peer: KNativePointer) => new LabelledStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_LABELLED_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/Literal.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/Literal.ts new file mode 100644 index 0000000000000000000000000000000000000000..c8c20aa35886e6756fa999504bb8d32716675286 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/Literal.ts @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class Literal extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + get isFolded(): boolean { + return global.generatedEs2panda._LiteralIsFoldedConst(global.context, this.peer) + } + /** @deprecated */ + setFolded(folded: boolean): this { + global.generatedEs2panda._LiteralSetFolded(global.context, this.peer, folded) + return this + } + protected readonly brandLiteral: undefined +} +export function isLiteral(node: object | undefined): node is Literal { + return node instanceof Literal +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/LoopStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/LoopStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..d02bc72d9fb85687f2361b0f660df1dbd93487b4 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/LoopStatement.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Statement } from "./Statement" + +export class LoopStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + protected readonly brandLoopStatement: undefined +} +export function isLoopStatement(node: object | undefined): node is LoopStatement { + return node instanceof LoopStatement +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/MaybeOptionalExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/MaybeOptionalExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..bdfeee561443d848d6fd8ba4a60d5eeb899b32c4 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/MaybeOptionalExpression.ts @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class MaybeOptionalExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + get isOptional(): boolean { + return global.generatedEs2panda._MaybeOptionalExpressionIsOptionalConst(global.context, this.peer) + } + /** @deprecated */ + clearOptional(): this { + global.generatedEs2panda._MaybeOptionalExpressionClearOptional(global.context, this.peer) + return this + } + protected readonly brandMaybeOptionalExpression: undefined +} +export function isMaybeOptionalExpression(node: object | undefined): node is MaybeOptionalExpression { + return node instanceof MaybeOptionalExpression +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/MemberExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/MemberExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..941c2302795274734a6a474c9c2b35bd6372fda3 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/MemberExpression.ts @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { CodeGen } from "./CodeGen" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaMemberExpressionKind } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { MaybeOptionalExpression } from "./MaybeOptionalExpression" +import { VReg } from "./VReg" + +export class MemberExpression extends MaybeOptionalExpression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createMemberExpression(object_arg: Expression | undefined, property: Expression | undefined, kind: Es2pandaMemberExpressionKind, computed: boolean, optional_arg: boolean): MemberExpression { + const result: MemberExpression = new MemberExpression(global.generatedEs2panda._CreateMemberExpression(global.context, passNode(object_arg), passNode(property), kind, computed, optional_arg), Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateMemberExpression(original: MemberExpression | undefined, object_arg: Expression | undefined, property: Expression | undefined, kind: Es2pandaMemberExpressionKind, computed: boolean, optional_arg: boolean): MemberExpression { + const result: MemberExpression = new MemberExpression(global.generatedEs2panda._UpdateMemberExpression(global.context, passNode(original), passNode(object_arg), passNode(property), kind, computed, optional_arg), Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get object(): Expression | undefined { + return unpackNode(global.generatedEs2panda._MemberExpressionObject(global.context, this.peer)) + } + /** @deprecated */ + setObject(object_arg?: Expression): this { + global.generatedEs2panda._MemberExpressionSetObject(global.context, this.peer, passNode(object_arg)) + return this + } + /** @deprecated */ + setProperty(prop?: Expression): this { + global.generatedEs2panda._MemberExpressionSetProperty(global.context, this.peer, passNode(prop)) + return this + } + get property(): Expression | undefined { + return unpackNode(global.generatedEs2panda._MemberExpressionProperty(global.context, this.peer)) + } + get isComputed(): boolean { + return global.generatedEs2panda._MemberExpressionIsComputedConst(global.context, this.peer) + } + get kind(): Es2pandaMemberExpressionKind { + return global.generatedEs2panda._MemberExpressionKindConst(global.context, this.peer) + } + /** @deprecated */ + addMemberKind(kind: Es2pandaMemberExpressionKind): this { + global.generatedEs2panda._MemberExpressionAddMemberKind(global.context, this.peer, kind) + return this + } + /** @deprecated */ + removeMemberKind(kind: Es2pandaMemberExpressionKind): this { + global.generatedEs2panda._MemberExpressionRemoveMemberKind(global.context, this.peer, kind) + return this + } + get isIgnoreBox(): boolean { + return global.generatedEs2panda._MemberExpressionIsIgnoreBoxConst(global.context, this.peer) + } + /** @deprecated */ + setIgnoreBox(): this { + global.generatedEs2panda._MemberExpressionSetIgnoreBox(global.context, this.peer) + return this + } + get isPrivateReference(): boolean { + return global.generatedEs2panda._MemberExpressionIsPrivateReferenceConst(global.context, this.peer) + } + /** @deprecated */ + compileToReg(pg?: CodeGen, objReg?: VReg): this { + global.generatedEs2panda._MemberExpressionCompileToRegConst(global.context, this.peer, passNode(pg), passNode(objReg)) + return this + } + /** @deprecated */ + compileToRegs(pg?: CodeGen, object_arg?: VReg, property?: VReg): this { + global.generatedEs2panda._MemberExpressionCompileToRegsConst(global.context, this.peer, passNode(pg), passNode(object_arg), passNode(property)) + return this + } + protected readonly brandMemberExpression: undefined +} +export function isMemberExpression(node: object | undefined): node is MemberExpression { + return node instanceof MemberExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION, (peer: KNativePointer) => new MemberExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/MetaProperty.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/MetaProperty.ts new file mode 100644 index 0000000000000000000000000000000000000000..7c6797f0a8b9ed3764cdf6949d2e2e51fdf2256d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/MetaProperty.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaMetaPropertyKind } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class MetaProperty extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createMetaProperty(kind: Es2pandaMetaPropertyKind): MetaProperty { + const result: MetaProperty = new MetaProperty(global.generatedEs2panda._CreateMetaProperty(global.context, kind), Es2pandaAstNodeType.AST_NODE_TYPE_META_PROPERTY_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateMetaProperty(original: MetaProperty | undefined, kind: Es2pandaMetaPropertyKind): MetaProperty { + const result: MetaProperty = new MetaProperty(global.generatedEs2panda._UpdateMetaProperty(global.context, passNode(original), kind), Es2pandaAstNodeType.AST_NODE_TYPE_META_PROPERTY_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get kind(): Es2pandaMetaPropertyKind { + return global.generatedEs2panda._MetaPropertyKindConst(global.context, this.peer) + } + protected readonly brandMetaProperty: undefined +} +export function isMetaProperty(node: object | undefined): node is MetaProperty { + return node instanceof MetaProperty +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_META_PROPERTY_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_META_PROPERTY_EXPRESSION, (peer: KNativePointer) => new MetaProperty(peer, Es2pandaAstNodeType.AST_NODE_TYPE_META_PROPERTY_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/MethodDefinition.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/MethodDefinition.ts new file mode 100644 index 0000000000000000000000000000000000000000..b85eca1c6fd1a1be952a65fe72f090abe925d22f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/MethodDefinition.ts @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { ClassElement } from "./ClassElement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaMethodDefinitionKind } from "./../Es2pandaEnums" +import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { ScriptFunction } from "./ScriptFunction" +import { extension_MethodDefinitionOnUpdate } from "./../../reexport-for-generated" +import { extension_MethodDefinitionSetChildrenParentPtr } from "./../../reexport-for-generated" + +export class MethodDefinition extends ClassElement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createMethodDefinition(kind: Es2pandaMethodDefinitionKind, key: Expression | undefined, value: Expression | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean, overloads?: readonly MethodDefinition[]): MethodDefinition { + const result: MethodDefinition = new MethodDefinition(global.generatedEs2panda._CreateMethodDefinition(global.context, kind, passNode(key), passNode(value), modifiers, isComputed), Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION) + if (overloads) + { + result.setOverloads(overloads) + } + result.setChildrenParentPtr() + return result + } + static updateMethodDefinition(original: MethodDefinition | undefined, kind: Es2pandaMethodDefinitionKind, key: Expression | undefined, value: Expression | undefined, modifiers: Es2pandaModifierFlags, isComputed: boolean, overloads?: readonly MethodDefinition[]): MethodDefinition { + const result: MethodDefinition = new MethodDefinition(global.generatedEs2panda._UpdateMethodDefinition(global.context, passNode(original), kind, passNode(key), passNode(value), modifiers, isComputed), Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION) + if (overloads) + { + result.setOverloads(overloads) + } + result.setChildrenParentPtr() + return result + } + get kind(): Es2pandaMethodDefinitionKind { + return global.generatedEs2panda._MethodDefinitionKindConst(global.context, this.peer) + } + get isConstructor(): boolean { + return global.generatedEs2panda._MethodDefinitionIsConstructorConst(global.context, this.peer) + } + get isMethod(): boolean { + return global.generatedEs2panda._MethodDefinitionIsMethodConst(global.context, this.peer) + } + get isExtensionMethod(): boolean { + return global.generatedEs2panda._MethodDefinitionIsExtensionMethodConst(global.context, this.peer) + } + get isGetter(): boolean { + return global.generatedEs2panda._MethodDefinitionIsGetterConst(global.context, this.peer) + } + get isSetter(): boolean { + return global.generatedEs2panda._MethodDefinitionIsSetterConst(global.context, this.peer) + } + get isDefaultAccessModifier(): boolean { + return global.generatedEs2panda._MethodDefinitionIsDefaultAccessModifierConst(global.context, this.peer) + } + /** @deprecated */ + setDefaultAccessModifier(isDefault: boolean): this { + global.generatedEs2panda._MethodDefinitionSetDefaultAccessModifier(global.context, this.peer, isDefault) + return this + } + get overloads(): readonly MethodDefinition[] { + return unpackNodeArray(global.generatedEs2panda._MethodDefinitionOverloadsConst(global.context, this.peer)) + } + get baseOverloadMethod(): MethodDefinition | undefined { + return unpackNode(global.generatedEs2panda._MethodDefinitionBaseOverloadMethod(global.context, this.peer)) + } + get asyncPairMethod(): MethodDefinition | undefined { + return unpackNode(global.generatedEs2panda._MethodDefinitionAsyncPairMethod(global.context, this.peer)) + } + /** @deprecated */ + setOverloads(overloads: readonly MethodDefinition[]): this { + global.generatedEs2panda._MethodDefinitionSetOverloads(global.context, this.peer, passNodeArray(overloads), overloads.length) + return this + } + /** @deprecated */ + addOverload(overload?: MethodDefinition): this { + global.generatedEs2panda._MethodDefinitionAddOverload(global.context, this.peer, passNode(overload)) + return this + } + /** @deprecated */ + setBaseOverloadMethod(baseOverloadMethod?: MethodDefinition): this { + global.generatedEs2panda._MethodDefinitionSetBaseOverloadMethod(global.context, this.peer, passNode(baseOverloadMethod)) + return this + } + /** @deprecated */ + setAsyncPairMethod(asyncPairMethod?: MethodDefinition): this { + global.generatedEs2panda._MethodDefinitionSetAsyncPairMethod(global.context, this.peer, passNode(asyncPairMethod)) + return this + } + get function(): ScriptFunction | undefined { + return unpackNode(global.generatedEs2panda._MethodDefinitionFunction(global.context, this.peer)) + } + /** @deprecated */ + initializeOverloadInfo(): this { + global.generatedEs2panda._MethodDefinitionInitializeOverloadInfo(global.context, this.peer) + return this + } + /** @deprecated */ + emplaceOverloads(overloads?: MethodDefinition): this { + global.generatedEs2panda._MethodDefinitionEmplaceOverloads(global.context, this.peer, passNode(overloads)) + return this + } + /** @deprecated */ + clearOverloads(): this { + global.generatedEs2panda._MethodDefinitionClearOverloads(global.context, this.peer) + return this + } + /** @deprecated */ + setValueOverloads(overloads: MethodDefinition | undefined, index: number): this { + global.generatedEs2panda._MethodDefinitionSetValueOverloads(global.context, this.peer, passNode(overloads), index) + return this + } + setChildrenParentPtr = extension_MethodDefinitionSetChildrenParentPtr + onUpdate = extension_MethodDefinitionOnUpdate + protected readonly brandMethodDefinition: undefined +} +export function isMethodDefinition(node: object | undefined): node is MethodDefinition { + return node instanceof MethodDefinition +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION, (peer: KNativePointer) => new MethodDefinition(peer, Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/NamedType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/NamedType.ts new file mode 100644 index 0000000000000000000000000000000000000000..95ca0809a9d83e86a1d08b39430fe54a4ac0810d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/NamedType.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TypeNode } from "./TypeNode" + +export class NamedType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createNamedType(name?: Identifier): NamedType { + const result: NamedType = new NamedType(global.generatedEs2panda._CreateNamedType(global.context, passNode(name)), Es2pandaAstNodeType.AST_NODE_TYPE_NAMED_TYPE) + result.setChildrenParentPtr() + return result + } + static updateNamedType(original?: NamedType, name?: Identifier): NamedType { + const result: NamedType = new NamedType(global.generatedEs2panda._UpdateNamedType(global.context, passNode(original), passNode(name)), Es2pandaAstNodeType.AST_NODE_TYPE_NAMED_TYPE) + result.setChildrenParentPtr() + return result + } + get name(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._NamedTypeNameConst(global.context, this.peer)) + } + get typeParams(): TSTypeParameterInstantiation | undefined { + return unpackNode(global.generatedEs2panda._NamedTypeTypeParamsConst(global.context, this.peer)) + } + get isNullable(): boolean { + return global.generatedEs2panda._NamedTypeIsNullableConst(global.context, this.peer) + } + /** @deprecated */ + setNullable(nullable: boolean): this { + global.generatedEs2panda._NamedTypeSetNullable(global.context, this.peer, nullable) + return this + } + /** @deprecated */ + setNext(next?: NamedType): this { + global.generatedEs2panda._NamedTypeSetNext(global.context, this.peer, passNode(next)) + return this + } + /** @deprecated */ + setTypeParams(typeParams?: TSTypeParameterInstantiation): this { + global.generatedEs2panda._NamedTypeSetTypeParams(global.context, this.peer, passNode(typeParams)) + return this + } + protected readonly brandNamedType: undefined +} +export function isNamedType(node: object | undefined): node is NamedType { + return node instanceof NamedType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NAMED_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NAMED_TYPE, (peer: KNativePointer) => new NamedType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_NAMED_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/NewExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/NewExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..b7a47fcfd38b0f5324d821d2e393b07606a0b125 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/NewExpression.ts @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class NewExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createNewExpression(callee: Expression | undefined, _arguments: readonly Expression[]): NewExpression { + const result: NewExpression = new NewExpression(global.generatedEs2panda._CreateNewExpression(global.context, passNode(callee), passNodeArray(_arguments), _arguments.length), Es2pandaAstNodeType.AST_NODE_TYPE_NEW_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateNewExpression(original: NewExpression | undefined, callee: Expression | undefined, _arguments: readonly Expression[]): NewExpression { + const result: NewExpression = new NewExpression(global.generatedEs2panda._UpdateNewExpression(global.context, passNode(original), passNode(callee), passNodeArray(_arguments), _arguments.length), Es2pandaAstNodeType.AST_NODE_TYPE_NEW_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get callee(): Expression | undefined { + return unpackNode(global.generatedEs2panda._NewExpressionCalleeConst(global.context, this.peer)) + } + get arguments(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._NewExpressionArgumentsConst(global.context, this.peer)) + } + protected readonly brandNewExpression: undefined +} +export function isNewExpression(node: object | undefined): node is NewExpression { + return node instanceof NewExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NEW_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NEW_EXPRESSION, (peer: KNativePointer) => new NewExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_NEW_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/NullLiteral.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/NullLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..b6faa23156ef6a2123abf4df6d3486f6000f0413 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/NullLiteral.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Literal } from "./Literal" + +export class NullLiteral extends Literal { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createNullLiteral(): NullLiteral { + const result: NullLiteral = new NullLiteral(global.generatedEs2panda._CreateNullLiteral(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_NULL_LITERAL) + result.setChildrenParentPtr() + return result + } + static updateNullLiteral(original?: NullLiteral): NullLiteral { + const result: NullLiteral = new NullLiteral(global.generatedEs2panda._UpdateNullLiteral(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_NULL_LITERAL) + result.setChildrenParentPtr() + return result + } + protected readonly brandNullLiteral: undefined +} +export function isNullLiteral(node: object | undefined): node is NullLiteral { + return node instanceof NullLiteral +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NULL_LITERAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NULL_LITERAL, (peer: KNativePointer) => new NullLiteral(peer, Es2pandaAstNodeType.AST_NODE_TYPE_NULL_LITERAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/NumberLiteral.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/NumberLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..ef5c9b4e042cb4ac5e50a019c7fa2f9b8fa43dbb --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/NumberLiteral.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Literal } from "./Literal" +import { extension_NumberLiteralValue } from "./../../reexport-for-generated" + +export class NumberLiteral extends Literal { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createNumberLiteral(value: number): AstNode { + const result: NumberLiteral = new NumberLiteral(global.generatedEs2panda._CreateNumberLiteral(global.context, value), Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL) + result.setChildrenParentPtr() + return result + } + static updateNumberLiteral(original: AstNode | undefined, value: number): AstNode { + const result: NumberLiteral = new NumberLiteral(global.generatedEs2panda._UpdateNumberLiteral(global.context, passNode(original), value), Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL) + result.setChildrenParentPtr() + return result + } + static update1NumberLiteral(original: AstNode | undefined, value: number): AstNode { + const result: NumberLiteral = new NumberLiteral(global.generatedEs2panda._UpdateNumberLiteral1(global.context, passNode(original), value), Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL) + result.setChildrenParentPtr() + return result + } + static update2NumberLiteral(original: AstNode | undefined, value: number): AstNode { + const result: NumberLiteral = new NumberLiteral(global.generatedEs2panda._UpdateNumberLiteral2(global.context, passNode(original), value), Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL) + result.setChildrenParentPtr() + return result + } + static update3NumberLiteral(original: AstNode | undefined, value: number): AstNode { + const result: NumberLiteral = new NumberLiteral(global.generatedEs2panda._UpdateNumberLiteral3(global.context, passNode(original), value), Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL) + result.setChildrenParentPtr() + return result + } + get str(): string { + return unpackString(global.generatedEs2panda._NumberLiteralStrConst(global.context, this.peer)) + } + value = extension_NumberLiteralValue + protected readonly brandNumberLiteral: undefined +} +export function isNumberLiteral(node: object | undefined): node is NumberLiteral { + return node instanceof NumberLiteral +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL, (peer: KNativePointer) => new NumberLiteral(peer, Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ObjectDescriptor.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ObjectDescriptor.ts new file mode 100644 index 0000000000000000000000000000000000000000..f5425a8be6e525ad345a835ec2ef3df5513e486f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ObjectDescriptor.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class ObjectDescriptor extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandObjectDescriptor: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ObjectExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ObjectExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..ab02e2cb2f953a4ec0cc3f0261e41203a976b853 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ObjectExpression.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotatedExpression } from "./AnnotatedExpression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" +import { ValidationInfo } from "./ValidationInfo" + +export class ObjectExpression extends AnnotatedExpression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createObjectExpression(nodeType: Es2pandaAstNodeType, properties: readonly Expression[], trailingComma: boolean): ObjectExpression { + const result: ObjectExpression = new ObjectExpression(global.generatedEs2panda._CreateObjectExpression(global.context, nodeType, passNodeArray(properties), properties.length, trailingComma), Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateObjectExpression(original: ObjectExpression | undefined, nodeType: Es2pandaAstNodeType, properties: readonly Expression[], trailingComma: boolean): ObjectExpression { + const result: ObjectExpression = new ObjectExpression(global.generatedEs2panda._UpdateObjectExpression(global.context, passNode(original), nodeType, passNodeArray(properties), properties.length, trailingComma), Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get properties(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._ObjectExpressionPropertiesConst(global.context, this.peer)) + } + get isDeclaration(): boolean { + return global.generatedEs2panda._ObjectExpressionIsDeclarationConst(global.context, this.peer) + } + get isOptional(): boolean { + return global.generatedEs2panda._ObjectExpressionIsOptionalConst(global.context, this.peer) + } + get validateExpression(): ValidationInfo | undefined { + return new ValidationInfo(global.generatedEs2panda._ObjectExpressionValidateExpression(global.context, this.peer)) + } + get convertibleToObjectPattern(): boolean { + return global.generatedEs2panda._ObjectExpressionConvertibleToObjectPattern(global.context, this.peer) + } + /** @deprecated */ + setDeclaration(): this { + global.generatedEs2panda._ObjectExpressionSetDeclaration(global.context, this.peer) + return this + } + /** @deprecated */ + setOptional(optional_arg: boolean): this { + global.generatedEs2panda._ObjectExpressionSetOptional(global.context, this.peer, optional_arg) + return this + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ObjectExpressionTypeAnnotationConst(global.context, this.peer)) + } + /** @deprecated */ + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { + global.generatedEs2panda._ObjectExpressionSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) + return this + } + protected readonly brandObjectExpression: undefined +} +export function isObjectExpression(node: object | undefined): node is ObjectExpression { + return node instanceof ObjectExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION, (peer: KNativePointer) => new ObjectExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_OBJECT_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/OmittedExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/OmittedExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..efa2bdee981d312edf623587e0e2a4ef968558cb --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/OmittedExpression.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class OmittedExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createOmittedExpression(): OmittedExpression { + const result: OmittedExpression = new OmittedExpression(global.generatedEs2panda._CreateOmittedExpression(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_OMITTED_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateOmittedExpression(original?: OmittedExpression): OmittedExpression { + const result: OmittedExpression = new OmittedExpression(global.generatedEs2panda._UpdateOmittedExpression(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_OMITTED_EXPRESSION) + result.setChildrenParentPtr() + return result + } + protected readonly brandOmittedExpression: undefined +} +export function isOmittedExpression(node: object | undefined): node is OmittedExpression { + return node instanceof OmittedExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_OMITTED_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OMITTED_EXPRESSION, (peer: KNativePointer) => new OmittedExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_OMITTED_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/OpaqueTypeNode.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/OpaqueTypeNode.ts new file mode 100644 index 0000000000000000000000000000000000000000..cb697f7ca4fe19ad75400d68bb9702c51ac49e1c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/OpaqueTypeNode.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class OpaqueTypeNode extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1OpaqueTypeNode(): OpaqueTypeNode { + const result: OpaqueTypeNode = new OpaqueTypeNode(global.generatedEs2panda._CreateOpaqueTypeNode1(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE) + result.setChildrenParentPtr() + return result + } + static update1OpaqueTypeNode(original?: OpaqueTypeNode): OpaqueTypeNode { + const result: OpaqueTypeNode = new OpaqueTypeNode(global.generatedEs2panda._UpdateOpaqueTypeNode1(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE) + result.setChildrenParentPtr() + return result + } + protected readonly brandOpaqueTypeNode: undefined +} +export function isOpaqueTypeNode(node: object | undefined): node is OpaqueTypeNode { + return node instanceof OpaqueTypeNode +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE, (peer: KNativePointer) => new OpaqueTypeNode(peer, Es2pandaAstNodeType.AST_NODE_TYPE_OPAQUE_TYPE_NODE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/OverloadDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/OverloadDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..618c71a764c02c85c119466e468b9a1a438212eb --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/OverloadDeclaration.ts @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { ClassElement } from "./ClassElement" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { Es2pandaOverloadDeclFlags } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { SrcDumper } from "./SrcDumper" + +export class OverloadDeclaration extends ClassElement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createOverloadDeclaration(key: Expression | undefined, modifiers: Es2pandaModifierFlags): OverloadDeclaration { + const result: OverloadDeclaration = new OverloadDeclaration(global.generatedEs2panda._CreateOverloadDeclaration(global.context, passNode(key), modifiers), Es2pandaAstNodeType.AST_NODE_TYPE_OVERLOAD_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateOverloadDeclaration(original: OverloadDeclaration | undefined, key: Expression | undefined, modifiers: Es2pandaModifierFlags): OverloadDeclaration { + const result: OverloadDeclaration = new OverloadDeclaration(global.generatedEs2panda._UpdateOverloadDeclaration(global.context, passNode(original), passNode(key), modifiers), Es2pandaAstNodeType.AST_NODE_TYPE_OVERLOAD_DECLARATION) + result.setChildrenParentPtr() + return result + } + get flag(): Es2pandaOverloadDeclFlags { + return global.generatedEs2panda._OverloadDeclarationFlagConst(global.context, this.peer) + } + get overloadedList(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._OverloadDeclarationOverloadedList(global.context, this.peer)) + } + /** @deprecated */ + setOverloadedList(overloadedList: readonly Expression[]): this { + global.generatedEs2panda._OverloadDeclarationSetOverloadedList(global.context, this.peer, passNodeArray(overloadedList), overloadedList.length) + return this + } + /** @deprecated */ + pushFront(overloadedExpression?: Identifier): this { + global.generatedEs2panda._OverloadDeclarationPushFront(global.context, this.peer, passNode(overloadedExpression)) + return this + } + /** @deprecated */ + addOverloadDeclFlag(overloadFlag: Es2pandaOverloadDeclFlags): this { + global.generatedEs2panda._OverloadDeclarationAddOverloadDeclFlag(global.context, this.peer, overloadFlag) + return this + } + get isConstructorOverloadDeclaration(): boolean { + return global.generatedEs2panda._OverloadDeclarationIsConstructorOverloadDeclaration(global.context, this.peer) + } + get isFunctionOverloadDeclaration(): boolean { + return global.generatedEs2panda._OverloadDeclarationIsFunctionOverloadDeclaration(global.context, this.peer) + } + get isClassMethodOverloadDeclaration(): boolean { + return global.generatedEs2panda._OverloadDeclarationIsClassMethodOverloadDeclaration(global.context, this.peer) + } + get isInterfaceMethodOverloadDeclaration(): boolean { + return global.generatedEs2panda._OverloadDeclarationIsInterfaceMethodOverloadDeclaration(global.context, this.peer) + } + /** @deprecated */ + dumpModifier(dumper?: SrcDumper): this { + global.generatedEs2panda._OverloadDeclarationDumpModifierConst(global.context, this.peer, passNode(dumper)) + return this + } + protected readonly brandOverloadDeclaration: undefined +} +export function isOverloadDeclaration(node: object | undefined): node is OverloadDeclaration { + return node instanceof OverloadDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_OVERLOAD_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_OVERLOAD_DECLARATION, (peer: KNativePointer) => new OverloadDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_OVERLOAD_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/PrefixAssertionExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/PrefixAssertionExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..f693038b33a5b8e77e761a470104778aa1acc467 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/PrefixAssertionExpression.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class PrefixAssertionExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createPrefixAssertionExpression(expr?: Expression, type?: TypeNode): PrefixAssertionExpression { + const result: PrefixAssertionExpression = new PrefixAssertionExpression(global.generatedEs2panda._CreatePrefixAssertionExpression(global.context, passNode(expr), passNode(type)), Es2pandaAstNodeType.AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updatePrefixAssertionExpression(original?: PrefixAssertionExpression, expr?: Expression, type?: TypeNode): PrefixAssertionExpression { + const result: PrefixAssertionExpression = new PrefixAssertionExpression(global.generatedEs2panda._UpdatePrefixAssertionExpression(global.context, passNode(original), passNode(expr), passNode(type)), Es2pandaAstNodeType.AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get expr(): Expression | undefined { + return unpackNode(global.generatedEs2panda._PrefixAssertionExpressionExprConst(global.context, this.peer)) + } + get type(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._PrefixAssertionExpressionTypeConst(global.context, this.peer)) + } + protected readonly brandPrefixAssertionExpression: undefined +} +export function isPrefixAssertionExpression(node: object | undefined): node is PrefixAssertionExpression { + return node instanceof PrefixAssertionExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION, (peer: KNativePointer) => new PrefixAssertionExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_PREFIX_ASSERTION_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/Program.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/Program.ts new file mode 100644 index 0000000000000000000000000000000000000000..a1d31feb5e84534965961ea87585d80561b71bb7 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/Program.ts @@ -0,0 +1,204 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { BlockStatement } from "./BlockStatement" +import { ClassDefinition } from "./ClassDefinition" +import { Es2pandaModuleKind } from "./../Es2pandaEnums" +import { Es2pandaProgramFlags } from "./../Es2pandaEnums" +import { Es2pandaScriptKind } from "./../Es2pandaEnums" +import { SourcePosition } from "./SourcePosition" +import { extension_ProgramGetExternalSources } from "./../../reexport-for-generated" + +export class Program extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + /** @deprecated */ + setKind(kind: Es2pandaScriptKind): this { + global.generatedEs2panda._ProgramSetKind(global.context, this.peer, kind) + return this + } + /** @deprecated */ + pushVarBinder(): this { + global.generatedEs2panda._ProgramPushVarBinder(global.context, this.peer) + return this + } + /** @deprecated */ + pushChecker(): this { + global.generatedEs2panda._ProgramPushChecker(global.context, this.peer) + return this + } + get kind(): Es2pandaScriptKind { + return global.generatedEs2panda._ProgramKindConst(global.context, this.peer) + } + get sourceCode(): string { + return unpackString(global.generatedEs2panda._ProgramSourceCodeConst(global.context, this.peer)) + } + get sourceFilePath(): string { + return unpackString(global.generatedEs2panda._ProgramSourceFilePathConst(global.context, this.peer)) + } + get sourceFileFolder(): string { + return unpackString(global.generatedEs2panda._ProgramSourceFileFolderConst(global.context, this.peer)) + } + get fileName(): string { + return unpackString(global.generatedEs2panda._ProgramFileNameConst(global.context, this.peer)) + } + get fileNameWithExtension(): string { + return unpackString(global.generatedEs2panda._ProgramFileNameWithExtensionConst(global.context, this.peer)) + } + get absoluteName(): string { + return unpackString(global.generatedEs2panda._ProgramAbsoluteNameConst(global.context, this.peer)) + } + get resolvedFilePath(): string { + return unpackString(global.generatedEs2panda._ProgramResolvedFilePathConst(global.context, this.peer)) + } + get relativeFilePath(): string { + return unpackString(global.generatedEs2panda._ProgramRelativeFilePathConst(global.context, this.peer)) + } + /** @deprecated */ + setRelativeFilePath(relPath: string): this { + global.generatedEs2panda._ProgramSetRelativeFilePath(global.context, this.peer, relPath) + return this + } + get ast(): BlockStatement { + return unpackNonNullableNode(global.generatedEs2panda._ProgramAst(global.context, this.peer)) + } + /** @deprecated */ + setAst(ast?: BlockStatement): this { + global.generatedEs2panda._ProgramSetAst(global.context, this.peer, passNode(ast)) + return this + } + get globalClass(): ClassDefinition | undefined { + return unpackNode(global.generatedEs2panda._ProgramGlobalClass(global.context, this.peer)) + } + /** @deprecated */ + setGlobalClass(globalClass?: ClassDefinition): this { + global.generatedEs2panda._ProgramSetGlobalClass(global.context, this.peer, passNode(globalClass)) + return this + } + get packageStart(): SourcePosition | undefined { + return new SourcePosition(global.generatedEs2panda._ProgramPackageStartConst(global.context, this.peer)) + } + /** @deprecated */ + setPackageStart(start?: SourcePosition): this { + global.generatedEs2panda._ProgramSetPackageStart(global.context, this.peer, passNode(start)) + return this + } + /** @deprecated */ + setSource(sourceCode: string, sourceFilePath: string, sourceFileFolder: string): this { + global.generatedEs2panda._ProgramSetSource(global.context, this.peer, sourceCode, sourceFilePath, sourceFileFolder) + return this + } + /** @deprecated */ + setPackageInfo(name: string, kind: Es2pandaModuleKind): this { + global.generatedEs2panda._ProgramSetPackageInfo(global.context, this.peer, name, kind) + return this + } + get moduleName(): string { + return unpackString(global.generatedEs2panda._ProgramModuleNameConst(global.context, this.peer)) + } + get modulePrefix(): string { + return unpackString(global.generatedEs2panda._ProgramModulePrefixConst(global.context, this.peer)) + } + get isSeparateModule(): boolean { + return global.generatedEs2panda._ProgramIsSeparateModuleConst(global.context, this.peer) + } + get isDeclarationModule(): boolean { + return global.generatedEs2panda._ProgramIsDeclarationModuleConst(global.context, this.peer) + } + get isPackage(): boolean { + return global.generatedEs2panda._ProgramIsPackageConst(global.context, this.peer) + } + get isDeclForDynamicStaticInterop(): boolean { + return global.generatedEs2panda._ProgramIsDeclForDynamicStaticInteropConst(global.context, this.peer) + } + /** @deprecated */ + setFlag(flag: Es2pandaProgramFlags): this { + global.generatedEs2panda._ProgramSetFlag(global.context, this.peer, flag) + return this + } + /** @deprecated */ + setASTChecked(): this { + global.generatedEs2panda._ProgramSetASTChecked(global.context, this.peer) + return this + } + /** @deprecated */ + removeAstChecked(): this { + global.generatedEs2panda._ProgramRemoveAstChecked(global.context, this.peer) + return this + } + get isASTChecked(): boolean { + return global.generatedEs2panda._ProgramIsASTChecked(global.context, this.peer) + } + /** @deprecated */ + markASTAsLowered(): this { + global.generatedEs2panda._ProgramMarkASTAsLowered(global.context, this.peer) + return this + } + get isASTLowered(): boolean { + return global.generatedEs2panda._ProgramIsASTLoweredConst(global.context, this.peer) + } + get isStdLib(): boolean { + return global.generatedEs2panda._ProgramIsStdLibConst(global.context, this.peer) + } + get isGenAbcForExternal(): boolean { + return global.generatedEs2panda._ProgramIsGenAbcForExternalConst(global.context, this.peer) + } + /** @deprecated */ + setGenAbcForExternalSources(genAbc: boolean): this { + global.generatedEs2panda._ProgramSetGenAbcForExternalSources(global.context, this.peer, genAbc) + return this + } + get dump(): string { + return unpackString(global.generatedEs2panda._ProgramDumpConst(global.context, this.peer)) + } + /** @deprecated */ + dumpSilent(): this { + global.generatedEs2panda._ProgramDumpSilentConst(global.context, this.peer) + return this + } + get isDied(): boolean { + return global.generatedEs2panda._ProgramIsDiedConst(global.context, this.peer) + } + /** @deprecated */ + addFileDependencies(file: string, depFile: string): this { + global.generatedEs2panda._ProgramAddFileDependencies(global.context, this.peer, file, depFile) + return this + } + getExternalSources = extension_ProgramGetExternalSources + protected readonly brandProgram: undefined +} +export function isProgram(node: object | undefined): node is Program { + return node instanceof Program +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/Property.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/Property.ts new file mode 100644 index 0000000000000000000000000000000000000000..f8e62621e6cc153855092f29fa4647cc29336026 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/Property.ts @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaPropertyKind } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { ValidationInfo } from "./ValidationInfo" + +export class Property extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1Property(kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property { + const result: Property = new Property(global.generatedEs2panda._CreateProperty1(global.context, kind, passNode(key), passNode(value), isMethod, isComputed), Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY) + result.setChildrenParentPtr() + return result + } + static updateProperty(original?: Property, key?: Expression, value?: Expression): Property { + const result: Property = new Property(global.generatedEs2panda._UpdateProperty(global.context, passNode(original), passNode(key), passNode(value)), Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY) + result.setChildrenParentPtr() + return result + } + static update1Property(original: Property | undefined, kind: Es2pandaPropertyKind, key: Expression | undefined, value: Expression | undefined, isMethod: boolean, isComputed: boolean): Property { + const result: Property = new Property(global.generatedEs2panda._UpdateProperty1(global.context, passNode(original), kind, passNode(key), passNode(value), isMethod, isComputed), Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY) + result.setChildrenParentPtr() + return result + } + get key(): Expression | undefined { + return unpackNode(global.generatedEs2panda._PropertyKey(global.context, this.peer)) + } + get value(): Expression | undefined { + return unpackNode(global.generatedEs2panda._PropertyValue(global.context, this.peer)) + } + get kind(): Es2pandaPropertyKind { + return global.generatedEs2panda._PropertyKindConst(global.context, this.peer) + } + get isMethod(): boolean { + return global.generatedEs2panda._PropertyIsMethodConst(global.context, this.peer) + } + get isShorthand(): boolean { + return global.generatedEs2panda._PropertyIsShorthandConst(global.context, this.peer) + } + get isComputed(): boolean { + return global.generatedEs2panda._PropertyIsComputedConst(global.context, this.peer) + } + get isAccessor(): boolean { + return global.generatedEs2panda._PropertyIsAccessorConst(global.context, this.peer) + } + get convertibleToPatternProperty(): boolean { + return global.generatedEs2panda._PropertyConvertibleToPatternProperty(global.context, this.peer) + } + get validateExpression(): ValidationInfo | undefined { + return new ValidationInfo(global.generatedEs2panda._PropertyValidateExpression(global.context, this.peer)) + } + protected readonly brandProperty: undefined +} +export function isProperty(node: object | undefined): node is Property { + return node instanceof Property +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY, (peer: KNativePointer) => new Property(peer, Es2pandaAstNodeType.AST_NODE_TYPE_PROPERTY)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/RegExpLiteral.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/RegExpLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..56edc663f50c00c7fb642895a246dd7b36405545 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/RegExpLiteral.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaRegExpFlags } from "./../Es2pandaEnums" +import { Literal } from "./Literal" + +export class RegExpLiteral extends Literal { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createRegExpLiteral(pattern: string, flags: Es2pandaRegExpFlags, flagsStr: string): RegExpLiteral { + const result: RegExpLiteral = new RegExpLiteral(global.generatedEs2panda._CreateRegExpLiteral(global.context, pattern, flags, flagsStr), Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL) + result.setChildrenParentPtr() + return result + } + static updateRegExpLiteral(original: RegExpLiteral | undefined, pattern: string, flags: Es2pandaRegExpFlags, flagsStr: string): RegExpLiteral { + const result: RegExpLiteral = new RegExpLiteral(global.generatedEs2panda._UpdateRegExpLiteral(global.context, passNode(original), pattern, flags, flagsStr), Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL) + result.setChildrenParentPtr() + return result + } + get pattern(): string { + return unpackString(global.generatedEs2panda._RegExpLiteralPatternConst(global.context, this.peer)) + } + get flags(): Es2pandaRegExpFlags { + return global.generatedEs2panda._RegExpLiteralFlagsConst(global.context, this.peer) + } + protected readonly brandRegExpLiteral: undefined +} +export function isRegExpLiteral(node: object | undefined): node is RegExpLiteral { + return node instanceof RegExpLiteral +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL, (peer: KNativePointer) => new RegExpLiteral(peer, Es2pandaAstNodeType.AST_NODE_TYPE_REGEXP_LITERAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ReturnStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ReturnStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..ec8168bb4c4e77ef17a6050e6564e0fabc1552ca --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ReturnStatement.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" + +export class ReturnStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1ReturnStatement(argument?: Expression): ReturnStatement { + const result: ReturnStatement = new ReturnStatement(global.generatedEs2panda._CreateReturnStatement1(global.context, passNode(argument)), Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateReturnStatement(original?: ReturnStatement): ReturnStatement { + const result: ReturnStatement = new ReturnStatement(global.generatedEs2panda._UpdateReturnStatement(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT) + result.setChildrenParentPtr() + return result + } + static update1ReturnStatement(original?: ReturnStatement, argument?: Expression): ReturnStatement { + const result: ReturnStatement = new ReturnStatement(global.generatedEs2panda._UpdateReturnStatement1(global.context, passNode(original), passNode(argument)), Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT) + result.setChildrenParentPtr() + return result + } + get argument(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ReturnStatementArgument(global.context, this.peer)) + } + /** @deprecated */ + setArgument(arg?: Expression): this { + global.generatedEs2panda._ReturnStatementSetArgument(global.context, this.peer, passNode(arg)) + return this + } + get isAsyncImplReturn(): boolean { + return global.generatedEs2panda._ReturnStatementIsAsyncImplReturnConst(global.context, this.peer) + } + protected readonly brandReturnStatement: undefined +} +export function isReturnStatement(node: object | undefined): node is ReturnStatement { + return node instanceof ReturnStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT, (peer: KNativePointer) => new ReturnStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ScopeFindResult.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ScopeFindResult.ts new file mode 100644 index 0000000000000000000000000000000000000000..86792937aaeceb1e5d3c4078f20f71126c88e288 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ScopeFindResult.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class ScopeFindResult extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandScopeFindResult: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ScriptFunction.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ScriptFunction.ts new file mode 100644 index 0000000000000000000000000000000000000000..f0f861376cb5817c5dcfb2d666bbd8c88d1f6cef --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ScriptFunction.ts @@ -0,0 +1,309 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaScriptFunctionFlags } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { FunctionSignature } from "./FunctionSignature" +import { Identifier } from "./Identifier" +import { ReturnStatement } from "./ReturnStatement" +import { SrcDumper } from "./SrcDumper" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TypeNode } from "./TypeNode" +import { extension_ScriptFunctionGetPreferredReturnTypePointer } from "./../../reexport-for-generated" +import { extension_ScriptFunctionGetSignaturePointer } from "./../../reexport-for-generated" +import { extension_ScriptFunctionSetPreferredReturnTypePointer } from "./../../reexport-for-generated" +import { extension_ScriptFunctionSetSignaturePointer } from "./../../reexport-for-generated" + +export class ScriptFunction extends AstNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createScriptFunction(databody: AstNode | undefined, datasignature: FunctionSignature | undefined, datafuncFlags: number, dataflags: number, ident?: Identifier, annotations?: readonly AnnotationUsage[]): ScriptFunction { + const result: ScriptFunction = new ScriptFunction(global.generatedEs2panda._CreateScriptFunction(global.context, passNode(databody), passNode(datasignature), datafuncFlags, dataflags), Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION) + if (ident) + { + result.setIdent(ident) + } + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static updateScriptFunction(original: ScriptFunction | undefined, databody: AstNode | undefined, datasignature: FunctionSignature | undefined, datafuncFlags: number, dataflags: number, ident?: Identifier, annotations?: readonly AnnotationUsage[]): ScriptFunction { + const result: ScriptFunction = new ScriptFunction(global.generatedEs2panda._UpdateScriptFunction(global.context, passNode(original), passNode(databody), passNode(datasignature), datafuncFlags, dataflags), Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION) + if (ident) + { + result.setIdent(ident) + } + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + get id(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._ScriptFunctionId(global.context, this.peer)) + } + get params(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionParams(global.context, this.peer)) + } + get returnStatements(): readonly ReturnStatement[] { + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionReturnStatements(global.context, this.peer)) + } + get returnStatementsForUpdate(): readonly ReturnStatement[] { + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionReturnStatementsForUpdate(global.context, this.peer)) + } + get typeParams(): TSTypeParameterDeclaration | undefined { + return unpackNode(global.generatedEs2panda._ScriptFunctionTypeParams(global.context, this.peer)) + } + get body(): AstNode | undefined { + return unpackNode(global.generatedEs2panda._ScriptFunctionBody(global.context, this.peer)) + } + /** @deprecated */ + addReturnStatement(returnStatement?: ReturnStatement): this { + global.generatedEs2panda._ScriptFunctionAddReturnStatement(global.context, this.peer, passNode(returnStatement)) + return this + } + /** @deprecated */ + setBody(body?: AstNode): this { + global.generatedEs2panda._ScriptFunctionSetBody(global.context, this.peer, passNode(body)) + return this + } + get returnTypeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._ScriptFunctionReturnTypeAnnotation(global.context, this.peer)) + } + /** @deprecated */ + setReturnTypeAnnotation(node?: TypeNode): this { + global.generatedEs2panda._ScriptFunctionSetReturnTypeAnnotation(global.context, this.peer, passNode(node)) + return this + } + get isEntryPoint(): boolean { + return global.generatedEs2panda._ScriptFunctionIsEntryPointConst(global.context, this.peer) + } + get isGenerator(): boolean { + return global.generatedEs2panda._ScriptFunctionIsGeneratorConst(global.context, this.peer) + } + get isAsyncFunc(): boolean { + return global.generatedEs2panda._ScriptFunctionIsAsyncFuncConst(global.context, this.peer) + } + get isAsyncImplFunc(): boolean { + return global.generatedEs2panda._ScriptFunctionIsAsyncImplFuncConst(global.context, this.peer) + } + get isArrow(): boolean { + return global.generatedEs2panda._ScriptFunctionIsArrowConst(global.context, this.peer) + } + get isOverload(): boolean { + return global.generatedEs2panda._ScriptFunctionIsOverloadConst(global.context, this.peer) + } + get isExternalOverload(): boolean { + return global.generatedEs2panda._ScriptFunctionIsExternalOverloadConst(global.context, this.peer) + } + get isConstructor(): boolean { + return global.generatedEs2panda._ScriptFunctionIsConstructorConst(global.context, this.peer) + } + get isGetter(): boolean { + return global.generatedEs2panda._ScriptFunctionIsGetterConst(global.context, this.peer) + } + get isSetter(): boolean { + return global.generatedEs2panda._ScriptFunctionIsSetterConst(global.context, this.peer) + } + get isExtensionAccessor(): boolean { + return global.generatedEs2panda._ScriptFunctionIsExtensionAccessorConst(global.context, this.peer) + } + get isMethod(): boolean { + return global.generatedEs2panda._ScriptFunctionIsMethodConst(global.context, this.peer) + } + get isProxy(): boolean { + return global.generatedEs2panda._ScriptFunctionIsProxyConst(global.context, this.peer) + } + get isStaticBlock(): boolean { + return global.generatedEs2panda._ScriptFunctionIsStaticBlockConst(global.context, this.peer) + } + get isEnum(): boolean { + return global.generatedEs2panda._ScriptFunctionIsEnumConst(global.context, this.peer) + } + get isHidden(): boolean { + return global.generatedEs2panda._ScriptFunctionIsHiddenConst(global.context, this.peer) + } + get isExternal(): boolean { + return global.generatedEs2panda._ScriptFunctionIsExternalConst(global.context, this.peer) + } + get isImplicitSuperCallNeeded(): boolean { + return global.generatedEs2panda._ScriptFunctionIsImplicitSuperCallNeededConst(global.context, this.peer) + } + get hasBody(): boolean { + return global.generatedEs2panda._ScriptFunctionHasBodyConst(global.context, this.peer) + } + get hasRestParameter(): boolean { + return global.generatedEs2panda._ScriptFunctionHasRestParameterConst(global.context, this.peer) + } + get hasReturnStatement(): boolean { + return global.generatedEs2panda._ScriptFunctionHasReturnStatementConst(global.context, this.peer) + } + get hasThrowStatement(): boolean { + return global.generatedEs2panda._ScriptFunctionHasThrowStatementConst(global.context, this.peer) + } + get isTrailingLambda(): boolean { + return global.generatedEs2panda._ScriptFunctionIsTrailingLambdaConst(global.context, this.peer) + } + get isSynthetic(): boolean { + return global.generatedEs2panda._ScriptFunctionIsSyntheticConst(global.context, this.peer) + } + get isDynamic(): boolean { + return global.generatedEs2panda._ScriptFunctionIsDynamicConst(global.context, this.peer) + } + get isExtensionMethod(): boolean { + return global.generatedEs2panda._ScriptFunctionIsExtensionMethodConst(global.context, this.peer) + } + get flags(): Es2pandaScriptFunctionFlags { + return global.generatedEs2panda._ScriptFunctionFlagsConst(global.context, this.peer) + } + get hasReceiver(): boolean { + return global.generatedEs2panda._ScriptFunctionHasReceiverConst(global.context, this.peer) + } + /** @deprecated */ + setIdent(id: Identifier): this { + global.generatedEs2panda._ScriptFunctionSetIdent(global.context, this.peer, passNode(id)) + return this + } + /** @deprecated */ + addFlag(flags: Es2pandaScriptFunctionFlags): this { + global.generatedEs2panda._ScriptFunctionAddFlag(global.context, this.peer, flags) + return this + } + /** @deprecated */ + clearFlag(flags: Es2pandaScriptFunctionFlags): this { + global.generatedEs2panda._ScriptFunctionClearFlag(global.context, this.peer, flags) + return this + } + get formalParamsLength(): number { + return global.generatedEs2panda._ScriptFunctionFormalParamsLengthConst(global.context, this.peer) + } + /** @deprecated */ + setAsyncPairMethod(asyncPairFunction?: ScriptFunction): this { + global.generatedEs2panda._ScriptFunctionSetAsyncPairMethod(global.context, this.peer, passNode(asyncPairFunction)) + return this + } + get asyncPairMethod(): ScriptFunction | undefined { + return unpackNode(global.generatedEs2panda._ScriptFunctionAsyncPairMethod(global.context, this.peer)) + } + /** @deprecated */ + emplaceReturnStatements(returnStatements?: ReturnStatement): this { + global.generatedEs2panda._ScriptFunctionEmplaceReturnStatements(global.context, this.peer, passNode(returnStatements)) + return this + } + /** @deprecated */ + clearReturnStatements(): this { + global.generatedEs2panda._ScriptFunctionClearReturnStatements(global.context, this.peer) + return this + } + /** @deprecated */ + setValueReturnStatements(returnStatements: ReturnStatement | undefined, index: number): this { + global.generatedEs2panda._ScriptFunctionSetValueReturnStatements(global.context, this.peer, passNode(returnStatements), index) + return this + } + /** @deprecated */ + emplaceParams(params?: Expression): this { + global.generatedEs2panda._ScriptFunctionEmplaceParams(global.context, this.peer, passNode(params)) + return this + } + /** @deprecated */ + setParams(paramsList: readonly Expression[]): this { + global.generatedEs2panda._ScriptFunctionSetParams(global.context, this.peer, passNodeArray(paramsList), paramsList.length) + return this + } + /** @deprecated */ + clearParams(): this { + global.generatedEs2panda._ScriptFunctionClearParams(global.context, this.peer) + return this + } + /** @deprecated */ + setValueParams(params: Expression | undefined, index: number): this { + global.generatedEs2panda._ScriptFunctionSetValueParams(global.context, this.peer, passNode(params), index) + return this + } + get paramsForUpdate(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionParamsForUpdate(global.context, this.peer)) + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._ScriptFunctionHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._ScriptFunctionEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._ScriptFunctionClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._ScriptFunctionDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._ScriptFunctionAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ScriptFunctionSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._ScriptFunctionSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + getSignaturePointer = extension_ScriptFunctionGetSignaturePointer + setSignaturePointer = extension_ScriptFunctionSetSignaturePointer + getPreferredReturnTypePointer = extension_ScriptFunctionGetPreferredReturnTypePointer + setPreferredReturnTypePointer = extension_ScriptFunctionSetPreferredReturnTypePointer + protected readonly brandScriptFunction: undefined +} +export function isScriptFunction(node: object | undefined): node is ScriptFunction { + return node instanceof ScriptFunction +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION, (peer: KNativePointer) => new ScriptFunction(peer, Es2pandaAstNodeType.AST_NODE_TYPE_SCRIPT_FUNCTION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ScriptFunctionData.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ScriptFunctionData.ts new file mode 100644 index 0000000000000000000000000000000000000000..4745973aa5971073a04413ed554c1aa5ec14091e --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ScriptFunctionData.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class ScriptFunctionData extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandScriptFunctionData: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/SequenceExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/SequenceExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..68ee4fbdacfdf6b4fb3d07bc6fa88e325138ea42 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/SequenceExpression.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class SequenceExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createSequenceExpression(sequence_arg: readonly Expression[]): SequenceExpression { + const result: SequenceExpression = new SequenceExpression(global.generatedEs2panda._CreateSequenceExpression(global.context, passNodeArray(sequence_arg), sequence_arg.length), Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateSequenceExpression(original: SequenceExpression | undefined, sequence_arg: readonly Expression[]): SequenceExpression { + const result: SequenceExpression = new SequenceExpression(global.generatedEs2panda._UpdateSequenceExpression(global.context, passNode(original), passNodeArray(sequence_arg), sequence_arg.length), Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get sequence(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._SequenceExpressionSequence(global.context, this.peer)) + } + protected readonly brandSequenceExpression: undefined +} +export function isSequenceExpression(node: object | undefined): node is SequenceExpression { + return node instanceof SequenceExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION, (peer: KNativePointer) => new SequenceExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_SEQUENCE_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/SignatureInfo.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/SignatureInfo.ts new file mode 100644 index 0000000000000000000000000000000000000000..7ea77fdceecc29a0869a57622fb9034d7c9f4ee9 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/SignatureInfo.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class SignatureInfo extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandSignatureInfo: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/SourcePosition.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/SourcePosition.ts new file mode 100644 index 0000000000000000000000000000000000000000..8309bce5b4041d275d80ecab1d67ddc3f7fcd16b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/SourcePosition.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { extension_SourcePositionGetCol } from "./../../reexport-for-generated" +import { extension_SourcePositionGetLine } from "./../../reexport-for-generated" +import { extension_SourcePositionToString } from "./../../reexport-for-generated" + +export class SourcePosition extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + getLine = extension_SourcePositionGetLine + getCol = extension_SourcePositionGetCol + toString = extension_SourcePositionToString + protected readonly brandSourcePosition: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/SourceRange.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/SourceRange.ts new file mode 100644 index 0000000000000000000000000000000000000000..1b388713bd90ee9904670f938ad48e00ad71cab9 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/SourceRange.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class SourceRange extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandSourceRange: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/SpreadElement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/SpreadElement.ts new file mode 100644 index 0000000000000000000000000000000000000000..d853a91cc344042847f7b4392e81b666af65ddea --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/SpreadElement.ts @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotatedExpression } from "./AnnotatedExpression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" +import { ValidationInfo } from "./ValidationInfo" + +export class SpreadElement extends AnnotatedExpression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createSpreadElement(nodeType: Es2pandaAstNodeType, argument?: Expression): SpreadElement { + const result: SpreadElement = new SpreadElement(global.generatedEs2panda._CreateSpreadElement(global.context, nodeType, passNode(argument)), Es2pandaAstNodeType.AST_NODE_TYPE_SPREAD_ELEMENT) + result.setChildrenParentPtr() + return result + } + static updateSpreadElement(original: SpreadElement | undefined, nodeType: Es2pandaAstNodeType, argument?: Expression): SpreadElement { + const result: SpreadElement = new SpreadElement(global.generatedEs2panda._UpdateSpreadElement(global.context, passNode(original), nodeType, passNode(argument)), Es2pandaAstNodeType.AST_NODE_TYPE_SPREAD_ELEMENT) + result.setChildrenParentPtr() + return result + } + get argument(): Expression | undefined { + return unpackNode(global.generatedEs2panda._SpreadElementArgument(global.context, this.peer)) + } + get isOptional(): boolean { + return global.generatedEs2panda._SpreadElementIsOptionalConst(global.context, this.peer) + } + /** @deprecated */ + setOptional(optional_arg: boolean): this { + global.generatedEs2panda._SpreadElementSetOptional(global.context, this.peer, optional_arg) + return this + } + get validateExpression(): ValidationInfo | undefined { + return new ValidationInfo(global.generatedEs2panda._SpreadElementValidateExpression(global.context, this.peer)) + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._SpreadElementTypeAnnotationConst(global.context, this.peer)) + } + /** @deprecated */ + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { + global.generatedEs2panda._SpreadElementSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) + return this + } + protected readonly brandSpreadElement: undefined +} +export function isSpreadElement(node: object | undefined): node is SpreadElement { + return node instanceof SpreadElement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SPREAD_ELEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SPREAD_ELEMENT, (peer: KNativePointer) => new SpreadElement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_SPREAD_ELEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/SrcDumper.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/SrcDumper.ts new file mode 100644 index 0000000000000000000000000000000000000000..4c750b7e9205a85587b1496d84867559124fd872 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/SrcDumper.ts @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class SrcDumper extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + static create1SrcDumper(node: AstNode | undefined, isDeclgen: boolean): SrcDumper { + return new SrcDumper(global.generatedEs2panda._CreateSrcDumper1(global.context, passNode(node), isDeclgen)) + } + /** @deprecated */ + add(str: string): this { + global.generatedEs2panda._SrcDumperAdd(global.context, this.peer, str) + return this + } + /** @deprecated */ + add1(i: number): this { + global.generatedEs2panda._SrcDumperAdd1(global.context, this.peer, i) + return this + } + /** @deprecated */ + add2(i: number): this { + global.generatedEs2panda._SrcDumperAdd2(global.context, this.peer, i) + return this + } + /** @deprecated */ + add3(i: number): this { + global.generatedEs2panda._SrcDumperAdd3(global.context, this.peer, i) + return this + } + /** @deprecated */ + add4(l: number): this { + global.generatedEs2panda._SrcDumperAdd4(global.context, this.peer, l) + return this + } + /** @deprecated */ + add5(f: number): this { + global.generatedEs2panda._SrcDumperAdd5(global.context, this.peer, f) + return this + } + /** @deprecated */ + add6(d: number): this { + global.generatedEs2panda._SrcDumperAdd6(global.context, this.peer, d) + return this + } + get str(): string { + return unpackString(global.generatedEs2panda._SrcDumperStrConst(global.context, this.peer)) + } + /** @deprecated */ + incrIndent(): this { + global.generatedEs2panda._SrcDumperIncrIndent(global.context, this.peer) + return this + } + /** @deprecated */ + decrIndent(): this { + global.generatedEs2panda._SrcDumperDecrIndent(global.context, this.peer) + return this + } + /** @deprecated */ + endl(num: number): this { + global.generatedEs2panda._SrcDumperEndl(global.context, this.peer, num) + return this + } + get isDeclgen(): boolean { + return global.generatedEs2panda._SrcDumperIsDeclgenConst(global.context, this.peer) + } + /** @deprecated */ + dumpNode(key: string): this { + global.generatedEs2panda._SrcDumperDumpNode(global.context, this.peer, key) + return this + } + /** @deprecated */ + removeNode(key: string): this { + global.generatedEs2panda._SrcDumperRemoveNode(global.context, this.peer, key) + return this + } + get isIndirectDepPhase(): boolean { + return global.generatedEs2panda._SrcDumperIsIndirectDepPhaseConst(global.context, this.peer) + } + /** @deprecated */ + run(): this { + global.generatedEs2panda._SrcDumperRun(global.context, this.peer) + return this + } + protected readonly brandSrcDumper: undefined +} +export function isSrcDumper(node: object | undefined): node is SrcDumper { + return node instanceof SrcDumper +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/Statement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/Statement.ts new file mode 100644 index 0000000000000000000000000000000000000000..1ebab571e91678788c20ec2ae550f73712a291ca --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/Statement.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" + +export class Statement extends AstNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + protected readonly brandStatement: undefined +} +export function isStatement(node: object | undefined): node is Statement { + return node instanceof Statement +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/StringLiteral.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/StringLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..0e6ba1802151353d05a9c8f7933aa9870adc3557 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/StringLiteral.ts @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Literal } from "./Literal" + +export class StringLiteral extends Literal { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1StringLiteral(str: string): StringLiteral { + const result: StringLiteral = new StringLiteral(global.generatedEs2panda._CreateStringLiteral1(global.context, str), Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL) + result.setChildrenParentPtr() + return result + } + static updateStringLiteral(original?: StringLiteral): StringLiteral { + const result: StringLiteral = new StringLiteral(global.generatedEs2panda._UpdateStringLiteral(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL) + result.setChildrenParentPtr() + return result + } + static update1StringLiteral(original: StringLiteral | undefined, str: string): StringLiteral { + const result: StringLiteral = new StringLiteral(global.generatedEs2panda._UpdateStringLiteral1(global.context, passNode(original), str), Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL) + result.setChildrenParentPtr() + return result + } + get str(): string { + return unpackString(global.generatedEs2panda._StringLiteralStrConst(global.context, this.peer)) + } + protected readonly brandStringLiteral: undefined +} +export function isStringLiteral(node: object | undefined): node is StringLiteral { + return node instanceof StringLiteral +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL, (peer: KNativePointer) => new StringLiteral(peer, Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/SuggestionInfo.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/SuggestionInfo.ts new file mode 100644 index 0000000000000000000000000000000000000000..a4d620bb51714c6f4ba87537bce829235aee1bf3 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/SuggestionInfo.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class SuggestionInfo extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandSuggestionInfo: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/SuperExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/SuperExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..490544812f02f0953ca143d9155cc89dec9491be --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/SuperExpression.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class SuperExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createSuperExpression(): SuperExpression { + const result: SuperExpression = new SuperExpression(global.generatedEs2panda._CreateSuperExpression(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateSuperExpression(original?: SuperExpression): SuperExpression { + const result: SuperExpression = new SuperExpression(global.generatedEs2panda._UpdateSuperExpression(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION) + result.setChildrenParentPtr() + return result + } + protected readonly brandSuperExpression: undefined +} +export function isSuperExpression(node: object | undefined): node is SuperExpression { + return node instanceof SuperExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION, (peer: KNativePointer) => new SuperExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/SwitchCaseStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/SwitchCaseStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..4e4efe0c3db6406b7ab6ca51643c81e20c193653 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/SwitchCaseStatement.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" + +export class SwitchCaseStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createSwitchCaseStatement(test: Expression | undefined, consequent: readonly Statement[]): SwitchCaseStatement { + const result: SwitchCaseStatement = new SwitchCaseStatement(global.generatedEs2panda._CreateSwitchCaseStatement(global.context, passNode(test), passNodeArray(consequent), consequent.length), Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateSwitchCaseStatement(original: SwitchCaseStatement | undefined, test: Expression | undefined, consequent: readonly Statement[]): SwitchCaseStatement { + const result: SwitchCaseStatement = new SwitchCaseStatement(global.generatedEs2panda._UpdateSwitchCaseStatement(global.context, passNode(original), passNode(test), passNodeArray(consequent), consequent.length), Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT) + result.setChildrenParentPtr() + return result + } + get test(): Expression | undefined { + return unpackNode(global.generatedEs2panda._SwitchCaseStatementTest(global.context, this.peer)) + } + /** @deprecated */ + setTest(test?: Expression): this { + global.generatedEs2panda._SwitchCaseStatementSetTest(global.context, this.peer, passNode(test)) + return this + } + get consequent(): readonly Statement[] { + return unpackNodeArray(global.generatedEs2panda._SwitchCaseStatementConsequentConst(global.context, this.peer)) + } + protected readonly brandSwitchCaseStatement: undefined +} +export function isSwitchCaseStatement(node: object | undefined): node is SwitchCaseStatement { + return node instanceof SwitchCaseStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT, (peer: KNativePointer) => new SwitchCaseStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_CASE_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/SwitchStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/SwitchStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..60e9e3567d5eb8805cd2f315102d520908bae334 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/SwitchStatement.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" +import { SwitchCaseStatement } from "./SwitchCaseStatement" + +export class SwitchStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createSwitchStatement(discriminant: Expression | undefined, cases: readonly SwitchCaseStatement[]): SwitchStatement { + const result: SwitchStatement = new SwitchStatement(global.generatedEs2panda._CreateSwitchStatement(global.context, passNode(discriminant), passNodeArray(cases), cases.length), Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateSwitchStatement(original: SwitchStatement | undefined, discriminant: Expression | undefined, cases: readonly SwitchCaseStatement[]): SwitchStatement { + const result: SwitchStatement = new SwitchStatement(global.generatedEs2panda._UpdateSwitchStatement(global.context, passNode(original), passNode(discriminant), passNodeArray(cases), cases.length), Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT) + result.setChildrenParentPtr() + return result + } + get discriminant(): Expression | undefined { + return unpackNode(global.generatedEs2panda._SwitchStatementDiscriminant(global.context, this.peer)) + } + /** @deprecated */ + setDiscriminant(discriminant?: Expression): this { + global.generatedEs2panda._SwitchStatementSetDiscriminant(global.context, this.peer, passNode(discriminant)) + return this + } + get cases(): readonly SwitchCaseStatement[] { + return unpackNodeArray(global.generatedEs2panda._SwitchStatementCases(global.context, this.peer)) + } + protected readonly brandSwitchStatement: undefined +} +export function isSwitchStatement(node: object | undefined): node is SwitchStatement { + return node instanceof SwitchStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT, (peer: KNativePointer) => new SwitchStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_SWITCH_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSAnyKeyword.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSAnyKeyword.ts new file mode 100644 index 0000000000000000000000000000000000000000..9d4805cf201de649b41f45fcb783a95f76545a36 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSAnyKeyword.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSAnyKeyword extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSAnyKeyword(): TSAnyKeyword { + const result: TSAnyKeyword = new TSAnyKeyword(global.generatedEs2panda._CreateTSAnyKeyword(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD) + result.setChildrenParentPtr() + return result + } + static updateTSAnyKeyword(original?: TSAnyKeyword): TSAnyKeyword { + const result: TSAnyKeyword = new TSAnyKeyword(global.generatedEs2panda._UpdateTSAnyKeyword(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSAnyKeyword: undefined +} +export function isTSAnyKeyword(node: object | undefined): node is TSAnyKeyword { + return node instanceof TSAnyKeyword +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD, (peer: KNativePointer) => new TSAnyKeyword(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_ANY_KEYWORD)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSArrayType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSArrayType.ts new file mode 100644 index 0000000000000000000000000000000000000000..4ae71bd9d149a19b3b6f036914c6d4f38e3733ec --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSArrayType.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSArrayType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSArrayType(elementType?: TypeNode): TSArrayType { + const result: TSArrayType = new TSArrayType(global.generatedEs2panda._CreateTSArrayType(global.context, passNode(elementType)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_ARRAY_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSArrayType(original?: TSArrayType, elementType?: TypeNode): TSArrayType { + const result: TSArrayType = new TSArrayType(global.generatedEs2panda._UpdateTSArrayType(global.context, passNode(original), passNode(elementType)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_ARRAY_TYPE) + result.setChildrenParentPtr() + return result + } + get elementType(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSArrayTypeElementTypeConst(global.context, this.peer)) + } + protected readonly brandTSArrayType: undefined +} +export function isTSArrayType(node: object | undefined): node is TSArrayType { + return node instanceof TSArrayType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ARRAY_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ARRAY_TYPE, (peer: KNativePointer) => new TSArrayType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_ARRAY_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSAsExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSAsExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..25cb9383403d78c0738f3300e4c73be9666e4b4f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSAsExpression.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotatedExpression } from "./AnnotatedExpression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSAsExpression extends AnnotatedExpression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSAsExpression(expression: Expression | undefined, typeAnnotation: TypeNode | undefined, isConst: boolean): TSAsExpression { + const result: TSAsExpression = new TSAsExpression(global.generatedEs2panda._CreateTSAsExpression(global.context, passNode(expression), passNode(typeAnnotation), isConst), Es2pandaAstNodeType.AST_NODE_TYPE_TS_AS_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateTSAsExpression(original: TSAsExpression | undefined, expression: Expression | undefined, typeAnnotation: TypeNode | undefined, isConst: boolean): TSAsExpression { + const result: TSAsExpression = new TSAsExpression(global.generatedEs2panda._UpdateTSAsExpression(global.context, passNode(original), passNode(expression), passNode(typeAnnotation), isConst), Es2pandaAstNodeType.AST_NODE_TYPE_TS_AS_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get expr(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSAsExpressionExpr(global.context, this.peer)) + } + /** @deprecated */ + setExpr(expr?: Expression): this { + global.generatedEs2panda._TSAsExpressionSetExpr(global.context, this.peer, passNode(expr)) + return this + } + get isConst(): boolean { + return global.generatedEs2panda._TSAsExpressionIsConstConst(global.context, this.peer) + } + /** @deprecated */ + setUncheckedCast(isUncheckedCast: boolean): this { + global.generatedEs2panda._TSAsExpressionSetUncheckedCast(global.context, this.peer, isUncheckedCast) + return this + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSAsExpressionTypeAnnotationConst(global.context, this.peer)) + } + /** @deprecated */ + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { + global.generatedEs2panda._TSAsExpressionSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) + return this + } + protected readonly brandTSAsExpression: undefined +} +export function isTSAsExpression(node: object | undefined): node is TSAsExpression { + return node instanceof TSAsExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_AS_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_AS_EXPRESSION, (peer: KNativePointer) => new TSAsExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_AS_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSBigintKeyword.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSBigintKeyword.ts new file mode 100644 index 0000000000000000000000000000000000000000..34f7db9b7d6fa899da3c3cdee30638db9d507216 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSBigintKeyword.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSBigintKeyword extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSBigintKeyword(): TSBigintKeyword { + const result: TSBigintKeyword = new TSBigintKeyword(global.generatedEs2panda._CreateTSBigintKeyword(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_BIGINT_KEYWORD) + result.setChildrenParentPtr() + return result + } + static updateTSBigintKeyword(original?: TSBigintKeyword): TSBigintKeyword { + const result: TSBigintKeyword = new TSBigintKeyword(global.generatedEs2panda._UpdateTSBigintKeyword(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_BIGINT_KEYWORD) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSBigintKeyword: undefined +} +export function isTSBigintKeyword(node: object | undefined): node is TSBigintKeyword { + return node instanceof TSBigintKeyword +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BIGINT_KEYWORD)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BIGINT_KEYWORD, (peer: KNativePointer) => new TSBigintKeyword(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_BIGINT_KEYWORD)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSBooleanKeyword.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSBooleanKeyword.ts new file mode 100644 index 0000000000000000000000000000000000000000..fcf646c44604ea27f488ffc296593191a433c5cb --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSBooleanKeyword.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSBooleanKeyword extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSBooleanKeyword(): TSBooleanKeyword { + const result: TSBooleanKeyword = new TSBooleanKeyword(global.generatedEs2panda._CreateTSBooleanKeyword(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_BOOLEAN_KEYWORD) + result.setChildrenParentPtr() + return result + } + static updateTSBooleanKeyword(original?: TSBooleanKeyword): TSBooleanKeyword { + const result: TSBooleanKeyword = new TSBooleanKeyword(global.generatedEs2panda._UpdateTSBooleanKeyword(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_BOOLEAN_KEYWORD) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSBooleanKeyword: undefined +} +export function isTSBooleanKeyword(node: object | undefined): node is TSBooleanKeyword { + return node instanceof TSBooleanKeyword +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BOOLEAN_KEYWORD)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_BOOLEAN_KEYWORD, (peer: KNativePointer) => new TSBooleanKeyword(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_BOOLEAN_KEYWORD)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSClassImplements.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSClassImplements.ts new file mode 100644 index 0000000000000000000000000000000000000000..35010b673a88bcd9163f6397661562361348c82f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSClassImplements.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" + +export class TSClassImplements extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSClassImplements(expression?: Expression, typeParameters?: TSTypeParameterInstantiation): TSClassImplements { + const result: TSClassImplements = new TSClassImplements(global.generatedEs2panda._CreateTSClassImplements(global.context, passNode(expression), passNode(typeParameters)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_CLASS_IMPLEMENTS) + result.setChildrenParentPtr() + return result + } + static updateTSClassImplements(original?: TSClassImplements, expression?: Expression, typeParameters?: TSTypeParameterInstantiation): TSClassImplements { + const result: TSClassImplements = new TSClassImplements(global.generatedEs2panda._UpdateTSClassImplements(global.context, passNode(original), passNode(expression), passNode(typeParameters)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_CLASS_IMPLEMENTS) + result.setChildrenParentPtr() + return result + } + static update1TSClassImplements(original?: TSClassImplements, expression?: Expression): TSClassImplements { + const result: TSClassImplements = new TSClassImplements(global.generatedEs2panda._UpdateTSClassImplements1(global.context, passNode(original), passNode(expression)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_CLASS_IMPLEMENTS) + result.setChildrenParentPtr() + return result + } + get expr(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSClassImplementsExpr(global.context, this.peer)) + } + get typeParameters(): TSTypeParameterInstantiation | undefined { + return unpackNode(global.generatedEs2panda._TSClassImplementsTypeParametersConst(global.context, this.peer)) + } + protected readonly brandTSClassImplements: undefined +} +export function isTSClassImplements(node: object | undefined): node is TSClassImplements { + return node instanceof TSClassImplements +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CLASS_IMPLEMENTS)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CLASS_IMPLEMENTS, (peer: KNativePointer) => new TSClassImplements(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_CLASS_IMPLEMENTS)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSConditionalType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSConditionalType.ts new file mode 100644 index 0000000000000000000000000000000000000000..523b1b957f7102d1cb22782bcedd3197cdf96faf --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSConditionalType.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSConditionalType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSConditionalType(checkType?: Expression, extendsType?: Expression, trueType?: Expression, falseType?: Expression): TSConditionalType { + const result: TSConditionalType = new TSConditionalType(global.generatedEs2panda._CreateTSConditionalType(global.context, passNode(checkType), passNode(extendsType), passNode(trueType), passNode(falseType)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONDITIONAL_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSConditionalType(original?: TSConditionalType, checkType?: Expression, extendsType?: Expression, trueType?: Expression, falseType?: Expression): TSConditionalType { + const result: TSConditionalType = new TSConditionalType(global.generatedEs2panda._UpdateTSConditionalType(global.context, passNode(original), passNode(checkType), passNode(extendsType), passNode(trueType), passNode(falseType)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONDITIONAL_TYPE) + result.setChildrenParentPtr() + return result + } + get checkType(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSConditionalTypeCheckTypeConst(global.context, this.peer)) + } + get extendsType(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSConditionalTypeExtendsTypeConst(global.context, this.peer)) + } + get trueType(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSConditionalTypeTrueTypeConst(global.context, this.peer)) + } + get falseType(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSConditionalTypeFalseTypeConst(global.context, this.peer)) + } + protected readonly brandTSConditionalType: undefined +} +export function isTSConditionalType(node: object | undefined): node is TSConditionalType { + return node instanceof TSConditionalType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONDITIONAL_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONDITIONAL_TYPE, (peer: KNativePointer) => new TSConditionalType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONDITIONAL_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSConstructorType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSConstructorType.ts new file mode 100644 index 0000000000000000000000000000000000000000..b07f9d66f5cd06c5ce4d2c8ca85d622d106548e5 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSConstructorType.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { FunctionSignature } from "./FunctionSignature" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TypeNode } from "./TypeNode" + +export class TSConstructorType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSConstructorType(signature: FunctionSignature | undefined, abstract: boolean): TSConstructorType { + const result: TSConstructorType = new TSConstructorType(global.generatedEs2panda._CreateTSConstructorType(global.context, passNode(signature), abstract), Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSConstructorType(original: TSConstructorType | undefined, signature: FunctionSignature | undefined, abstract: boolean): TSConstructorType { + const result: TSConstructorType = new TSConstructorType(global.generatedEs2panda._UpdateTSConstructorType(global.context, passNode(original), passNode(signature), abstract), Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE) + result.setChildrenParentPtr() + return result + } + get typeParams(): TSTypeParameterDeclaration | undefined { + return unpackNode(global.generatedEs2panda._TSConstructorTypeTypeParams(global.context, this.peer)) + } + get params(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._TSConstructorTypeParamsConst(global.context, this.peer)) + } + get returnType(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSConstructorTypeReturnType(global.context, this.peer)) + } + get abstract(): boolean { + return global.generatedEs2panda._TSConstructorTypeAbstractConst(global.context, this.peer) + } + protected readonly brandTSConstructorType: undefined +} +export function isTSConstructorType(node: object | undefined): node is TSConstructorType { + return node instanceof TSConstructorType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE, (peer: KNativePointer) => new TSConstructorType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_CONSTRUCTOR_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSEnumDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSEnumDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..ac9665a979b5c20a8b48ed6ae1c58b56f144abf1 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSEnumDeclaration.ts @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { ClassDefinition } from "./ClassDefinition" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { TypeNode } from "./TypeNode" +import { TypedStatement } from "./TypedStatement" + +export class TSEnumDeclaration extends TypedStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1TSEnumDeclaration(key: Identifier | undefined, members: readonly AstNode[], isConst: boolean, isStatic: boolean, isDeclare: boolean, typeNode?: TypeNode): TSEnumDeclaration { + const result: TSEnumDeclaration = new TSEnumDeclaration(global.generatedEs2panda._CreateTSEnumDeclaration1(global.context, passNode(key), passNodeArray(members), members.length, isConst, isStatic, isDeclare, passNode(typeNode)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateTSEnumDeclaration(original: TSEnumDeclaration | undefined, key: Identifier | undefined, members: readonly AstNode[], isConst: boolean, isStatic: boolean, isDeclare: boolean): TSEnumDeclaration { + const result: TSEnumDeclaration = new TSEnumDeclaration(global.generatedEs2panda._UpdateTSEnumDeclaration(global.context, passNode(original), passNode(key), passNodeArray(members), members.length, isConst, isStatic, isDeclare), Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_DECLARATION) + result.setChildrenParentPtr() + return result + } + static update1TSEnumDeclaration(original: TSEnumDeclaration | undefined, key: Identifier | undefined, members: readonly AstNode[], isConst: boolean, isStatic: boolean, isDeclare: boolean, typeNode?: TypeNode): TSEnumDeclaration { + const result: TSEnumDeclaration = new TSEnumDeclaration(global.generatedEs2panda._UpdateTSEnumDeclaration1(global.context, passNode(original), passNode(key), passNodeArray(members), members.length, isConst, isStatic, isDeclare, passNode(typeNode)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_DECLARATION) + result.setChildrenParentPtr() + return result + } + get typeNodes(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSEnumDeclarationTypeNodes(global.context, this.peer)) + } + get key(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._TSEnumDeclarationKey(global.context, this.peer)) + } + get members(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._TSEnumDeclarationMembersConst(global.context, this.peer)) + } + get internalName(): string { + return unpackString(global.generatedEs2panda._TSEnumDeclarationInternalNameConst(global.context, this.peer)) + } + /** @deprecated */ + setInternalName(internalName: string): this { + global.generatedEs2panda._TSEnumDeclarationSetInternalName(global.context, this.peer, internalName) + return this + } + get boxedClass(): ClassDefinition | undefined { + return unpackNode(global.generatedEs2panda._TSEnumDeclarationBoxedClassConst(global.context, this.peer)) + } + /** @deprecated */ + setBoxedClass(boxedClass?: ClassDefinition): this { + global.generatedEs2panda._TSEnumDeclarationSetBoxedClass(global.context, this.peer, passNode(boxedClass)) + return this + } + get isConst(): boolean { + return global.generatedEs2panda._TSEnumDeclarationIsConstConst(global.context, this.peer) + } + /** @deprecated */ + emplaceMembers(source?: AstNode): this { + global.generatedEs2panda._TSEnumDeclarationEmplaceMembers(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearMembers(): this { + global.generatedEs2panda._TSEnumDeclarationClearMembers(global.context, this.peer) + return this + } + /** @deprecated */ + setValueMembers(source: AstNode | undefined, index: number): this { + global.generatedEs2panda._TSEnumDeclarationSetValueMembers(global.context, this.peer, passNode(source), index) + return this + } + get membersForUpdate(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._TSEnumDeclarationMembersForUpdate(global.context, this.peer)) + } + protected readonly brandTSEnumDeclaration: undefined +} +export function isTSEnumDeclaration(node: object | undefined): node is TSEnumDeclaration { + return node instanceof TSEnumDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_DECLARATION, (peer: KNativePointer) => new TSEnumDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSEnumMember.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSEnumMember.ts new file mode 100644 index 0000000000000000000000000000000000000000..db8ba6cfd0504f9fedcc75a4412341aa6d48ca9d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSEnumMember.ts @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" + +export class TSEnumMember extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1TSEnumMember(key: Expression | undefined, init: Expression | undefined, isGenerated: boolean): TSEnumMember { + const result: TSEnumMember = new TSEnumMember(global.generatedEs2panda._CreateTSEnumMember1(global.context, passNode(key), passNode(init), isGenerated), Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_MEMBER) + result.setChildrenParentPtr() + return result + } + static updateTSEnumMember(original?: TSEnumMember, key?: Expression, init?: Expression): TSEnumMember { + const result: TSEnumMember = new TSEnumMember(global.generatedEs2panda._UpdateTSEnumMember(global.context, passNode(original), passNode(key), passNode(init)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_MEMBER) + result.setChildrenParentPtr() + return result + } + static update1TSEnumMember(original: TSEnumMember | undefined, key: Expression | undefined, init: Expression | undefined, isGenerated: boolean): TSEnumMember { + const result: TSEnumMember = new TSEnumMember(global.generatedEs2panda._UpdateTSEnumMember1(global.context, passNode(original), passNode(key), passNode(init), isGenerated), Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_MEMBER) + result.setChildrenParentPtr() + return result + } + get key(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSEnumMemberKey(global.context, this.peer)) + } + get init(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSEnumMemberInit(global.context, this.peer)) + } + get isGenerated(): boolean { + return global.generatedEs2panda._TSEnumMemberIsGeneratedConst(global.context, this.peer) + } + get name(): string { + return unpackString(global.generatedEs2panda._TSEnumMemberNameConst(global.context, this.peer)) + } + protected readonly brandTSEnumMember: undefined +} +export function isTSEnumMember(node: object | undefined): node is TSEnumMember { + return node instanceof TSEnumMember +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_MEMBER)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_MEMBER, (peer: KNativePointer) => new TSEnumMember(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_ENUM_MEMBER)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSExternalModuleReference.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSExternalModuleReference.ts new file mode 100644 index 0000000000000000000000000000000000000000..105c01bc22e60369e7d998bca021afb1e438e940 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSExternalModuleReference.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class TSExternalModuleReference extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSExternalModuleReference(expr?: Expression): TSExternalModuleReference { + const result: TSExternalModuleReference = new TSExternalModuleReference(global.generatedEs2panda._CreateTSExternalModuleReference(global.context, passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE) + result.setChildrenParentPtr() + return result + } + static updateTSExternalModuleReference(original?: TSExternalModuleReference, expr?: Expression): TSExternalModuleReference { + const result: TSExternalModuleReference = new TSExternalModuleReference(global.generatedEs2panda._UpdateTSExternalModuleReference(global.context, passNode(original), passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE) + result.setChildrenParentPtr() + return result + } + get expr(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSExternalModuleReferenceExprConst(global.context, this.peer)) + } + protected readonly brandTSExternalModuleReference: undefined +} +export function isTSExternalModuleReference(node: object | undefined): node is TSExternalModuleReference { + return node instanceof TSExternalModuleReference +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE, (peer: KNativePointer) => new TSExternalModuleReference(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_EXTERNAL_MODULE_REFERENCE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSFunctionType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSFunctionType.ts new file mode 100644 index 0000000000000000000000000000000000000000..b0a2674a456c4db307121cc85e03b261e695f19d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSFunctionType.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { FunctionSignature } from "./FunctionSignature" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TypeNode } from "./TypeNode" + +export class TSFunctionType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSFunctionType(signature?: FunctionSignature): TSFunctionType { + const result: TSFunctionType = new TSFunctionType(global.generatedEs2panda._CreateTSFunctionType(global.context, passNode(signature)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_FUNCTION_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSFunctionType(original?: TSFunctionType, signature?: FunctionSignature): TSFunctionType { + const result: TSFunctionType = new TSFunctionType(global.generatedEs2panda._UpdateTSFunctionType(global.context, passNode(original), passNode(signature)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_FUNCTION_TYPE) + result.setChildrenParentPtr() + return result + } + get typeParams(): TSTypeParameterDeclaration | undefined { + return unpackNode(global.generatedEs2panda._TSFunctionTypeTypeParams(global.context, this.peer)) + } + get params(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._TSFunctionTypeParamsConst(global.context, this.peer)) + } + get returnType(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSFunctionTypeReturnType(global.context, this.peer)) + } + /** @deprecated */ + setNullable(nullable: boolean): this { + global.generatedEs2panda._TSFunctionTypeSetNullable(global.context, this.peer, nullable) + return this + } + protected readonly brandTSFunctionType: undefined +} +export function isTSFunctionType(node: object | undefined): node is TSFunctionType { + return node instanceof TSFunctionType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_FUNCTION_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_FUNCTION_TYPE, (peer: KNativePointer) => new TSFunctionType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_FUNCTION_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSImportEqualsDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSImportEqualsDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..c6e05cfe387ad549bd480349d8609373f8a789f6 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSImportEqualsDeclaration.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { Statement } from "./Statement" + +export class TSImportEqualsDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSImportEqualsDeclaration(id: Identifier | undefined, moduleReference: Expression | undefined, isExport: boolean): TSImportEqualsDeclaration { + const result: TSImportEqualsDeclaration = new TSImportEqualsDeclaration(global.generatedEs2panda._CreateTSImportEqualsDeclaration(global.context, passNode(id), passNode(moduleReference), isExport), Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateTSImportEqualsDeclaration(original: TSImportEqualsDeclaration | undefined, id: Identifier | undefined, moduleReference: Expression | undefined, isExport: boolean): TSImportEqualsDeclaration { + const result: TSImportEqualsDeclaration = new TSImportEqualsDeclaration(global.generatedEs2panda._UpdateTSImportEqualsDeclaration(global.context, passNode(original), passNode(id), passNode(moduleReference), isExport), Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION) + result.setChildrenParentPtr() + return result + } + get id(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._TSImportEqualsDeclarationIdConst(global.context, this.peer)) + } + get moduleReference(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSImportEqualsDeclarationModuleReferenceConst(global.context, this.peer)) + } + get isExport(): boolean { + return global.generatedEs2panda._TSImportEqualsDeclarationIsExportConst(global.context, this.peer) + } + protected readonly brandTSImportEqualsDeclaration: undefined +} +export function isTSImportEqualsDeclaration(node: object | undefined): node is TSImportEqualsDeclaration { + return node instanceof TSImportEqualsDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION, (peer: KNativePointer) => new TSImportEqualsDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_EQUALS_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSImportType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSImportType.ts new file mode 100644 index 0000000000000000000000000000000000000000..597fcbfeac70d8473f7f88f1f4a0f22c31692c08 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSImportType.ts @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TypeNode } from "./TypeNode" + +export class TSImportType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSImportType(param: Expression | undefined, typeParams: TSTypeParameterInstantiation | undefined, qualifier: Expression | undefined, isTypeof: boolean): TSImportType { + const result: TSImportType = new TSImportType(global.generatedEs2panda._CreateTSImportType(global.context, passNode(param), passNode(typeParams), passNode(qualifier), isTypeof), Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSImportType(original: TSImportType | undefined, param: Expression | undefined, typeParams: TSTypeParameterInstantiation | undefined, qualifier: Expression | undefined, isTypeof: boolean): TSImportType { + const result: TSImportType = new TSImportType(global.generatedEs2panda._UpdateTSImportType(global.context, passNode(original), passNode(param), passNode(typeParams), passNode(qualifier), isTypeof), Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_TYPE) + result.setChildrenParentPtr() + return result + } + get param(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSImportTypeParamConst(global.context, this.peer)) + } + get typeParams(): TSTypeParameterInstantiation | undefined { + return unpackNode(global.generatedEs2panda._TSImportTypeTypeParamsConst(global.context, this.peer)) + } + get qualifier(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSImportTypeQualifierConst(global.context, this.peer)) + } + get isTypeof(): boolean { + return global.generatedEs2panda._TSImportTypeIsTypeofConst(global.context, this.peer) + } + protected readonly brandTSImportType: undefined +} +export function isTSImportType(node: object | undefined): node is TSImportType { + return node instanceof TSImportType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_TYPE, (peer: KNativePointer) => new TSImportType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_IMPORT_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSIndexSignature.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSIndexSignature.ts new file mode 100644 index 0000000000000000000000000000000000000000..086f13ce66267341321d8b2985b5ee5c6f84adf4 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSIndexSignature.ts @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaTSIndexSignatureKind } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" +import { TypedAstNode } from "./TypedAstNode" + +export class TSIndexSignature extends TypedAstNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSIndexSignature(param: Expression | undefined, typeAnnotation: TypeNode | undefined, readonly_arg: boolean): TSIndexSignature { + const result: TSIndexSignature = new TSIndexSignature(global.generatedEs2panda._CreateTSIndexSignature(global.context, passNode(param), passNode(typeAnnotation), readonly_arg), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEX_SIGNATURE) + result.setChildrenParentPtr() + return result + } + static updateTSIndexSignature(original: TSIndexSignature | undefined, param: Expression | undefined, typeAnnotation: TypeNode | undefined, readonly_arg: boolean): TSIndexSignature { + const result: TSIndexSignature = new TSIndexSignature(global.generatedEs2panda._UpdateTSIndexSignature(global.context, passNode(original), passNode(param), passNode(typeAnnotation), readonly_arg), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEX_SIGNATURE) + result.setChildrenParentPtr() + return result + } + get param(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSIndexSignatureParamConst(global.context, this.peer)) + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSIndexSignatureTypeAnnotationConst(global.context, this.peer)) + } + get readonly(): boolean { + return global.generatedEs2panda._TSIndexSignatureReadonlyConst(global.context, this.peer) + } + get kind(): Es2pandaTSIndexSignatureKind { + return global.generatedEs2panda._TSIndexSignatureKindConst(global.context, this.peer) + } + protected readonly brandTSIndexSignature: undefined +} +export function isTSIndexSignature(node: object | undefined): node is TSIndexSignature { + return node instanceof TSIndexSignature +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEX_SIGNATURE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEX_SIGNATURE, (peer: KNativePointer) => new TSIndexSignature(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEX_SIGNATURE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSIndexedAccessType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSIndexedAccessType.ts new file mode 100644 index 0000000000000000000000000000000000000000..a72141a4633af29e5e4825f0bfcd404458194355 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSIndexedAccessType.ts @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSIndexedAccessType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSIndexedAccessType(objectType?: TypeNode, indexType?: TypeNode): TSIndexedAccessType { + const result: TSIndexedAccessType = new TSIndexedAccessType(global.generatedEs2panda._CreateTSIndexedAccessType(global.context, passNode(objectType), passNode(indexType)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSIndexedAccessType(original?: TSIndexedAccessType, objectType?: TypeNode, indexType?: TypeNode): TSIndexedAccessType { + const result: TSIndexedAccessType = new TSIndexedAccessType(global.generatedEs2panda._UpdateTSIndexedAccessType(global.context, passNode(original), passNode(objectType), passNode(indexType)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE) + result.setChildrenParentPtr() + return result + } + get objectType(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSIndexedAccessTypeObjectTypeConst(global.context, this.peer)) + } + get indexType(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSIndexedAccessTypeIndexTypeConst(global.context, this.peer)) + } + protected readonly brandTSIndexedAccessType: undefined +} +export function isTSIndexedAccessType(node: object | undefined): node is TSIndexedAccessType { + return node instanceof TSIndexedAccessType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE, (peer: KNativePointer) => new TSIndexedAccessType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INDEXED_ACCESS_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSInferType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSInferType.ts new file mode 100644 index 0000000000000000000000000000000000000000..bcdffc898fd17b155dba31979fb74981f7525c8b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSInferType.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TSTypeParameter } from "./TSTypeParameter" +import { TypeNode } from "./TypeNode" + +export class TSInferType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSInferType(typeParam?: TSTypeParameter): TSInferType { + const result: TSInferType = new TSInferType(global.generatedEs2panda._CreateTSInferType(global.context, passNode(typeParam)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INFER_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSInferType(original?: TSInferType, typeParam?: TSTypeParameter): TSInferType { + const result: TSInferType = new TSInferType(global.generatedEs2panda._UpdateTSInferType(global.context, passNode(original), passNode(typeParam)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INFER_TYPE) + result.setChildrenParentPtr() + return result + } + get typeParam(): TSTypeParameter | undefined { + return unpackNode(global.generatedEs2panda._TSInferTypeTypeParamConst(global.context, this.peer)) + } + protected readonly brandTSInferType: undefined +} +export function isTSInferType(node: object | undefined): node is TSInferType { + return node instanceof TSInferType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INFER_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INFER_TYPE, (peer: KNativePointer) => new TSInferType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INFER_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSInterfaceBody.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSInterfaceBody.ts new file mode 100644 index 0000000000000000000000000000000000000000..ab9f866a7cc5e1d22142bf862cc43d32df3e3065 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSInterfaceBody.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class TSInterfaceBody extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSInterfaceBody(body: readonly AstNode[]): TSInterfaceBody { + const result: TSInterfaceBody = new TSInterfaceBody(global.generatedEs2panda._CreateTSInterfaceBody(global.context, passNodeArray(body), body.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_BODY) + result.setChildrenParentPtr() + return result + } + static updateTSInterfaceBody(original: TSInterfaceBody | undefined, body: readonly AstNode[]): TSInterfaceBody { + const result: TSInterfaceBody = new TSInterfaceBody(global.generatedEs2panda._UpdateTSInterfaceBody(global.context, passNode(original), passNodeArray(body), body.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_BODY) + result.setChildrenParentPtr() + return result + } + get body(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._TSInterfaceBodyBody(global.context, this.peer)) + } + protected readonly brandTSInterfaceBody: undefined +} +export function isTSInterfaceBody(node: object | undefined): node is TSInterfaceBody { + return node instanceof TSInterfaceBody +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_BODY)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_BODY, (peer: KNativePointer) => new TSInterfaceBody(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_BODY)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSInterfaceDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSInterfaceDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..7caedfd252a8ccb6b72c4adc3a5cb4edab689de3 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSInterfaceDeclaration.ts @@ -0,0 +1,161 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { ClassDeclaration } from "./ClassDeclaration" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { SrcDumper } from "./SrcDumper" +import { TSInterfaceBody } from "./TSInterfaceBody" +import { TSInterfaceHeritage } from "./TSInterfaceHeritage" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TypedStatement } from "./TypedStatement" + +export class TSInterfaceDeclaration extends TypedStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSInterfaceDeclaration(_extends: readonly TSInterfaceHeritage[], id: AstNode | undefined, typeParams: AstNode | undefined, body: AstNode | undefined, isStatic: boolean, isExternal: boolean, modifierFlags?: Es2pandaModifierFlags): TSInterfaceDeclaration { + const result: TSInterfaceDeclaration = new TSInterfaceDeclaration(global.generatedEs2panda._CreateTSInterfaceDeclaration(global.context, passNodeArray(_extends), _extends.length, passNode(id), passNode(typeParams), passNode(body), isStatic, isExternal), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_DECLARATION) + if (modifierFlags) + { + result.modifierFlags = modifierFlags + } + result.setChildrenParentPtr() + return result + } + static updateTSInterfaceDeclaration(original: TSInterfaceDeclaration | undefined, _extends: readonly TSInterfaceHeritage[], id: AstNode | undefined, typeParams: AstNode | undefined, body: AstNode | undefined, isStatic: boolean, isExternal: boolean, modifierFlags?: Es2pandaModifierFlags): TSInterfaceDeclaration { + const result: TSInterfaceDeclaration = new TSInterfaceDeclaration(global.generatedEs2panda._UpdateTSInterfaceDeclaration(global.context, passNode(original), passNodeArray(_extends), _extends.length, passNode(id), passNode(typeParams), passNode(body), isStatic, isExternal), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_DECLARATION) + if (modifierFlags) + { + result.modifierFlags = modifierFlags + } + result.setChildrenParentPtr() + return result + } + get body(): TSInterfaceBody | undefined { + return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationBody(global.context, this.peer)) + } + get id(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationId(global.context, this.peer)) + } + get internalName(): string { + return unpackString(global.generatedEs2panda._TSInterfaceDeclarationInternalNameConst(global.context, this.peer)) + } + /** @deprecated */ + setInternalName(internalName: string): this { + global.generatedEs2panda._TSInterfaceDeclarationSetInternalName(global.context, this.peer, internalName) + return this + } + get isStatic(): boolean { + return global.generatedEs2panda._TSInterfaceDeclarationIsStaticConst(global.context, this.peer) + } + get isFromExternal(): boolean { + return global.generatedEs2panda._TSInterfaceDeclarationIsFromExternalConst(global.context, this.peer) + } + get typeParams(): TSTypeParameterDeclaration | undefined { + return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationTypeParams(global.context, this.peer)) + } + get extends(): readonly TSInterfaceHeritage[] { + return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationExtends(global.context, this.peer)) + } + get extendsForUpdate(): readonly TSInterfaceHeritage[] { + return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationExtendsForUpdate(global.context, this.peer)) + } + get anonClass(): ClassDeclaration | undefined { + return unpackNode(global.generatedEs2panda._TSInterfaceDeclarationGetAnonClass(global.context, this.peer)) + } + /** @deprecated */ + setAnonClass(anonClass?: ClassDeclaration): this { + global.generatedEs2panda._TSInterfaceDeclarationSetAnonClass(global.context, this.peer, passNode(anonClass)) + return this + } + /** @deprecated */ + emplaceExtends(_extends?: TSInterfaceHeritage): this { + global.generatedEs2panda._TSInterfaceDeclarationEmplaceExtends(global.context, this.peer, passNode(_extends)) + return this + } + /** @deprecated */ + clearExtends(): this { + global.generatedEs2panda._TSInterfaceDeclarationClearExtends(global.context, this.peer) + return this + } + /** @deprecated */ + setValueExtends(_extends: TSInterfaceHeritage | undefined, index: number): this { + global.generatedEs2panda._TSInterfaceDeclarationSetValueExtends(global.context, this.peer, passNode(_extends), index) + return this + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._TSInterfaceDeclarationHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._TSInterfaceDeclarationEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._TSInterfaceDeclarationClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._TSInterfaceDeclarationDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TSInterfaceDeclarationAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TSInterfaceDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TSInterfaceDeclarationSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + protected readonly brandTSInterfaceDeclaration: undefined +} +export function isTSInterfaceDeclaration(node: object | undefined): node is TSInterfaceDeclaration { + return node instanceof TSInterfaceDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_DECLARATION, (peer: KNativePointer) => new TSInterfaceDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSInterfaceHeritage.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSInterfaceHeritage.ts new file mode 100644 index 0000000000000000000000000000000000000000..80c68978d76401933d17ec8b2d830c29e0f01d8b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSInterfaceHeritage.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSInterfaceHeritage extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSInterfaceHeritage(expr?: TypeNode): TSInterfaceHeritage { + const result: TSInterfaceHeritage = new TSInterfaceHeritage(global.generatedEs2panda._CreateTSInterfaceHeritage(global.context, passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_HERITAGE) + result.setChildrenParentPtr() + return result + } + static updateTSInterfaceHeritage(original?: TSInterfaceHeritage, expr?: TypeNode): TSInterfaceHeritage { + const result: TSInterfaceHeritage = new TSInterfaceHeritage(global.generatedEs2panda._UpdateTSInterfaceHeritage(global.context, passNode(original), passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_HERITAGE) + result.setChildrenParentPtr() + return result + } + get expr(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSInterfaceHeritageExpr(global.context, this.peer)) + } + protected readonly brandTSInterfaceHeritage: undefined +} +export function isTSInterfaceHeritage(node: object | undefined): node is TSInterfaceHeritage { + return node instanceof TSInterfaceHeritage +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_HERITAGE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_HERITAGE, (peer: KNativePointer) => new TSInterfaceHeritage(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERFACE_HERITAGE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSIntersectionType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSIntersectionType.ts new file mode 100644 index 0000000000000000000000000000000000000000..77016132fc6f3e4a18ebdfff5be52248c30cce85 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSIntersectionType.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSIntersectionType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSIntersectionType(types: readonly Expression[]): TSIntersectionType { + const result: TSIntersectionType = new TSIntersectionType(global.generatedEs2panda._CreateTSIntersectionType(global.context, passNodeArray(types), types.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERSECTION_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSIntersectionType(original: TSIntersectionType | undefined, types: readonly Expression[]): TSIntersectionType { + const result: TSIntersectionType = new TSIntersectionType(global.generatedEs2panda._UpdateTSIntersectionType(global.context, passNode(original), passNodeArray(types), types.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERSECTION_TYPE) + result.setChildrenParentPtr() + return result + } + get types(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._TSIntersectionTypeTypesConst(global.context, this.peer)) + } + protected readonly brandTSIntersectionType: undefined +} +export function isTSIntersectionType(node: object | undefined): node is TSIntersectionType { + return node instanceof TSIntersectionType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERSECTION_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERSECTION_TYPE, (peer: KNativePointer) => new TSIntersectionType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_INTERSECTION_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSLiteralType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSLiteralType.ts new file mode 100644 index 0000000000000000000000000000000000000000..52d3042fbc14cfb05fc65f0325aa306375b38272 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSLiteralType.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSLiteralType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSLiteralType(literal?: Expression): TSLiteralType { + const result: TSLiteralType = new TSLiteralType(global.generatedEs2panda._CreateTSLiteralType(global.context, passNode(literal)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSLiteralType(original?: TSLiteralType, literal?: Expression): TSLiteralType { + const result: TSLiteralType = new TSLiteralType(global.generatedEs2panda._UpdateTSLiteralType(global.context, passNode(original), passNode(literal)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE) + result.setChildrenParentPtr() + return result + } + get literal(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSLiteralTypeLiteralConst(global.context, this.peer)) + } + protected readonly brandTSLiteralType: undefined +} +export function isTSLiteralType(node: object | undefined): node is TSLiteralType { + return node instanceof TSLiteralType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE, (peer: KNativePointer) => new TSLiteralType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_LITERAL_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSMappedType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSMappedType.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ac038c73f4ba1a1e0fe882ff2d97a4d62afc087 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSMappedType.ts @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaMappedOption } from "./../Es2pandaEnums" +import { TSTypeParameter } from "./TSTypeParameter" +import { TypeNode } from "./TypeNode" + +export class TSMappedType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSMappedType(typeParameter: TSTypeParameter | undefined, typeAnnotation: TypeNode | undefined, readonly_arg: Es2pandaMappedOption, optional_arg: Es2pandaMappedOption): TSMappedType { + const result: TSMappedType = new TSMappedType(global.generatedEs2panda._CreateTSMappedType(global.context, passNode(typeParameter), passNode(typeAnnotation), readonly_arg, optional_arg), Es2pandaAstNodeType.AST_NODE_TYPE_TS_MAPPED_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSMappedType(original: TSMappedType | undefined, typeParameter: TSTypeParameter | undefined, typeAnnotation: TypeNode | undefined, readonly_arg: Es2pandaMappedOption, optional_arg: Es2pandaMappedOption): TSMappedType { + const result: TSMappedType = new TSMappedType(global.generatedEs2panda._UpdateTSMappedType(global.context, passNode(original), passNode(typeParameter), passNode(typeAnnotation), readonly_arg, optional_arg), Es2pandaAstNodeType.AST_NODE_TYPE_TS_MAPPED_TYPE) + result.setChildrenParentPtr() + return result + } + get typeParameter(): TSTypeParameter | undefined { + return unpackNode(global.generatedEs2panda._TSMappedTypeTypeParameter(global.context, this.peer)) + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSMappedTypeTypeAnnotation(global.context, this.peer)) + } + get readonly(): Es2pandaMappedOption { + return global.generatedEs2panda._TSMappedTypeReadonly(global.context, this.peer) + } + get optional(): Es2pandaMappedOption { + return global.generatedEs2panda._TSMappedTypeOptional(global.context, this.peer) + } + protected readonly brandTSMappedType: undefined +} +export function isTSMappedType(node: object | undefined): node is TSMappedType { + return node instanceof TSMappedType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MAPPED_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MAPPED_TYPE, (peer: KNativePointer) => new TSMappedType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_MAPPED_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSMethodSignature.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSMethodSignature.ts new file mode 100644 index 0000000000000000000000000000000000000000..f6cdfa5786db76fd6ab1b3e3f6379f2f00176853 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSMethodSignature.ts @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { FunctionSignature } from "./FunctionSignature" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TypeNode } from "./TypeNode" + +export class TSMethodSignature extends AstNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSMethodSignature(key: Expression | undefined, signature: FunctionSignature | undefined, computed: boolean, optional_arg: boolean): TSMethodSignature { + const result: TSMethodSignature = new TSMethodSignature(global.generatedEs2panda._CreateTSMethodSignature(global.context, passNode(key), passNode(signature), computed, optional_arg), Es2pandaAstNodeType.AST_NODE_TYPE_TS_METHOD_SIGNATURE) + result.setChildrenParentPtr() + return result + } + static updateTSMethodSignature(original: TSMethodSignature | undefined, key: Expression | undefined, signature: FunctionSignature | undefined, computed: boolean, optional_arg: boolean): TSMethodSignature { + const result: TSMethodSignature = new TSMethodSignature(global.generatedEs2panda._UpdateTSMethodSignature(global.context, passNode(original), passNode(key), passNode(signature), computed, optional_arg), Es2pandaAstNodeType.AST_NODE_TYPE_TS_METHOD_SIGNATURE) + result.setChildrenParentPtr() + return result + } + get key(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSMethodSignatureKey(global.context, this.peer)) + } + get typeParams(): TSTypeParameterDeclaration | undefined { + return unpackNode(global.generatedEs2panda._TSMethodSignatureTypeParams(global.context, this.peer)) + } + get params(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._TSMethodSignatureParamsConst(global.context, this.peer)) + } + get returnTypeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSMethodSignatureReturnTypeAnnotation(global.context, this.peer)) + } + get computed(): boolean { + return global.generatedEs2panda._TSMethodSignatureComputedConst(global.context, this.peer) + } + get optional(): boolean { + return global.generatedEs2panda._TSMethodSignatureOptionalConst(global.context, this.peer) + } + protected readonly brandTSMethodSignature: undefined +} +export function isTSMethodSignature(node: object | undefined): node is TSMethodSignature { + return node instanceof TSMethodSignature +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_METHOD_SIGNATURE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_METHOD_SIGNATURE, (peer: KNativePointer) => new TSMethodSignature(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_METHOD_SIGNATURE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSModuleBlock.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSModuleBlock.ts new file mode 100644 index 0000000000000000000000000000000000000000..181fcf35bab7be67047eccbd23a140302ea7726c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSModuleBlock.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Statement } from "./Statement" + +export class TSModuleBlock extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSModuleBlock(statements: readonly Statement[]): TSModuleBlock { + const result: TSModuleBlock = new TSModuleBlock(global.generatedEs2panda._CreateTSModuleBlock(global.context, passNodeArray(statements), statements.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_BLOCK) + result.setChildrenParentPtr() + return result + } + static updateTSModuleBlock(original: TSModuleBlock | undefined, statements: readonly Statement[]): TSModuleBlock { + const result: TSModuleBlock = new TSModuleBlock(global.generatedEs2panda._UpdateTSModuleBlock(global.context, passNode(original), passNodeArray(statements), statements.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_BLOCK) + result.setChildrenParentPtr() + return result + } + get statements(): readonly Statement[] { + return unpackNodeArray(global.generatedEs2panda._TSModuleBlockStatementsConst(global.context, this.peer)) + } + protected readonly brandTSModuleBlock: undefined +} +export function isTSModuleBlock(node: object | undefined): node is TSModuleBlock { + return node instanceof TSModuleBlock +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_BLOCK)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_BLOCK, (peer: KNativePointer) => new TSModuleBlock(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_BLOCK)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSModuleDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSModuleDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..5f4e64f97e63f4d8a1f9018b1f334c09478ae19f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSModuleDeclaration.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" + +export class TSModuleDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSModuleDeclaration(name: Expression | undefined, body: Statement | undefined, declare: boolean, _global: boolean): TSModuleDeclaration { + const result: TSModuleDeclaration = new TSModuleDeclaration(global.generatedEs2panda._CreateTSModuleDeclaration(global.context, passNode(name), passNode(body), declare, _global), Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateTSModuleDeclaration(original: TSModuleDeclaration | undefined, name: Expression | undefined, body: Statement | undefined, declare: boolean, _global: boolean): TSModuleDeclaration { + const result: TSModuleDeclaration = new TSModuleDeclaration(global.generatedEs2panda._UpdateTSModuleDeclaration(global.context, passNode(original), passNode(name), passNode(body), declare, _global), Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_DECLARATION) + result.setChildrenParentPtr() + return result + } + get name(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSModuleDeclarationNameConst(global.context, this.peer)) + } + get body(): Statement | undefined { + return unpackNode(global.generatedEs2panda._TSModuleDeclarationBodyConst(global.context, this.peer)) + } + get global(): boolean { + return global.generatedEs2panda._TSModuleDeclarationGlobalConst(global.context, this.peer) + } + get isExternalOrAmbient(): boolean { + return global.generatedEs2panda._TSModuleDeclarationIsExternalOrAmbientConst(global.context, this.peer) + } + protected readonly brandTSModuleDeclaration: undefined +} +export function isTSModuleDeclaration(node: object | undefined): node is TSModuleDeclaration { + return node instanceof TSModuleDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_DECLARATION, (peer: KNativePointer) => new TSModuleDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_MODULE_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSNamedTupleMember.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSNamedTupleMember.ts new file mode 100644 index 0000000000000000000000000000000000000000..3a0605ad5c44c64036747e7a0ed48e4cf6914d75 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSNamedTupleMember.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSNamedTupleMember extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSNamedTupleMember(label: Expression | undefined, elementType: TypeNode | undefined, optional_arg: boolean): TSNamedTupleMember { + const result: TSNamedTupleMember = new TSNamedTupleMember(global.generatedEs2panda._CreateTSNamedTupleMember(global.context, passNode(label), passNode(elementType), optional_arg), Es2pandaAstNodeType.AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER) + result.setChildrenParentPtr() + return result + } + static updateTSNamedTupleMember(original: TSNamedTupleMember | undefined, label: Expression | undefined, elementType: TypeNode | undefined, optional_arg: boolean): TSNamedTupleMember { + const result: TSNamedTupleMember = new TSNamedTupleMember(global.generatedEs2panda._UpdateTSNamedTupleMember(global.context, passNode(original), passNode(label), passNode(elementType), optional_arg), Es2pandaAstNodeType.AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER) + result.setChildrenParentPtr() + return result + } + get label(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSNamedTupleMemberLabelConst(global.context, this.peer)) + } + get elementType(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSNamedTupleMemberElementType(global.context, this.peer)) + } + get isOptional(): boolean { + return global.generatedEs2panda._TSNamedTupleMemberIsOptionalConst(global.context, this.peer) + } + protected readonly brandTSNamedTupleMember: undefined +} +export function isTSNamedTupleMember(node: object | undefined): node is TSNamedTupleMember { + return node instanceof TSNamedTupleMember +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER, (peer: KNativePointer) => new TSNamedTupleMember(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_NAMED_TUPLE_MEMBER)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSNeverKeyword.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSNeverKeyword.ts new file mode 100644 index 0000000000000000000000000000000000000000..510fe11dfb1c3f42fdbd8cffa3c9468251f42a78 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSNeverKeyword.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSNeverKeyword extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSNeverKeyword(): TSNeverKeyword { + const result: TSNeverKeyword = new TSNeverKeyword(global.generatedEs2panda._CreateTSNeverKeyword(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_NEVER_KEYWORD) + result.setChildrenParentPtr() + return result + } + static updateTSNeverKeyword(original?: TSNeverKeyword): TSNeverKeyword { + const result: TSNeverKeyword = new TSNeverKeyword(global.generatedEs2panda._UpdateTSNeverKeyword(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_NEVER_KEYWORD) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSNeverKeyword: undefined +} +export function isTSNeverKeyword(node: object | undefined): node is TSNeverKeyword { + return node instanceof TSNeverKeyword +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NEVER_KEYWORD)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NEVER_KEYWORD, (peer: KNativePointer) => new TSNeverKeyword(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_NEVER_KEYWORD)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSNonNullExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSNonNullExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..ce5902b24371aa71958dbb058999e1673e77e4aa --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSNonNullExpression.ts @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class TSNonNullExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSNonNullExpression(expr?: Expression): TSNonNullExpression { + const result: TSNonNullExpression = new TSNonNullExpression(global.generatedEs2panda._CreateTSNonNullExpression(global.context, passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_NON_NULL_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateTSNonNullExpression(original?: TSNonNullExpression, expr?: Expression): TSNonNullExpression { + const result: TSNonNullExpression = new TSNonNullExpression(global.generatedEs2panda._UpdateTSNonNullExpression(global.context, passNode(original), passNode(expr)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_NON_NULL_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get expr(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSNonNullExpressionExpr(global.context, this.peer)) + } + /** @deprecated */ + setExpr(expr?: Expression): this { + global.generatedEs2panda._TSNonNullExpressionSetExpr(global.context, this.peer, passNode(expr)) + return this + } + protected readonly brandTSNonNullExpression: undefined +} +export function isTSNonNullExpression(node: object | undefined): node is TSNonNullExpression { + return node instanceof TSNonNullExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NON_NULL_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NON_NULL_EXPRESSION, (peer: KNativePointer) => new TSNonNullExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_NON_NULL_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSNullKeyword.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSNullKeyword.ts new file mode 100644 index 0000000000000000000000000000000000000000..80141b4aeb03fb0b40dc9bf7097317dc4627705a --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSNullKeyword.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSNullKeyword extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSNullKeyword(): TSNullKeyword { + const result: TSNullKeyword = new TSNullKeyword(global.generatedEs2panda._CreateTSNullKeyword(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_NULL_KEYWORD) + result.setChildrenParentPtr() + return result + } + static updateTSNullKeyword(original?: TSNullKeyword): TSNullKeyword { + const result: TSNullKeyword = new TSNullKeyword(global.generatedEs2panda._UpdateTSNullKeyword(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_NULL_KEYWORD) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSNullKeyword: undefined +} +export function isTSNullKeyword(node: object | undefined): node is TSNullKeyword { + return node instanceof TSNullKeyword +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NULL_KEYWORD)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NULL_KEYWORD, (peer: KNativePointer) => new TSNullKeyword(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_NULL_KEYWORD)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSNumberKeyword.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSNumberKeyword.ts new file mode 100644 index 0000000000000000000000000000000000000000..2560896b2c1ab17d9bd48146949c621a5f7b7067 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSNumberKeyword.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSNumberKeyword extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSNumberKeyword(): TSNumberKeyword { + const result: TSNumberKeyword = new TSNumberKeyword(global.generatedEs2panda._CreateTSNumberKeyword(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_NUMBER_KEYWORD) + result.setChildrenParentPtr() + return result + } + static updateTSNumberKeyword(original?: TSNumberKeyword): TSNumberKeyword { + const result: TSNumberKeyword = new TSNumberKeyword(global.generatedEs2panda._UpdateTSNumberKeyword(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_NUMBER_KEYWORD) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSNumberKeyword: undefined +} +export function isTSNumberKeyword(node: object | undefined): node is TSNumberKeyword { + return node instanceof TSNumberKeyword +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NUMBER_KEYWORD)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_NUMBER_KEYWORD, (peer: KNativePointer) => new TSNumberKeyword(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_NUMBER_KEYWORD)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSObjectKeyword.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSObjectKeyword.ts new file mode 100644 index 0000000000000000000000000000000000000000..792b814c67e80aaf16438b767b4a1557b5725340 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSObjectKeyword.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSObjectKeyword extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSObjectKeyword(): TSObjectKeyword { + const result: TSObjectKeyword = new TSObjectKeyword(global.generatedEs2panda._CreateTSObjectKeyword(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_OBJECT_KEYWORD) + result.setChildrenParentPtr() + return result + } + static updateTSObjectKeyword(original?: TSObjectKeyword): TSObjectKeyword { + const result: TSObjectKeyword = new TSObjectKeyword(global.generatedEs2panda._UpdateTSObjectKeyword(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_OBJECT_KEYWORD) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSObjectKeyword: undefined +} +export function isTSObjectKeyword(node: object | undefined): node is TSObjectKeyword { + return node instanceof TSObjectKeyword +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_OBJECT_KEYWORD)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_OBJECT_KEYWORD, (peer: KNativePointer) => new TSObjectKeyword(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_OBJECT_KEYWORD)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSParameterProperty.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSParameterProperty.ts new file mode 100644 index 0000000000000000000000000000000000000000..98b91024a5c29e32a818fab4ecffff08ad13131d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSParameterProperty.ts @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAccessibilityOption } from "./../Es2pandaEnums" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class TSParameterProperty extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSParameterProperty(accessibility: Es2pandaAccessibilityOption, parameter: Expression | undefined, readonly_arg: boolean, isStatic: boolean, isExport: boolean): TSParameterProperty { + const result: TSParameterProperty = new TSParameterProperty(global.generatedEs2panda._CreateTSParameterProperty(global.context, accessibility, passNode(parameter), readonly_arg, isStatic, isExport), Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARAMETER_PROPERTY) + result.setChildrenParentPtr() + return result + } + static updateTSParameterProperty(original: TSParameterProperty | undefined, accessibility: Es2pandaAccessibilityOption, parameter: Expression | undefined, readonly_arg: boolean, isStatic: boolean, isExport: boolean): TSParameterProperty { + const result: TSParameterProperty = new TSParameterProperty(global.generatedEs2panda._UpdateTSParameterProperty(global.context, passNode(original), accessibility, passNode(parameter), readonly_arg, isStatic, isExport), Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARAMETER_PROPERTY) + result.setChildrenParentPtr() + return result + } + get accessibility(): Es2pandaAccessibilityOption { + return global.generatedEs2panda._TSParameterPropertyAccessibilityConst(global.context, this.peer) + } + get readonly(): boolean { + return global.generatedEs2panda._TSParameterPropertyReadonlyConst(global.context, this.peer) + } + get isStatic(): boolean { + return global.generatedEs2panda._TSParameterPropertyIsStaticConst(global.context, this.peer) + } + get isExport(): boolean { + return global.generatedEs2panda._TSParameterPropertyIsExportConst(global.context, this.peer) + } + get parameter(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSParameterPropertyParameterConst(global.context, this.peer)) + } + protected readonly brandTSParameterProperty: undefined +} +export function isTSParameterProperty(node: object | undefined): node is TSParameterProperty { + return node instanceof TSParameterProperty +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARAMETER_PROPERTY)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARAMETER_PROPERTY, (peer: KNativePointer) => new TSParameterProperty(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARAMETER_PROPERTY)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSParenthesizedType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSParenthesizedType.ts new file mode 100644 index 0000000000000000000000000000000000000000..fbeac852a52bf31e0b9edb10f415348cc1424f40 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSParenthesizedType.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSParenthesizedType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSParenthesizedType(type?: TypeNode): TSParenthesizedType { + const result: TSParenthesizedType = new TSParenthesizedType(global.generatedEs2panda._CreateTSParenthesizedType(global.context, passNode(type)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARENT_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSParenthesizedType(original?: TSParenthesizedType, type?: TypeNode): TSParenthesizedType { + const result: TSParenthesizedType = new TSParenthesizedType(global.generatedEs2panda._UpdateTSParenthesizedType(global.context, passNode(original), passNode(type)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARENT_TYPE) + result.setChildrenParentPtr() + return result + } + get type(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSParenthesizedTypeTypeConst(global.context, this.peer)) + } + protected readonly brandTSParenthesizedType: undefined +} +export function isTSParenthesizedType(node: object | undefined): node is TSParenthesizedType { + return node instanceof TSParenthesizedType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARENT_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARENT_TYPE, (peer: KNativePointer) => new TSParenthesizedType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_PARENT_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSPropertySignature.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSPropertySignature.ts new file mode 100644 index 0000000000000000000000000000000000000000..c145d4d2a716d1a0c00549e0553d7b920228c127 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSPropertySignature.ts @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotatedAstNode } from "./AnnotatedAstNode" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSPropertySignature extends AnnotatedAstNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSPropertySignature(key: Expression | undefined, typeAnnotation: TypeNode | undefined, computed: boolean, optional_arg: boolean, readonly_arg: boolean): TSPropertySignature { + const result: TSPropertySignature = new TSPropertySignature(global.generatedEs2panda._CreateTSPropertySignature(global.context, passNode(key), passNode(typeAnnotation), computed, optional_arg, readonly_arg), Es2pandaAstNodeType.AST_NODE_TYPE_TS_PROPERTY_SIGNATURE) + result.setChildrenParentPtr() + return result + } + static updateTSPropertySignature(original: TSPropertySignature | undefined, key: Expression | undefined, typeAnnotation: TypeNode | undefined, computed: boolean, optional_arg: boolean, readonly_arg: boolean): TSPropertySignature { + const result: TSPropertySignature = new TSPropertySignature(global.generatedEs2panda._UpdateTSPropertySignature(global.context, passNode(original), passNode(key), passNode(typeAnnotation), computed, optional_arg, readonly_arg), Es2pandaAstNodeType.AST_NODE_TYPE_TS_PROPERTY_SIGNATURE) + result.setChildrenParentPtr() + return result + } + get key(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSPropertySignatureKey(global.context, this.peer)) + } + get computed(): boolean { + return global.generatedEs2panda._TSPropertySignatureComputedConst(global.context, this.peer) + } + get optional(): boolean { + return global.generatedEs2panda._TSPropertySignatureOptionalConst(global.context, this.peer) + } + get readonly(): boolean { + return global.generatedEs2panda._TSPropertySignatureReadonlyConst(global.context, this.peer) + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSPropertySignatureTypeAnnotationConst(global.context, this.peer)) + } + /** @deprecated */ + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { + global.generatedEs2panda._TSPropertySignatureSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) + return this + } + protected readonly brandTSPropertySignature: undefined +} +export function isTSPropertySignature(node: object | undefined): node is TSPropertySignature { + return node instanceof TSPropertySignature +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PROPERTY_SIGNATURE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_PROPERTY_SIGNATURE, (peer: KNativePointer) => new TSPropertySignature(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_PROPERTY_SIGNATURE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSQualifiedName.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSQualifiedName.ts new file mode 100644 index 0000000000000000000000000000000000000000..af3047dc36f1a6bd467e51a8e2fcb164d86c4829 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSQualifiedName.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" + +export class TSQualifiedName extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSQualifiedName(left?: Expression, right?: Identifier): TSQualifiedName { + const result: TSQualifiedName = new TSQualifiedName(global.generatedEs2panda._CreateTSQualifiedName(global.context, passNode(left), passNode(right)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_QUALIFIED_NAME) + result.setChildrenParentPtr() + return result + } + static updateTSQualifiedName(original?: TSQualifiedName, left?: Expression, right?: Identifier): TSQualifiedName { + const result: TSQualifiedName = new TSQualifiedName(global.generatedEs2panda._UpdateTSQualifiedName(global.context, passNode(original), passNode(left), passNode(right)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_QUALIFIED_NAME) + result.setChildrenParentPtr() + return result + } + get left(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSQualifiedNameLeft(global.context, this.peer)) + } + get right(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._TSQualifiedNameRight(global.context, this.peer)) + } + get name(): string { + return unpackString(global.generatedEs2panda._TSQualifiedNameNameConst(global.context, this.peer)) + } + get resolveLeftMostQualifiedName(): TSQualifiedName | undefined { + return unpackNode(global.generatedEs2panda._TSQualifiedNameResolveLeftMostQualifiedName(global.context, this.peer)) + } + protected readonly brandTSQualifiedName: undefined +} +export function isTSQualifiedName(node: object | undefined): node is TSQualifiedName { + return node instanceof TSQualifiedName +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_QUALIFIED_NAME)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_QUALIFIED_NAME, (peer: KNativePointer) => new TSQualifiedName(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_QUALIFIED_NAME)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSSignatureDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSSignatureDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..c47244030fa8d4845b8541565de9a36a8a4d46bb --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSSignatureDeclaration.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaTSSignatureDeclarationKind } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { FunctionSignature } from "./FunctionSignature" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TypeNode } from "./TypeNode" +import { TypedAstNode } from "./TypedAstNode" + +export class TSSignatureDeclaration extends TypedAstNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSSignatureDeclaration(kind: Es2pandaTSSignatureDeclarationKind, signature?: FunctionSignature): TSSignatureDeclaration { + const result: TSSignatureDeclaration = new TSSignatureDeclaration(global.generatedEs2panda._CreateTSSignatureDeclaration(global.context, kind, passNode(signature)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_SIGNATURE_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateTSSignatureDeclaration(original: TSSignatureDeclaration | undefined, kind: Es2pandaTSSignatureDeclarationKind, signature?: FunctionSignature): TSSignatureDeclaration { + const result: TSSignatureDeclaration = new TSSignatureDeclaration(global.generatedEs2panda._UpdateTSSignatureDeclaration(global.context, passNode(original), kind, passNode(signature)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_SIGNATURE_DECLARATION) + result.setChildrenParentPtr() + return result + } + get typeParams(): TSTypeParameterDeclaration | undefined { + return unpackNode(global.generatedEs2panda._TSSignatureDeclarationTypeParams(global.context, this.peer)) + } + get params(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._TSSignatureDeclarationParamsConst(global.context, this.peer)) + } + get returnTypeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSSignatureDeclarationReturnTypeAnnotation(global.context, this.peer)) + } + get kind(): Es2pandaTSSignatureDeclarationKind { + return global.generatedEs2panda._TSSignatureDeclarationKindConst(global.context, this.peer) + } + protected readonly brandTSSignatureDeclaration: undefined +} +export function isTSSignatureDeclaration(node: object | undefined): node is TSSignatureDeclaration { + return node instanceof TSSignatureDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_SIGNATURE_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_SIGNATURE_DECLARATION, (peer: KNativePointer) => new TSSignatureDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_SIGNATURE_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSStringKeyword.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSStringKeyword.ts new file mode 100644 index 0000000000000000000000000000000000000000..5fbc447b29c10e0f44ca6b5b82007f6c864b3c8f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSStringKeyword.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSStringKeyword extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSStringKeyword(): TSStringKeyword { + const result: TSStringKeyword = new TSStringKeyword(global.generatedEs2panda._CreateTSStringKeyword(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_STRING_KEYWORD) + result.setChildrenParentPtr() + return result + } + static updateTSStringKeyword(original?: TSStringKeyword): TSStringKeyword { + const result: TSStringKeyword = new TSStringKeyword(global.generatedEs2panda._UpdateTSStringKeyword(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_STRING_KEYWORD) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSStringKeyword: undefined +} +export function isTSStringKeyword(node: object | undefined): node is TSStringKeyword { + return node instanceof TSStringKeyword +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_STRING_KEYWORD)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_STRING_KEYWORD, (peer: KNativePointer) => new TSStringKeyword(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_STRING_KEYWORD)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSThisType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSThisType.ts new file mode 100644 index 0000000000000000000000000000000000000000..d148187388ce3cba931c10ef3adc0386ce7ff285 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSThisType.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSThisType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSThisType(): TSThisType { + const result: TSThisType = new TSThisType(global.generatedEs2panda._CreateTSThisType(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_THIS_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSThisType(original?: TSThisType): TSThisType { + const result: TSThisType = new TSThisType(global.generatedEs2panda._UpdateTSThisType(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_THIS_TYPE) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSThisType: undefined +} +export function isTSThisType(node: object | undefined): node is TSThisType { + return node instanceof TSThisType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_THIS_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_THIS_TYPE, (peer: KNativePointer) => new TSThisType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_THIS_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSTupleType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTupleType.ts new file mode 100644 index 0000000000000000000000000000000000000000..ea6c847cffd0829173238120033344a1993976bb --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTupleType.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSTupleType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSTupleType(elementTypes: readonly TypeNode[]): TSTupleType { + const result: TSTupleType = new TSTupleType(global.generatedEs2panda._CreateTSTupleType(global.context, passNodeArray(elementTypes), elementTypes.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TUPLE_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSTupleType(original: TSTupleType | undefined, elementTypes: readonly TypeNode[]): TSTupleType { + const result: TSTupleType = new TSTupleType(global.generatedEs2panda._UpdateTSTupleType(global.context, passNode(original), passNodeArray(elementTypes), elementTypes.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TUPLE_TYPE) + result.setChildrenParentPtr() + return result + } + get elementType(): readonly TypeNode[] { + return unpackNodeArray(global.generatedEs2panda._TSTupleTypeElementTypeConst(global.context, this.peer)) + } + protected readonly brandTSTupleType: undefined +} +export function isTSTupleType(node: object | undefined): node is TSTupleType { + return node instanceof TSTupleType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TUPLE_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TUPLE_TYPE, (peer: KNativePointer) => new TSTupleType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TUPLE_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeAliasDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeAliasDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..060ea866642375d3f70c39733f170b243339bbf7 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeAliasDeclaration.ts @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotatedStatement } from "./AnnotatedStatement" +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { Identifier } from "./Identifier" +import { SrcDumper } from "./SrcDumper" +import { TSTypeParameterDeclaration } from "./TSTypeParameterDeclaration" +import { TypeNode } from "./TypeNode" + +export class TSTypeAliasDeclaration extends AnnotatedStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSTypeAliasDeclaration(id?: Identifier, typeParams?: TSTypeParameterDeclaration, typeAnnotation?: TypeNode, annotations?: readonly AnnotationUsage[], modifierFlags?: Es2pandaModifierFlags): TSTypeAliasDeclaration { + const result: TSTypeAliasDeclaration = new TSTypeAliasDeclaration(global.generatedEs2panda._CreateTSTypeAliasDeclaration(global.context, passNode(id), passNode(typeParams), passNode(typeAnnotation)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION) + if (annotations) + { + result.setAnnotations(annotations) + } + if (modifierFlags) + { + result.modifierFlags = modifierFlags + } + result.setChildrenParentPtr() + return result + } + static updateTSTypeAliasDeclaration(original?: TSTypeAliasDeclaration, id?: Identifier, typeParams?: TSTypeParameterDeclaration, typeAnnotation?: TypeNode, annotations?: readonly AnnotationUsage[], modifierFlags?: Es2pandaModifierFlags): TSTypeAliasDeclaration { + const result: TSTypeAliasDeclaration = new TSTypeAliasDeclaration(global.generatedEs2panda._UpdateTSTypeAliasDeclaration(global.context, passNode(original), passNode(id), passNode(typeParams), passNode(typeAnnotation)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION) + if (annotations) + { + result.setAnnotations(annotations) + } + if (modifierFlags) + { + result.modifierFlags = modifierFlags + } + result.setChildrenParentPtr() + return result + } + static update1TSTypeAliasDeclaration(original?: TSTypeAliasDeclaration, id?: Identifier, annotations?: readonly AnnotationUsage[], modifierFlags?: Es2pandaModifierFlags): TSTypeAliasDeclaration { + const result: TSTypeAliasDeclaration = new TSTypeAliasDeclaration(global.generatedEs2panda._UpdateTSTypeAliasDeclaration1(global.context, passNode(original), passNode(id)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION) + if (annotations) + { + result.setAnnotations(annotations) + } + if (modifierFlags) + { + result.modifierFlags = modifierFlags + } + result.setChildrenParentPtr() + return result + } + get id(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._TSTypeAliasDeclarationId(global.context, this.peer)) + } + get typeParams(): TSTypeParameterDeclaration | undefined { + return unpackNode(global.generatedEs2panda._TSTypeAliasDeclarationTypeParamsConst(global.context, this.peer)) + } + /** @deprecated */ + setTypeParameters(typeParams?: TSTypeParameterDeclaration): this { + global.generatedEs2panda._TSTypeAliasDeclarationSetTypeParameters(global.context, this.peer, passNode(typeParams)) + return this + } + /** @deprecated */ + clearTypeParamterTypes(): this { + global.generatedEs2panda._TSTypeAliasDeclarationClearTypeParamterTypes(global.context, this.peer) + return this + } + get typeAnnotation(): TypeNode { + return unpackNonNullableNode(global.generatedEs2panda._TSTypeAliasDeclarationTypeAnnotationConst(global.context, this.peer)) + } + /** @deprecated */ + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { + global.generatedEs2panda._TSTypeAliasDeclarationSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) + return this + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._TSTypeAliasDeclarationHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._TSTypeAliasDeclarationEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._TSTypeAliasDeclarationClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._TSTypeAliasDeclarationDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TSTypeAliasDeclarationAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TSTypeAliasDeclarationAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TSTypeAliasDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TSTypeAliasDeclarationSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + protected readonly brandTSTypeAliasDeclaration: undefined +} +export function isTSTypeAliasDeclaration(node: object | undefined): node is TSTypeAliasDeclaration { + return node instanceof TSTypeAliasDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION, (peer: KNativePointer) => new TSTypeAliasDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ALIAS_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeAssertion.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeAssertion.ts new file mode 100644 index 0000000000000000000000000000000000000000..3df36d052cdd74acff44645218533a9892769562 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeAssertion.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotatedExpression } from "./AnnotatedExpression" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSTypeAssertion extends AnnotatedExpression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSTypeAssertion(typeAnnotation?: TypeNode, expression?: Expression): TSTypeAssertion { + const result: TSTypeAssertion = new TSTypeAssertion(global.generatedEs2panda._CreateTSTypeAssertion(global.context, passNode(typeAnnotation), passNode(expression)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ASSERTION) + result.setChildrenParentPtr() + return result + } + static updateTSTypeAssertion(original?: TSTypeAssertion, typeAnnotation?: TypeNode, expression?: Expression): TSTypeAssertion { + const result: TSTypeAssertion = new TSTypeAssertion(global.generatedEs2panda._UpdateTSTypeAssertion(global.context, passNode(original), passNode(typeAnnotation), passNode(expression)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ASSERTION) + result.setChildrenParentPtr() + return result + } + get expression(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSTypeAssertionGetExpressionConst(global.context, this.peer)) + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSTypeAssertionTypeAnnotationConst(global.context, this.peer)) + } + /** @deprecated */ + setTsTypeAnnotation(typeAnnotation?: TypeNode): this { + global.generatedEs2panda._TSTypeAssertionSetTsTypeAnnotation(global.context, this.peer, passNode(typeAnnotation)) + return this + } + protected readonly brandTSTypeAssertion: undefined +} +export function isTSTypeAssertion(node: object | undefined): node is TSTypeAssertion { + return node instanceof TSTypeAssertion +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ASSERTION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ASSERTION, (peer: KNativePointer) => new TSTypeAssertion(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_ASSERTION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeLiteral.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..a77d723c70ba8143915b418ac0dfc6feec1ab5fa --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeLiteral.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSTypeLiteral extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSTypeLiteral(members: readonly AstNode[]): TSTypeLiteral { + const result: TSTypeLiteral = new TSTypeLiteral(global.generatedEs2panda._CreateTSTypeLiteral(global.context, passNodeArray(members), members.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_LITERAL) + result.setChildrenParentPtr() + return result + } + static updateTSTypeLiteral(original: TSTypeLiteral | undefined, members: readonly AstNode[]): TSTypeLiteral { + const result: TSTypeLiteral = new TSTypeLiteral(global.generatedEs2panda._UpdateTSTypeLiteral(global.context, passNode(original), passNodeArray(members), members.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_LITERAL) + result.setChildrenParentPtr() + return result + } + get members(): readonly AstNode[] { + return unpackNodeArray(global.generatedEs2panda._TSTypeLiteralMembersConst(global.context, this.peer)) + } + protected readonly brandTSTypeLiteral: undefined +} +export function isTSTypeLiteral(node: object | undefined): node is TSTypeLiteral { + return node instanceof TSTypeLiteral +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_LITERAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_LITERAL, (peer: KNativePointer) => new TSTypeLiteral(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_LITERAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeOperator.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeOperator.ts new file mode 100644 index 0000000000000000000000000000000000000000..ff536f22e3652ee44e27e1b5a7bc29687e180974 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeOperator.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaTSOperatorType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSTypeOperator extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSTypeOperator(type: TypeNode | undefined, operatorType: Es2pandaTSOperatorType): TSTypeOperator { + const result: TSTypeOperator = new TSTypeOperator(global.generatedEs2panda._CreateTSTypeOperator(global.context, passNode(type), operatorType), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_OPERATOR) + result.setChildrenParentPtr() + return result + } + static updateTSTypeOperator(original: TSTypeOperator | undefined, type: TypeNode | undefined, operatorType: Es2pandaTSOperatorType): TSTypeOperator { + const result: TSTypeOperator = new TSTypeOperator(global.generatedEs2panda._UpdateTSTypeOperator(global.context, passNode(original), passNode(type), operatorType), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_OPERATOR) + result.setChildrenParentPtr() + return result + } + get type(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSTypeOperatorTypeConst(global.context, this.peer)) + } + get isReadonly(): boolean { + return global.generatedEs2panda._TSTypeOperatorIsReadonlyConst(global.context, this.peer) + } + get isKeyof(): boolean { + return global.generatedEs2panda._TSTypeOperatorIsKeyofConst(global.context, this.peer) + } + get isUnique(): boolean { + return global.generatedEs2panda._TSTypeOperatorIsUniqueConst(global.context, this.peer) + } + protected readonly brandTSTypeOperator: undefined +} +export function isTSTypeOperator(node: object | undefined): node is TSTypeOperator { + return node instanceof TSTypeOperator +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_OPERATOR)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_OPERATOR, (peer: KNativePointer) => new TSTypeOperator(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_OPERATOR)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeParameter.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeParameter.ts new file mode 100644 index 0000000000000000000000000000000000000000..50037ac11660358cb43cb10f7167a8e310a4f026 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeParameter.ts @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaModifierFlags } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { SrcDumper } from "./SrcDumper" +import { TypeNode } from "./TypeNode" + +export class TSTypeParameter extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1TSTypeParameter(name: Identifier | undefined, constraint: TypeNode | undefined, defaultType: TypeNode | undefined, flags: Es2pandaModifierFlags): TSTypeParameter { + const result: TSTypeParameter = new TSTypeParameter(global.generatedEs2panda._CreateTSTypeParameter1(global.context, passNode(name), passNode(constraint), passNode(defaultType), flags), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER) + result.setChildrenParentPtr() + return result + } + static updateTSTypeParameter(original?: TSTypeParameter, name?: Identifier, constraint?: TypeNode, defaultType?: TypeNode): TSTypeParameter { + const result: TSTypeParameter = new TSTypeParameter(global.generatedEs2panda._UpdateTSTypeParameter(global.context, passNode(original), passNode(name), passNode(constraint), passNode(defaultType)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER) + result.setChildrenParentPtr() + return result + } + static update1TSTypeParameter(original: TSTypeParameter | undefined, name: Identifier | undefined, constraint: TypeNode | undefined, defaultType: TypeNode | undefined, flags: Es2pandaModifierFlags): TSTypeParameter { + const result: TSTypeParameter = new TSTypeParameter(global.generatedEs2panda._UpdateTSTypeParameter1(global.context, passNode(original), passNode(name), passNode(constraint), passNode(defaultType), flags), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER) + result.setChildrenParentPtr() + return result + } + get name(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._TSTypeParameterName(global.context, this.peer)) + } + get constraint(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSTypeParameterConstraint(global.context, this.peer)) + } + /** @deprecated */ + setConstraint(constraint?: TypeNode): this { + global.generatedEs2panda._TSTypeParameterSetConstraint(global.context, this.peer, passNode(constraint)) + return this + } + get defaultType(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSTypeParameterDefaultTypeConst(global.context, this.peer)) + } + /** @deprecated */ + setDefaultType(defaultType?: TypeNode): this { + global.generatedEs2panda._TSTypeParameterSetDefaultType(global.context, this.peer, passNode(defaultType)) + return this + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._TSTypeParameterHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._TSTypeParameterEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._TSTypeParameterClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._TSTypeParameterDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TSTypeParameterAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TSTypeParameterAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TSTypeParameterSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TSTypeParameterSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + protected readonly brandTSTypeParameter: undefined +} +export function isTSTypeParameter(node: object | undefined): node is TSTypeParameter { + return node instanceof TSTypeParameter +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER, (peer: KNativePointer) => new TSTypeParameter(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeParameterDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeParameterDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..2682a3771fde8afd2b6a231e4c9d30d875a80388 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeParameterDeclaration.ts @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TSTypeParameter } from "./TSTypeParameter" + +export class TSTypeParameterDeclaration extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSTypeParameterDeclaration(params: readonly TSTypeParameter[], requiredParams: number): TSTypeParameterDeclaration { + const result: TSTypeParameterDeclaration = new TSTypeParameterDeclaration(global.generatedEs2panda._CreateTSTypeParameterDeclaration(global.context, passNodeArray(params), params.length, requiredParams), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION) + result.setChildrenParentPtr() + return result + } + static updateTSTypeParameterDeclaration(original: TSTypeParameterDeclaration | undefined, params: readonly TSTypeParameter[], requiredParams: number): TSTypeParameterDeclaration { + const result: TSTypeParameterDeclaration = new TSTypeParameterDeclaration(global.generatedEs2panda._UpdateTSTypeParameterDeclaration(global.context, passNode(original), passNodeArray(params), params.length, requiredParams), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION) + result.setChildrenParentPtr() + return result + } + get params(): readonly TSTypeParameter[] { + return unpackNodeArray(global.generatedEs2panda._TSTypeParameterDeclarationParamsConst(global.context, this.peer)) + } + /** @deprecated */ + addParam(param?: TSTypeParameter): this { + global.generatedEs2panda._TSTypeParameterDeclarationAddParam(global.context, this.peer, passNode(param)) + return this + } + /** @deprecated */ + setValueParams(source: TSTypeParameter | undefined, index: number): this { + global.generatedEs2panda._TSTypeParameterDeclarationSetValueParams(global.context, this.peer, passNode(source), index) + return this + } + get requiredParams(): number { + return global.generatedEs2panda._TSTypeParameterDeclarationRequiredParamsConst(global.context, this.peer) + } + protected readonly brandTSTypeParameterDeclaration: undefined +} +export function isTSTypeParameterDeclaration(node: object | undefined): node is TSTypeParameterDeclaration { + return node instanceof TSTypeParameterDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION, (peer: KNativePointer) => new TSTypeParameterDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeParameterInstantiation.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeParameterInstantiation.ts new file mode 100644 index 0000000000000000000000000000000000000000..700560a938e916e3c1227fba61101ae97c426b36 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeParameterInstantiation.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSTypeParameterInstantiation extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSTypeParameterInstantiation(params: readonly TypeNode[]): TSTypeParameterInstantiation { + const result: TSTypeParameterInstantiation = new TSTypeParameterInstantiation(global.generatedEs2panda._CreateTSTypeParameterInstantiation(global.context, passNodeArray(params), params.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION) + result.setChildrenParentPtr() + return result + } + static updateTSTypeParameterInstantiation(original: TSTypeParameterInstantiation | undefined, params: readonly TypeNode[]): TSTypeParameterInstantiation { + const result: TSTypeParameterInstantiation = new TSTypeParameterInstantiation(global.generatedEs2panda._UpdateTSTypeParameterInstantiation(global.context, passNode(original), passNodeArray(params), params.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION) + result.setChildrenParentPtr() + return result + } + get params(): readonly TypeNode[] { + return unpackNodeArray(global.generatedEs2panda._TSTypeParameterInstantiationParamsConst(global.context, this.peer)) + } + protected readonly brandTSTypeParameterInstantiation: undefined +} +export function isTSTypeParameterInstantiation(node: object | undefined): node is TSTypeParameterInstantiation { + return node instanceof TSTypeParameterInstantiation +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION, (peer: KNativePointer) => new TSTypeParameterInstantiation(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER_INSTANTIATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypePredicate.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypePredicate.ts new file mode 100644 index 0000000000000000000000000000000000000000..b2207003604535f900bf3017c0e47cf3424d4840 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypePredicate.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSTypePredicate extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSTypePredicate(parameterName: Expression | undefined, typeAnnotation: TypeNode | undefined, asserts: boolean): TSTypePredicate { + const result: TSTypePredicate = new TSTypePredicate(global.generatedEs2panda._CreateTSTypePredicate(global.context, passNode(parameterName), passNode(typeAnnotation), asserts), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PREDICATE) + result.setChildrenParentPtr() + return result + } + static updateTSTypePredicate(original: TSTypePredicate | undefined, parameterName: Expression | undefined, typeAnnotation: TypeNode | undefined, asserts: boolean): TSTypePredicate { + const result: TSTypePredicate = new TSTypePredicate(global.generatedEs2panda._UpdateTSTypePredicate(global.context, passNode(original), passNode(parameterName), passNode(typeAnnotation), asserts), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PREDICATE) + result.setChildrenParentPtr() + return result + } + get parameterName(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSTypePredicateParameterNameConst(global.context, this.peer)) + } + get typeAnnotation(): TypeNode | undefined { + return unpackNode(global.generatedEs2panda._TSTypePredicateTypeAnnotationConst(global.context, this.peer)) + } + get asserts(): boolean { + return global.generatedEs2panda._TSTypePredicateAssertsConst(global.context, this.peer) + } + protected readonly brandTSTypePredicate: undefined +} +export function isTSTypePredicate(node: object | undefined): node is TSTypePredicate { + return node instanceof TSTypePredicate +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PREDICATE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PREDICATE, (peer: KNativePointer) => new TSTypePredicate(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PREDICATE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeQuery.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeQuery.ts new file mode 100644 index 0000000000000000000000000000000000000000..4d16ee411c4ba9384ad344a704bc46a540dd54ed --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeQuery.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypeNode } from "./TypeNode" + +export class TSTypeQuery extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSTypeQuery(exprName?: Expression): TSTypeQuery { + const result: TSTypeQuery = new TSTypeQuery(global.generatedEs2panda._CreateTSTypeQuery(global.context, passNode(exprName)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_QUERY) + result.setChildrenParentPtr() + return result + } + static updateTSTypeQuery(original?: TSTypeQuery, exprName?: Expression): TSTypeQuery { + const result: TSTypeQuery = new TSTypeQuery(global.generatedEs2panda._UpdateTSTypeQuery(global.context, passNode(original), passNode(exprName)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_QUERY) + result.setChildrenParentPtr() + return result + } + get exprName(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSTypeQueryExprNameConst(global.context, this.peer)) + } + protected readonly brandTSTypeQuery: undefined +} +export function isTSTypeQuery(node: object | undefined): node is TSTypeQuery { + return node instanceof TSTypeQuery +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_QUERY)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_QUERY, (peer: KNativePointer) => new TSTypeQuery(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_QUERY)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeReference.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeReference.ts new file mode 100644 index 0000000000000000000000000000000000000000..f71b1957d3a139d0a579af291e647283b89fcf0d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSTypeReference.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Identifier } from "./Identifier" +import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TypeNode } from "./TypeNode" + +export class TSTypeReference extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSTypeReference(typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference { + const result: TSTypeReference = new TSTypeReference(global.generatedEs2panda._CreateTSTypeReference(global.context, passNode(typeName), passNode(typeParams)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_REFERENCE) + result.setChildrenParentPtr() + return result + } + static updateTSTypeReference(original?: TSTypeReference, typeName?: Expression, typeParams?: TSTypeParameterInstantiation): TSTypeReference { + const result: TSTypeReference = new TSTypeReference(global.generatedEs2panda._UpdateTSTypeReference(global.context, passNode(original), passNode(typeName), passNode(typeParams)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_REFERENCE) + result.setChildrenParentPtr() + return result + } + get typeParams(): TSTypeParameterInstantiation | undefined { + return unpackNode(global.generatedEs2panda._TSTypeReferenceTypeParamsConst(global.context, this.peer)) + } + get typeName(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TSTypeReferenceTypeNameConst(global.context, this.peer)) + } + get baseName(): Identifier | undefined { + return unpackNode(global.generatedEs2panda._TSTypeReferenceBaseNameConst(global.context, this.peer)) + } + protected readonly brandTSTypeReference: undefined +} +export function isTSTypeReference(node: object | undefined): node is TSTypeReference { + return node instanceof TSTypeReference +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_REFERENCE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_REFERENCE, (peer: KNativePointer) => new TSTypeReference(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_REFERENCE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSUndefinedKeyword.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSUndefinedKeyword.ts new file mode 100644 index 0000000000000000000000000000000000000000..db9649c8cb75aca8431496d1258b85f9df97cf06 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSUndefinedKeyword.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSUndefinedKeyword extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSUndefinedKeyword(): TSUndefinedKeyword { + const result: TSUndefinedKeyword = new TSUndefinedKeyword(global.generatedEs2panda._CreateTSUndefinedKeyword(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNDEFINED_KEYWORD) + result.setChildrenParentPtr() + return result + } + static updateTSUndefinedKeyword(original?: TSUndefinedKeyword): TSUndefinedKeyword { + const result: TSUndefinedKeyword = new TSUndefinedKeyword(global.generatedEs2panda._UpdateTSUndefinedKeyword(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNDEFINED_KEYWORD) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSUndefinedKeyword: undefined +} +export function isTSUndefinedKeyword(node: object | undefined): node is TSUndefinedKeyword { + return node instanceof TSUndefinedKeyword +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNDEFINED_KEYWORD)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNDEFINED_KEYWORD, (peer: KNativePointer) => new TSUndefinedKeyword(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNDEFINED_KEYWORD)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSUnionType.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSUnionType.ts new file mode 100644 index 0000000000000000000000000000000000000000..96d119aacbb41cc2142bcdebaf72076053a36c8b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSUnionType.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSUnionType extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSUnionType(types: readonly TypeNode[]): TSUnionType { + const result: TSUnionType = new TSUnionType(global.generatedEs2panda._CreateTSUnionType(global.context, passNodeArray(types), types.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNION_TYPE) + result.setChildrenParentPtr() + return result + } + static updateTSUnionType(original: TSUnionType | undefined, types: readonly TypeNode[]): TSUnionType { + const result: TSUnionType = new TSUnionType(global.generatedEs2panda._UpdateTSUnionType(global.context, passNode(original), passNodeArray(types), types.length), Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNION_TYPE) + result.setChildrenParentPtr() + return result + } + get types(): readonly TypeNode[] { + return unpackNodeArray(global.generatedEs2panda._TSUnionTypeTypesConst(global.context, this.peer)) + } + protected readonly brandTSUnionType: undefined +} +export function isTSUnionType(node: object | undefined): node is TSUnionType { + return node instanceof TSUnionType +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNION_TYPE)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNION_TYPE, (peer: KNativePointer) => new TSUnionType(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNION_TYPE)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSUnknownKeyword.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSUnknownKeyword.ts new file mode 100644 index 0000000000000000000000000000000000000000..7992dfff754a077aeaabbf322eae3bc0d7632398 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSUnknownKeyword.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSUnknownKeyword extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSUnknownKeyword(): TSUnknownKeyword { + const result: TSUnknownKeyword = new TSUnknownKeyword(global.generatedEs2panda._CreateTSUnknownKeyword(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNKNOWN_KEYWORD) + result.setChildrenParentPtr() + return result + } + static updateTSUnknownKeyword(original?: TSUnknownKeyword): TSUnknownKeyword { + const result: TSUnknownKeyword = new TSUnknownKeyword(global.generatedEs2panda._UpdateTSUnknownKeyword(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNKNOWN_KEYWORD) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSUnknownKeyword: undefined +} +export function isTSUnknownKeyword(node: object | undefined): node is TSUnknownKeyword { + return node instanceof TSUnknownKeyword +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNKNOWN_KEYWORD)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNKNOWN_KEYWORD, (peer: KNativePointer) => new TSUnknownKeyword(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_UNKNOWN_KEYWORD)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TSVoidKeyword.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TSVoidKeyword.ts new file mode 100644 index 0000000000000000000000000000000000000000..e5935a79f0dac798b5b599554a440150a84c220f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TSVoidKeyword.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { TypeNode } from "./TypeNode" + +export class TSVoidKeyword extends TypeNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTSVoidKeyword(): TSVoidKeyword { + const result: TSVoidKeyword = new TSVoidKeyword(global.generatedEs2panda._CreateTSVoidKeyword(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_TS_VOID_KEYWORD) + result.setChildrenParentPtr() + return result + } + static updateTSVoidKeyword(original?: TSVoidKeyword): TSVoidKeyword { + const result: TSVoidKeyword = new TSVoidKeyword(global.generatedEs2panda._UpdateTSVoidKeyword(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TS_VOID_KEYWORD) + result.setChildrenParentPtr() + return result + } + protected readonly brandTSVoidKeyword: undefined +} +export function isTSVoidKeyword(node: object | undefined): node is TSVoidKeyword { + return node instanceof TSVoidKeyword +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TS_VOID_KEYWORD)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TS_VOID_KEYWORD, (peer: KNativePointer) => new TSVoidKeyword(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TS_VOID_KEYWORD)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TaggedTemplateExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TaggedTemplateExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..2b148c17278fa5d214bde84070d03d5c9b5229ea --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TaggedTemplateExpression.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TSTypeParameterInstantiation } from "./TSTypeParameterInstantiation" +import { TemplateLiteral } from "./TemplateLiteral" + +export class TaggedTemplateExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTaggedTemplateExpression(tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression { + const result: TaggedTemplateExpression = new TaggedTemplateExpression(global.generatedEs2panda._CreateTaggedTemplateExpression(global.context, passNode(tag), passNode(quasi), passNode(typeParams)), Es2pandaAstNodeType.AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateTaggedTemplateExpression(original?: TaggedTemplateExpression, tag?: Expression, quasi?: TemplateLiteral, typeParams?: TSTypeParameterInstantiation): TaggedTemplateExpression { + const result: TaggedTemplateExpression = new TaggedTemplateExpression(global.generatedEs2panda._UpdateTaggedTemplateExpression(global.context, passNode(original), passNode(tag), passNode(quasi), passNode(typeParams)), Es2pandaAstNodeType.AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get tag(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionTagConst(global.context, this.peer)) + } + get quasi(): TemplateLiteral | undefined { + return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionQuasiConst(global.context, this.peer)) + } + get typeParams(): TSTypeParameterInstantiation | undefined { + return unpackNode(global.generatedEs2panda._TaggedTemplateExpressionTypeParamsConst(global.context, this.peer)) + } + protected readonly brandTaggedTemplateExpression: undefined +} +export function isTaggedTemplateExpression(node: object | undefined): node is TaggedTemplateExpression { + return node instanceof TaggedTemplateExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION, (peer: KNativePointer) => new TaggedTemplateExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TAGGED_TEMPLATE_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TemplateElement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TemplateElement.ts new file mode 100644 index 0000000000000000000000000000000000000000..1158a11bdd3c66bd80a2827013d0f66cd00f647f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TemplateElement.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class TemplateElement extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1TemplateElement(raw: string, cooked: string): TemplateElement { + const result: TemplateElement = new TemplateElement(global.generatedEs2panda._CreateTemplateElement1(global.context, raw, cooked), Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT) + result.setChildrenParentPtr() + return result + } + static updateTemplateElement(original?: TemplateElement): TemplateElement { + const result: TemplateElement = new TemplateElement(global.generatedEs2panda._UpdateTemplateElement(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT) + result.setChildrenParentPtr() + return result + } + static update1TemplateElement(original: TemplateElement | undefined, raw: string, cooked: string): TemplateElement { + const result: TemplateElement = new TemplateElement(global.generatedEs2panda._UpdateTemplateElement1(global.context, passNode(original), raw, cooked), Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT) + result.setChildrenParentPtr() + return result + } + get raw(): string { + return unpackString(global.generatedEs2panda._TemplateElementRawConst(global.context, this.peer)) + } + get cooked(): string { + return unpackString(global.generatedEs2panda._TemplateElementCookedConst(global.context, this.peer)) + } + protected readonly brandTemplateElement: undefined +} +export function isTemplateElement(node: object | undefined): node is TemplateElement { + return node instanceof TemplateElement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT, (peer: KNativePointer) => new TemplateElement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_ELEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TemplateLiteral.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TemplateLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..b4d6780259b0ccaefb37ca5cc3004a0ae0e5668b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TemplateLiteral.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TemplateElement } from "./TemplateElement" + +export class TemplateLiteral extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTemplateLiteral(quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral { + const result: TemplateLiteral = new TemplateLiteral(global.generatedEs2panda._CreateTemplateLiteral(global.context, passNodeArray(quasis), quasis.length, passNodeArray(expressions), expressions.length, multilineString), Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL) + result.setChildrenParentPtr() + return result + } + static updateTemplateLiteral(original: TemplateLiteral | undefined, quasis: readonly TemplateElement[], expressions: readonly Expression[], multilineString: string): TemplateLiteral { + const result: TemplateLiteral = new TemplateLiteral(global.generatedEs2panda._UpdateTemplateLiteral(global.context, passNode(original), passNodeArray(quasis), quasis.length, passNodeArray(expressions), expressions.length, multilineString), Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL) + result.setChildrenParentPtr() + return result + } + get quasis(): readonly TemplateElement[] { + return unpackNodeArray(global.generatedEs2panda._TemplateLiteralQuasisConst(global.context, this.peer)) + } + get expressions(): readonly Expression[] { + return unpackNodeArray(global.generatedEs2panda._TemplateLiteralExpressionsConst(global.context, this.peer)) + } + get multilineString(): string { + return unpackString(global.generatedEs2panda._TemplateLiteralGetMultilineStringConst(global.context, this.peer)) + } + protected readonly brandTemplateLiteral: undefined +} +export function isTemplateLiteral(node: object | undefined): node is TemplateLiteral { + return node instanceof TemplateLiteral +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL, (peer: KNativePointer) => new TemplateLiteral(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TEMPLATE_LITERAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ThisExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ThisExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..06c494b701d68af7eee0989abe6904b1cbaf4020 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ThisExpression.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class ThisExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createThisExpression(): ThisExpression { + const result: ThisExpression = new ThisExpression(global.generatedEs2panda._CreateThisExpression(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_THIS_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateThisExpression(original?: ThisExpression): ThisExpression { + const result: ThisExpression = new ThisExpression(global.generatedEs2panda._UpdateThisExpression(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_THIS_EXPRESSION) + result.setChildrenParentPtr() + return result + } + protected readonly brandThisExpression: undefined +} +export function isThisExpression(node: object | undefined): node is ThisExpression { + return node instanceof ThisExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_THIS_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_THIS_EXPRESSION, (peer: KNativePointer) => new ThisExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_THIS_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ThrowStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ThrowStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..184a854bccb990c3e16a4de05e940dde20bc923f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ThrowStatement.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { Statement } from "./Statement" + +export class ThrowStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createThrowStatement(argument?: Expression): ThrowStatement { + const result: ThrowStatement = new ThrowStatement(global.generatedEs2panda._CreateThrowStatement(global.context, passNode(argument)), Es2pandaAstNodeType.AST_NODE_TYPE_THROW_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateThrowStatement(original?: ThrowStatement, argument?: Expression): ThrowStatement { + const result: ThrowStatement = new ThrowStatement(global.generatedEs2panda._UpdateThrowStatement(global.context, passNode(original), passNode(argument)), Es2pandaAstNodeType.AST_NODE_TYPE_THROW_STATEMENT) + result.setChildrenParentPtr() + return result + } + get argument(): Expression | undefined { + return unpackNode(global.generatedEs2panda._ThrowStatementArgumentConst(global.context, this.peer)) + } + protected readonly brandThrowStatement: undefined +} +export function isThrowStatement(node: object | undefined): node is ThrowStatement { + return node instanceof ThrowStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_THROW_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_THROW_STATEMENT, (peer: KNativePointer) => new ThrowStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_THROW_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TryStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TryStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..28376d9e3a35dde1a9c4b4bf5f1b9b5b98ae3cd1 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TryStatement.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { BlockStatement } from "./BlockStatement" +import { CatchClause } from "./CatchClause" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { LabelPair } from "./LabelPair" +import { Statement } from "./Statement" + +export class TryStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTryStatement(block: BlockStatement | undefined, catchClauses: readonly CatchClause[], finalizer: BlockStatement | undefined, finalizerInsertionsLabelPair: readonly LabelPair[], finalizerInsertionsStatement: readonly Statement[]): TryStatement { + const result: TryStatement = new TryStatement(global.generatedEs2panda._CreateTryStatement(global.context, passNode(block), passNodeArray(catchClauses), catchClauses.length, passNode(finalizer), passNodeArray(finalizerInsertionsLabelPair), finalizerInsertionsLabelPair.length, passNodeArray(finalizerInsertionsStatement), finalizerInsertionsStatement.length), Es2pandaAstNodeType.AST_NODE_TYPE_TRY_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateTryStatement(original: TryStatement | undefined, block: BlockStatement | undefined, catchClauses: readonly CatchClause[], finalizer: BlockStatement | undefined, finalizerInsertionsLabelPair: readonly LabelPair[], finalizerInsertionsStatement: readonly Statement[]): TryStatement { + const result: TryStatement = new TryStatement(global.generatedEs2panda._UpdateTryStatement(global.context, passNode(original), passNode(block), passNodeArray(catchClauses), catchClauses.length, passNode(finalizer), passNodeArray(finalizerInsertionsLabelPair), finalizerInsertionsLabelPair.length, passNodeArray(finalizerInsertionsStatement), finalizerInsertionsStatement.length), Es2pandaAstNodeType.AST_NODE_TYPE_TRY_STATEMENT) + result.setChildrenParentPtr() + return result + } + static update1TryStatement(original?: TryStatement, other?: TryStatement): TryStatement { + const result: TryStatement = new TryStatement(global.generatedEs2panda._UpdateTryStatement1(global.context, passNode(original), passNode(other)), Es2pandaAstNodeType.AST_NODE_TYPE_TRY_STATEMENT) + result.setChildrenParentPtr() + return result + } + get finallyBlock(): BlockStatement | undefined { + return unpackNode(global.generatedEs2panda._TryStatementFinallyBlockConst(global.context, this.peer)) + } + get block(): BlockStatement | undefined { + return unpackNode(global.generatedEs2panda._TryStatementBlockConst(global.context, this.peer)) + } + get hasFinalizer(): boolean { + return global.generatedEs2panda._TryStatementHasFinalizerConst(global.context, this.peer) + } + get hasDefaultCatchClause(): boolean { + return global.generatedEs2panda._TryStatementHasDefaultCatchClauseConst(global.context, this.peer) + } + get catchClauses(): readonly CatchClause[] { + return unpackNodeArray(global.generatedEs2panda._TryStatementCatchClausesConst(global.context, this.peer)) + } + get finallyCanCompleteNormally(): boolean { + return global.generatedEs2panda._TryStatementFinallyCanCompleteNormallyConst(global.context, this.peer) + } + /** @deprecated */ + setFinallyCanCompleteNormally(finallyCanCompleteNormally: boolean): this { + global.generatedEs2panda._TryStatementSetFinallyCanCompleteNormally(global.context, this.peer, finallyCanCompleteNormally) + return this + } + protected readonly brandTryStatement: undefined +} +export function isTryStatement(node: object | undefined): node is TryStatement { + return node instanceof TryStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TRY_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TRY_STATEMENT, (peer: KNativePointer) => new TryStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TRY_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TypeNode.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TypeNode.ts new file mode 100644 index 0000000000000000000000000000000000000000..c06674cc49da7f2414572068235fab5dfa3b05f1 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TypeNode.ts @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { SrcDumper } from "./SrcDumper" + +export class TypeNode extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._TypeNodeHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._TypeNodeEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._TypeNodeClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._TypeNodeDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TypeNodeAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._TypeNodeAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TypeNodeSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._TypeNodeSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + protected readonly brandTypeNode: undefined +} +export function isTypeNode(node: object | undefined): node is TypeNode { + return node instanceof TypeNode +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TypedAstNode.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TypedAstNode.ts new file mode 100644 index 0000000000000000000000000000000000000000..fabf268ae0d89749d3d427060aae4f300a447b68 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TypedAstNode.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" + +export class TypedAstNode extends AstNode { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + protected readonly brandTypedAstNode: undefined +} +export function isTypedAstNode(node: object | undefined): node is TypedAstNode { + return node instanceof TypedAstNode +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TypedStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TypedStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..4070d382e0ff74432fd220575110fb335f9edc81 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TypedStatement.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Statement } from "./Statement" + +export class TypedStatement extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + protected readonly brandTypedStatement: undefined +} +export function isTypedStatement(node: object | undefined): node is TypedStatement { + return node instanceof TypedStatement +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/TypeofExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/TypeofExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..d68760a7477ca599381ede9bc882686ed9c4580c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/TypeofExpression.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class TypeofExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createTypeofExpression(argument?: Expression): TypeofExpression { + const result: TypeofExpression = new TypeofExpression(global.generatedEs2panda._CreateTypeofExpression(global.context, passNode(argument)), Es2pandaAstNodeType.AST_NODE_TYPE_TYPEOF_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateTypeofExpression(original?: TypeofExpression, argument?: Expression): TypeofExpression { + const result: TypeofExpression = new TypeofExpression(global.generatedEs2panda._UpdateTypeofExpression(global.context, passNode(original), passNode(argument)), Es2pandaAstNodeType.AST_NODE_TYPE_TYPEOF_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get argument(): Expression | undefined { + return unpackNode(global.generatedEs2panda._TypeofExpressionArgumentConst(global.context, this.peer)) + } + protected readonly brandTypeofExpression: undefined +} +export function isTypeofExpression(node: object | undefined): node is TypeofExpression { + return node instanceof TypeofExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_TYPEOF_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_TYPEOF_EXPRESSION, (peer: KNativePointer) => new TypeofExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_TYPEOF_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/UnaryExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/UnaryExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..b9bcd64225fa67d689e2d7a63a1be3c8d0281417 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/UnaryExpression.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaTokenType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class UnaryExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createUnaryExpression(argument: Expression | undefined, unaryOperator: Es2pandaTokenType): UnaryExpression { + const result: UnaryExpression = new UnaryExpression(global.generatedEs2panda._CreateUnaryExpression(global.context, passNode(argument), unaryOperator), Es2pandaAstNodeType.AST_NODE_TYPE_UNARY_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateUnaryExpression(original: UnaryExpression | undefined, argument: Expression | undefined, unaryOperator: Es2pandaTokenType): UnaryExpression { + const result: UnaryExpression = new UnaryExpression(global.generatedEs2panda._UpdateUnaryExpression(global.context, passNode(original), passNode(argument), unaryOperator), Es2pandaAstNodeType.AST_NODE_TYPE_UNARY_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get operatorType(): Es2pandaTokenType { + return global.generatedEs2panda._UnaryExpressionOperatorTypeConst(global.context, this.peer) + } + get argument(): Expression | undefined { + return unpackNode(global.generatedEs2panda._UnaryExpressionArgument(global.context, this.peer)) + } + /** @deprecated */ + setArgument(arg?: Expression): this { + global.generatedEs2panda._UnaryExpressionSetArgument(global.context, this.peer, passNode(arg)) + return this + } + protected readonly brandUnaryExpression: undefined +} +export function isUnaryExpression(node: object | undefined): node is UnaryExpression { + return node instanceof UnaryExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_UNARY_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_UNARY_EXPRESSION, (peer: KNativePointer) => new UnaryExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_UNARY_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/UndefinedLiteral.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/UndefinedLiteral.ts new file mode 100644 index 0000000000000000000000000000000000000000..4bc40796198f6ec8d3ffacc01abef36288cdefb0 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/UndefinedLiteral.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Literal } from "./Literal" + +export class UndefinedLiteral extends Literal { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createUndefinedLiteral(): UndefinedLiteral { + const result: UndefinedLiteral = new UndefinedLiteral(global.generatedEs2panda._CreateUndefinedLiteral(global.context), Es2pandaAstNodeType.AST_NODE_TYPE_UNDEFINED_LITERAL) + result.setChildrenParentPtr() + return result + } + static updateUndefinedLiteral(original?: UndefinedLiteral): UndefinedLiteral { + const result: UndefinedLiteral = new UndefinedLiteral(global.generatedEs2panda._UpdateUndefinedLiteral(global.context, passNode(original)), Es2pandaAstNodeType.AST_NODE_TYPE_UNDEFINED_LITERAL) + result.setChildrenParentPtr() + return result + } + protected readonly brandUndefinedLiteral: undefined +} +export function isUndefinedLiteral(node: object | undefined): node is UndefinedLiteral { + return node instanceof UndefinedLiteral +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_UNDEFINED_LITERAL)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_UNDEFINED_LITERAL, (peer: KNativePointer) => new UndefinedLiteral(peer, Es2pandaAstNodeType.AST_NODE_TYPE_UNDEFINED_LITERAL)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/UpdateExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/UpdateExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..e56b7fb03d1b59ee250f331a788ca51f49e51b90 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/UpdateExpression.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaTokenType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class UpdateExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createUpdateExpression(argument: Expression | undefined, updateOperator: Es2pandaTokenType, isPrefix: boolean): UpdateExpression { + const result: UpdateExpression = new UpdateExpression(global.generatedEs2panda._CreateUpdateExpression(global.context, passNode(argument), updateOperator, isPrefix), Es2pandaAstNodeType.AST_NODE_TYPE_UPDATE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateUpdateExpression(original: UpdateExpression | undefined, argument: Expression | undefined, updateOperator: Es2pandaTokenType, isPrefix: boolean): UpdateExpression { + const result: UpdateExpression = new UpdateExpression(global.generatedEs2panda._UpdateUpdateExpression(global.context, passNode(original), passNode(argument), updateOperator, isPrefix), Es2pandaAstNodeType.AST_NODE_TYPE_UPDATE_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get operatorType(): Es2pandaTokenType { + return global.generatedEs2panda._UpdateExpressionOperatorTypeConst(global.context, this.peer) + } + get argument(): Expression | undefined { + return unpackNode(global.generatedEs2panda._UpdateExpressionArgument(global.context, this.peer)) + } + get isPrefix(): boolean { + return global.generatedEs2panda._UpdateExpressionIsPrefixConst(global.context, this.peer) + } + protected readonly brandUpdateExpression: undefined +} +export function isUpdateExpression(node: object | undefined): node is UpdateExpression { + return node instanceof UpdateExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_UPDATE_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_UPDATE_EXPRESSION, (peer: KNativePointer) => new UpdateExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_UPDATE_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/VReg.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/VReg.ts new file mode 100644 index 0000000000000000000000000000000000000000..5871cd606c9611af0296fa6d8be85c694d3f40a5 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/VReg.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class VReg extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandVReg: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/ValidationInfo.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/ValidationInfo.ts new file mode 100644 index 0000000000000000000000000000000000000000..adb0df6bb54cfa1863b3ec0b23b23217e29da0d6 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/ValidationInfo.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { SourcePosition } from "./SourcePosition" + +export class ValidationInfo extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + static create1ValidationInfo(m: string, p?: SourcePosition): ValidationInfo { + return new ValidationInfo(global.generatedEs2panda._CreateValidationInfo1(global.context, m, passNode(p))) + } + get fail(): boolean { + return global.generatedEs2panda._ValidationInfoFailConst(global.context, this.peer) + } + protected readonly brandValidationInfo: undefined +} +export function isValidationInfo(node: object | undefined): node is ValidationInfo { + return node instanceof ValidationInfo +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/VariableDeclaration.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/VariableDeclaration.ts new file mode 100644 index 0000000000000000000000000000000000000000..3ee86944aa92e0b81f60f188aaee5e4b005fc142 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/VariableDeclaration.ts @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { AnnotationUsage } from "./AnnotationUsage" +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaVariableDeclarationKind } from "./../Es2pandaEnums" +import { SrcDumper } from "./SrcDumper" +import { Statement } from "./Statement" +import { VariableDeclarator } from "./VariableDeclarator" + +export class VariableDeclaration extends Statement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createVariableDeclaration(kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[], annotations?: readonly AnnotationUsage[]): VariableDeclaration { + const result: VariableDeclaration = new VariableDeclaration(global.generatedEs2panda._CreateVariableDeclaration(global.context, kind, passNodeArray(declarators), declarators.length), Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + static updateVariableDeclaration(original: VariableDeclaration | undefined, kind: Es2pandaVariableDeclarationKind, declarators: readonly VariableDeclarator[], annotations?: readonly AnnotationUsage[]): VariableDeclaration { + const result: VariableDeclaration = new VariableDeclaration(global.generatedEs2panda._UpdateVariableDeclaration(global.context, passNode(original), kind, passNodeArray(declarators), declarators.length), Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION) + if (annotations) + { + result.setAnnotations(annotations) + } + result.setChildrenParentPtr() + return result + } + get declarators(): readonly VariableDeclarator[] { + return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDeclarators(global.context, this.peer)) + } + get declaratorsForUpdate(): readonly VariableDeclarator[] { + return unpackNodeArray(global.generatedEs2panda._VariableDeclarationDeclaratorsForUpdate(global.context, this.peer)) + } + get kind(): Es2pandaVariableDeclarationKind { + return global.generatedEs2panda._VariableDeclarationKindConst(global.context, this.peer) + } + get hasAnnotations(): boolean { + return global.generatedEs2panda._VariableDeclarationHasAnnotationsConst(global.context, this.peer) + } + /** @deprecated */ + emplaceAnnotation(source?: AnnotationUsage): this { + global.generatedEs2panda._VariableDeclarationEmplaceAnnotation(global.context, this.peer, passNode(source)) + return this + } + /** @deprecated */ + clearAnnotations(): this { + global.generatedEs2panda._VariableDeclarationClearAnnotations(global.context, this.peer) + return this + } + /** @deprecated */ + dumpAnnotations(dumper?: SrcDumper): this { + global.generatedEs2panda._VariableDeclarationDumpAnnotationsConst(global.context, this.peer, passNode(dumper)) + return this + } + get annotationsForUpdate(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._VariableDeclarationAnnotationsForUpdate(global.context, this.peer)) + } + get annotations(): readonly AnnotationUsage[] { + return unpackNodeArray(global.generatedEs2panda._VariableDeclarationAnnotations(global.context, this.peer)) + } + /** @deprecated */ + setAnnotations(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._VariableDeclarationSetAnnotations(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + /** @deprecated */ + setAnnotations1(annotationList: readonly AnnotationUsage[]): this { + global.generatedEs2panda._VariableDeclarationSetAnnotations1(global.context, this.peer, passNodeArray(annotationList), annotationList.length) + return this + } + protected readonly brandVariableDeclaration: undefined +} +export function isVariableDeclaration(node: object | undefined): node is VariableDeclaration { + return node instanceof VariableDeclaration +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION, (peer: KNativePointer) => new VariableDeclaration(peer, Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/VariableDeclarator.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/VariableDeclarator.ts new file mode 100644 index 0000000000000000000000000000000000000000..5355e971a1dd83c47b0876f24da292fa21169dca --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/VariableDeclarator.ts @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Es2pandaVariableDeclaratorFlag } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { TypedStatement } from "./TypedStatement" + +export class VariableDeclarator extends TypedStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static create1VariableDeclarator(flag: Es2pandaVariableDeclaratorFlag, ident?: Expression, init?: Expression): VariableDeclarator { + const result: VariableDeclarator = new VariableDeclarator(global.generatedEs2panda._CreateVariableDeclarator1(global.context, flag, passNode(ident), passNode(init)), Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR) + result.setChildrenParentPtr() + return result + } + static updateVariableDeclarator(original: VariableDeclarator | undefined, flag: Es2pandaVariableDeclaratorFlag, ident?: Expression): VariableDeclarator { + const result: VariableDeclarator = new VariableDeclarator(global.generatedEs2panda._UpdateVariableDeclarator(global.context, passNode(original), flag, passNode(ident)), Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR) + result.setChildrenParentPtr() + return result + } + static update1VariableDeclarator(original: VariableDeclarator | undefined, flag: Es2pandaVariableDeclaratorFlag, ident?: Expression, init?: Expression): VariableDeclarator { + const result: VariableDeclarator = new VariableDeclarator(global.generatedEs2panda._UpdateVariableDeclarator1(global.context, passNode(original), flag, passNode(ident), passNode(init)), Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR) + result.setChildrenParentPtr() + return result + } + get init(): Expression | undefined { + return unpackNode(global.generatedEs2panda._VariableDeclaratorInit(global.context, this.peer)) + } + /** @deprecated */ + setInit(init?: Expression): this { + global.generatedEs2panda._VariableDeclaratorSetInit(global.context, this.peer, passNode(init)) + return this + } + get id(): Expression | undefined { + return unpackNode(global.generatedEs2panda._VariableDeclaratorId(global.context, this.peer)) + } + get flag(): Es2pandaVariableDeclaratorFlag { + return global.generatedEs2panda._VariableDeclaratorFlag(global.context, this.peer) + } + protected readonly brandVariableDeclarator: undefined +} +export function isVariableDeclarator(node: object | undefined): node is VariableDeclarator { + return node instanceof VariableDeclarator +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR, (peer: KNativePointer) => new VariableDeclarator(peer, Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/VerificationContext.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/VerificationContext.ts new file mode 100644 index 0000000000000000000000000000000000000000..d2340ecd42b51a7be6c873a17afc8e20edf085ba --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/VerificationContext.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class VerificationContext extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandVerificationContext: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/VerifierMessage.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/VerifierMessage.ts new file mode 100644 index 0000000000000000000000000000000000000000..15482293a397c06647c0f8c1481229bd361b380e --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/VerifierMessage.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + + +export class VerifierMessage extends ArktsObject { + constructor(pointer: KNativePointer) { + super(pointer) + } + protected readonly brandVerifierMessage: undefined +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/WhileStatement.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/WhileStatement.ts new file mode 100644 index 0000000000000000000000000000000000000000..c597fdc8017cf5d16b9910407901911dd1325083 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/WhileStatement.ts @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" +import { LoopStatement } from "./LoopStatement" +import { Statement } from "./Statement" + +export class WhileStatement extends LoopStatement { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createWhileStatement(test?: Expression, body?: Statement): WhileStatement { + const result: WhileStatement = new WhileStatement(global.generatedEs2panda._CreateWhileStatement(global.context, passNode(test), passNode(body)), Es2pandaAstNodeType.AST_NODE_TYPE_WHILE_STATEMENT) + result.setChildrenParentPtr() + return result + } + static updateWhileStatement(original?: WhileStatement, test?: Expression, body?: Statement): WhileStatement { + const result: WhileStatement = new WhileStatement(global.generatedEs2panda._UpdateWhileStatement(global.context, passNode(original), passNode(test), passNode(body)), Es2pandaAstNodeType.AST_NODE_TYPE_WHILE_STATEMENT) + result.setChildrenParentPtr() + return result + } + get test(): Expression | undefined { + return unpackNode(global.generatedEs2panda._WhileStatementTest(global.context, this.peer)) + } + /** @deprecated */ + setTest(test?: Expression): this { + global.generatedEs2panda._WhileStatementSetTest(global.context, this.peer, passNode(test)) + return this + } + get body(): Statement | undefined { + return unpackNode(global.generatedEs2panda._WhileStatementBody(global.context, this.peer)) + } + protected readonly brandWhileStatement: undefined +} +export function isWhileStatement(node: object | undefined): node is WhileStatement { + return node instanceof WhileStatement +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_WHILE_STATEMENT)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_WHILE_STATEMENT, (peer: KNativePointer) => new WhileStatement(peer, Es2pandaAstNodeType.AST_NODE_TYPE_WHILE_STATEMENT)) +} diff --git a/koala_tools/ui2abc/libarkts/src/generated/peers/YieldExpression.ts b/koala_tools/ui2abc/libarkts/src/generated/peers/YieldExpression.ts new file mode 100644 index 0000000000000000000000000000000000000000..1e8b074ebb8cb800fc38f29aa2923a5ab0ce5239 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/generated/peers/YieldExpression.ts @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2024 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. + */ + +/* + * THIS FILE IS AUTOGENERATED BY arktscgen. DO NOT EDIT MANUALLY! + */ + +import { + global, + passNode, + passNodeArray, + unpackNonNullableNode, + unpackNode, + unpackNodeArray, + assertValidPeer, + AstNode, + KNativePointer, + nodeByType, + ArktsObject, + unpackString +} from "../../reexport-for-generated" + +import { Es2pandaAstNodeType } from "./../Es2pandaEnums" +import { Expression } from "./Expression" + +export class YieldExpression extends Expression { + constructor(pointer: KNativePointer, astNodeType: Es2pandaAstNodeType) { + super(pointer, astNodeType) + } + static createYieldExpression(argument: Expression | undefined, isDelegate: boolean): YieldExpression { + const result: YieldExpression = new YieldExpression(global.generatedEs2panda._CreateYieldExpression(global.context, passNode(argument), isDelegate), Es2pandaAstNodeType.AST_NODE_TYPE_YIELD_EXPRESSION) + result.setChildrenParentPtr() + return result + } + static updateYieldExpression(original: YieldExpression | undefined, argument: Expression | undefined, isDelegate: boolean): YieldExpression { + const result: YieldExpression = new YieldExpression(global.generatedEs2panda._UpdateYieldExpression(global.context, passNode(original), passNode(argument), isDelegate), Es2pandaAstNodeType.AST_NODE_TYPE_YIELD_EXPRESSION) + result.setChildrenParentPtr() + return result + } + get hasDelegate(): boolean { + return global.generatedEs2panda._YieldExpressionHasDelegateConst(global.context, this.peer) + } + get argument(): Expression | undefined { + return unpackNode(global.generatedEs2panda._YieldExpressionArgumentConst(global.context, this.peer)) + } + protected readonly brandYieldExpression: undefined +} +export function isYieldExpression(node: object | undefined): node is YieldExpression { + return node instanceof YieldExpression +} +if (!nodeByType.has(Es2pandaAstNodeType.AST_NODE_TYPE_YIELD_EXPRESSION)) { + nodeByType.set(Es2pandaAstNodeType.AST_NODE_TYPE_YIELD_EXPRESSION, (peer: KNativePointer) => new YieldExpression(peer, Es2pandaAstNodeType.AST_NODE_TYPE_YIELD_EXPRESSION)) +} diff --git a/koala_tools/ui2abc/libarkts/src/index.ts b/koala_tools/ui2abc/libarkts/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..730181a83a64bc2512cfd06fe7dbfa841a0bd7ad --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/index.ts @@ -0,0 +1,46 @@ +/* + * 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. + */ + +export * from "./checkSdk" +export * from "./utils" +export * from "./reexport-for-generated" +export * from "./generated/Es2pandaEnums" +export * from "./generated" + +export * from "./arkts-api/utilities/private" +export * from "./arkts-api/utilities/public" +export * from "./arkts-api/factory/nodeFactory" +export * from "./arkts-api/visitor" +export * from "./arkts-api/AbstractVisitor" +export * from "./arkts-api/ChainExpressionFilter" +export * from "./arkts-api/plugins" +export * from "./arkts-api/ImportStorage" +export * from "./arkts-api/ProgramProvider" +export * from "./arkts-api/node-utilities/Program" +export * from "./arkts-api/node-utilities/ArkTsConfig" + +export * from "./arkts-api/peers/AstNode" +export * from "./arkts-api/peers/Config" +export * from "./arkts-api/peers/Context" +export { GlobalContext } from "./arkts-api/peers/Context" +export * from "./arkts-api/peers/ExternalSource" +export * from "./arkts-api/peers/ImportPathManager" +export * from "./arkts-api/peers/Options" +export { global as arktsGlobal } from "./arkts-api/static/global" +export * from "./arkts-api/static/globalUtils" +export * as arkts from "./arkts-api" + +export * from "./plugin-utils" +export * from "./tracer" diff --git a/koala_tools/ui2abc/libarkts/src/plugin-utils.ts b/koala_tools/ui2abc/libarkts/src/plugin-utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..6cfd9ff5bef0d13280d6ec3a2f3ed0913f37230f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/plugin-utils.ts @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + Es2pandaContextState, + PluginContext, + ImportStorage, + arktsGlobal, + ChainExpressionFilter, + ProgramTransformer, + Program, + ProgramProvider, + CompilationOptions, + dumpProgramSrcFormatted, +} from "./arkts-api" +import { Tracer } from "./tracer" + +export interface RunTransformerHooks { + onProgramTransformStart?(options: CompilationOptions, program: Program): void + onProgramTransformEnd?(options: CompilationOptions, program: Program): void +} + +class ASTCache { + processedPrograms = new Set() + constructor() { } + find(program: Program): boolean { + return this.processedPrograms.has(program.absoluteName) + } + update(program: Program) { + this.processedPrograms.add(program.absoluteName) + } +} + +export class DumpingHooks implements RunTransformerHooks { + constructor(private state: Es2pandaContextState, private pluginName: string, private dumpAst: boolean = false) { + if (process.env.KOALA_DUMP_PLUGIN_AST) { + this.dumpAst = true + } + } + onProgramTransformStart(options: CompilationOptions, program: Program) { + if (this.dumpAst) { + console.log(`BEFORE ${this.pluginName}:`) + dumpProgramSrcFormatted(program, true) + } + if (!options.isProgramForCodegeneration) arktsGlobal.profiler.transformDepStarted() + } + onProgramTransformEnd(options: CompilationOptions, program: Program) { + if (!options.isProgramForCodegeneration) arktsGlobal.profiler.transformDepEnded(this.state, this.pluginName) + if (this.dumpAst) { + console.log(`AFTER ${this.pluginName}:`) + dumpProgramSrcFormatted(program, true) + } + } +} + + +export function runTransformerOnProgram(program: Program, options: CompilationOptions, transform: ProgramTransformer | undefined, pluginContext: PluginContext, hooks: RunTransformerHooks = {}) { + arktsGlobal.filePath = program.absoluteName + + Tracer.startProgramTracing(program) + + // Perform some additional actions before the transformation start + hooks.onProgramTransformStart?.(options, program) + + // Save currently existing imports in the program + const importStorage = new ImportStorage(program, options.state == Es2pandaContextState.ES2PANDA_STATE_PARSED) + + // Run the plugin itself + transform?.(program, options, pluginContext) + + // Run some common plugins that should be run after plugin usage and depends on the current state + stateSpecificPostFilters(program, options.state) + + // Update internal import information based on import modification by plugin + importStorage.update() + + // Perform some additional actions after the transformation end + hooks.onProgramTransformEnd?.(options, program) + + Tracer.stopProgramTracing() +} + +export function runTransformer(prog: Program, state: Es2pandaContextState, transform: ProgramTransformer | undefined, pluginContext: PluginContext, hooks: RunTransformerHooks = {}) { + // Program provider used to provide programs to transformer dynamically relative to inserted imports + const provider = new ProgramProvider(prog) + + // The first program provided by program provider is the main program + let currentProgram = provider.next() + let isMainProgram = true + + while (currentProgram) { + // Options passed to plugin and hooks + const options: CompilationOptions = { + isProgramForCodegeneration: isProgramForCodegeneration(currentProgram, isMainProgram), + state, + } + + runTransformerOnProgram(currentProgram, options, transform, pluginContext, hooks) + + // The first program is always the main program + isMainProgram = false + + // Proceed to the next program + currentProgram = provider.next() + } +} + +function stateSpecificPostFilters(program: Program, state: Es2pandaContextState) { + if (state == Es2pandaContextState.ES2PANDA_STATE_CHECKED) { + program.setAst(new ChainExpressionFilter().visitor(program.ast)) + } +} + +function isProgramForCodegeneration( + program: Program, + isMainProgram: boolean, +): boolean { + if (!arktsGlobal.isContextGenerateAbcForExternalSourceFiles) { + return isMainProgram + } + return program.isGenAbcForExternal +} diff --git a/koala_tools/ui2abc/libarkts/src/reexport-for-generated.ts b/koala_tools/ui2abc/libarkts/src/reexport-for-generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..824c34447a9b30091ca62115514dd13459808d2c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/reexport-for-generated.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2024 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. + */ +export { KNativePointer } from "@koalaui/interop" +export { AstNode } from "./arkts-api/peers/AstNode" +export { ArktsObject, isSameNativeObject } from "./arkts-api/peers/ArktsObject" +export { NodeCache } from "./arkts-api/node-cache" +export { + passNode, + unpackNonNullableNode, + unpackNodeArray, + passNodeArray, + unpackNode, + unpackNonNullableObject, + unpackString, + unpackObject, + assertValidPeer, + updateNodeByNode +} from "./arkts-api/utilities/private" +export { nodeByType } from "./arkts-api/class-by-peer" +export { global } from "./arkts-api/static/global" +export { Es2pandaMemberExpressionKind } from "./generated/Es2pandaEnums" +export { + extension_ETSModuleGetNamespaceFlag, + extension_MethodDefinitionOnUpdate, + extension_MethodDefinitionSetChildrenParentPtr, + extension_ScriptFunctionGetSignaturePointer, + extension_ScriptFunctionSetSignaturePointer, + extension_ScriptFunctionGetPreferredReturnTypePointer, + extension_ScriptFunctionSetPreferredReturnTypePointer, + extension_ExpressionGetPreferredTypePointer, + extension_ExpressionSetPreferredTypePointer, + extension_ProgramGetExternalSources, + extension_SourcePositionGetCol, + extension_SourcePositionGetLine, + extension_SourcePositionToString, + extension_NumberLiteralValue, + extension_ScriptFunctionSetParams, + extension_ClassDefinitionSetBody, +} from "./arkts-api/utilities/extensions" diff --git a/koala_tools/ui2abc/libarkts/src/tracer.ts b/koala_tools/ui2abc/libarkts/src/tracer.ts new file mode 100644 index 0000000000000000000000000000000000000000..10a5773fd49c52edd5f91870f14f860c85741d05 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/tracer.ts @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as fs from "node:fs" +import * as path from "node:path" +import { Program } from "./generated" +import { global } from "./arkts-api/static/global" + +export class Tracer { + static traceDir: string + static GlobalTracer: Tracer + static Tracers: Map + static LRUTracer: Tracer | undefined + + static startGlobalTracing(outDir: string) { + Tracer.traceDir = path.join(outDir, 'trace') + fs.rmSync(Tracer.traceDir, { force: true, recursive: true }) + const globalTraceFile = path.join(Tracer.traceDir, '.global.txt') + + Tracer.GlobalTracer = new Tracer(globalTraceFile) + Tracer.pushContext('tracer') + traceGlobal(() => `Trace file created at ${globalTraceFile}`, true) + + Tracer.Tracers = new Map() + } + + static startProgramTracing(program: Program) { + if (!Tracer.GlobalTracer) { + return + } + const programPath = program.absoluteName + if (programPath == "") { + return + } + const suggestedTracer = Tracer.Tracers.get(programPath) + if (suggestedTracer) { + Tracer.LRUTracer = suggestedTracer + return + } + if (!global.arktsconfig) { + throw new Error("global.arktsconfig should be set for tracer usage") + } + const relative = path.relative(global.arktsconfig?.baseUrl, programPath) + const traceFileSuggestedPath = relative.startsWith('..') + ? path.join(this.traceDir, 'external', program.absoluteName.slice(1)) + : path.join(this.traceDir, relative) + Tracer.LRUTracer = new Tracer( + path.join(path.dirname(traceFileSuggestedPath), path.basename(traceFileSuggestedPath, path.extname(traceFileSuggestedPath)) + '.txt'), + programPath + ) + } + + static stopProgramTracing() { + Tracer.LRUTracer = undefined + } + + static stopGlobalTracing() { + Tracer.GlobalTracer.traceEventsStats() + } + + private constructor(private traceFilePath: string, inputFilePath?: string) { + if (!fs.existsSync(path.dirname(traceFilePath))) { + fs.mkdirSync(path.dirname(traceFilePath), { recursive: true }) + } + if (inputFilePath) { + Tracer.Tracers.set(inputFilePath, this) + } + } + + trace(traceLog: string | undefined | void) { + if (!traceLog) { + return + } + const lastContext = Tracer.lastContext() + fs.appendFileSync(this.traceFilePath, `[${lastContext.padStart(12)}] ${traceLog}\n`, 'utf-8') + } + + events: Map | undefined + eventsPerContext: Map > | undefined + + recordEvent(event: string) { + if (!this.events) { + this.events = new Map() + } + this.events.set(event, (this.events.get(event) ?? 0) + 1) + + if (!this.eventsPerContext) { + this.eventsPerContext = new Map >() + } + if (!this.eventsPerContext.has(Tracer.lastContext())) { + this.eventsPerContext.set(Tracer.lastContext(), new Map()) + } + const eventsPerContext = this.eventsPerContext.get(Tracer.lastContext()) + eventsPerContext?.set(event, (eventsPerContext.get(event) ?? 0) + 1) + } + + traceEventsStats() { + if (this.events && this.eventsPerContext) { + const maxLength = Math.max( + ...[...this.events.keys()].map(it => `Event "${it}"`.length), + ...[...this.eventsPerContext?.keys()].map(it => ` in context [${it}]`.length), + ) + this.trace(`Events stats:`) + this.events.forEach((eventCnt: number, event: string) => { + this.trace(`${`Event "${event}"`.padEnd(maxLength)}: ${eventCnt}`) + this.eventsPerContext?.forEach((localizedEventsMap: Map, context: string) => { + localizedEventsMap.forEach((localizedEventCnt: number, localizedEvent: string) => { + if (localizedEvent == event) { + this.trace(`${` in context [${context}]`.padEnd(maxLength)}: ${localizedEventCnt}`) + } + }) + }) + }) + } else { + this.trace('No events recorded') + } + Tracer.popContext() + } + + private static contexts: string[] = [] + + static lastContext() { + return Tracer.contexts[Tracer.contexts.length - 1] + } + + static pushContext(newContext: string) { + Tracer.contexts.push(newContext) + } + + static popContext() { + Tracer.contexts.pop() + } +} + +export function traceGlobal(traceLog: () => string | undefined | void, forceLogToConsole: boolean = false) { + if (forceLogToConsole) { + const result = traceLog() + if (result) { + console.log(`[${Tracer.lastContext()}] ${result}`) + } + } + if (!Tracer.GlobalTracer) { + return + } + Tracer.GlobalTracer.trace(traceLog()) +} + +export function trace(event: string, traceLog: () => string | undefined | void, forceLogToConsole: boolean = false) { + if (forceLogToConsole) { + const result = traceLog() + if (result) { + console.log(`[${Tracer.lastContext()}] ${result}`) + } + } + if (!Tracer.GlobalTracer) { + return + } + Tracer.LRUTracer?.trace(traceLog()) + Tracer.GlobalTracer.recordEvent(event) +} diff --git a/koala_tools/ui2abc/libarkts/src/ts-api/factory/nodeFactory.ts b/koala_tools/ui2abc/libarkts/src/ts-api/factory/nodeFactory.ts new file mode 100644 index 0000000000000000000000000000000000000000..641ff6588520ae760776958ed128457fed389402 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/ts-api/factory/nodeFactory.ts @@ -0,0 +1,1390 @@ +/* + * 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 { throwError } from "../../utils" +import * as ts from "@koalaui/ets-tsc" +import * as arkts from "../../arkts-api" + +import { + passNode, + passNodeArray, + passToken, + passModifiersToScriptFunction, + passModifiers, + passIdentifier, + passTypeParams, + passVariableDeclarationKind, +} from "../utilities/private" +import { + SyntaxKind, + NodeFlags, +} from "../static/enums" +import { + Es2pandaContextState, + Es2pandaPrimitiveType, + Es2pandaMethodDefinitionKind, + Es2pandaModifierFlags, + Es2pandaScriptFunctionFlags, + Es2pandaMemberExpressionKind, + Es2pandaClassDefinitionModifiers, + Es2pandaVariableDeclarationKind, + Es2pandaVariableDeclaratorFlag, +} from "../../arkts-api" +import { + // ts types: + Modifier, + BinaryOperatorToken, + + Node, + Token, + Identifier, + StringLiteral, + FunctionDeclaration, + Block, + KeywordTypeNode, + PropertyAccessExpression, + ParameterDeclaration, + ReturnStatement, + IfStatement, + ExpressionStatement, + CallExpression, + ArrowFunction, + TypeReferenceNode, + BinaryExpression, + FunctionTypeNode, + TypeNode, + Expression, + Statement, + SourceFile, + ClassElement, + MethodDeclaration, + ConstructorDeclaration, + TypeParameterDeclaration, + NumericLiteral, + ClassDeclaration, + VariableDeclaration, + VariableDeclarationList, + VariableStatement, + UnionTypeNode, + SuperExpression, + ParenthesizedExpression, + ImportDeclaration, + ImportClause, + ImportSpecifier, +} from "../types" + +// Improve: add flags and base +export function createNodeFactory() { + return { + createSourceFile, + updateSourceFile, + createIdentifier, + createStringLiteral, + createNumericLiteral, + createFunctionDeclaration, + updateFunctionDeclaration, + createParameterDeclaration, + updateParameterDeclaration, + createETSTypeReferenceNode, + updateTypeReferenceNode, + createKeywordTypeNode, + createBlock, + updateBlock, + createExpressionStatement, + updateExpressionStatement, + createReturnStatement, + updateReturnStatement, + createPropertyAccessExpression, + updatePropertyAccessExpression, + createCallExpression, + updateCallExpression, + createIfStatement, + updateIfStatement, + createToken, + createBinaryExpression, + updateBinaryExpression, + createArrowFunction, + updateArrowFunction, + createFunctionTypeNode, + updateFunctionTypeNode, + createMethodDeclaration, + updateMethodDeclaration, + createConstructorDeclaration, + updateConstructorDeclaration, + createTypeParameterDeclaration, + updateTypeParameterDeclaration, + createClassDeclaration, + updateClassDeclaration, + createVariableDeclarationList, + updateVariableDeclarationList, + createVariableStatement, + updateVariableStatement, + createVariableDeclaration, + updateVariableDeclaration, + createETSUnionTypeNode, + updateETSUnionTypeNode, + createSuper, + updateSuper, + createParenthesizedExpression, + updateParenthesizedExpression, + // createImportDeclaration, + createImportSpecifier, + } + + // @api + // function createSourceFile( + // statements: readonly Statement[], + // endOfFileToken: EndOfFileToken, + // flags: NodeFlags, + // ): SourceFile; + function createSourceFile(source: string, state: Es2pandaContextState = Es2pandaContextState.ES2PANDA_STATE_PARSED): SourceFile { + const node = arkts.EtsScript.createFromSource(source, state) + return new SourceFile(node) + } + + // Improve: fix (now doesn't create a new node) + // @api + // updateSourceFile( + // node: SourceFile, + // statements: readonly Statement[], + // isDeclarationFile?: boolean, + // referencedFiles?: readonly FileReference[], + // typeReferences?: readonly FileReference[], + // hasNoDefaultLib?: boolean, + // libReferences?: readonly FileReference[] + // ): SourceFile; + function updateSourceFile( + node: SourceFile, + statements: readonly Statement[] + ): SourceFile { + return new SourceFile( + arkts.EtsScript.updateByStatements( + node.node, + passNodeArray(statements) + ) + ) + } + + // @api + // createIdentifier( + // text: string + // ): Identifier; + function createIdentifier( + text: string, + typeAnnotation?: TypeNode | undefined + ): Identifier { + return new Identifier( + arkts.factory.createIdentifier( + text, + passNode(typeAnnotation) + ) + ) + } + + // @api + // createStringLiteral( + // text: string, + // isSingleQuote?: boolean + // ): StringLiteral; + function createStringLiteral( + str: string + ): StringLiteral { + return new StringLiteral( + arkts.factory.createStringLiteral( + str + ) + ) + } + + // @api + // createNumericLiteral( + // value: string | number, + // numericLiteralFlags: TokenFlags = TokenFlags.None + // ): NumericLiteral { + function createNumericLiteral( + value: number + ): NumericLiteral { + return new NumericLiteral( + arkts.factory.createNumberLiteral( + value + ) + ) + } + + // @api + // createVariableDeclarationList( + // declarations: readonly VariableDeclaration[], + // flags = NodeFlags.None + // ): VariableDeclarationList + function createVariableDeclarationList( + declarations: readonly VariableDeclaration[], + flags: NodeFlags = NodeFlags.None + ): VariableDeclarationList { + return new VariableDeclarationList( + arkts.factory.createVariableDeclaration( + passModifiers([]), + passVariableDeclarationKind(flags), + passNodeArray(declarations) + ) + ) + } + + // @api + // updateVariableDeclarationList( + // node: VariableDeclarationList, + // declarations: readonly VariableDeclaration[] + // ): VariableDeclarationList + function updateVariableDeclarationList( + node: VariableDeclarationList, + declarations: readonly VariableDeclaration[] + ): VariableDeclarationList { + return new VariableDeclarationList( + arkts.factory.updateVariableDeclaration( + node.node, + passModifiers([]), + passVariableDeclarationKind(node.flags), + passNodeArray(declarations) + ) + ) + } + + // @api + // createVariableStatement( + // modifiers: readonly ModifierLike[] | undefined, + // declarationList: VariableDeclarationList | readonly VariableDeclaration[] + // ): VariableStatement + function createVariableStatement( + modifiers: readonly Modifier[] | undefined, + declarationList: VariableDeclarationList | readonly VariableDeclaration[] + ): VariableStatement { + const node: arkts.VariableDeclaration = (declarationList instanceof VariableDeclarationList) ? declarationList.node : createVariableDeclarationList(declarationList, undefined).node + return new VariableStatement( + arkts.factory.createVariableDeclaration( + passModifiers(modifiers), + node.declarationKind, + node.declarators + ) + ) + } + + // @api + // updateVariableStatement( + // node: VariableStatement, + // modifiers: readonly ModifierLike[] | undefined, + // declarationList: VariableDeclarationList + // ): VariableStatement + function updateVariableStatement( + node: VariableStatement, + modifiers: readonly Modifier[] | undefined, + declarationList: VariableDeclarationList + ): VariableStatement { + return new VariableStatement( + arkts.factory.updateVariableDeclaration( + node.node, + passModifiers(modifiers), + declarationList.node.declarationKind, + declarationList.node.declarators + ) + ) + } + + // @api + // createVariableDeclaration( + // name: string | BindingName, + // exclamationToken: ExclamationToken | undefined, + // type: TypeNode | undefined, + // initializer: Expression | undefined + // ): VariableDeclaration + function createVariableDeclaration( + name: string | Identifier, + exclamationToken: undefined, + type: TypeNode | undefined, + initializer: Expression | undefined + ): VariableDeclaration { + return new VariableDeclaration( + arkts.factory.createVariableDeclarator( + // Improve: maybe incorrect + Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_UNKNOWN, + passIdentifier(name, type), + passNode(initializer) + ) + ) + } + + // @api + // function updateVariableDeclaration( + // node: VariableDeclaration, + // name: BindingName, + // exclamationToken: ExclamationToken | undefined, + // type: TypeNode | undefined, + // initializer: Expression | undefined + // ): VariableDeclaration + function updateVariableDeclaration( + node: VariableDeclaration, + name: Identifier, + exclamationToken: undefined, + type: TypeNode | undefined, + initializer: Expression | undefined + ): VariableDeclaration { + return new VariableDeclaration( + arkts.factory.updateVariableDeclarator( + node.node, + // Improve: maybe incorrect + Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_UNKNOWN, + passIdentifier(name, type), + passNode(initializer) + ) + ) + } + + // @api + // createFunctionDeclaration( + // modifiers: readonly ModifierLike[] | undefined, + // asteriskToken: AsteriskToken | undefined, + // name: string | Identifier | undefined, + // typeParameters: readonly TypeParameterDeclaration[] | undefined, + // parameters: readonly ParameterDeclaration[], + // type: TypeNode | undefined, + // body: Block | undefined + // ): FunctionDeclaration; + function createFunctionDeclaration( + modifiers: readonly Modifier[] | undefined, + asteriskToken: undefined, + name: string | Identifier | undefined, + typeParameters: readonly TypeParameterDeclaration[] | undefined, + parameters: readonly ParameterDeclaration[], + type: TypeNode | undefined, + body: Block | undefined + ): FunctionDeclaration { + return new FunctionDeclaration( + arkts.factory.createFunctionDeclaration( + arkts.factory.createScriptFunction( + body?.node, + arkts.FunctionSignature.create( + passTypeParams(typeParameters), + passNodeArray(parameters), + type?.node + ), + 0, + passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC | Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC, + body === undefined, + passIdentifier(name) + ), + false + ) + ) + } + + // @api + // updateFunctionDeclaration( + // node: FunctionDeclaration, + // modifiers: readonly ModifierLike[] | undefined, + // asteriskToken: AsteriskToken | undefined, + // name: Identifier | undefined, + // typeParameters: readonly TypeParameterDeclaration[] | undefined, + // parameters: readonly ParameterDeclaration[], + // type: TypeNode | undefined, + // body: Block | undefined + // ): FunctionDeclaration; + function updateFunctionDeclaration( + node: FunctionDeclaration, + modifiers: readonly Modifier[] | undefined, + asteriskToken: undefined, + name: Identifier | undefined, + typeParameters: readonly TypeParameterDeclaration[] | undefined, + parameters: readonly ParameterDeclaration[], + type: TypeNode | undefined, + body: Block | undefined + ): FunctionDeclaration { + return new FunctionDeclaration( + arkts.factory.updateFunctionDeclaration( + node.node, + arkts.factory.updateScriptFunction( + node.node.scriptFunction, + body?.node, + arkts.FunctionSignature.create( + passTypeParams(typeParameters), + passNodeArray(parameters), + type?.node + ), + 0, + passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC | Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC, + body === undefined, + passIdentifier(name) + ), + false + ) + ) + } + + // @api + // createParameterDeclaration( + // modifiers: readonly ModifierLike[] | undefined, + // dotDotDotToken: DotDotDotToken | undefined, + // name: string | BindingName, + // questionToken?: QuestionToken, + // type?: TypeNode, + // initializer?: Expression + // ): ParameterDeclaration; + function createParameterDeclaration( + modifiers: readonly Modifier[] | undefined, + dotDotDotToken: undefined, + name: string | Identifier, + questionToken?: undefined, + type?: TypeNode, + initializer?: Expression + ): ParameterDeclaration { + return new ParameterDeclaration( + arkts.factory.createParameterDeclaration( + arkts.factory.createIdentifier( + (name instanceof Identifier) ? name.node.name : name, + type?.node + ), + initializer?.node + ) + ) + } + + // @api + // function updateParameterDeclaration( + // node: ParameterDeclaration, + // modifiers: readonly ModifierLike[] | undefined, + // dotDotDotToken: DotDotDotToken | undefined, + // name: string | BindingName, + // questionToken: QuestionToken | undefined, + // type: TypeNode | undefined, + // initializer: Expression | undefined, + // ): ParameterDeclaration + function updateParameterDeclaration( + node: ParameterDeclaration, + modifiers: readonly Modifier[] | undefined, + dotDotDotToken: undefined, + name: string | Identifier, + questionToken?: undefined, + type?: TypeNode, + initializer?: Expression + ): ParameterDeclaration { + return new ParameterDeclaration( + arkts.factory.updateParameterDeclaration( + node.node, + arkts.factory.createIdentifier( + (name instanceof Identifier) ? name.node.name : name, + type?.node + ), + initializer?.node + ) + ) + } + + // @api + // createTypeParameterDeclaration( + // modifiers: readonly Modifier[] | undefined, + // name: string | Identifier, + // constraint?: TypeNode, + // defaultType?: TypeNode + // ): TypeParameterDeclaration; + function createTypeParameterDeclaration( + modifiers: readonly Modifier[] | undefined, + name: string | Identifier, + constraint?: TypeNode, + defaultType?: TypeNode + ): TypeParameterDeclaration { + return new TypeParameterDeclaration( + arkts.factory.createTypeParameter( + passIdentifier(name), + constraint?.node, + defaultType?.node, + passModifiers(modifiers) + ) + ) + } + + // @api + // function updateTypeParameterDeclaration( + // node: TypeParameterDeclaration, + // modifiers: readonly Modifier[] | undefined, + // name: Identifier, + // constraint: TypeNode | undefined, + // defaultType: TypeNode | undefined + // ): TypeParameterDeclaration + function updateTypeParameterDeclaration( + node: TypeParameterDeclaration, + modifiers: readonly Modifier[] | undefined, + name: string | Identifier, + constraint?: TypeNode, + defaultType?: TypeNode + ): TypeParameterDeclaration { + return new TypeParameterDeclaration( + arkts.factory.updateTypeParameter( + node.node, + passIdentifier(name), + constraint?.node, + defaultType?.node, + passModifiers(modifiers) + ) + ) + } + + // @api + // createETSUnionTypeNode( + // types: readonly TypeNode[] + // ): UnionTypeNode + function createETSUnionTypeNode( + types: readonly TypeNode[] + ): UnionTypeNode { + return new UnionTypeNode( + arkts.factory.createETSUnionType( + passNodeArray(types) + ) + ) + } + + // @api + // function updateETSUnionTypeNode( + // node: UnionTypeNode, + // types: NodeArray + // ): UnionTypeNode + function updateETSUnionTypeNode( + node: UnionTypeNode, + types: readonly TypeNode[] + ): UnionTypeNode { + return new UnionTypeNode( + arkts.factory.updateETSUnionType( + node.node, + passNodeArray(types) + ) + ) + + } + + // @api + // createETSTypeReferenceNode( + // typeName: string | EntityName, + // typeArguments?: readonly TypeNode[] + // ): TypeReferenceNode; + function createETSTypeReferenceNode( + typeName: Identifier, + typeArguments?: undefined + ): TypeReferenceNode { + return new TypeReferenceNode( + arkts.factory.createETSTypeReferenceFromId( + typeName.node + ) + ) + } + + // @api + // function updateTypeReferenceNode( + // node: TypeReferenceNode, + // typeName: EntityName, + // typeArguments: NodeArray | undefined + // ): TypeReferenceNode + function updateTypeReferenceNode( + node: TypeReferenceNode, + typeName: Identifier, + typeArguments?: undefined + ): TypeReferenceNode { + return new TypeReferenceNode( + arkts.factory.updateTypeReferenceFromId( + node.node, + typeName.node + ) + ) + } + + // @api + // createKeywordTypeNode( + // kind: TKind + // ): KeywordTypeNode; + function createKeywordTypeNode( + TKind: ts.KeywordTypeSyntaxKind + ): KeywordTypeNode { + function createKeywordTypeNodeFromString( + keyword: string + ): KeywordTypeNode { + return new KeywordTypeNode( + arkts.factory.createETSTypeReferenceFromId( + arkts.factory.createIdentifier( + keyword + ) + ) + ) + } + + function createKeywordTypeNodeFromKind( + kind: number + ): KeywordTypeNode { + return new KeywordTypeNode( + arkts.factory.createPrimitiveType( + kind + ) + ) + } + + const keywords = new Map([ + [ts.SyntaxKind.NumberKeyword, createKeywordTypeNodeFromString("number")], + [ts.SyntaxKind.StringKeyword, createKeywordTypeNodeFromString("string")], + [ts.SyntaxKind.AnyKeyword, createKeywordTypeNodeFromString("any")], + [ts.SyntaxKind.VoidKeyword, createKeywordTypeNodeFromKind(8)], + ]) + return keywords.get(TKind) ?? throwError('unsupported keyword') + } + + // @api + // createBlock( + // statements: readonly Statement[], + // multiLine?: boolean + // ): Block; + function createBlock( + statements: readonly Statement[], + multiline?: boolean + ): Block { + return new Block( + arkts.factory.createBlock( + passNodeArray(statements) + ) + ) + } + + // @api + // updateBlock( + // node: Block, + // statements: readonly Statement[] + // ): Block; + function updateBlock( + node: Block, + statements: readonly Statement[] + ): Block { + return new Block( + arkts.factory.updateBlock( + node.node, + passNodeArray(statements) + ) + ) + } + + // @api + // createExpressionStatement( + // expression: Expression + // ): ExpressionStatement; + function createExpressionStatement( + expression: Expression + ): ExpressionStatement { + return new ExpressionStatement( + arkts.factory.createExpressionStatement( + expression.node + ) + ) + } + + // @api + // updateExpressionStatement( + // node: ExpressionStatement, + // expression: Expression + // ): ExpressionStatement; + function updateExpressionStatement( + node: ExpressionStatement, + expression: Expression + ): ExpressionStatement { + return new ExpressionStatement( + arkts.factory.updateExpressionStatement( + node.node, + expression.node + ) + ) + } + + // @api + // createReturnStatement( + // expression?: Expression + // ): ReturnStatement; + function createReturnStatement( + expression: Expression + ): ReturnStatement { + return new ReturnStatement( + arkts.factory.createReturnStatement( + expression.node + ) + ) + } + + // @api + // function updateReturnStatement( + // node: ReturnStatement, + // expression: Expression | undefined + // ): ReturnStatement + function updateReturnStatement( + node: ReturnStatement, + expression: Expression + ): ReturnStatement { + return new ReturnStatement( + arkts.factory.updateReturnStatement( + node.node, + expression.node + ) + ) + } + + // @api + // createPropertyAccessExpression( + // expression: Expression, + // name: string | MemberName + // ): PropertyAccessExpression; + function createPropertyAccessExpression( + expression: Expression, + name: string | Identifier + ): PropertyAccessExpression { + return new PropertyAccessExpression( + arkts.factory.createMemberExpression( + expression.node, + passIdentifier(name), + Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ) + ) + } + + // @api + // updatePropertyAccessExpression( + // node: PropertyAccessExpression, + // expression: Expression, + // name: MemberName + // ): PropertyAccessExpression; + function updatePropertyAccessExpression( + node: PropertyAccessExpression, + expression: Expression, + name: Identifier + ): PropertyAccessExpression { + return new PropertyAccessExpression( + arkts.factory.updateMemberExpression( + node.node, + expression.node, + passIdentifier(name), + Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ) + ) + } + + // @api + // createCallExpression( + // expression: Expression, + // typeArguments: readonly TypeNode[] | undefined, + // argumentsArray: readonly Expression[] | undefined + // ): CallExpression; + function createCallExpression( + expression: Expression, + typeArguments: readonly TypeNode[] | undefined, + argumentsArray: readonly Expression[] | undefined + ): CallExpression { + return new CallExpression( + arkts.factory.createCallExpression( + expression.node, + (typeArguments !== undefined) ? + arkts.factory.createTypeParameterDeclaration(passNodeArray(typeArguments)) : undefined, + passNodeArray(argumentsArray) + ) + ) + } + + // @api + // updateCallExpression( + // node: CallExpression, + // expression: Expression, + // typeArguments: readonly TypeNode[] | undefined, + // argumentsArray: readonly Expression[] + // ): CallExpression; + function updateCallExpression( + node: CallExpression, + expression: Expression, + typeArguments: readonly TypeNode[] | undefined, + argumentsArray: readonly Expression[] | undefined + ): CallExpression { + return new CallExpression( + arkts.factory.updateCallExpression( + node.node, + expression.node, + (typeArguments !== undefined) ? + arkts.factory.createTypeParameterDeclaration(passNodeArray(typeArguments)) : undefined, + passNodeArray(argumentsArray) + ) + ) + } + + // @api + // createIfStatement( + // expression: Expression, + // thenStatement: Statement, + // elseStatement?: Statement + // ): IfStatement; + function createIfStatement( + expression: Expression, + thenStatement: Statement, + elseStatement?: undefined + ): IfStatement { + return new IfStatement( + arkts.factory.createIfStatement( + passNode(expression), + passNode(thenStatement), + passNode(elseStatement), + ) + ) + } + + // @api + // updateIfStatement( + // expression: Expression, + // thenStatement: Statement, + // elseStatement: Statement | undefined + // ): IfStatement; + function updateIfStatement( + node: IfStatement, + expression: Expression, + thenStatement: Statement, + elseStatement?: undefined + ): IfStatement { + return new IfStatement( + arkts.factory.updateIfStatement( + node.node, + passNode(expression), + passNode(thenStatement), + passNode(elseStatement), + ) + ) + } + + // Improve: rewrite maybe + // @api + // createToken( + // token: SyntaxKind._ + // ): _; + function createToken( + token: TKind + ) { + return new Token(token) + } + + // @api + // createBinaryExpression( + // left: Expression, + // operator: BinaryOperator | BinaryOperatorToken, + // right: Expression + // ): BinaryExpression; + function createBinaryExpression( + left: Expression, + operator: BinaryOperatorToken, + right: Expression + ): BinaryExpression { + return new BinaryExpression( + arkts.factory.createBinaryExpression( + passNode(left), + passToken(operator), + passNode(right), + ) + ) + } + + // @api + // function updateBinaryExpression( + // node: BinaryExpression, + // left: Expression, + // operator: BinaryOperatorToken, + // right: Expression + // ): BinaryExpression + function updateBinaryExpression( + node: BinaryExpression, + left: Expression, + operator: BinaryOperatorToken, + right: Expression + ): BinaryExpression { + return new BinaryExpression( + arkts.factory.updateBinaryExpression( + node.node, + passNode(left), + passToken(operator), + passNode(right), + ) + ) + } + + // @api + // createArrowFunction( + // modifiers: readonly Modifier[] | undefined, + // typeParameters: readonly TypeParameterDeclaration[] | undefined, + // parameters: readonly ParameterDeclaration[], + // type: TypeNode | undefined, + // equalsGreaterThanToken: EqualsGreaterThanToken | undefined, + // body: ConciseBody + // ): ArrowFunction; + function createArrowFunction( + modifiers: readonly Modifier[] | undefined, + typeParameters: readonly TypeParameterDeclaration[] | undefined, + parameters: readonly ParameterDeclaration[], + type: TypeNode | undefined, + equalsGreaterThanToken: Token | undefined, + body: Block + ) { + return new ArrowFunction( + arkts.factory.createArrowFunction( + arkts.factory.createScriptFunction( + passNode(body), + arkts.FunctionSignature.create( + passTypeParams(typeParameters), + passNodeArray(parameters), + passNode(type) + ), + passModifiersToScriptFunction(modifiers) | Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_ARROW, + passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + false, + undefined + ) + ) + ) + } + + // @api + // function updateArrowFunction( + // node: ArrowFunction, + // modifiers: readonly Modifier[] | undefined, + // typeParameters: readonly TypeParameterDeclaration[] | undefined, + // parameters: readonly ParameterDeclaration[], + // type: TypeNode | undefined, + // equalsGreaterThanToken: EqualsGreaterThanToken, + // body: ConciseBody, + // ): ArrowFunction + function updateArrowFunction( + node: ArrowFunction, + modifiers: readonly Modifier[] | undefined, + typeParameters: readonly TypeParameterDeclaration[] | undefined, + parameters: readonly ParameterDeclaration[], + type: undefined, + equalsGreaterThanToken: Token | undefined, + body: Block, + ): ArrowFunction { + return new ArrowFunction( + arkts.factory.updateArrowFunction( + node.node, + arkts.factory.updateScriptFunction( + node.node.scriptFunction, + passNode(body), + arkts.FunctionSignature.create( + passTypeParams(typeParameters), + passNodeArray(parameters), + passNode(type) + ), + passModifiersToScriptFunction(modifiers) | Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_ARROW, + passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + false, + undefined + ) + ) + ) + } + + // @api + // function createClassDeclaration( + // modifiers: readonly ModifierLike[] | undefined, + // name: string | Identifier | undefined, + // typeParameters: readonly TypeParameterDeclaration[] | undefined, + // heritageClauses: readonly HeritageClause[] | undefined, + // members: readonly ClassElement[], + // ): ClassDeclaration + function createClassDeclaration( + modifiers: readonly Modifier[] | undefined, + name: string | Identifier | undefined, + typeParameters: readonly TypeParameterDeclaration[] | undefined, + heritageClauses: readonly TypeParameterDeclaration[] | undefined, + members: readonly ClassElement[] + ): ClassDeclaration { + return new ClassDeclaration( + arkts.factory.createClassDeclaration( + arkts.factory.createClassDefinition( + passIdentifier(name), + passNodeArray(members), + // passModifiers(modifiers) | es2panda_ModifierFlags.MODIFIER_FLAGS_PUBLIC | es2panda_ModifierFlags.MODIFIER_FLAGS_STATIC, + Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + // Improve: pass through modifiers + Es2pandaClassDefinitionModifiers.CLASS_DEFINITION_MODIFIERS_NONE, + passTypeParams(typeParameters), + undefined + ) + ) + ) + } + + // @api + // updateClassDeclaration( + // node: ClassDeclaration, + // modifiers: readonly ModifierLike[] | undefined, + // name: Identifier | undefined, + // typeParameters: readonly TypeParameterDeclaration[] | undefined, + // heritageClauses: readonly HeritageClause[] | undefined, + // members: readonly ClassElement[] + // ): ClassDeclaration; + function updateClassDeclaration( + node: ClassDeclaration, + modifiers: readonly Modifier[] | undefined, + name: Identifier | undefined, + typeParameters: readonly TypeParameterDeclaration[] | undefined, + heritageClauses: undefined, + members: readonly ClassElement[] + ): ClassDeclaration { + return new ClassDeclaration( + arkts.factory.updateClassDeclaration( + node.node, + arkts.factory.updateClassDefinition( + node.node.definition, + passIdentifier(name), + passNodeArray(members), + // passModifiers(modifiers) | es2panda_ModifierFlags.MODIFIER_FLAGS_PUBLIC | es2panda_ModifierFlags.MODIFIER_FLAGS_STATIC, + Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + // Improve: pass through modifiers + Es2pandaClassDefinitionModifiers.CLASS_DEFINITION_MODIFIERS_NONE, + passTypeParams(typeParameters) + ) + ) + ) + } + + // @api + // tsc: createFunctionTypeNode( + // typeParameters: readonly TypeParameterDeclaration[] | undefined, + // parameters: readonly ParameterDeclaration[], + // type: TypeNode + // ): FunctionTypeNode; + function createFunctionTypeNode( + typeParameters: readonly TypeParameterDeclaration[] | undefined, + parameters: readonly ParameterDeclaration[], + type: TypeNode + ): FunctionTypeNode { + return new FunctionTypeNode( + arkts.factory.createFunctionType( + arkts.FunctionSignature.create( + passTypeParams(typeParameters), + passNodeArray(parameters), + passNode(type) + ), + Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_NONE + ) + ) + } + + // @api + // function updateFunctionTypeNode( + // node: FunctionTypeNode, + // typeParameters: NodeArray | undefined, + // parameters: NodeArray, + // type: TypeNode, + // ): FunctionTypeNode + function updateFunctionTypeNode( + node: FunctionTypeNode, + typeParameters: readonly TypeParameterDeclaration[] | undefined, + parameters: readonly ParameterDeclaration[], + type: TypeNode + ): FunctionTypeNode { + return new FunctionTypeNode( + arkts.factory.updateFunctionType( + node.node, + arkts.FunctionSignature.create( + passTypeParams(typeParameters), + passNodeArray(parameters), + passNode(type) + ), + Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_NONE + ) + ) + } + + // Improve: fix modifiers + // @api + // createMethodDeclaration( + // modifiers: readonly ModifierLike[] | undefined, + // asteriskToken: AsteriskToken | undefined, + // name: string | PropertyName, + // questionToken: QuestionToken | undefined, + // typeParameters: readonly TypeParameterDeclaration[] | undefined, + // parameters: readonly ParameterDeclaration[], + // type: TypeNode | undefined, + // body: Block | undefined + // ): MethodDeclaration; + function createMethodDeclaration( + modifiers: readonly Modifier[] | undefined, + asteriskToken: undefined, + name: string | Identifier, + questionToken: undefined, + typeParameters: readonly TypeParameterDeclaration[] | undefined, + parameters: readonly ParameterDeclaration[], + type: TypeNode | undefined, + body: Block | undefined + ): MethodDeclaration { + const _name = passIdentifier(name) + return new MethodDeclaration( + arkts.factory.createMethodDefinition( + Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD, + _name, + arkts.factory.createFunctionExpression( + arkts.factory.createScriptFunction( + passNode(body), + arkts.FunctionSignature.create( + passTypeParams(typeParameters), + passNodeArray(parameters), + passNode(type) + ), + 0, + passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC || Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC, + false, + _name + ) + ), + passModifiers(modifiers), + false + ) + ) + } + + // @api + // tsc: updateMethodDeclaration( + // node: MethodDeclaration, + // modifiers: readonly ModifierLike[] | undefined, + // asteriskToken: AsteriskToken | undefined, + // name: PropertyName, + // questionToken: QuestionToken | undefined, + // typeParameters: readonly TypeParameterDeclaration[] | undefined, + // parameters: readonly ParameterDeclaration[], + // type: TypeNode | undefined, + // body: Block | undefined + // ): MethodDeclaration; + function updateMethodDeclaration( + node: MethodDeclaration, + modifiers: readonly Modifier[] | undefined, + asteriskToken: undefined, + name: Identifier, + questionToken: undefined, + typeParameters: readonly TypeParameterDeclaration[] | undefined, + parameters: readonly ParameterDeclaration[], + type: undefined, + body: Block | undefined + ): MethodDeclaration { + const _name = passIdentifier(name) + return new MethodDeclaration( + arkts.factory.updateMethodDefinition( + node.node, + Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD, + _name, + arkts.factory.createFunctionExpression( + // Improve: maybe fix + arkts.factory.updateScriptFunction( + node.node.scriptFunction, + passNode(body), + arkts.FunctionSignature.create( + passTypeParams(typeParameters), + passNodeArray(parameters), + passNode(type) + ), + 0, + passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC || Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC, + false, + _name + ) + ), + passModifiers(modifiers), + false + ) + ) + } + + // @api + // createConstructorDeclaration( + // modifiers: readonly ModifierLike[] | undefined, + // parameters: readonly ParameterDeclaration[], + // body: Block | undefined + // ): ConstructorDeclaration; + function createConstructorDeclaration( + modifiers: readonly Modifier[] | undefined, + parameters: readonly ParameterDeclaration[], + body: Block | undefined + ): ConstructorDeclaration { + const _name = arkts.factory.createIdentifier( + "constructor" + ) + return new ConstructorDeclaration( + arkts.factory.createMethodDefinition( + Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_CONSTRUCTOR, + _name, + arkts.factory.createFunctionExpression( + arkts.factory.createScriptFunction( + passNode(body), + arkts.FunctionSignature.create( + undefined, + passNodeArray(parameters), + // Improve: change to void maybe + undefined + ), + passModifiersToScriptFunction(modifiers) | Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_CONSTRUCTOR, + passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC | Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR, + false, + _name + ) + ), + passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR, + false + ) + ) + } + + // @api + // function updateConstructorDeclaration( + // node: ConstructorDeclaration, + // modifiers: readonly ModifierLike[] | undefined, + // parameters: readonly ParameterDeclaration[], + // body: Block | undefined, + // ): ConstructorDeclaration + function updateConstructorDeclaration( + node: ConstructorDeclaration, + modifiers: readonly Modifier[] | undefined, + parameters: readonly ParameterDeclaration[], + body: Block | undefined + ): ConstructorDeclaration { + const _name = arkts.factory.updateIdentifier( + node.node.name, + "constructor" + ) + return new ConstructorDeclaration( + arkts.factory.updateMethodDefinition( + node.node, + Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_CONSTRUCTOR, + _name, + arkts.factory.createFunctionExpression( + // Improve: maybe fix + arkts.factory.updateScriptFunction( + node.node.scriptFunction, + passNode(body), + arkts.FunctionSignature.create( + undefined, + passNodeArray(parameters), + // Improve: change to void maybe + undefined + ), + passModifiersToScriptFunction(modifiers) | Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_CONSTRUCTOR, + passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC | Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR, + false, + _name + ) + ), + passModifiers(modifiers) | Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR, + false + ) + ) + + } + + // @api + // tsc: createSuper( + // ): SuperExpression; + function createSuper( + ): SuperExpression { + return new SuperExpression( + arkts.factory.createSuperExpression() + ) + } + + // @api + // tsc: updateSuper( + // node: SuperExpression + // ): SuperExpression; + function updateSuper( + node: SuperExpression + ): SuperExpression { + return new SuperExpression( + arkts.factory.updateSuperExpression( + node.node, + ) + ) + } + + // @api + // tsc: createParenthesizedExpression( + // expression: Expression + // ): ParenthesizedExpression; + function createParenthesizedExpression( + expression: Expression + ): ParenthesizedExpression { + return expression + // Improve: + // return new ParenthesizedExpression( + // expression + // ) + } + + // @api + // tsc: updateParenthesizedExpression( + // node: ParenthesizedExpression, + // expression: Expression + // ): ParenthesizedExpression; + function updateParenthesizedExpression( + node: ParenthesizedExpression, + expression: Expression + ): ParenthesizedExpression { + return expression + // Improve: + // return new ParenthesizedExpression( + // expression + // ) + } + + // // @api + // // createImportDeclaration( + // // decorators: readonly Decorator[] | undefined, + // // modifiers: readonly Modifier[] | undefined, + // // importClause: ImportClause | undefined, + // // moduleSpecifier: Expression, + // // assertClause?: AssertClause + // // ): ImportDeclaration; + // function createImportDeclaration( + // decorators: undefined, + // modifiers: readonly Modifier[] | undefined, + // importClause: ImportClause | undefined, + // moduleSpecifier: StringLiteral, + // assertClause?: undefined + // ): ImportDeclaration { + // return new ImportDeclaration( + // arkts.EtsImportDeclaration.create( + // undefined, + // arkts.ImportSource.create(moduleSpecifier.node), + + // ) + // ) + // } + + // @api + // createImportSpecifier( + // isTypeOnly: boolean, + // propertyName: Identifier | undefined, + // name: Identifier + // ): ImportSpecifier; + function createImportSpecifier( + isTypeOnly: boolean, + propertyName: Identifier | undefined, + name: Identifier + ): ImportSpecifier { + return new ImportSpecifier( + name.node + ) + } +} + +export const factory = createNodeFactory(); diff --git a/koala_tools/ui2abc/libarkts/src/ts-api/factory/nodeTests.ts b/koala_tools/ui2abc/libarkts/src/ts-api/factory/nodeTests.ts new file mode 100644 index 0000000000000000000000000000000000000000..d108973f6f6d71daed654069d533cb86a8d8e02c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/ts-api/factory/nodeTests.ts @@ -0,0 +1,125 @@ +/* + * 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 { SyntaxKind, } from "@koalaui/ets-tsc" + +import { + ArrowFunction, + Block, + CallExpression, + ClassDeclaration, + ExpressionStatement, + FunctionDeclaration, + FunctionExpression, + FunctionTypeNode, + GetAccessorDeclaration, + Identifier, + MethodDeclaration, + MethodSignature, + Node, + ParameterDeclaration, + PropertyAccessExpression, + PropertyDeclaration, + PropertySignature, + SetAccessorDeclaration, + SourceFile, + VariableDeclaration, + VariableDeclarationList, + VariableStatement, +} from "../types" + +export function isIdentifier(node: Node): node is Identifier { + return node.kind === SyntaxKind.Identifier +} + +export function isCallExpression(node: Node): node is CallExpression { + return node.kind === SyntaxKind.CallExpression +} + +export function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression { + return node.kind === SyntaxKind.PropertyAccessExpression +} + +export function isFunctionDeclaration(node: Node): node is FunctionDeclaration { + return node.kind === SyntaxKind.FunctionDeclaration +} + +export function isMethodDeclaration(node: Node): node is MethodDeclaration { + return node.kind === SyntaxKind.MethodDeclaration +} + +export function isSourceFile(node: Node): node is SourceFile { + return node.kind === SyntaxKind.SourceFile +} + +export function isExpressionStatement(node: Node): node is ExpressionStatement { + return node.kind === SyntaxKind.ExpressionStatement +} + +export function isArrowFunction(node: Node): node is ArrowFunction { + return node.kind === SyntaxKind.ArrowFunction +} + +export function isClassDeclaration(node: Node): node is ClassDeclaration { + return node.kind === SyntaxKind.ClassDeclaration +} + +export function isBlock(node: Node): node is Block { + return node.kind === SyntaxKind.Block +} + +export function isFunctionExpression(node: Node): node is FunctionExpression { + return node.kind === SyntaxKind.FunctionExpression +} + +export function isParameter(node: Node): node is ParameterDeclaration { + return node.kind === SyntaxKind.Parameter +} + +export function isVariableDeclaration(node: Node): node is VariableDeclaration { + return node.kind === SyntaxKind.VariableDeclaration +} + +export function isVariableDeclarationList(node: Node): node is VariableDeclarationList { + return node.kind === SyntaxKind.VariableDeclarationList +} + +export function isPropertyDeclaration(node: Node): node is PropertyDeclaration { + return node.kind === SyntaxKind.PropertyDeclaration +} + +export function isPropertySignature(node: Node): node is PropertySignature { + return node.kind === SyntaxKind.PropertySignature +} + +export function isFunctionTypeNode(node: Node): node is FunctionTypeNode { + return node.kind === SyntaxKind.FunctionType +} + +export function isMethodSignature(node: Node): node is MethodSignature { + return node.kind === SyntaxKind.MethodSignature +} + +export function isGetAccessorDeclaration(node: Node): node is GetAccessorDeclaration { + return node.kind === SyntaxKind.GetAccessor +} + +export function isSetAccessorDeclaration(node: Node): node is SetAccessorDeclaration { + return node.kind === SyntaxKind.SetAccessor +} + +export function isVariableStatement(node: Node): node is VariableStatement { + return node.kind === SyntaxKind.VariableStatement +} diff --git a/koala_tools/ui2abc/libarkts/src/ts-api/index.ts b/koala_tools/ui2abc/libarkts/src/ts-api/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..439eb8086b290dd4a39a7f2f2908fe7dd5574e9d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/ts-api/index.ts @@ -0,0 +1,35 @@ +/* + * 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. + */ + +// Improve: remove private export +export * from "./utilities/private" +export * from "./utilities/public" +export * from "./types" +export * from "./factory/nodeFactory" +export * from "./factory/nodeTests" +export { + visitEachChild, +} from "./visitor/visitor" +export { + SyntaxKind, + NodeFlags, +} from "./static/enums" + +// from ArkTS api +export * from "../arkts-api/static/global" +export { + Es2pandaContextState as ContextState, + Es2pandaPrimitiveType as Es2pandaPrimitiveType, +} from "../arkts-api" diff --git a/koala_tools/ui2abc/libarkts/src/ts-api/static/enums.ts b/koala_tools/ui2abc/libarkts/src/ts-api/static/enums.ts new file mode 100644 index 0000000000000000000000000000000000000000..78dc895df7ecda4ff446e39b9edd61d465cd5eec --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/ts-api/static/enums.ts @@ -0,0 +1,18 @@ +/* + * 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. + */ + +export { SyntaxKind } from "@koalaui/ets-tsc" +export { TokenSyntaxKind } from "@koalaui/ets-tsc" +export { NodeFlags } from "@koalaui/ets-tsc" diff --git a/koala_tools/ui2abc/libarkts/src/ts-api/types.ts b/koala_tools/ui2abc/libarkts/src/ts-api/types.ts new file mode 100644 index 0000000000000000000000000000000000000000..dd265808a583e65d04266365a1eaa63c292f4310 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/ts-api/types.ts @@ -0,0 +1,935 @@ +/* + * 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 * as ts from "@koalaui/ets-tsc" +import * as arkts from "../arkts-api" + +import { throwError } from "../utils" +import { + passModifiers, + emptyImplementation, + unpackModifiers, + unpackNode, + unpackNodeArray, + unpackVariableDeclarationKind, +} from "./utilities/private" +import { SyntaxKind } from "./static/enums" + +// Improve: write implementation +export interface TransformationContext {} + +// Improve: write implementation +export interface Program {} + +// Improve: remove U type param +export type NodeArray, U extends arkts.AstNode | undefined = arkts.AstNode | undefined> = ts.NodeArray + +export abstract class Node implements ts.Node { + constructor(node: T) { + this.node = node + } + + readonly node: T + + // Improve: remove any + get parent(): any { + if (this.node === undefined) { + throwError('trying to get parent of undefined _node') + } + return unpackNode(this.node.parent) + } + + set parent(node: Node) { + if (this.node === undefined) { + throwError('trying to set parent of undefined') + } + if (node.node === undefined) { + throwError('trying to set parent to undefined') + } + this.node.parent = node.node + } + + set modifiers(flags: readonly Modifier[] | undefined) { + if (this.node === undefined) { + throwError('trying to set modifiers of undefined') + } + this.node.modifiers = passModifiers(flags) + } + + get modifiers(): NodeArray { + return unpackModifiers(this.node?.modifiers) + } + + abstract kind: SyntaxKind + + // Improve: + forEachChild(cbNode: (node: ts.Node) => T | undefined, cbNodeArray?: ((nodes: ts.NodeArray) => T | undefined) | undefined): T | undefined { throw new Error("Method not implemented.") } + getSourceFile(): ts.SourceFile { throw new Error("Method not implemented.") } + getChildCount(sourceFile?: ts.SourceFile | undefined): number { throw new Error("Method not implemented.") } + getChildAt(index: number, sourceFile?: ts.SourceFile | undefined): ts.Node { throw new Error("Method not implemented.") } + getChildren(sourceFile?: ts.SourceFile | undefined): ts.Node[] { throw new Error("Method not implemented.") } + + getStart(sourceFile?: ts.SourceFile | undefined, includeJsDocComment?: boolean | undefined): number { throw new Error("Method not implemented.") } + getFullStart(): number { throw new Error("Method not implemented.") } + getEnd(): number { throw new Error("Method not implemented.") } + getWidth(sourceFile?: ts.SourceFileLike | undefined): number { throw new Error("Method not implemented.") } + getFullWidth(): number { throw new Error("Method not implemented.") } + getLeadingTriviaWidth(sourceFile?: ts.SourceFile | undefined): number { throw new Error("Method not implemented.") } + getFullText(sourceFile?: ts.SourceFile | undefined): string { throw new Error("Method not implemented.") } + getText(sourceFile?: ts.SourceFile | undefined): string { throw new Error("Method not implemented.") } + getFirstToken(sourceFile?: ts.SourceFile | undefined): ts.Node | undefined { throw new Error("Method not implemented.") } + getLastToken(sourceFile?: ts.SourceFile | undefined): ts.Node | undefined { throw new Error("Method not implemented.") } + + get symbol(): ts.Symbol { return emptyImplementation() } + get flags(): ts.NodeFlags { return emptyImplementation() } + get pos(): number { return emptyImplementation() } + get end(): number { return emptyImplementation() } +} + +// Improve: add all tokens +export type BinaryOperator = + | ts.SyntaxKind.PlusToken + | ts.SyntaxKind.MinusToken + + | ts.SyntaxKind.AsteriskToken + +export type BinaryOperatorToken = Token; + +// Improve: rethink maybe (temporary solution) +export class Token extends Node { + constructor(kind: TKind) { + super(undefined) + this.kind = kind + } + + readonly kind: TKind; +} + +export type ModifierSyntaxKind = + // | SyntaxKind.ConstructorKeyword + | SyntaxKind.AbstractKeyword + | SyntaxKind.AccessorKeyword + | SyntaxKind.AsyncKeyword + | SyntaxKind.ConstKeyword + | SyntaxKind.DeclareKeyword + | SyntaxKind.DefaultKeyword + | SyntaxKind.ExportKeyword + | SyntaxKind.InKeyword + | SyntaxKind.PrivateKeyword + | SyntaxKind.ProtectedKeyword + | SyntaxKind.PublicKeyword + | SyntaxKind.ReadonlyKeyword + | SyntaxKind.OutKeyword + | SyntaxKind.OverrideKeyword + | SyntaxKind.StaticKeyword; + +export class Modifier extends Node { + constructor(kind: ModifierSyntaxKind) { + super(undefined) + this.kind = kind + } + + public toString(): string { + return `${this.kind}` + } + + kind: ModifierSyntaxKind +} + +export abstract class Expression extends Node implements ts.Expression { + // Improve: support minimal interface + _expressionBrand: any +} + +export class FunctionDeclaration extends Node implements ts.FunctionDeclaration, FunctionLikeDeclarationBase { + constructor(node: arkts.FunctionDeclaration) { + super(node) + this.name = unpackNode(node.name) + this.body = unpackNode(node.body) + this.typeParameters = unpackNodeArray(node.typeParamsDecl?.parameters) + this.type = unpackNode(node.returnType) + this.parameters = unpackNodeArray(node.parameters) + } + + readonly name?: Identifier | undefined + readonly body?: Block | undefined + readonly typeParameters?: NodeArray | undefined + readonly type?: TypeNode | undefined + readonly parameters: NodeArray + readonly kind: ts.SyntaxKind.FunctionDeclaration = ts.SyntaxKind.FunctionDeclaration + + // brands + _functionLikeDeclarationBrand: any + _declarationBrand: any + _statementBrand: any +} + +export class FunctionExpression extends Node implements ts.FunctionExpression, FunctionLikeDeclarationBase { + constructor(node: arkts.FunctionExpression) { + super(node) + this.name = unpackNode(node.scriptFunction.ident) + if (node.scriptFunction.body === undefined) { + throwError('body expected to be not undefined') + } + this.body = unpackNode(node.scriptFunction.body) + this.parameters = unpackNodeArray(node.scriptFunction.parameters) + } + + readonly name?: Identifier + readonly body: Block + readonly parameters: NodeArray + readonly kind: ts.SyntaxKind.FunctionExpression = ts.SyntaxKind.FunctionExpression + + // brands + _primaryExpressionBrand: any + _memberExpressionBrand: any + _leftHandSideExpressionBrand: any + _updateExpressionBrand: any + _unaryExpressionBrand: any + _expressionBrand: any + _functionLikeDeclarationBrand: any + _declarationBrand: any +} + +export class Identifier extends Node implements ts.Identifier, Expression { + constructor(node: arkts.Identifier) { + super(node) + this.text = node.name + } + + readonly text: string + readonly kind: ts.SyntaxKind.Identifier = ts.SyntaxKind.Identifier + + // Improve: + get escapedText(): ts.__String { return emptyImplementation() } + + // brands + _primaryExpressionBrand: any + _memberExpressionBrand: any + _leftHandSideExpressionBrand: any + _updateExpressionBrand: any + _unaryExpressionBrand: any + _expressionBrand: any + _declarationBrand: any +} + +export class PrivateIdentifier extends Node implements ts.PrivateIdentifier, Expression { + constructor(node: arkts.Identifier) { + super(node) + this.text = node.name + if (!node.isPrivate) { + throwError('identifier expected to be private') + } + } + + readonly text: string + readonly kind: ts.SyntaxKind.PrivateIdentifier = ts.SyntaxKind.PrivateIdentifier + + // Improve: + get escapedText(): ts.__String { return emptyImplementation() } + + // brands + _primaryExpressionBrand: any + _memberExpressionBrand: any + _leftHandSideExpressionBrand: any + _updateExpressionBrand: any + _unaryExpressionBrand: any + _expressionBrand: any + _declarationBrand: any +} + +export abstract class Statement extends Node implements ts.Statement { + // brands + _statementBrand: any +} + +export class Block extends Node implements ts.Block { + constructor(node: arkts.BlockStatement) { + super(node) + this.statements = unpackNodeArray(node.statements) + } + + readonly statements: NodeArray + readonly kind: ts.SyntaxKind.Block = ts.SyntaxKind.Block + + // brands + _statementBrand: any +} + +export class SourceFile extends Node implements ts.SourceFile { + constructor(node: arkts.EtsScript) { + super(node) + + this.statements = unpackNodeArray(this.node.statements) + } + + readonly statements: NodeArray + readonly kind: ts.SyntaxKind.SourceFile = ts.SyntaxKind.SourceFile + + // Improve: + getLineAndCharacterOfPosition(pos: number): ts.LineAndCharacter { throw new Error("Method not implemented.") } + getLineEndOfPosition(pos: number): number { throw new Error("Method not implemented.") } + getLineStarts(): readonly number[] { throw new Error("Method not implemented.") } + getPositionOfLineAndCharacter(line: number, character: number): number { throw new Error("Method not implemented.") } + update(newText: string, textChangeRange: ts.TextChangeRange): ts.SourceFile { throw new Error("Method not implemented.") } + get endOfFileToken(): ts.Token { return emptyImplementation() } + get fileName(): string { return emptyImplementation() } + get text() { return emptyImplementation() } + get amdDependencies(): readonly ts.AmdDependency[] { return emptyImplementation() } + get referencedFiles(): readonly ts.FileReference[] { return emptyImplementation() } + get typeReferenceDirectives(): readonly ts.FileReference[] { return emptyImplementation() } + get libReferenceDirectives(): readonly ts.FileReference[] { return emptyImplementation() } + get languageVariant(): ts.LanguageVariant { return emptyImplementation() } + get isDeclarationFile(): boolean { return emptyImplementation() } + get hasNoDefaultLib(): boolean { return emptyImplementation() } + get languageVersion(): ts.ScriptTarget { return emptyImplementation() } + + // brands + _declarationBrand: any +} + +export abstract class LeftHandSideExpression extends Node implements ts.LeftHandSideExpression, Expression { + // brands + _leftHandSideExpressionBrand: any + _updateExpressionBrand: any + _unaryExpressionBrand: any + _expressionBrand: any +} + +export class ExpressionStatement extends Node implements ts.ExpressionStatement, Statement { + constructor(node: arkts.ExpressionStatement) { + super(node) + this.expression = unpackNode(this.node.expression) + } + + readonly expression: Expression + readonly kind: ts.SyntaxKind.ExpressionStatement = ts.SyntaxKind.ExpressionStatement + + // brands + _statementBrand: any +} + +export class CallExpression extends Node implements ts.CallExpression, LeftHandSideExpression { + constructor(node: arkts.CallExpression) { + super(node) + this.expression = unpackNode(node.expression) + this.arguments = unpackNodeArray(node.arguments) + } + + readonly expression: LeftHandSideExpression + readonly arguments: NodeArray + readonly kind: ts.SyntaxKind.CallExpression = ts.SyntaxKind.CallExpression + + // brands + _leftHandSideExpressionBrand: any + _updateExpressionBrand: any + _unaryExpressionBrand: any + _expressionBrand: any + _declarationBrand: any +} + +export class PropertyAccessExpression extends Node implements ts.PropertyAccessExpression, Expression { + constructor(node: arkts.MemberExpression) { + super(node) + this.expression = unpackNode(node.object) + this.name = unpackNode(node.property) + } + + readonly expression: LeftHandSideExpression + readonly name: Identifier + readonly kind: ts.SyntaxKind.PropertyAccessExpression = ts.SyntaxKind.PropertyAccessExpression + + // brands + _memberExpressionBrand: any + _leftHandSideExpressionBrand: any + _updateExpressionBrand: any + _unaryExpressionBrand: any + _expressionBrand: any + _declarationBrand: any +} + +export class StringLiteral extends Node implements ts.StringLiteral { + constructor(node: arkts.StringLiteral) { + super(node) + + this.text = node.str + } + + readonly text: string + readonly kind: ts.SyntaxKind.StringLiteral = ts.SyntaxKind.StringLiteral + + // brands + _literalExpressionBrand: any + _primaryExpressionBrand: any + _memberExpressionBrand: any + _leftHandSideExpressionBrand: any + _updateExpressionBrand: any + _unaryExpressionBrand: any + _expressionBrand: any + _declarationBrand: any +} + +export class ClassDeclaration extends Node implements ts.ClassDeclaration { + constructor(node: arkts.ClassDeclaration) { + super(node) + this.name = unpackNode(node.definition.name) + this.members = unpackNodeArray(node.definition.members) + this.typeParameters = unpackNodeArray(node.definition.typeParamsDecl?.parameters) + } + + readonly name: Identifier + readonly members: NodeArray + readonly typeParameters?: NodeArray + readonly kind: ts.SyntaxKind.ClassDeclaration = ts.SyntaxKind.ClassDeclaration + + // brands + _declarationBrand: any + _statementBrand: any +} + +export abstract class ClassElement extends Node implements ts.ClassElement { + // brands + _declarationBrand: any + _classElementBrand: any +} + +export type MemberName = Identifier | PrivateIdentifier; + +// Improve: support +// export type PropertyName = Identifier | StringLiteral | NumericLiteral | ts.ComputedPropertyName | PrivateIdentifier; +export type PropertyName = Identifier | StringLiteral | NumericLiteral | PrivateIdentifier; + +// Improve: support +export type DeclarationName = + | PropertyName + // | JsxAttributeName + // | StringLiteralLike + // | ElementAccessExpression + // | BindingPattern + // | EntityNameExpression; + +export interface Declaration extends Node {} + +export abstract class NamedDeclaration extends Node implements ts.NamedDeclaration, Declaration { + readonly name?: DeclarationName; + + // brands + _declarationBrand: any +} + +export type SignatureDeclaration = ts.CallSignatureDeclaration | ts.ConstructSignatureDeclaration | MethodSignature | ts.IndexSignatureDeclaration | FunctionTypeNode | ts.ConstructorTypeNode | ts.JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | ts.AccessorDeclaration | FunctionExpression | ArrowFunction; + +export interface SignatureDeclarationBase extends NamedDeclaration {} + +export type VariableLikeDeclaration = ts.VariableDeclaration | ParameterDeclaration | ts.BindingElement | PropertyDeclaration | ts.PropertyAssignment | PropertySignature | ts.JsxAttribute | ts.ShorthandPropertyAssignment | ts.EnumMember | ts.JSDocPropertyTag | ts.JSDocParameterTag; + +export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase { + // brands + _functionLikeDeclarationBrand: any; +} + +// Improve: support +// export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction; +export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction; + +export class MethodSignature extends Node implements ts.MethodSignature, SignatureDeclarationBase { + constructor(node: arkts.AstNode) { + super(node) + } + + // readonly name: PropertyName + // readonly parameters: NodeArray + readonly kind: ts.SyntaxKind.MethodSignature = ts.SyntaxKind.MethodSignature + + // Improve: + name: any + parameters: any + + // brands + _declarationBrand: any + _typeElementBrand: any +} + +// export class MethodDeclaration extends Node implements ts.MethodDeclaration, FunctionLikeDeclarationBase, ClassElement { +export class MethodDeclaration extends Node implements ts.MethodDeclaration, ClassElement { + constructor(node: arkts.MethodDefinition) { + super(node) + this.name = unpackNode(node.name) + this.parameters = unpackNodeArray(node.scriptFunction.parameters) + this.body = unpackNode(node.scriptFunction.body) + } + + // tsc: readonly name?: PropertyName + readonly name: Identifier + readonly parameters: NodeArray + // tsc: readonly body?: FunctionBody | undefined + readonly body?: Block | undefined + readonly kind: ts.SyntaxKind.MethodDeclaration = ts.SyntaxKind.MethodDeclaration + + // brands + _functionLikeDeclarationBrand: any + _classElementBrand: any + _objectLiteralBrand: any + _declarationBrand: any +} + +// export class ConstructorDeclaration extends Node implements ts.ConstructorDeclaration, FunctionLikeDeclarationBase, ClassElement { +export class ConstructorDeclaration extends Node implements ts.ConstructorDeclaration, ClassElement { + constructor(node: arkts.MethodDefinition) { + super(node) + this.name = unpackNode(node.name) + this.parameters = unpackNodeArray(node.scriptFunction.parameters) + this.body = unpackNode(node.scriptFunction.body) + } + + // ts: readonly name?: PropertyName + readonly name: Identifier + readonly parameters: NodeArray + // ts: readonly body?: FunctionBody | undefined + readonly body?: Block + readonly kind: ts.SyntaxKind.Constructor = ts.SyntaxKind.Constructor + + // brands + _functionLikeDeclarationBrand: any + _classElementBrand: any + _objectLiteralBrand: any + _declarationBrand: any +} + +// Improve: specify arkts.AstNode type +export class PropertySignature extends Node implements ts.TypeElement { + constructor(node: arkts.AstNode) { + super(node) + } + + readonly name?: PropertyName + readonly kind: ts.SyntaxKind.PropertySignature = ts.SyntaxKind.PropertySignature + + // brands + _typeElementBrand: any + _declarationBrand: any +} + +// Improve: specify arkts.AstNode type +export class PropertyDeclaration extends Node implements ts.PropertyDeclaration, ClassElement { + constructor(node: arkts.AstNode) { + super(node) + } + + readonly kind: ts.SyntaxKind.PropertyDeclaration = ts.SyntaxKind.PropertyDeclaration + + // Improve: + name: any + + // brands + _classElementBrand: any + _declarationBrand: any +} + +// Improve: specify arkts.AstNode type +export class GetAccessorDeclaration extends Node implements ts.GetAccessorDeclaration, FunctionLikeDeclarationBase, ClassElement { + constructor(node: arkts.AstNode) { + super(node) + } + + // readonly name: PropertyName + // readonly parameters: NodeArray + readonly kind: ts.SyntaxKind.GetAccessor = ts.SyntaxKind.GetAccessor + + // Improve: + name: any + parameters: any + + // brands + _functionLikeDeclarationBrand: any + _declarationBrand: any + _classElementBrand: any + _typeElementBrand: any + _objectLiteralBrand: any +} + +// Improve: specify arkts.AstNode type +export class SetAccessorDeclaration extends Node implements ts.SetAccessorDeclaration, FunctionLikeDeclarationBase, ClassElement { + constructor(node: arkts.AstNode) { + super(node) + } + + // readonly name: PropertyName + // readonly parameters: NodeArray + readonly kind: ts.SyntaxKind.SetAccessor = ts.SyntaxKind.SetAccessor + + // Improve: + name: any + parameters: any + + // brands + _functionLikeDeclarationBrand: any + _declarationBrand: any + _classElementBrand: any + _typeElementBrand: any + _objectLiteralBrand: any +} + +export class ParameterDeclaration extends Node implements ts.ParameterDeclaration, NamedDeclaration { + constructor(node: arkts.ETSParameterExpression) { + super(node) + } + + readonly kind: ts.SyntaxKind.Parameter = ts.SyntaxKind.Parameter + + // Improve: + name: any + + // brands + _declarationBrand: any +} + +export type BindingName = Identifier | ts.BindingPattern; + +export class VariableStatement extends Node implements ts.VariableStatement { + constructor(node: arkts.VariableDeclaration) { + super(node) + this.declarationList = new VariableDeclarationList(node) + } + + readonly declarationList: VariableDeclarationList + readonly kind: ts.SyntaxKind.VariableStatement = ts.SyntaxKind.VariableStatement + + // brands + _statementBrand: any +} + +export class VariableDeclarationList extends Node implements ts.VariableDeclarationList { + constructor(node: arkts.VariableDeclaration) { + super(node) + this.declarations = unpackNodeArray(node.declarators) + } + + readonly declarations: NodeArray + get flags(): ts.NodeFlags { return unpackVariableDeclarationKind(this.node.declarationKind) } + readonly kind: ts.SyntaxKind.VariableDeclarationList = ts.SyntaxKind.VariableDeclarationList +} + +export class VariableDeclaration extends Node implements ts.VariableDeclaration, NamedDeclaration { + constructor(node: arkts.VariableDeclarator) { + super(node) + this.name = unpackNode(node.name) + } + + readonly name: Identifier + readonly kind: ts.SyntaxKind.VariableDeclaration = ts.SyntaxKind.VariableDeclaration + + // brands + _declarationBrand: any +} + +export class TypeParameterDeclaration extends Node implements ts.TypeParameterDeclaration { + constructor(node: arkts.TSTypeParameter) { + super(node) + this.name = unpackNode(node.name) + } + + readonly name: Identifier + readonly kind: ts.SyntaxKind.TypeParameter = ts.SyntaxKind.TypeParameter + + // brands + _declarationBrand: any +} + +export abstract class TypeNode extends Node implements ts.TypeNode { + // brands + _typeNodeBrand: any +} + +export class KeywordTypeNode extends Node implements ts.KeywordTypeNode, TypeNode { + constructor(node: arkts.ETSPrimitiveType | arkts.ETSTypeReference) { + super(node) + } + + readonly kind: ts.KeywordTypeSyntaxKind = ts.SyntaxKind.UnknownKeyword + + // brands + _typeNodeBrand: any +} + +export class TypeReferenceNode extends Node implements ts.TypeReferenceNode, TypeNode { + constructor(node: arkts.AstNode) { + super(node) + } + + readonly kind: ts.SyntaxKind.TypeReference = ts.SyntaxKind.TypeReference + + // Improve: + typeName: any + + // brands + _typeNodeBrand: any +} + +export class FunctionTypeNode extends Node implements ts.FunctionTypeNode, TypeNode, SignatureDeclarationBase { + constructor(node: arkts.AstNode) { + super(node) + } + + readonly name?: DeclarationName + readonly kind: ts.SyntaxKind.FunctionType = ts.SyntaxKind.FunctionType + + // Improve: support minimal interface + parameters: any + type: any + + // brands + _typeNodeBrand: any + _declarationBrand: any +} + +export class UnionTypeNode extends Node implements ts.UnionTypeNode, TypeNode { + constructor(node: arkts.ETSUnionType) { + super(node) + this.types = unpackNodeArray(node.types) + } + + readonly types: NodeArray + readonly kind: ts.SyntaxKind.UnionType = ts.SyntaxKind.UnionType + + // brands + _typeNodeBrand: any +} + +export class ReturnStatement extends Node implements ts.ReturnStatement, Statement { + constructor(node: arkts.ReturnStatement) { + super(node) + this.expression = unpackNode(node.argument) + } + + readonly expression: Expression | undefined + readonly kind: ts.SyntaxKind.ReturnStatement = ts.SyntaxKind.ReturnStatement + + // brands + _statementBrand: any +} + +export class IfStatement extends Node implements ts.IfStatement { + constructor(node: arkts.IfStatement) { + super(node) + } + + readonly kind: ts.SyntaxKind.IfStatement = ts.SyntaxKind.IfStatement + + // Improve: + thenStatement: any + expression: any + + // brands + _statementBrand: any +} + +export class BinaryExpression extends Node implements ts.BinaryExpression { + constructor(node: arkts.BinaryExpression) { + super(node) + } + + readonly kind: ts.SyntaxKind.BinaryExpression = ts.SyntaxKind.BinaryExpression + + // Improve: + left: any + right: any + operatorToken: any + + // brands + _expressionBrand: any + _declarationBrand: any +} + +export class AssignmentExpression extends Node implements ts.AssignmentExpression { + constructor(node: arkts.AssignmentExpression) { + super(node) + } + + readonly kind: ts.SyntaxKind.BinaryExpression = ts.SyntaxKind.BinaryExpression + + // Improve: + right: any + left: any + operatorToken: any + + // brands + _expressionBrand: any + _declarationBrand: any +} + +export class ArrowFunction extends Node implements ts.ArrowFunction { + constructor(node: arkts.ArrowFunctionExpression) { + super(node) + if (node.scriptFunction.body === undefined) { + throwError('node.scriptFunction.body not expected to be undefined') + } + this.body = unpackNode(node.scriptFunction.body) + this.parameters = unpackNodeArray(node.scriptFunction.parameters) + } + + get name(): never { return throwError(`name doesn't exist for ArrowFunction`) } + readonly body: Block + readonly parameters: NodeArray + readonly kind: ts.SyntaxKind.ArrowFunction = ts.SyntaxKind.ArrowFunction + + // Improve: + equalsGreaterThanToken: any + + // brands + _expressionBrand: any + _functionLikeDeclarationBrand: any + _declarationBrand: any +} + +export class NumericLiteral extends Node implements ts.NumericLiteral, Declaration { + constructor(node: arkts.NumberLiteral) { + super(node) + + this.text = `${node.value}` + } + + readonly text: string + readonly kind: ts.SyntaxKind.NumericLiteral = ts.SyntaxKind.NumericLiteral + + // brands + _literalExpressionBrand: any + _declarationBrand: any + _primaryExpressionBrand: any + _memberExpressionBrand: any + _leftHandSideExpressionBrand: any + _updateExpressionBrand: any + _unaryExpressionBrand: any + _expressionBrand: any +} + +export class SuperExpression extends Node implements ts.SuperExpression { + constructor(node: arkts.SuperExpression) { + super(node) + } + + readonly kind: ts.SyntaxKind.SuperKeyword = ts.SyntaxKind.SuperKeyword + + // brands + _primaryExpressionBrand: any + _memberExpressionBrand: any + _leftHandSideExpressionBrand: any + _updateExpressionBrand: any + _unaryExpressionBrand: any + _expressionBrand: any +} + +export class HeritageClause extends Node implements ts.HeritageClause { + constructor(node: arkts.SuperExpression) { + super(node) + } + + readonly kind: ts.SyntaxKind.HeritageClause = ts.SyntaxKind.HeritageClause + // token: ts.SyntaxKind.ExtendsKeyword | ts.SyntaxKind.ImplementsKeyword + // types: ts.NodeArray + + // Improve: + token: any + types: any +} + + +// Improve: there is no ParenthesizedExpression in ArkTS, +// so for temporary solution we're just gonna ignore this type of nodes +// and replace it with Expression underneath +export type ParenthesizedExpression = Expression +// export class ParenthesizedExpression extends Node implements ts.ParenthesizedExpression { +// constructor(expression: Expression) { +// super(undefined) +// this.expression = expression +// } + +// readonly expression: Expression +// readonly kind: ts.SyntaxKind.ParenthesizedExpression = ts.SyntaxKind.ParenthesizedExpression + +// // brands +// _primaryExpressionBrand: any +// _memberExpressionBrand: any +// _leftHandSideExpressionBrand: any +// _updateExpressionBrand: any +// _unaryExpressionBrand: any +// _expressionBrand: any +// } + +// Improve: +export class ImportDeclaration extends Node implements ts.ImportDeclaration { + constructor(node: arkts.UnsupportedNode) { + super(node) + } + + readonly kind: ts.SyntaxKind.ImportDeclaration = ts.SyntaxKind.ImportDeclaration + + // Improve: + moduleSpecifier: any + + // brands + _statementBrand: any +} + +// Improve: +export class ImportClause extends Node implements ts.ImportClause { + constructor(node: arkts.UnsupportedNode) { + super(node) + } + + readonly kind: ts.SyntaxKind.ImportClause = ts.SyntaxKind.ImportClause + + // Improve: + isTypeOnly: any + + // brands + _declarationBrand: any +} + +// Improve: +export class NamedImports extends Node implements ts.NamedImports { + constructor(node: arkts.UnsupportedNode) { + super(node) + } + + readonly kind: ts.SyntaxKind.NamedImports = ts.SyntaxKind.NamedImports + + // Improve: + elements: any +} + +export class ImportSpecifier extends Node implements ts.ImportSpecifier { + constructor(node: arkts.Identifier) { + super(node) + this.name = unpackNode(this.node) + } + + readonly name: Identifier + readonly kind: ts.SyntaxKind.ImportSpecifier = ts.SyntaxKind.ImportSpecifier + + // Improve: + isTypeOnly: any + + // brands + _declarationBrand: any +} + +export class UnsupportedNode extends Node implements ts.Node { + constructor(node: arkts.AstNode) { + super(node) + } + + readonly kind: ts.SyntaxKind = SyntaxKind.Unknown +} diff --git a/koala_tools/ui2abc/libarkts/src/ts-api/utilities/private.ts b/koala_tools/ui2abc/libarkts/src/ts-api/utilities/private.ts new file mode 100644 index 0000000000000000000000000000000000000000..060c3d5c7f9d60925aef9b263e6e89fe479075b8 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/ts-api/utilities/private.ts @@ -0,0 +1,289 @@ +/* + * 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 { throwError } from "../../utils" + +import * as ts from "../" +import * as arkts from "../../arkts-api" + +import { KInt } from "@koalaui/interop" +import { + SyntaxKind, + TokenSyntaxKind, + NodeFlags, +} from "../static/enums" +import { + Es2pandaAstNodeType, + Es2pandaModifierFlags, + Es2pandaScriptFunctionFlags, + Es2pandaTokenType, + Es2pandaVariableDeclarationKind, +} from "../../arkts-api" + +export function emptyImplementation(): any { + throwError("Not yet implemented") +} + +type kindTypes = + | { new (node: arkts.AstNode): ts.Node } + | { new (node: arkts.Identifier): ts.Identifier } + | { new (node: arkts.EtsScript): ts.SourceFile } + | { new (node: arkts.StringLiteral): ts.StringLiteral } + | { new (node: arkts.NumberLiteral): ts.NumericLiteral } + | { new (node: arkts.ExpressionStatement): ts.ExpressionStatement } + | { new (node: arkts.FunctionDeclaration): ts.FunctionDeclaration } + | { new (node: arkts.ReturnStatement): ts.ReturnStatement } + | { new (node: arkts.ETSParameterExpression): ts.ParameterDeclaration } + | { new (node: arkts.CallExpression): ts.CallExpression } + | { new (node: arkts.BlockStatement): ts.Block } + | { new (node: arkts.TSTypeParameter): ts.TypeParameterDeclaration} + | { new (node: arkts.MemberExpression): ts.PropertyAccessExpression} + | { new (node: arkts.IfStatement): ts.IfStatement} + | { new (node: arkts.ETSTypeReference): ts.TypeReferenceNode } + | { new (node: arkts.ETSPrimitiveType | arkts.ETSTypeReference): ts.KeywordTypeNode } + | { new (node: arkts.BinaryExpression): ts.BinaryExpression } + | { new (node: arkts.ETSUnionType): ts.UnionTypeNode } + | { new (node: arkts.ArrowFunctionExpression): ts.ArrowFunction } + | { new (node: arkts.ClassDeclaration): ts.ClassDeclaration } + | { new (node: arkts.MethodDefinition): ts.MethodDeclaration } + | { new (node: arkts.VariableDeclarator): ts.VariableDeclaration } + | { new (node: arkts.VariableDeclaration): ts.VariableStatement } + +export function classByEtsNode(node: arkts.AstNode) { + const types = + new Map([ + [Es2pandaAstNodeType.AST_NODE_TYPE_ETS_MODULE, ts.SourceFile], + [Es2pandaAstNodeType.AST_NODE_TYPE_IDENTIFIER, ts.Identifier], + [Es2pandaAstNodeType.AST_NODE_TYPE_STRING_LITERAL, ts.StringLiteral], + [Es2pandaAstNodeType.AST_NODE_TYPE_NUMBER_LITERAL, ts.NumericLiteral], + [Es2pandaAstNodeType.AST_NODE_TYPE_EXPRESSION_STATEMENT, ts.ExpressionStatement], + [Es2pandaAstNodeType.AST_NODE_TYPE_FUNCTION_DECLARATION, ts.FunctionDeclaration], + [Es2pandaAstNodeType.AST_NODE_TYPE_RETURN_STATEMENT, ts.ReturnStatement], + [Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PARAMETER_EXPRESSION, ts.ParameterDeclaration], + [Es2pandaAstNodeType.AST_NODE_TYPE_CALL_EXPRESSION, ts.CallExpression], + [Es2pandaAstNodeType.AST_NODE_TYPE_BLOCK_STATEMENT, ts.Block], + [Es2pandaAstNodeType.AST_NODE_TYPE_ETS_TYPE_REFERENCE, ts.TypeReferenceNode], + [Es2pandaAstNodeType.AST_NODE_TYPE_TS_TYPE_PARAMETER, ts.TypeParameterDeclaration], + [Es2pandaAstNodeType.AST_NODE_TYPE_MEMBER_EXPRESSION, ts.PropertyAccessExpression], + [Es2pandaAstNodeType.AST_NODE_TYPE_IF_STATEMENT, ts.IfStatement], + [Es2pandaAstNodeType.AST_NODE_TYPE_ETS_PRIMITIVE_TYPE, ts.KeywordTypeNode], + [Es2pandaAstNodeType.AST_NODE_TYPE_BINARY_EXPRESSION, ts.BinaryExpression], + [Es2pandaAstNodeType.AST_NODE_TYPE_ETS_UNION_TYPE, ts.UnionTypeNode], + [Es2pandaAstNodeType.AST_NODE_TYPE_ARROW_FUNCTION_EXPRESSION, ts.ArrowFunction], + [Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_DECLARATION, ts.ClassDeclaration], + [Es2pandaAstNodeType.AST_NODE_TYPE_METHOD_DEFINITION, ts.MethodDeclaration], + [Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATION, ts.VariableStatement], + [Es2pandaAstNodeType.AST_NODE_TYPE_VARIABLE_DECLARATOR, ts.VariableDeclaration], + [Es2pandaAstNodeType.AST_NODE_TYPE_SUPER_EXPRESSION, ts.SuperExpression], + + [Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_STATIC_BLOCK, ts.UnsupportedNode], + [Es2pandaAstNodeType.AST_NODE_TYPE_CLASS_PROPERTY, ts.UnsupportedNode], + [Es2pandaAstNodeType.AST_NODE_TYPE_ETS_IMPORT_DECLARATION, ts.UnsupportedNode], + ]) + + return types.get(node.type) ?? throwError(`UNSUPPORTED NODE (ts): ${Es2pandaAstNodeType[node.type]}`) +} + +// Improve: add checks for casts in functions below + +export function unpackNode >(node: U): T +export function unpackNode >(node: U): T | undefined +export function unpackNode >(node: U): T | undefined { + if (node === undefined) { + return undefined + } + return (new (classByEtsNode(node))(node as any)) as T +} + +export function passNode(node: ts.Node): T +export function passNode(node: ts.Node | undefined): T | undefined +export function passNode(node: ts.Node | undefined): T | undefined { + if (node === undefined) { + return undefined + } + return (node.node as T) ?? throwError('trying to pass non-compatible node') +} + +export function unpackNodeArray >(nodes: readonly U[]): ts.NodeArray +export function unpackNodeArray >(nodes: readonly U[] | undefined): ts.NodeArray | undefined +export function unpackNodeArray >(nodes: readonly U[] | undefined): ts.NodeArray | undefined { + return nodes?.map((node: U) => unpackNode(node)) as ReadonlyArray > as ts.NodeArray +} + +export function passNodeArray(nodes: readonly ts.Node[]): T[] +export function passNodeArray(nodes: readonly ts.Node[] | undefined): T[] | undefined +export function passNodeArray(nodes: readonly ts.Node[] | undefined): T[] | undefined { + return nodes?.map((node: ts.Node) => passNode(node)) +} + +export function passIdentifier(node: ts.Identifier | string, typeAnnotation?: ts.TypeNode): arkts.Identifier +export function passIdentifier(node: ts.Identifier | string | undefined, typeAnnotation?: ts.TypeNode): arkts.Identifier | undefined +export function passIdentifier(node: ts.Identifier | string | undefined, typeAnnotation?: ts.TypeNode): arkts.Identifier | undefined { + if (node === undefined) { + return undefined + } + if (node instanceof ts.Identifier) { + if (typeAnnotation === undefined) { + return node.node + } + return arkts.Identifier.create( + node.node.name, + passNode(typeAnnotation) + ) + } + return arkts.Identifier.create( + node, + passNode(typeAnnotation) + ) +} + +// Improve: support optional params +export function passTypeParams(params: readonly ts.TypeParameterDeclaration[] | undefined): arkts.TSTypeParameterDeclaration | undefined { + if (params === undefined) { + return undefined + } + return arkts.factory.createTypeParameterDeclaration( + passNodeArray(params) + ) +} + +export function unpackModifiers(modifiers: KInt | undefined): ts.NodeArray { + const translation = new Map([ + // [Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, SyntaxKind.UnknownKeyword], + // [Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR, SyntaxKind.ConstructorKeyword], + + [Es2pandaModifierFlags.MODIFIER_FLAGS_ABSTRACT, SyntaxKind.AbstractKeyword], + // Improve: unsupported + // [Es2pandaModifierFlags. , SyntaxKind.AccessorKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_ASYNC, SyntaxKind.AsyncKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_CONST, SyntaxKind.ConstKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_DECLARE, SyntaxKind.DeclareKeyword], + // Improve: choose one + // [Es2pandaModifierFlags.MODIFIER_FLAGS_DEFAULT_EXPORT, SyntaxKind.DefaultClause], + // [Es2pandaModifierFlags.MODIFIER_FLAGS_DEFAULT_EXPORT, SyntaxKind.DefaultKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_EXPORT, SyntaxKind.ExportKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_IN, SyntaxKind.InKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_PRIVATE, SyntaxKind.PrivateKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_PROTECTED, SyntaxKind.ProtectedKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, SyntaxKind.PublicKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_OUT, SyntaxKind.OutKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_OVERRIDE, SyntaxKind.OverrideKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_READONLY, SyntaxKind.ReadonlyKeyword], + [Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC, SyntaxKind.StaticKeyword], + ]) + + const bits = function*(flags: KInt) { + let bit: KInt = 1 + while (flags >= bit) { + if ((flags & bit) > 0) { + yield bit + } + bit <<= 1 + } + } + if (modifiers === undefined) { + return [] as ReadonlyArray as ts.NodeArray + } + let mods: ts.Modifier[] = [] + for (const bit of bits(modifiers)) { + mods.push(new ts.Modifier(translation.get(bit) ?? throwError(`Unsupported modifier: ${bit}`))) + } + return mods as ReadonlyArray as ts.NodeArray +} + +export function passModifiers(modifiers: ReadonlyArray | undefined): KInt { + const translation = new Map([ + // [SyntaxKind.UnknownKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_NONE], + // [SyntaxKind.ConstructorKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR], + + [SyntaxKind.AbstractKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_ABSTRACT], + // Improve: unsupported + // [SyntaxKind.AccessorKeyword, Es2pandaModifierFlags.], + [SyntaxKind.AsyncKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_ASYNC], + [SyntaxKind.ConstKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_CONST], + [SyntaxKind.DeclareKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_DECLARE], + [SyntaxKind.DefaultKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_DEFAULT_EXPORT], + [SyntaxKind.ExportKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_EXPORT], + [SyntaxKind.InKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_IN], + [SyntaxKind.PrivateKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_PRIVATE], + [SyntaxKind.ProtectedKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_PROTECTED], + [SyntaxKind.PublicKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC], + [SyntaxKind.OutKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_OUT], + [SyntaxKind.OverrideKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_OVERRIDE], + [SyntaxKind.ReadonlyKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_READONLY], + [SyntaxKind.StaticKeyword, Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC], + ]) + + if (modifiers === undefined) { + return Es2pandaModifierFlags.MODIFIER_FLAGS_NONE + } + return modifiers + .map((mod: ts.Modifier | undefined | Es2pandaModifierFlags) => { + if (mod === undefined) { + return Es2pandaModifierFlags.MODIFIER_FLAGS_NONE + } + if (typeof mod === 'object') { + return translation.get(mod.kind) ?? throwError(`Unsupported modifier: ${mod.kind}`) + } + return mod + }) + .reduce( + (prev, curr) => (prev | curr), + Es2pandaModifierFlags.MODIFIER_FLAGS_NONE + ) +} + +export function passToken(token: ts.Token): KInt { + const translation = new Map([ + [SyntaxKind.PlusToken, Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_PLUS], + [SyntaxKind.MinusToken, Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_MINUS], + [SyntaxKind.AsteriskToken, Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_MULTIPLY], + ]) + + return translation.get(token.kind) ?? throwError('unsupported token') +} + +export function passModifiersToScriptFunction(modifiers: readonly ts.Modifier[] | undefined): KInt { + const translation = new Map([ + [SyntaxKind.StaticKeyword, Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_STATIC_BLOCK], + [SyntaxKind.AsyncKeyword, Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_ASYNC], + [SyntaxKind.PublicKeyword, Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_NONE], + ]) + + return modifiers?.reduce( + (prev, curr) => prev | (translation.get(curr.kind) ?? throwError(`Unsupported ScriptFunction flag: ${curr.kind}`)), + Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_NONE + ) ?? Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_NONE +} + +export function passVariableDeclarationKind(flags: NodeFlags): Es2pandaVariableDeclarationKind { + const translation = new Map([ + [NodeFlags.Const, Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_CONST], + [NodeFlags.Let, Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_LET], + [NodeFlags.None, Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_VAR], + ]) + + return translation.get(flags) ?? throwError('unsupported VariableDeclarationKind') +} + +export function unpackVariableDeclarationKind(kind: Es2pandaVariableDeclarationKind): NodeFlags { + const translation = new Map([ + [Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_CONST, NodeFlags.Const], + [Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_LET, NodeFlags.Let], + [Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_VAR, NodeFlags.None], + ]) + + return translation.get(kind) ?? throwError('unsupported VariableDeclarationKind') +} diff --git a/koala_tools/ui2abc/libarkts/src/ts-api/utilities/public.ts b/koala_tools/ui2abc/libarkts/src/ts-api/utilities/public.ts new file mode 100644 index 0000000000000000000000000000000000000000..4cde32c6a1b4d8f0d5c1311cdf24b3c03139a7a4 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/ts-api/utilities/public.ts @@ -0,0 +1,55 @@ +/* + * 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 { global } from "../../arkts-api/static/global" +import { throwError } from "../../utils" +import * as ts from "../." +import { KNativePointer, nullptr } from "@koalaui/interop" +import { unpackNonNullableNode } from "../../arkts-api" + +export { proceedToState, startChecker } from "../../arkts-api" + +// Improve: like in arkts utils +export function getDecl(node: ts.Node): ts.Node | undefined { + if (node.node === undefined) { + throwError('there is no arkts pair of ts node (unable to getDecl)') + } + let decl: KNativePointer = node.node.peer + decl = global.es2panda._AstNodeVariableConst(global.context, decl) + if (decl === nullptr) { + return undefined + } + decl = global.es2panda._VariableDeclaration(global.context, decl) + if (decl === nullptr) { + return undefined + } + decl = global.es2panda._DeclNode(global.context, decl) + if (decl === nullptr) { + return undefined + } + return ts.unpackNode(unpackNonNullableNode(decl)) +} + +// Improve: like in arkts utils +export function getOriginalNode(node: ts.Node): ts.Node { + if (node.node === undefined) { + // Improve: fix this + throwError('there is no arkts pair of ts node (unable to getOriginalNode)') + } + if (node.node.originalPeer === nullptr) { + return node + } + return ts.unpackNode(unpackNonNullableNode(node.node.originalPeer)) +} diff --git a/koala_tools/ui2abc/libarkts/src/ts-api/visitor/visitor.ts b/koala_tools/ui2abc/libarkts/src/ts-api/visitor/visitor.ts new file mode 100644 index 0000000000000000000000000000000000000000..37865884037c29a62e28398e00248baf80c65e61 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/ts-api/visitor/visitor.ts @@ -0,0 +1,155 @@ +/* + * 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 { throwError } from "../../utils" + +import * as ts from "../." +import { factory } from "../factory/nodeFactory" +import { SyntaxKind } from "../static/enums" + +type Visitor = (node: ts.Node) => ts.Node + +// Improve: rethink (remove as) +function nodeVisitor(node: T, visitor: Visitor): T { + if (node === undefined) { + return node + } + return visitor(node) as T +} + +// Improve: rethink (remove as) +function nodesVisitor | undefined>(nodes: TIn, visitor: Visitor): T[] | TIn { + if (nodes === undefined) { + return nodes + } + return nodes.map(node => visitor(node) as T) +} + +type VisitEachChildFunction = (node: T, visitor: Visitor) => T + +// Improve: add more nodes +type HasChildren = + | ts.SourceFile + | ts.FunctionDeclaration + | ts.ExpressionStatement + | ts.CallExpression + | ts.PropertyAccessExpression + | ts.ClassDeclaration + | ts.MethodDeclaration + | ts.Block + | ts.VariableStatement + | ts.VariableDeclarationList + +type VisitEachChildTable = { [TNode in HasChildren as TNode["kind"]]: VisitEachChildFunction } + +// Improve: add more nodes +const visitEachChildTable: VisitEachChildTable = { + [SyntaxKind.SourceFile]: function (node: ts.SourceFile, visitor: Visitor) { + return factory.updateSourceFile( + node, + nodesVisitor(node.statements, visitor) + ) + }, + [SyntaxKind.FunctionDeclaration]: function (node: ts.FunctionDeclaration, visitor: Visitor) { + return factory.updateFunctionDeclaration( + node, + node.modifiers, + undefined, + nodeVisitor(node.name, visitor), + nodesVisitor(node.typeParameters, visitor), + nodesVisitor(node.parameters, visitor), + nodeVisitor(node.type, visitor), + nodeVisitor(node.body, visitor), + ) + }, + [SyntaxKind.ExpressionStatement]: function (node: ts.ExpressionStatement, visitor: Visitor) { + return factory.updateExpressionStatement( + node, + nodeVisitor(node.expression, visitor) + ) + }, + [SyntaxKind.CallExpression]: function (node: ts.CallExpression, visitor: Visitor) { + return factory.updateCallExpression( + node, + nodeVisitor(node.expression, visitor), + undefined, + nodesVisitor(node.arguments, visitor) + ) + }, + [SyntaxKind.PropertyAccessExpression]: function (node: ts.PropertyAccessExpression, visitor: Visitor) { + return factory.updatePropertyAccessExpression( + node, + nodeVisitor(node.expression, visitor), + nodeVisitor(node.name, visitor) + ) + }, + [SyntaxKind.ClassDeclaration]: function (node: ts.ClassDeclaration, visitor: Visitor) { + return factory.updateClassDeclaration( + node, + undefined, + nodeVisitor(node.name, visitor), + undefined, + undefined, + nodesVisitor(node.members, visitor) + ) + }, + [SyntaxKind.MethodDeclaration]: function (node: ts.MethodDeclaration, visitor: Visitor) { + return factory.updateMethodDeclaration( + node, + undefined, + undefined, + nodeVisitor(node.name, visitor), + undefined, + undefined, + nodesVisitor(node.parameters, visitor), + undefined, + nodeVisitor(node.body, visitor), + ) + }, + [SyntaxKind.Block]: function (node: ts.Block, visitor: Visitor) { + return factory.updateBlock( + node, + nodesVisitor(node.statements, visitor), + ) + }, + [SyntaxKind.VariableStatement]: function (node: ts.VariableStatement, visitor: Visitor) { + return factory.updateVariableStatement( + node, + undefined, + nodeVisitor(node.declarationList, visitor), + ) + }, + [SyntaxKind.VariableDeclarationList]: function (node: ts.VariableDeclarationList, visitor: Visitor) { + return factory.updateVariableDeclarationList( + node, + nodesVisitor(node.declarations, visitor), + ) + }, +} + +function nodeHasChildren(node: ts.Node): node is HasChildren { + return node.kind in visitEachChildTable +} + +export function visitEachChild( + node: T, + visitor: Visitor +): T { + const visitFunc = (visitEachChildTable as Record | undefined>)[node.kind]; + if (nodeHasChildren(node) && visitFunc === undefined) { + throwError('Unsupported node kind: ' + node.kind) + } + return (visitFunc === undefined) ? node : visitFunc(node, visitor); +} diff --git a/koala_tools/ui2abc/libarkts/src/utils.ts b/koala_tools/ui2abc/libarkts/src/utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..9fc372018108f2a9414c3c9d11a52311973e8852 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/src/utils.ts @@ -0,0 +1,224 @@ +/* + * 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. + */ + +export function throwError(error: string): never { + throw new Error(error) +} + +export function withWarning(value: T, message: string): T { + // console.warn(message) + return value +} + +export function isNumber(value: any): value is number { + return typeof value === `number` +} + +function replacePercentOutsideStrings(code: string): string { + const stringPattern = /("[^"]*"|'[^']*'|`[^`]*`)/g; + const percentPattern = /(?(); + strings.forEach((string) => { + const placeholder = `__STRING_PLACEHOLDER_${placeholderCounter++}__`; + placeholderMap.set(placeholder, string); + code = code.replace(string, placeholder); + }); + + code = code.replace(percentPattern, '_'); + + placeholderMap.forEach((originalString, placeholder) => { + code = code.replace(new RegExp(placeholder, 'g'), originalString); + }); + + return code; +} + +function replaceIllegalHashes(code: string): string { + const stringPattern = /("[^"]*"|'[^']*'|`[^`]*`)/g; + const strings = code.match(stringPattern) || []; + + let placeholderCounter = 0; + const placeholderMap = new Map(); + strings.forEach((string) => { + const placeholder = `__STRING_PLACEHOLDER_${placeholderCounter++}__`; + placeholderMap.set(placeholder, string); + code = code.replace(string, placeholder); + }); + + code = code.replace(/#/g, '_'); + + placeholderMap.forEach((originalString, placeholder) => { + code = code.replace(new RegExp(placeholder, 'g'), originalString); + }); + + return code; +} + +function replaceGensymWrappers(code: string): string { + const indices = [...code.matchAll(/\({let/g)].map(it => it.index) + const replacements: string[][] = [] + for (var i of indices) { + if (!i) { + continue + } + var j = i + 1, depth = 1 + while (j < code.length) { + if (code[j] == '(') { + depth++ + } + if (code[j] == ')') { + depth-- + } + if (depth == 0) { + break + } + j++ + } + + if (j == code.length) { + continue + } + + const base = code.substring(i, j + 1) + if (base.match(/\({let/)?.length! > 1) { // don't touch if contains nested constructions + continue + } + const fixed = base.replaceAll(/^\({let ([_%a-zA-Z0-9]+?) = (?!\({let)([\s\S]*?);\n([\s\S]*?)}\)$/g, + (match, name: string, val: string, expr: string) => { + let rightExpr = expr.slice(expr.lastIndexOf(name) + name.length, -1) + if (rightExpr[0] != '.') { + rightExpr = `.${rightExpr}` + } + return `(${val}?${rightExpr})` + } + ) + replacements.push([base, fixed]) + } + for (var [b, f] of replacements) { + code = code.replace(b, f) + } + return code +} + +function addExports(code: string): string { + const exportAstNodes = [" enum", "let", "const", "class", "abstract class", "@Entry() @Component() final class", "@Component() final class", "interface", "@interface", "type", "enum", "final class", "function", + "declare interface", "@memo_stable() declare interface", "@memo_stable() interface", + "@Retention({policy:\"SOURCE\"}) @interface", "@memo() function", "@memo_entry() function", "@memo_intrinsic() function", + ] + exportAstNodes.forEach((astNodeText) => { + code = code.replaceAll(`\n${astNodeText}`, `\nexport ${astNodeText}`) + } + ) + // Improve: this is a temporary workaround and should be replaced with a proper import/export handling in future + code = code.replaceAll(/\n(@memo\(\) @BuilderLambda\(\{value:"\w+"\}\)) function/g, '\n$1 export function') + const fix = [ + ["export @memo() function", "@memo() export function"], + ["export @memo_entry() function", "@memo_entry() export function"], + ["export @memo_intrinsic() function", "@memo_intrinsic() export function"], + ["export @memo_stable()", "@memo_stable() export"], + ["export class OhosRouter", "export default class OhosRouter"] + ] + for (var [f, t] of fix) { + code = code.replaceAll(f, t) + } + return code.replaceAll("\nexport function main()", "\nfunction main()") +} + +function excludePartialInterfaces(code: string): string { + return code + .replaceAll(/export interface (.*)\$partial<>([\s\S]*?)}/g, '') + .replaceAll(/interface (.*)\$partial<>([\s\S]*?)}/g, '') +} + +function fixEnums(code: string) { + const lines = code.split('\n') + const enums = [] + for (let i = 0; i + 1 < lines.length; i++) { + if (lines[i].trimStart().startsWith(`export final class`) + && lines[i + 1].trimStart().startsWith(`private readonly _ordinal`) + ) { + const name = lines[i].split(' ')[3] + enums.push(name) + } + } + enums.forEach((name) => { + const regexp = new RegExp(`${name}\\.(\\w+)(.)`, `g`) + code = code.replaceAll(regexp, (match, p1, p2) => { + if (!p1.startsWith('_') && p2 == ":") { // this colon is for switch case, not for type + return `${name}.${p1}.valueOf()${p2}` + } + return match + }) + const idents = [...code.matchAll(new RegExp(`(\\w+?)([\\W])(\\w+?): ${name}`, `g`))].filter(it => it[1] != "readonly" && it[1] != "_get").map(it => it[3]) + // work manually with a couple of cases not to write one more bracket parser + if (code.includes(`const eventKind = (deserializer.readInt32() as CallbackEventKind);`)) { + // this is for file arkui/src/generated/peers/CallbacksChecker.ts + idents.push(`eventKind`) + code = code.replace(`const eventKind = (deserializer.readInt32() as CallbackEventKind);`, `const eventKind = CallbackEventKind.fromValue(deserializer.readInt32());`) + } + if (code.includes(`switch ((type as EventType))`)) { + // this is for file arkui/src/Application.ts + code = code.replace(`switch ((type as EventType))`, `switch (type)`) + } + idents.forEach((id) => { + code = code.replaceAll(`${id} as int32`, `${id}.valueOf()`) + code = code.replaceAll(`switch (${id})`, `switch (${id}.valueOf())`) + }) + }) + return code +} + +function fixEmptyDeclareNamespace(code: string): string { + const lines = code.split('\n') + for (let i = 0; i < lines.length; i++) { + if (lines[i].startsWith('export declare namespace') && !lines[i].endsWith('{')) { + lines[i] += ' {}' + } + } + return lines.join('\n') +} + +/* + Improve: + The lowerings insert %% and other special symbols into names of temporary variables. + Until we keep feeding ast dumps back to the parser this function is needed. + */ +export function filterSource(text: string): string { + //console.error("====") + // console.error(text.split('\n').map((it, index) => `${`${index + 1}`.padStart(4)} |${it}`).join('\n')) + const dumperUnwrappers = [ + addExports, + fixEmptyDeclareNamespace, + fixEnums, + replaceGensymWrappers, // nested + replaceGensymWrappers, // nested + replaceGensymWrappers, + replaceIllegalHashes, + replacePercentOutsideStrings, + excludePartialInterfaces, + (code: string) => code.replaceAll("", "_cctor_"), + (code: string) => code.replaceAll("public constructor() {}", ""), + ] + // console.error("====") + // console.error(dumperUnwrappers.reduceRight((code, f) => f(code), text).split('\n').map((it, index) => `${`${index + 1}`.padStart(4)} |${it}`).join('\n')) + return dumperUnwrappers.reduceRight((code, f) => f(code), text) +} + +export function getEnumName(enumType: any, value: number): string | undefined { + return enumType[value]; +} \ No newline at end of file diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/expressions/call-expression.test.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/expressions/call-expression.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..3132fc8dee3e6c019dfb718b87a078fb4c850ead --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/expressions/call-expression.test.ts @@ -0,0 +1,73 @@ +/* + * 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 * as util from "../../test-util" +import * as arkts from "../../../src/arkts-api" + +suite(util.basename(__filename), () => { + test("sample-1", function() { + const sample_in = + ` + function _() {}; + ` + + const sample_out = + ` + function _() {}; + console.log('out') + ` + + let script = arkts.createETSModuleFromSource(sample_in) + + script = arkts.factory.updateETSModule( + script, + [ + script.statements[0], + arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier( + 'console' + ), + arkts.Identifier.create2Identifier( + 'log' + ), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + [ + arkts.factory.createStringLiteral( + 'out' + ) + ], + undefined, + false, + false, + undefined, + ) + ) + ], + script.ident, + script.getNamespaceFlag(), + script.program, + ) + + util.ARKTS_TEST_ASSERTION( + script, + sample_out + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/functions/create.test.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/functions/create.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..d222e07f1c73862420e76c235fecf1fe12f58649 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/functions/create.test.ts @@ -0,0 +1,262 @@ +/* + * Copyright (c) 2024 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 * as util from "../../test-util" +import * as arkts from "../../../src/arkts-api" + +suite(util.basename(__filename), () => { + test("sample-1", function() { + const sample_in = + ` + function _() {}; + ` + + const sample_out = + ` + function _() {}; + function foo() { + console.log("AAA") + } + foo() + ` + + let script = arkts.createETSModuleFromSource(sample_in) + + const scriptFunc = + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement( + [ + arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier( + 'console' + ), + arkts.factory.createIdentifier( + 'log' + ), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + [ + arkts.factory.createStringLiteral( + 'AAA' + ) + ], + undefined, + false, + false, + undefined, + ) + ) + ] + ), + undefined, + [], + undefined, + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_NONE, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC | arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC, + arkts.factory.createIdentifier("foo"), + undefined, + ) + + const funcDecl = + arkts.factory.createFunctionDeclaration( + scriptFunc, + [], + false + ) + funcDecl.updateModifiers(scriptFunc.modifierFlags) + + script = arkts.factory.updateETSModule( + script, + [ + script.statements[0], + funcDecl, + arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createIdentifier( + 'foo' + ), + [], + undefined, + false, + false, + undefined, + ) + ) + ], + script.ident, + script.getNamespaceFlag(), + script.program, + ) + + util.ARKTS_TEST_ASSERTION( + script, + sample_out + ) + }) + + test("sample-2", function() { + const sample_in = + ` + function _() {}; + ` + + const sample_out = + ` + function _() {}; + function foo(x: int, y: string = "bbb") { + console.log(x) + console.log(y) + } + foo(0) + ` + + let script = arkts.createETSModuleFromSource(sample_in) + + const scriptFunc = + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement( + [ + arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier( + 'console' + ), + arkts.factory.createIdentifier( + 'log' + ), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + [ + arkts.factory.createIdentifier( + 'x' + ) + ], + undefined, + false, + false, + undefined, + ) + ), + arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier( + 'console' + ), + arkts.factory.createIdentifier( + 'log' + ), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + [ + arkts.factory.createIdentifier( + 'y' + ) + ], + undefined, + false, + false, + undefined, + ) + ) + ] + ), + undefined, + [ + arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier( + 'x', + arkts.factory.createETSPrimitiveType( + arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_INT + ) + ), + false + ), + arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier( + 'y', + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier( + 'string' + ) + ) + ) + ), + false, + arkts.factory.createStringLiteral( + 'bbb' + ) + ) + ], + undefined, + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_NONE, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC | arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC, + arkts.factory.createIdentifier("foo"), + undefined, + ) + + const funcDecl = + arkts.factory.createFunctionDeclaration( + scriptFunc, + [], + false + ) + funcDecl.updateModifiers(scriptFunc.modifierFlags) + + script = arkts.factory.updateETSModule( + script, + [ + script.statements[0], + funcDecl, + arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createIdentifier( + 'foo' + ), + [ + arkts.factory.createNumberLiteral( + 0 + ) + ], + undefined, + false, + false, + undefined, + ) + ) + ], + script.ident, + script.getNamespaceFlag(), + script.program, + ) + + util.ARKTS_TEST_ASSERTION( + script, + sample_out + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/general/annotations.test.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/general/annotations.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..f6564beff7b60458e139afb6c6a39391ca1f11bf --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/general/annotations.test.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2024 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 * as util from "../../test-util" +import * as arkts from "../../../src/arkts-api" +import { assert } from "@koalaui/harness" + +suite(util.basename(__filename), () => { + test("annotated-function-1", function() { + const sample_in = + ` + @annotation1 + @annotation2 + function foo() {} + ` + + let script = arkts.createETSModuleFromSource( + sample_in, + arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED + ) + + const annotations = arkts.getAnnotations(script.statements[0]) + + const names = annotations.map((annot) => { + if (annot.expr === undefined) { + throw new Error('annotation expression is undefined') + } + if (!arkts.isIdentifier(annot.expr)) { + throw new Error('annotation expected to be Identifier') + } + return annot.expr.name + }) + + assert.equal(names.join(', '), 'annotation1, annotation2') + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/general/basic.test.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/general/basic.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..e76d7c4bbc45371129b970f9aaa36ea341b59ec8 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/general/basic.test.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2024 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 * as util from "../../test-util" +import * as arkts from "../../../src/arkts-api" + +suite(util.basename(__filename), () => { + test("sample-1", function() { + const sample_in = + ` + ` + + let script = arkts.createETSModuleFromSource(sample_in) + + script = arkts.factory.updateETSModule( + script, + [ + arkts.factory.createExpressionStatement( + arkts.factory.createIdentifier( + 'abc' + ) + ) + ], + script.ident, + script.getNamespaceFlag(), + script.program, + ) + + util.ARKTS_TEST_ASSERTION( + script, + ` + abc + `, + arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/general/jsdoc.test.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/general/jsdoc.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..ee4890ba3bf217899a3d0114f8887c72330969f3 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/general/jsdoc.test.ts @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as util from "../../test-util" +import * as arkts from "../../../src/arkts-api" +import { assert } from "@koalaui/harness" +import { + isMethodDefinition, + isBlockStatement, + isClassDeclaration, + isFunctionDeclaration, + isStatement, + isTSTypeAliasDeclaration, + isClassProperty, + getJsDoc, + isIdentifier +} from "../../../src/arkts-api" + +suite(util.basename(__filename), () => { + const comments: string[] = [ + '/** Regular function */' , + '/** Type T */', + '/** Class A */', + '/** Method */', + '/** Return type */', + '/** Property */', + ] + + test("jsdoc", function() { + const sample_in = ` + ${comments[0]} + export function foo(); + ${comments[1]} + type T = int; + ${comments[2]} + export class A { + ${comments[3]} + a_foo(): // colon here + ${comments[4]} + void {} + ${comments[5]} + private a_prop: number = 1 + }` + + let script = arkts.createETSModuleFromSource( + sample_in, + arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED + ) + + const jsdocs: (string | undefined)[] = [] + for (const stmt of script.statements) { + jsdocs.push(getJsDoc(stmt)) + if (isClassDeclaration(stmt)) { + const body = stmt.definition?.body ?? [] + for (const node of body) { + jsdocs.push(getJsDoc(node)) + + if (isMethodDefinition(node) && isIdentifier(node.key) && + node.key.name === 'a_foo' && node.function?.returnTypeAnnotation) { + jsdocs.push(getJsDoc(node.function?.returnTypeAnnotation)) + } + } + } + } + + assert.equal( + comments + .concat('') // implicit ctor returns undefined + .join(','), + jsdocs + .join(',') + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/general/recheck.test.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/general/recheck.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..d26b01d7c1a5abff3cfdc4311d1fb8181c89307a --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/general/recheck.test.ts @@ -0,0 +1,189 @@ +/* + * Copyright (c) 2024 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 * as util from "../../test-util" +import * as arkts from "../../../src/arkts-api" + +const PANDA_SDK_PATH = process.env.PANDA_SDK_PATH ?? '../../incremental/tools/panda/node_modules/@panda/sdk' + +function createConfig() { + arkts.arktsGlobal.config = arkts.Config.create([ + '_', + '--arktsconfig', + 'arktsconfig.json', + './plugins/input/main.ets', + '--extension', + 'ets', + '--stdlib', + `${PANDA_SDK_PATH}/ets/stdlib`, + '--output', + './build/main.abc' + ]).peer +} + +class RenameTestFunction extends arkts.AbstractVisitor { + visitor(node: arkts.BlockStatement): arkts.BlockStatement + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + // Don't change name at checked state, add another import + if (arkts.isImportDeclaration(node)) return node + if (arkts.isIdentifier(node) && node.name == "testFunction") { + return arkts.factory.createIdentifier("testFunctionChanged") + } + return node + } +} + + +suite(util.basename(__filename), () => { + + + test("add import at parsed state and proceed to checked", function() { + createConfig() + arkts.initVisitsTable() + + const code = + ` + console.log("test") + ` + + arkts.arktsGlobal.filePath = "./plugins/input/main.ets" + arkts.arktsGlobal.compilerContext = arkts.Context.createFromString(code) + + arkts.proceedToState(arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED) + + const program = arkts.arktsGlobal.compilerContext!.program + const importStorage = new arkts.ImportStorage(program, true) + const module = program.ast as arkts.ETSModule + + program.setAst( + arkts.factory.updateETSModule( + module, + [ + arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral( + './library' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'testFunction' + ), + arkts.factory.createIdentifier( + 'testFunction' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL, + ), + ...module.statements, + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + importStorage.update() + + arkts.proceedToState(arkts.Es2pandaContextState.ES2PANDA_STATE_CHECKED) + + arkts.recheckContext() + + util.assert.equal( + program.ast.dumpSrc(), ` +import { testFunction as testFunction } from "./library"; + +function main() {} + + +`, + `invalid result: ${program.ast.dumpSrc()}`) + + arkts.proceedToState(arkts.Es2pandaContextState.ES2PANDA_STATE_BIN_GENERATED) + }) + + test("change function name in main program and in dependency", function() { + createConfig() + arkts.initVisitsTable() + + const code = + ` + import { testFunction } from "./library" + testFunction() + ` + + arkts.arktsGlobal.filePath = "./plugins/input/main.ets" + arkts.arktsGlobal.compilerContext = arkts.Context.createFromString(code) + + arkts.proceedToState(arkts.Es2pandaContextState.ES2PANDA_STATE_CHECKED) + + const program = arkts.arktsGlobal.compilerContext!.program + const importStorage = new arkts.ImportStorage(program, true) + const module = program.ast as arkts.ETSModule + + arkts.arktsGlobal.compilerContext!.program.getExternalSources().forEach(it => { + if (!it.getName().includes("library")) return + it.programs.forEach(program => { + program.setAst(new RenameTestFunction().visitor(program.ast)) + }) + }) + + program.setAst( + arkts.factory.updateETSModule( + module, + [ + arkts.factory.updateETSImportDeclaration( + module.statements[0] as arkts.ETSImportDeclaration, + arkts.factory.createStringLiteral( + './library' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'testFunctionChanged' + ), + arkts.factory.createIdentifier( + 'testFunctionChanged' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL, + ), + ...module.statements.slice(1), + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + + program.setAst(new RenameTestFunction().visitor(program.ast)) + + importStorage.update() + arkts.recheckContext() + + util.assert.equal( + program.ast.dumpSrc(), ` +import { testFunctionChanged as testFunctionChanged } from "./library"; + +function main() {} + + +`, + `invalid result: ${program.ast.dumpSrc()}`) + + arkts.proceedToState(arkts.Es2pandaContextState.ES2PANDA_STATE_BIN_GENERATED) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/import-export/import.test.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/import-export/import.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..a4727774f54da7c2007c05245cd332913f2fe1ea --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/import-export/import.test.ts @@ -0,0 +1,242 @@ +/* + * Copyright (c) 2024 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 * as util from "../../test-util" +import * as arkts from "../../../src/arkts-api" +import { global } from "../../../src/arkts-api/static/global" + + +suite(util.basename(__filename), () => { + test("sample-1", function() { + const sample_in = + ` + ` + + let script = arkts.createETSModuleFromSource(sample_in) + + script = arkts.factory.updateETSModule( + script, + [ + arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral( + './variable' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'X' + ), + arkts.factory.createIdentifier( + 'X' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL, + ) + ], + script.ident, + script.getNamespaceFlag(), + script.program, + ) + + util.ARKTS_TEST_ASSERTION( + script, + ` + import { X } from "./variable" + `, + arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED + ) + }) + + test("sample-2-rewrite", function() { + const sample_in = + ` + import { Y } from "./variable" + ` + + let script = arkts.createETSModuleFromSource(sample_in) + const importDeclaration = script.statements[0] as arkts.ETSImportDeclaration + + script = arkts.factory.updateETSModule( + script, + [ + arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral( + './variable' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'X' + ), + arkts.factory.createIdentifier( + 'X' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL, + ), + ...script.statements, + ], + script.ident, + script.getNamespaceFlag(), + script.program, + ) + + util.ARKTS_TEST_ASSERTION( + script, + ` + import { X } from "./variable" + import { Y } from "./variable" + `, + arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED + ) + }) + + test("rewrite-imported-variable", function() { + const sample_in = + ` + import { Y } from "./variable" + + function main() { + console.log(X) + } + ` + + let script = arkts.createETSModuleFromSource(sample_in) + const importDeclaration = script.statements[0] as arkts.ETSImportDeclaration + + script = arkts.factory.updateETSModule( + script, + [ + arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral( + './variable' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'X' + ), + arkts.factory.createIdentifier( + 'X' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL, + ), + ...script.statements, + ], + script.ident, + script.getNamespaceFlag(), + script.program, + ) + + util.ARKTS_TEST_ASSERTION( + script, + ` + import { X } from "./variable" + import { Y } from "./variable" + + function main() { + console.log(X) + } + `, + arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED + ) + + // util.cleanGenerated() + // util.fileToAbc(`./input/variable.sts`, true) + // util.contextToAbc() + // util.runAbc(`./generated/main.abc`, ['./generated/variable.abc']) + }) + + test("rewrite-imported-function", function() { + const sample_in = + ` + import { f } from "./f" + function main() {} + ` + + let script = arkts.createETSModuleFromSource(sample_in) + const functionDeclaration: arkts.FunctionDeclaration = script.statements[1] as arkts.FunctionDeclaration + const scriptFunction: arkts.ScriptFunction = functionDeclaration.function! + + const newScriptFunc = + arkts.factory.updateScriptFunction( + scriptFunction, + arkts.factory.createBlockStatement( + [ + arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createIdentifier( + 'f' + ), + [], + undefined, + false, + false, + undefined, + ) + ) + ] + ), + undefined, + [], + undefined, + false, + scriptFunction.flags, + scriptFunction.modifierFlags, + scriptFunction.id!, + undefined, + ) + + const newFuncDecl = + arkts.factory.updateFunctionDeclaration( + functionDeclaration, + newScriptFunc, + [], + false + ) + newFuncDecl.updateModifiers(newScriptFunc.modifierFlags) + + script = arkts.factory.updateETSModule( + script, + [ + script.statements[0], + newFuncDecl + ], + script.ident, + script.getNamespaceFlag(), + script.program, + ) + + util.ARKTS_TEST_ASSERTION( + script, + ` + import { f } from "./f" + function main() { + f() + } + `, + arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED + ) + + // util.cleanGenerated() + // util.fileToAbc(`./input/f.sts`, true) + // util.contextToAbc() + // util.runAbc(`./generated/main.abc`, ['./generated/f.abc']) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/arktsconfig.json b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/arktsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..a0a1a87886101252b596d34ce445bf2d2e8f63ca --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/arktsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "outDir": "./build/abc", + "baseUrl": "." + }, + "include": ["./**/*.ts"] +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/constructor/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/constructor/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..52b9b2e2e6c8825934e12877936cd3e5f1a3644f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/constructor/index.ts @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../src/arkts-api" + +class ConstructorWithOverload extends arkts.AbstractVisitor { + visitor(beforeChildren: arkts.BlockStatement): arkts.BlockStatement + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + if (arkts.isScriptFunction(node) && node.id?.name == "constructor") { + return arkts.factory.updateScriptFunction( + node, + arkts.factory.createBlockStatement( + [ + + arkts.factory.createIfStatement( + arkts.factory.createBooleanLiteral(true), + arkts.factory.createReturnStatement(), + undefined + ), + ...(arkts.isBlockStatement(node.body) ? node.body.statements : []), + ] + ), + node.typeParams, + node.params, + node.returnTypeAnnotation, + node.hasReceiver, + node.flags, + node.modifierFlags, + node.id, + node.annotations + ) + } + return node + } +} + +export function constructorWithOverload(program: arkts.Program) { + program.setAst(new ConstructorWithOverload().visitor(program.ast)) +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/constructor/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/constructor/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..77d192544a663c738c67499d9f27c4c843da3fae --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/constructor/main.ets @@ -0,0 +1,5 @@ + +class XXX { + constructor(x: ()=>void, y?: ()=>void) { + } +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..9eaf755df9b31441fb402e15a469477e02fc4bab --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/dump-src/main.ets @@ -0,0 +1,13 @@ + +import { C as C } from "./library"; + +import { f as f } from "./library"; + +function main() {} + + +class D { + public c = new C(); + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..d131f3cd2b7e0c17b1ec32b04b131eb728aea640 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/index.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +class ExportClass extends arkts.AbstractVisitor { + visitor(beforeChildren: arkts.BlockStatement): arkts.BlockStatement + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + if (arkts.isClassDeclaration(node) && node.definition?.ident?.name == "C") { + node.modifierFlags |= arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_EXPORT + } + return node + } +} + +export function addUseImportClassSameFileAndExportClass(program: arkts.Program, options: arkts.CompilationOptions) { + if (options.isProgramForCodegeneration) { + const module = program.ast as arkts.ETSModule + program.setAst( + arkts.factory.updateETSModule( + module, + [ + // import { C as C } from "./library" + arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral( + './library' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'C' + ), + arkts.factory.createIdentifier( + 'C' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL + ), + ...module.statements, + // class D { + // c = new C() + // } + arkts.factory.createClassDeclaration( + arkts.factory.createClassDefinition( + arkts.factory.createIdentifier("D"), + undefined, + undefined, + [], + undefined, + undefined, + [ + arkts.factory.createClassProperty( + arkts.factory.createIdentifier("c"), + arkts.factory.createETSNewClassInstanceExpression( + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier("C") + ) + ), + [] + ), + undefined, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + false, + ) + ], + arkts.Es2pandaClassDefinitionModifiers.CLASS_DEFINITION_MODIFIERS_CLASS_DECL, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + ) + ) + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + } else { + program.setAst(new ExportClass().visitor(program.ast)) + } + return program +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/library.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/library.ets new file mode 100644 index 0000000000000000000000000000000000000000..17667d2341a877d57ac6ff421ca1386ba4bebf22 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/library.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export declare function f(): void + +class C { + +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..0d31540d6ff2d83b82b231e29cd1d5fab27c2fb3 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/add-export/main.ets @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { f } from "./library" + +f() diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..9eaf755df9b31441fb402e15a469477e02fc4bab --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/dump-src/main.ets @@ -0,0 +1,13 @@ + +import { C as C } from "./library"; + +import { f as f } from "./library"; + +function main() {} + + +class D { + public c = new C(); + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..5d0f11addf0773a775a92f1a4e80a150b67ac3f7 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/index.ts @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +export function addUseImportClassSameFile(program: arkts.Program, options: arkts.CompilationOptions) { + if (options.isProgramForCodegeneration) { + const module = program.ast as arkts.ETSModule + program.setAst( + arkts.factory.updateETSModule( + module, + [ + // import { C as C } from "./library" + arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral( + './library' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'C' + ), + arkts.factory.createIdentifier( + 'C' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL + ), + ...module.statements, + // class D { + // c = new C() + // } + arkts.factory.createClassDeclaration( + arkts.factory.createClassDefinition( + arkts.factory.createIdentifier("D"), + undefined, + undefined, + [], + undefined, + undefined, + [ + arkts.factory.createClassProperty( + arkts.factory.createIdentifier("c"), + arkts.factory.createETSNewClassInstanceExpression( + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier("C") + ) + ), + [] + ), + undefined, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + false, + ) + ], + arkts.Es2pandaClassDefinitionModifiers.CLASS_DEFINITION_MODIFIERS_CLASS_DECL, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + ) + ) + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + } + return program +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/library.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/library.ets new file mode 100644 index 0000000000000000000000000000000000000000..7e717b8cc8fe9f36fc58fc44a7b7c450a9278568 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/library.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export declare function f(): void + +export class C { + +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..0d31540d6ff2d83b82b231e29cd1d5fab27c2fb3 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/basic/main.ets @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { f } from "./library" + +f() diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..9eaf755df9b31441fb402e15a469477e02fc4bab --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/dump-src/main.ets @@ -0,0 +1,13 @@ + +import { C as C } from "./library"; + +import { f as f } from "./library"; + +function main() {} + + +class D { + public c = new C(); + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..15d194c3b1834f66a82861277d040caa89c33aa6 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/index.ts @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +export function addUseImportClassSameFileAndCreateClass(program: arkts.Program, options: arkts.CompilationOptions) { + if (options.isProgramForCodegeneration) { + const module = program.ast as arkts.ETSModule + program.setAst( + arkts.factory.updateETSModule( + module, + [ + // import { C as C } from "./library" + arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral( + './library' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'C' + ), + arkts.factory.createIdentifier( + 'C' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL + ), + ...module.statements, + // class D { + // c = new C() + // } + arkts.factory.createClassDeclaration( + arkts.factory.createClassDefinition( + arkts.factory.createIdentifier("D"), + undefined, + undefined, + [], + undefined, + undefined, + [ + arkts.factory.createClassProperty( + arkts.factory.createIdentifier("c"), + arkts.factory.createETSNewClassInstanceExpression( + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier("C") + ) + ), + [] + ), + undefined, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + false, + ) + ], + arkts.Es2pandaClassDefinitionModifiers.CLASS_DEFINITION_MODIFIERS_CLASS_DECL, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + ) + ) + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + } else { + const module = program.ast as arkts.ETSModule + program.setAst( + arkts.factory.updateETSModule( + module, + [ + ...module.statements, + arkts.factory.createClassDeclaration( + arkts.factory.createClassDefinition( + arkts.factory.createIdentifier( + "C" + ), + undefined, + undefined, + [], + undefined, + undefined, + [ + arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_CONSTRUCTOR, + arkts.factory.createIdentifier("constructor"), + arkts.factory.createFunctionExpression( + arkts.factory.createIdentifier("constructor"), + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement( + [], + ), + undefined, + [], + undefined, + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_CONSTRUCTOR, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + arkts.factory.createIdentifier("constructor"), + [], + ) + ), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR, + false, + [], + ), + ], + arkts.Es2pandaClassDefinitionModifiers.CLASS_DEFINITION_MODIFIERS_CLASS_DECL, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + ), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_EXPORT, + ) + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + } + return program +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/library.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/library.ets new file mode 100644 index 0000000000000000000000000000000000000000..e97afd392c7f7a88b99ca7f3112d4b7c93111e28 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/library.ets @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export declare function f(): void diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..0d31540d6ff2d83b82b231e29cd1d5fab27c2fb3 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/create-class/main.ets @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { f } from "./library" + +f() diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..9eaf755df9b31441fb402e15a469477e02fc4bab --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/dump-src/main.ets @@ -0,0 +1,13 @@ + +import { C as C } from "./library"; + +import { f as f } from "./library"; + +function main() {} + + +class D { + public c = new C(); + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..959a6d6459fd1e75b3fd15f4a6ee2bcbe095e66a --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/index.ts @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +class StructToClass extends arkts.AbstractVisitor { + visitor(beforeChildren: arkts.BlockStatement): arkts.BlockStatement + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + if (arkts.isETSStructDeclaration(node)) { + return arkts.factory.createClassDeclaration( + node.definition, + ) + } + return node + } +} + +export function rewriteStructToClass(program: arkts.Program, options: arkts.CompilationOptions) { + if (!options.isProgramForCodegeneration) { + program.setAst(new StructToClass().visitor(program.ast)) + } + return program +} + +class ExportClass extends arkts.AbstractVisitor { + visitor(beforeChildren: arkts.BlockStatement): arkts.BlockStatement + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + if (arkts.isClassDeclaration(node) && node.definition?.ident?.name == "C") { + node.modifierFlags |= arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_EXPORT + } + return node + } +} + +export function addUseImportClassSameFileAfterRewritingStructToClass(program: arkts.Program, options: arkts.CompilationOptions) { + if (options.isProgramForCodegeneration) { + const module = program.ast as arkts.ETSModule + program.setAst( + arkts.factory.updateETSModule( + module, + [ + // import { C as C } from "./library" + arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral( + './library' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'C' + ), + arkts.factory.createIdentifier( + 'C' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL + ), + ...module.statements, + // class D { + // c = new C() + // } + arkts.factory.createClassDeclaration( + arkts.factory.createClassDefinition( + arkts.factory.createIdentifier("D"), + undefined, + undefined, + [], + undefined, + undefined, + [ + arkts.factory.createClassProperty( + arkts.factory.createIdentifier("c"), + arkts.factory.createETSNewClassInstanceExpression( + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier("C") + ) + ), + [] + ), + undefined, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + false, + ) + ], + arkts.Es2pandaClassDefinitionModifiers.CLASS_DEFINITION_MODIFIERS_CLASS_DECL, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + ) + ) + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + } else { + program.setAst(new ExportClass().visitor(program.ast as arkts.ETSModule)) + } + return program +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/library.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/library.ets new file mode 100644 index 0000000000000000000000000000000000000000..a84fea72c678bb42746294822a766a583a988bfb --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/library.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export declare function f(): void + +struct C { + +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..0d31540d6ff2d83b82b231e29cd1d5fab27c2fb3 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/exports/struct-to-class/main.ets @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { f } from "./library" + +f() diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-new-file/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-new-file/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..39557636fc77d7c24784db40b2ea95259dcd66d2 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-new-file/index.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +export function addImportNewFile(program: arkts.Program, options: arkts.CompilationOptions) { + if (options.isProgramForCodegeneration) { + const module = program.ast as arkts.ETSModule + program.setAst( + arkts.factory.updateETSModule( + module, + [ + arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral( + './library' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'testFunction' + ), + arkts.factory.createIdentifier( + 'testFunction' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL + ), + ...module.statements, + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + } + return program +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-new-file/library.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-new-file/library.ts new file mode 100644 index 0000000000000000000000000000000000000000..a38c17c74a063eff1f70187e96138f96995ea380 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-new-file/library.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export function testFunction(): string { + return "yes" +} +export function anotherFunction(): string { + return "no" +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-new-file/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-new-file/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..0310cbba14b1342ebfa00b5e78ee9f4ef3ff4251 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-new-file/main.ets @@ -0,0 +1,2 @@ + +console.log("test") diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..80be4243ee2d39b464902ae6e8e2b101eacf7cfb --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/dump-src/main.ets @@ -0,0 +1,8 @@ + +import { testFunction as testFunction } from "./library"; + +import { anotherFunction as anotherFunction } from "./library"; + +function main() {} + + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..cd6e17d76ab0bb803766d600f67ef462de29f5e8 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/index.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +export function addImportSameFile(program: arkts.Program, options: arkts.CompilationOptions) { + if (options.isProgramForCodegeneration) { + const module = program.ast as arkts.ETSModule + program.setAst( + arkts.factory.updateETSModule( + module, + [ + arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral( + './library' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'testFunction' + ), + arkts.factory.createIdentifier( + 'testFunction' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL + ), + ...module.statements, + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + } + return program +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/library.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/library.ts new file mode 100644 index 0000000000000000000000000000000000000000..a38c17c74a063eff1f70187e96138f96995ea380 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/library.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export function testFunction(): string { + return "yes" +} +export function anotherFunction(): string { + return "no" +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5adb0b5d7e06cd2b8854e19cf1654f6998c4f3b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-same-file/main.ets @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { anotherFunction } from "./library" +console.log("test") diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..492e1126581a2fc42fec384a15e544deb4ddb667 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/dump-src/main.ets @@ -0,0 +1,9 @@ + +import { testFunction as testFunction } from "./library"; + +import { anotherFunction as anotherFunction } from "./library"; + +function main() {} + + +testFunction() diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..5e21a8ab7b1bb3839c51144b3fb2958a47f63b34 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/index.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +export function addUseImportSameFile(program: arkts.Program, options: arkts.CompilationOptions) { + if (options.isProgramForCodegeneration) { + const module = program.ast as arkts.ETSModule + program.setAst( + arkts.factory.updateETSModule( + module, + [ + arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral( + './library' + ), + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier( + 'testFunction' + ), + arkts.factory.createIdentifier( + 'testFunction' + ) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL + ), + ...module.statements, + arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createIdentifier("testFunction"), + [], + undefined, + false, + false, + undefined + ) + ) + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + } + return program +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/library.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/library.ts new file mode 100644 index 0000000000000000000000000000000000000000..a38c17c74a063eff1f70187e96138f96995ea380 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/library.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export function testFunction(): string { + return "yes" +} +export function anotherFunction(): string { + return "no" +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5adb0b5d7e06cd2b8854e19cf1654f6998c4f3b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/add-use-same-file/main.ets @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { anotherFunction } from "./library" +console.log("test") diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..951b36b32a961171c56b877adc32650dc850e4c1 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/dump-src/main.ets @@ -0,0 +1,8 @@ + +import { One as One } from "./one_recursive"; + +import { Two as Two } from "./two_recursive"; + +function main() {} + + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..43a9433ed75236cfbdcd96732626e88b0debf71f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/index.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +class InsertParameter extends arkts.AbstractVisitor { + visitor(beforeChildren: arkts.BlockStatement): arkts.BlockStatement + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + if (arkts.isScriptFunction(node) && + (node.id?.name == "one" || node.id?.name == "two") ) { + + return arkts.factory.updateScriptFunction( + node, + node.body, + node.typeParams, + [ + arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier("createdParam", arkts.factory.createETSPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_BOOLEAN)), + false, + undefined, + undefined + ) + ], + node.returnTypeAnnotation, + node.hasReceiver, + node.flags, + node.modifierFlags, + node.id, + node.annotations + ) + } + return node + } +} + +export function insertParameter(program: arkts.Program) { + program.setAst(new InsertParameter().visitor(program.ast)) +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..2e116ff7b2489399a52958a87ec48c2cd32e8f00 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/main.ets @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { One } from "./one_recursive" +import { Two } from "./two_recursive" diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/one_recursive.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/one_recursive.ts new file mode 100644 index 0000000000000000000000000000000000000000..bbc749b12407dc1c9f4cc453571e6f6798a6ab74 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/one_recursive.ts @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Two } from "./two_recursive" + +export interface One { + two(): Two { + throw new Error("") + } +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/two_recursive.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/two_recursive.ts new file mode 100644 index 0000000000000000000000000000000000000000..ee28528bd7bc288ede551b0cf379c62cfa4d2443 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/imports/recursive/two_recursive.ts @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { One } from "./one_recursive" + +export interface Two { + one(): One { + throw new Error("") + } +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/lambda/unchanged/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/lambda/unchanged/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..e7e3006e6ceee557942ab27068d7f8cd993e6cb4 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/lambda/unchanged/dump-src/main.ets @@ -0,0 +1,29 @@ + +function main() {} + +function foo(): void { + HasInstantiate.$_instantiate((() => { + return new HasInstantiate(); + }), "foo"); +} + +function hasTrailing(first?: string, trailing?: (()=> void)): void { + ({let gensym%%_1040 = trailing; + (((gensym%%_1040) == (null)) ? undefined : gensym%%_1040())}); +} + +function bar(zzz: string): void { + hasTrailing("xxx"); + hasTrailing("xxx", (() => { + const d = zzz; + })); +} + + +class HasInstantiate { + public static $_instantiate(factory: (()=> HasInstantiate), arg: string) {} + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/lambda/unchanged/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/lambda/unchanged/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..354f2045d2f6220667a3bd4a009adb2ab91ef0f0 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/lambda/unchanged/main.ets @@ -0,0 +1,23 @@ + +class HasInstantiate { + static $_instantiate(factory: () => HasInstantiate, arg: string) { + } +} + +function foo(): void { + HasInstantiate("foo") +} + +function hasTrailing(first?: string, trailing?: () => void): void { + trailing?.() +} + +function bar(zzz: string): void { + + hasTrailing("xxx") + + hasTrailing("xxx") { + const d = zzz + } +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/add-chain/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/add-chain/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..35279acf0194c3296e5a80d7fbf3461335d59268 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/add-chain/dump-src/main.ets @@ -0,0 +1,17 @@ + +function main() {} + +function someFunc(value: (SomeClass | undefined)): void { + let x: (SomeClass | undefined) = value; + let zzz = ({let chaintmp%%_0 = x; + (((chaintmp%%_0) === (undefined)) ? undefined : chaintmp%%_0.y)}); +} + + +class SomeClass { + public y: string = "yyy"; + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/add-chain/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/add-chain/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..b5aa8a49ae77ca60a3a89bdb7b4bcaea784c1138 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/add-chain/index.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +class AddOptionalChain extends arkts.AbstractVisitor { + visitor(beforeChildren: arkts.BlockStatement): arkts.BlockStatement + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + if (arkts.isVariableDeclarator(node) && arkts.isIdentifier(node.id) && node.id.name == "zzz") { + return arkts.factory.updateVariableDeclarator( + node, + node.flag, + node.id, + arkts.factory.createChainExpression( + arkts.factory.createMemberExpression( + + arkts.factory.createIdentifier("x"), + arkts.factory.createIdentifier("y"), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ) + ) + + ) + } + return node + } +} + +export function addOptionalChain(program: arkts.Program) { + const inserted = new AddOptionalChain().visitor(program.ast) + return program.setAst(new arkts.ChainExpressionFilter().visitor(inserted)) +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/add-chain/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/add-chain/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..e53234f414663b13d1e9c2460b68bd1073816d82 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/add-chain/main.ets @@ -0,0 +1,9 @@ +class SomeClass { + y: string = "yyy" +} + +function someFunc(value: SomeClass|undefined): void { + let x: SomeClass|undefined = value + let zzz = x?.y +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/unchanged/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/unchanged/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f5b3689359ac7caa026bd432c064fbbf4f0f48e --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/unchanged/dump-src/main.ets @@ -0,0 +1,17 @@ + +function main() {} + +function foo(x: (X | undefined)) { + let zzz = ({let gensym%%_890 = ({let gensym%%_889 = x; + (((gensym%%_889) == (null)) ? undefined : gensym%%_889.y)}); + (((gensym%%_890) == (null)) ? undefined : gensym%%_890.length)}); +} + + +class X { + public y?: (string | undefined); + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/unchanged/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/unchanged/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..492728c84a335682a8c692e9cc1a3b59063005c0 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/optional/unchanged/main.ets @@ -0,0 +1,9 @@ + +class X { + y?: string +} + +function foo(x: X|undefined) { + let zzz = x?.y?.length +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/overloads/getter-setter/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/overloads/getter-setter/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..f062e25a6f26c89d6ded757a5185163c6bcb7fe8 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/overloads/getter-setter/dump-src/main.ets @@ -0,0 +1,11 @@ + +function main() {} + + +interface I { + get f(): ((createdParam: boolean)=> void) + + set f(f: ((createdParam: boolean)=> void)) + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/overloads/getter-setter/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/overloads/getter-setter/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..f305ebeda4518463e1b0e94ce3d8226ee502dfac --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/overloads/getter-setter/index.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +class InsertParameterToType extends arkts.AbstractVisitor { + visitor(beforeChildren: arkts.BlockStatement): arkts.BlockStatement + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + if (arkts.isETSFunctionType(node)) { + return arkts.factory.createETSFunctionType( + node.typeParams, + [ + arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier("createdParam", arkts.factory.createETSPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_BOOLEAN)), + false, + undefined, + undefined + ), + ...node.params + ], + node.returnType, + node.isExtensionFunction, + node.flags, + node.annotations, + ) + } + return node + } +} + +export function insertParameterToType(program: arkts.Program) { + program.setAst(new InsertParameterToType().visitor(program.ast)) +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/overloads/getter-setter/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/overloads/getter-setter/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..d158146d3da863a3fb8feefc4390b28771ec0c5c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/overloads/getter-setter/main.ets @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +interface I { + set f(f: () => void) + get f(): () => void +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/recheck.test.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/recheck.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..28e8936831ae07ab692da0c3ce23860f475bf757 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/recheck.test.ts @@ -0,0 +1,293 @@ +/* + * 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. + */ + +import * as fs from "node:fs" +import * as util from "../../test-util" +import * as arkts from "../../../src" +import { constructorWithOverload } from "./constructor" +import { updateTopLevelClass } from "./simple" +import { renameClass } from "./simple/rename-class" +import { addClassMethod } from "./simple/add-class-method" +import { addVariableDeclaration } from "./simple/add-variable" +import { addThisReference } from "./this" +import { insertParameterToType } from "./overloads/getter-setter" +import { insertParameter } from "./imports/recursive" +import { addImportSameFile } from "./imports/add-same-file" +import { addUseImportSameFile } from "./imports/add-use-same-file" +import { addImportNewFile } from "./imports/add-new-file" +import { addOptionalChain } from "./optional/add-chain" +import { addUseImportClassSameFile } from "./exports/basic" +import { addUseImportClassSameFileAndExportClass } from "./exports/add-export" +import { addUseImportClassSameFileAndCreateClass } from "./exports/create-class" +import { addUseImportClassSameFileAfterRewritingStructToClass, rewriteStructToClass } from "./exports/struct-to-class" + +const DIR = './test/arkts-api/recheck' +const PANDA_SDK_PATH = process.env.PANDA_SDK_PATH ?? '../../incremental/tools/panda/node_modules/@panda/sdk' + +function createConfig(file: string) { + fs.mkdirSync(`${DIR}/build/abc/${file}`, { recursive: true }) + arkts.arktsGlobal.filePath = `${DIR}/${file}/main.ets` + arkts.arktsGlobal.config = arkts.Config.create([ + '_', + '--arktsconfig', + `${DIR}/arktsconfig.json`, + `${DIR}/${file}/main.ets`, + '--extension', + 'ets', + '--stdlib', + `${PANDA_SDK_PATH}/ets/stdlib`, + '--output', + `${DIR}/build/abc/${file}/main.abc` + ]).peer + + arkts.initVisitsTable() +} + +function createContext(file: string) { + const code = fs.readFileSync(`${DIR}/${file}/main.ets`, 'utf-8') + arkts.arktsGlobal.filePath = `${DIR}/${file}/main.ets` + arkts.arktsGlobal.compilerContext = arkts.Context.createFromString(code) +} + +function proceedToParsed() { + arkts.proceedToState(arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED) +} + +function proceedToChecked() { + arkts.proceedToState(arkts.Es2pandaContextState.ES2PANDA_STATE_CHECKED) +} + +function applyTransformOnState(transform?: arkts.ProgramTransformer, state: arkts.Es2pandaContextState = arkts.Es2pandaContextState.ES2PANDA_STATE_CHECKED) { + arkts.runTransformer(arkts.arktsGlobal.compilerContext!.program, state, transform, new arkts.PluginContextImpl(), {}) +} + +function recheck() { + arkts.recheckSubtree(arkts.createETSModuleFromContext()) +} + +function dumpSrc(file: string) { + const src = arkts.createETSModuleFromContext().dumpSrc() + fs.mkdirSync(`${DIR}/${file}/dump-src`, { recursive: true }) + fs.writeFileSync(`${DIR}/${file}/dump-src/main.ets`, src) +} + +function dumpJson(file: string) { + const json = arkts.createETSModuleFromContext().dumpJson() + fs.mkdirSync(`${DIR}/${file}/dump-json`, { recursive: true }) + fs.writeFileSync(`${DIR}/${file}/dump-json/main.json`, json) +} + +function assertSrc(file: string) { + const src = arkts.createETSModuleFromContext().dumpSrc() + const expected = fs.readFileSync(`${DIR}/${file}/dump-src/main.ets`, 'utf-8') + util.assert.equal(filterGensym(src), filterGensym(expected)) +} + +function assertJson(file: string) { + const json = arkts.createETSModuleFromContext().dumpJson() + const expected = fs.readFileSync(`${DIR}/${file}/dump-json/main.json`, 'utf-8') + util.assert.equal(json, expected) +} + +function filterGensym(value: string): string { + return value.replaceAll(/gensym%%_[0-9]*/g, "gensym_XXX") +} + +function proceedToBin() { + arkts.proceedToState(arkts.Es2pandaContextState.ES2PANDA_STATE_BIN_GENERATED) +} + +interface TestOptions { + skipSrc?: boolean, + skipJson?: boolean, +} + +const defaultTestOptions: TestOptions = { + skipSrc: false, + skipJson: true, +} + +function runTest( + file: string, + transform?: arkts.ProgramTransformer, + userOptions: TestOptions = defaultTestOptions +) { + const options = { + skipSrc: userOptions.skipSrc ?? defaultTestOptions.skipSrc, + skipJson: userOptions.skipJson ?? defaultTestOptions.skipJson, + } + createConfig(file) + createContext(file) + proceedToChecked() + applyTransformOnState(transform) + recheck() + if (process.env.TEST_GOLDEN == "1") { + if (!options.skipSrc) dumpSrc(file) + if (!options.skipJson) dumpJson(file) + } else { + if (!options.skipSrc) assertSrc(file) + if (!options.skipJson) assertJson(file) + } + proceedToBin() +} + +function runTestWithParsedTransform( + file: string, + parsedTransform?: arkts.ProgramTransformer, + transform?: arkts.ProgramTransformer, + userOptions: TestOptions = defaultTestOptions +) { + const options = { + skipSrc: userOptions.skipSrc ?? defaultTestOptions.skipSrc, + skipJson: userOptions.skipJson ?? defaultTestOptions.skipJson, + } + createConfig(file) + createContext(file) + proceedToParsed() + applyTransformOnState(parsedTransform, arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED) + proceedToChecked() + applyTransformOnState(transform) + recheck() + if (process.env.TEST_GOLDEN == "1") { + if (!options.skipSrc) dumpSrc(file) + if (!options.skipJson) dumpJson(file) + } else { + if (!options.skipSrc) assertSrc(file) + if (!options.skipJson) assertJson(file) + } + proceedToBin() +} + +suite(util.basename(__filename), () => { + suite('static', () => { + test("function", () => { + runTest('static/function', undefined) + }) + + test.skip("public setter", () => { + runTest('static/public-setter', undefined) + }) + + test.skip("constructor with overload", () => { + runTest('static/constructor', undefined) + }) + + // es2panda issue 24821 + test.skip("property", () => { + runTest('static/property', undefined) + }) + + test("typed property", () => { + runTest('static/typed-property', undefined) + }) + + test("trailing block", () => { + runTest('static/trailing-block', undefined) + }) + + test("import type", () => { + runTest('static/import-type', undefined) + }) + + test("import all", () => { + runTest('static/import-all', undefined) + }) + }) + + suite('simple', () => { + test('rename class', () => { + runTest('simple/rename-class', (program: arkts.Program) => { + program.setAst(updateTopLevelClass(program.ast as arkts.ETSModule, renameClass)) + }) + }) + + test('add class method', () => { + runTest('simple/add-class-method', (program: arkts.Program) => { + program.setAst(updateTopLevelClass(program.ast as arkts.ETSModule, addClassMethod)) + }) + }) + + test('add variable declaration', () => { + runTest('simple/add-variable', (program: arkts.Program) => { + program.setAst(updateTopLevelClass(program.ast as arkts.ETSModule, addVariableDeclaration)) + }) + }) + }) + + test.skip('constructor', () => { + runTest('constructor', constructorWithOverload) + }) + + test('add this reference', () => { + runTest('this', addThisReference) + }) + + suite('optional', () => { + test('pass optional unchanged', () => { + runTest('optional/unchanged', undefined) + }) + test('add optional chain', () => { + runTest('optional/add-chain', addOptionalChain) + }) + }) + + suite('lambda', () => { + test('compiler produced lambdas unchanged', () => { + runTest('lambda/unchanged', undefined) + }) + }) + + suite('imports', () => { + test('add another import from the same file with dedicated API', () => { + runTest('imports/add-same-file', addImportSameFile) + }) + + test('add another import from the same file with dedicated API and use it', () => { + runTest('imports/add-use-same-file', addUseImportSameFile) + }) + + test.skip('add import from the new file with dedicated API', () => { + runTest('imports/add-new-file', addImportNewFile) + }) + + test('recursive', () => { + runTest('imports/recursive', insertParameter) + }) + }) + + suite('overloads', () => { + test('getter and setter both modified simultaneously', () => { + runTest('overloads/getter-setter', insertParameterToType) + }) + }) + + suite('exports', () => { + test('import existing exported class', () => { + runTest('exports/basic', addUseImportClassSameFile) + }) + + test('import existing not exported class', () => { + runTest('exports/add-export', addUseImportClassSameFileAndExportClass) + }) + + test('import created class', () => { + runTest('exports/create-class', addUseImportClassSameFileAndCreateClass) + }) + + test('export struct as class', () => { + runTestWithParsedTransform('exports/struct-to-class', rewriteStructToClass, addUseImportClassSameFileAfterRewritingStructToClass) + }) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-class-method/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-class-method/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..aeb6e10b7585d74241c6c72e8833eb7f75cd286d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-class-method/dump-src/main.ets @@ -0,0 +1,13 @@ + +function main() {} + + +class C { + public g(): double { + return 5; + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-class-method/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-class-method/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..38d3ebcdc721a3fae4da12417286efb8e754d5af --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-class-method/index.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +export function addClassMethod(node: arkts.ClassDefinition) { + return arkts.factory.updateClassDefinition( + node, + node.ident, + node.typeParams, + node.superTypeParams, + node.implements, + undefined, + node.super, + [ + arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD, + arkts.factory.createIdentifier("g"), + arkts.factory.createFunctionExpression( + arkts.factory.createIdentifier("g"), + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement([ + arkts.factory.createReturnStatement( + arkts.factory.createNumberLiteral(5) + ) + ]), + undefined, + [], + arkts.factory.createETSPrimitiveType( + arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_DOUBLE, + ), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + arkts.factory.createIdentifier("g"), + undefined, + ) + ), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + false, + ), + ...node.body, + ], + node.modifiers, + node.modifierFlags + ) +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-class-method/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-class-method/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..96041f4f2bd132009d7c06ce704d10ef206d9d2e --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-class-method/main.ets @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class C { +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-variable/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-variable/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..534b4a38d65bdaafd82b2f68e4a7ea83cc620f1e --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-variable/dump-src/main.ets @@ -0,0 +1,13 @@ + +function main() {} + + +class C { + public f(): void { + const x = ((1) + (4)); + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-variable/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-variable/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..fd15fbbd215fa8164344c27a7b8e55dee2c6e648 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-variable/index.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +export function addVariableDeclaration(node: arkts.ClassDefinition) { + return arkts.factory.updateClassDefinition( + node, + node.ident, + node.typeParams, + node.superTypeParams, + node.implements, + undefined, + node.super, + [ + ...node.body.map((node: arkts.AstNode) => { + if (!arkts.isMethodDefinition(node)) { + return node + } + if (node.id?.name != "f") { + return node + } + if (!arkts.isFunctionExpression(node.value)) { + return node + } + const func = node.value.function + if (!func || !arkts.isBlockStatement(func.body)) { + return node + } + return arkts.factory.updateMethodDefinition( + node, + node.kind, + node.key, + arkts.factory.updateFunctionExpression( + node.value, + node.id, + arkts.factory.updateScriptFunction( + func, + arkts.factory.updateBlockStatement( + func.body, + [ + arkts.factory.createVariableDeclaration( + arkts.Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_CONST, + [ + arkts.factory.createVariableDeclarator( + arkts.Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_CONST, + arkts.factory.createIdentifier("x"), + arkts.factory.createBinaryExpression( + arkts.factory.createNumberLiteral(1), + arkts.factory.createNumberLiteral(4), + arkts.Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_PLUS, + ), + ), + ], + ), + ...func.body.statements, + ], + ), + func.typeParams, + func.params, + func.returnTypeAnnotation, + func.hasReceiver, + func.flags, + func.modifierFlags, + func.id, + func.annotations, + ), + ), + node.modifierFlags, + node.isComputed, + node.overloads, + ) + }) + ], + node.modifiers, + node.modifierFlags + ) +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-variable/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-variable/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..408125c2b4b2a22a708ba13ff54bae651b3285ab --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/add-variable/main.ets @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2022-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. + */ + +class C { + f(): void { + } +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..1966eff8eadb63a6eed9a979938dcdcccf9a9b77 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/index.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../src/arkts-api" + +export function updateTopLevelClass( + module: arkts.ETSModule, + update: (node: arkts.ClassDefinition) => arkts.ClassDefinition +) { + return arkts.factory.updateETSModule( + module, + [ + ...module.statements.map((node) => { + if (!arkts.isClassDeclaration(node)) { + return node + } + if (!arkts.isClassDefinition(node.definition)) { + return node + } + if (node.definition.ident?.name == "C") { + return arkts.factory.updateClassDeclaration( + node, + update(node.definition) + ) + } + return node + }) + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/rename-class/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/rename-class/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..b91d6ad10f82db415ab0d794ff579a81e70b4eaf --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/rename-class/dump-src/main.ets @@ -0,0 +1,11 @@ + +function main() {} + + +class D { + public f(): void {} + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/rename-class/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/rename-class/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..c930e924aaef3abee06b1b8546217c8432a6302e --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/rename-class/index.ts @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../../src/arkts-api" + +export function renameClass(node: arkts.ClassDefinition) { + return arkts.factory.updateClassDefinition( + node, + node.ident ? arkts.factory.updateIdentifier( + node.ident, + "D" + ) : undefined, + node.typeParams, + node.superTypeParams, + node.implements, + undefined, + node.super, + node.body, + node.modifiers, + node.modifierFlags + ) +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/rename-class/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/rename-class/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..64541ccc260c088a2955cf31b3c121a797d76cc5 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/simple/rename-class/main.ets @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class C { + f(): void { + } +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/constructor/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/constructor/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..2339dcfc717a53690eeaa38d4b19582c77009c97 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/constructor/dump-src/main.ets @@ -0,0 +1,14 @@ + +function main(): void {} + + + +class XXX { + constructor(x: (()=> void)) { + this(x, undefined); + } + + public constructor(x: (()=> void), y: (()=> void) | undefined) {} + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/constructor/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/constructor/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..5916c50417c70fbdc10c4def077c165df6dfd3b1 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/constructor/main.ets @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class XXX { + constructor(x: ()=>void, y?: ()=>void) { + } +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/function/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/function/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..2d4ba9e9542eef9fd8300f31f22fa900e9e907f1 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/function/dump-src/main.ets @@ -0,0 +1,6 @@ + +function main() {} + +function foo(): void {} + + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/function/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/function/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..2c0360369803ad3484835777dd439988186dd684 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/function/main.ets @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function foo(): void {} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-all/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-all/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..ee631c93e23b358831ded14d64532f1d8ab85af0 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-all/dump-src/main.ets @@ -0,0 +1,6 @@ + +import * as library from "./library"; + +function main() {} + + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-all/library.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-all/library.ts new file mode 100644 index 0000000000000000000000000000000000000000..e76c034cae87408f2f5f2d2fd654168933a11512 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-all/library.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2022-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. + */ + +export class Scope { + static scope(): Scope { + throw new Error("") + } + cached(): T { + throw new Error("") + } +} + +export interface ExportedType { + scope( value: () => V ) +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-all/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-all/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..802b16326bf22b7a1bb6cc7f7a2b78ef75d113b2 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-all/main.ets @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as library from "./library" diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-type/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-type/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..93843db2f86c0880c4140912875b10383a2ac10d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-type/dump-src/main.ets @@ -0,0 +1,6 @@ + +import { ExportedType as ExportedType } from "./library"; + +function main() {} + + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-type/library.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-type/library.ts new file mode 100644 index 0000000000000000000000000000000000000000..e76c034cae87408f2f5f2d2fd654168933a11512 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-type/library.ts @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2022-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. + */ + +export class Scope { + static scope(): Scope { + throw new Error("") + } + cached(): T { + throw new Error("") + } +} + +export interface ExportedType { + scope( value: () => V ) +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-type/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-type/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..8bef6f3001b4084331c94ce3d2e6d5a1a081b042 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/import-type/main.ets @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ExportedType } from "./library" diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/property/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/property/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..0cdc54eb9ec5b3611e1d7dbf889b35e5a28ebad7 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/property/main.ets @@ -0,0 +1,8 @@ + +interface I { + prop: boolean +} + +class C implements I { + prop = true +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/public-setter/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/public-setter/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..49c59c1b4c0232bd99f2233abbaa0683bc149290 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/public-setter/dump-src/main.ets @@ -0,0 +1,24 @@ + +import { AnimatedState as AnimatedState, one as one } from "./library"; + +let x: (AnimatedState | undefined); + +function main(): void {} + +if (x) { + x!.paused = true +} + +class AnimatedStateImpl implements AnimatedState { + set paused(paused: boolean) { + throw new Error(""); + } + + public get paused(): boolean { + throw new Error(""); + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/public-setter/library.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/public-setter/library.ts new file mode 100644 index 0000000000000000000000000000000000000000..7f38c5ffaf4ab7b9ef62e4f354b41e36e4d74ffe --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/public-setter/library.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface AnimatedState { + paused: boolean +} + +class AnimatedStateImpl implements AnimatedState { + get paused(): boolean { + throw new Error("") + } + set paused(paused: boolean) { + throw new Error("") + } +} + +export function one() { + +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/public-setter/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/public-setter/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9676161864d3b65e9526fe9880d95e2ecc00560 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/public-setter/main.ets @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AnimatedState, one } from "./library" + +let x: AnimatedState|undefined +if (x) x!.paused = true +class AnimatedStateImpl implements AnimatedState { + get paused(): boolean { + throw new Error("") + } + set paused(paused: boolean) { + throw new Error("") + } +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/trailing-block/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/trailing-block/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..b8097f64c43fb3fc4f2ceda9cd56bafefa384fcc --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/trailing-block/dump-src/main.ets @@ -0,0 +1,17 @@ + +function main() {} + + +class C { + public f(arg: (()=> void)): void {} + + public g(): void { + this.f((() => { + const x = 11; + })); + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/trailing-block/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/trailing-block/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..826ec914b9842dead5985b3faeda05d8dca60c01 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/trailing-block/main.ets @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class C { + f(arg: () => void): void { } + + g(): void { + this.f() { + const x = 6 + 5 + } + } +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/typed-property/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/typed-property/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..db418dc18a268bf936bee3b83bc3f4a2a7cb4c12 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/typed-property/dump-src/main.ets @@ -0,0 +1,27 @@ + +function main() {} + + +interface I { + set prop(prop: boolean) + + get prop(): boolean + +} + +class C implements I { + public constructor() {} + + private _$property$_prop: boolean = true; + + set prop(_$property$_prop: boolean) { + this._$property$_prop = _$property$_prop; + return; + } + + public get prop(): boolean { + return this._$property$_prop; + } + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/typed-property/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/typed-property/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..6cddab31224d58a02616fa2f571345d2600dee4d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/static/typed-property/main.ets @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2022-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. + */ + +interface I { + prop: boolean +} + +class C implements I { + prop: boolean = true +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/this/dump-src/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/this/dump-src/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..814a569298a5c056e8dcbdc3855ab35db73a0679 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/this/dump-src/main.ets @@ -0,0 +1,14 @@ + +function main() {} + + +class A { + public no_this(): void { + this; + console.log("test"); + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/this/index.ts b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/this/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..65a35d8756ced9c843e5f6ae3a5472ec5c08eeb2 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/this/index.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "../../../../src/arkts-api" + +class AddThisReference extends arkts.AbstractVisitor { + visitor(beforeChildren: arkts.BlockStatement): arkts.BlockStatement + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + if (arkts.isScriptFunction(node) && node.id?.name == "no_this") { + return arkts.factory.updateScriptFunction( + node, + arkts.factory.createBlockStatement( + [ + + arkts.factory.createExpressionStatement( + arkts.factory.createThisExpression() + ), + ...(arkts.isBlockStatement(node.body) ? node.body.statements : []), + ] + ), + node.typeParams, + node.params, + node.returnTypeAnnotation, + node.hasReceiver, + node.flags, + node.modifierFlags, + node.id, + node.annotations + ) + } + return node + } +} + +export function addThisReference(program: arkts.Program) { + program.setAst(new AddThisReference().visitor(program.ast)) +} diff --git a/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/this/main.ets b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/this/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..c3dc450b6b52592337bedf34a59673ca6ac9129a --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/arkts-api/recheck/this/main.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class A { + no_this(): void { + console.log("test") + } +} diff --git a/koala_tools/ui2abc/libarkts/test/test-util.ts b/koala_tools/ui2abc/libarkts/test/test-util.ts new file mode 100644 index 0000000000000000000000000000000000000000..929043298dd306482e56eda96bf9c272d4035c8f --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/test-util.ts @@ -0,0 +1,158 @@ +/* + * 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 { global } from "../src/arkts-api/static/global" +import * as arkts from "../src/arkts-api" + +import * as pth from "path" +import { assert } from "@koalaui/harness" +import { exec, execSync } from "child_process" + +export { Es2pandaNativeModule } from "../src/Es2pandaNativeModule" +export { assert } from "@koalaui/harness" + +export function alignText(text: string): string { + const lines = text.replace(/\t/gy, ' ').split('\n') + + const shift = + lines + .map((str: string) => str.search(/\S/)) + .reduce( + (prev: number, curr: number) => { + if (prev === -1) { + return curr + } + if (curr === -1) { + return prev + } + return Math.min(prev, curr) + } + ) + return lines.map(str => str.slice((shift === -1) ? 0 : shift)).join('\n').trim() +} + +export function basename(fileName: string) { + return pth.basename(fileName).split('.')[0] +} + +export function assertEqualsSource(sourceResult: string, sourceExpect: string, message?: string) { + assert.equal( + sourceResult.trim().split('\n').map((line: string) => line.trim()).join('\n'), + sourceExpect.trim().split('\n').map((line: string) => line.trim()).join('\n'), + message + ) +} + +export function ARKTS_TEST_ASSERTION(node: arkts.ETSModule, source: string, state?: arkts.Es2pandaContextState) { + const finalState: arkts.Es2pandaContextState = (() => { + if (state !== undefined) { + return state + } + if (process.env.STATE_CHECKED !== undefined) { + return arkts.Es2pandaContextState.ES2PANDA_STATE_CHECKED + } + return arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED + })() + arkts.proceedToState(finalState) + + const ast = node.dumpJson() + const src = node.dumpSrc() + const dump = node.dump() + global.es2panda._DestroyContext(global.context) + + try { + const script = arkts.createETSModuleFromSource(source, finalState) + assertEqualsSource(src, script.dumpSrc(), 'Error on SOURCE comparison') + assert.equal(ast, script.dumpJson(), 'Error on JSON comparison') + assert.equal(dump, script.dump(), 'Error on DUMP comparison') + } finally { + global.es2panda._DestroyContext(global.context) + } +} + + + +export function cleanGenerated(): void { + exec('npm run clean:generated') +} + +export function fileToAbc(path: string, isModule?: boolean): void { + const file = pth.basename(path).split('.')[0] + + execSync(`../../../incremental/tools/panda/node_modules/@panda/sdk/linux_host_tools/bin/es2panda ${path} --arktsconfig ./arktsconfig.json ${isModule ? '--ets-module' : ''}`) + execSync('mkdir -p ./generated') + execSync(`mv ./${file}.abc ./generated/${file}.abc`) +} + +export function contextToAbc(): void { + arkts.proceedToState(arkts.Es2pandaContextState.ES2PANDA_STATE_BIN_GENERATED) + // Improve: get name of file + execSync('mkdir -p ./generated') + execSync('mv ./main.abc ./generated/main.abc') +} + +export function runAbc(path: string = './generated/main.abc', modules?: readonly string[]): void { + const modulesStr: string = (modules === undefined) ? '' : (':' + modules.join(':')) + + exec(`../../incremental/tools/panda/node_modules/@panda/sdk/linux_host_tools/bin/ark --load-runtimes=ets --boot-panda-files=../../incremental/tools/panda/node_modules/@panda/sdk/ets/etsstdlib.abc${modulesStr} ${path} ETSGLOBAL::main`, + (error: any, stdout: string, stderr: string) => { + if (error !== null) { + assert(false, `failed to run abc: ${error}`) + } + console.log(`stdout: ${stdout}`); + console.log(`stderr: ${stderr}`); + } + ) +} + +export function assertEqualsBinaryOutput(output: string, ctx: Mocha.Context): void { + if (process.env.TEST_BIN === undefined) { + ctx.skip() + } + try { + contextToAbc() + exec( + 'npm run run:abc', + (error: any, stdout: string, stderr: string) => { + if (error !== null) { + assert(false, `failed to run abc: ${error}`) + } + const lines = stdout.trim().split('\n') + assert(lines.length >= 2) + assert.equal(lines[0], '> run:abc') + assert.equal(stderr, '') + if (lines.length === 2) { + assert.equal('', output.trim()) + } else { + assert.equal(lines.splice(2).join('\n').trim(), output.trim()) + } + } + ) + } finally { + global.es2panda._DestroyContext(global.context) + } +} + +export function trimLines(value: string): string { + return value.split('\n').map(it => it.trim()).join('\n') +} + +export function equalTrimming(value1: string, value2: string, message: string) { + return assert.equal( + trimLines(value1), + trimLines(value2), + message + ) +} diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/classes/heritage/extends.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/classes/heritage/extends.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..8a57a64cb8571fcb6f097cc3a6840e540ac44f43 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/classes/heritage/extends.test.ts @@ -0,0 +1,74 @@ +/* + * 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 * as util from "../../../test-util" +import * as ts from "../../../../src/ts-api" +import { factory } from "../../../../src/ts-api" + +// Improve: +suite.skip(util.basename(__filename), () => { + test("sample-1", function() { + const sample_in = + ` + abstract class A {}; + abstract class C {}; + interface D {}; + class B extends A implements C, D {}; + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + // sourceFile = factory.updateSourceFile( + // sourceFile, + // [ + // factory.createClassDeclaration( + // [ + // factory.createToken(ts.SyntaxKind.AbstractKeyword) + // ], + // factory.createIdentifier("A"), + // undefined, + // undefined, + // [] + // ), + // factory.createClassDeclaration( + // undefined, + // factory.createIdentifier("B"), + // undefined, + // [ + // factory.createHeritageClause( + // ts.SyntaxKind.ExtendsKeyword, + // [ + // factory.createExpressionWithTypeArguments( + // factory.createIdentifier("A"), + // undefined + // ) + // ] + // ) + // ], + // [] + // ) + // ] + // ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + abstract class A {}; + class B extends A {}; + ` + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/cross/cross.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/cross/cross.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..de273c4aa9f445211ab1277e1431dce527eee9f6 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/cross/cross.test.ts @@ -0,0 +1,57 @@ +/* + * 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 * as util from "../../test-util" +import * as ts from "../../../src/ts-api" + +suite.skip(util.basename(__filename), () => { + test("imported-function-call", function() { + const sample_in = + ` + import { X } from "./variable" + + export function main() { + console.log(X) + } + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + util.cleanGenerated() + util.fileToAbc(`./input/variable.sts`, true) + util.contextToAbc() + util.runAbc(`./generated/main.abc`, ['./generated/variable.abc']) + }) + + test("rewrite-imported-function-call", function() { + const sample_in = + ` + import { X } from "./variable" + + export function main() { + console.log(Y) + } + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + util.cleanGenerated() + util.fileToAbc(`./input/variable.sts`, true) + util.contextToAbc() + util.runAbc(`./generated/main.abc`, ['./generated/variable.abc']) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/functions/function-declaration/create-function-declaration.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/functions/function-declaration/create-function-declaration.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..fd329a7337bee2010ad65c242a9d01debc4fea2e --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/functions/function-declaration/create-function-declaration.test.ts @@ -0,0 +1,442 @@ +/* + * 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 * as util from "../../../test-util" +import * as ts from "../../../../src/ts-api" +import { factory } from "../../../../src/ts-api" + +suite.skip(util.basename(__filename), () => { + test("empty-function", function() { + // function test_func() { + // // empty + // } + + const sample_in = `` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const funcDecl = ts.factory.createFunctionDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("test_func"), + undefined, + [], + undefined, + ts.factory.createBlock( + [], + true + ) + ) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + funcDecl + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function test_func() {} + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + test("empty-function-with-param", function() { + const sample_in = `` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const funcParams = [ + ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("x"), + undefined, + ts.factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), + undefined + ) + ] + const funcDecl = ts.factory.createFunctionDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("test_func"), + undefined, + funcParams, + undefined, + ts.factory.createBlock( + [], + true + ) + ) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + funcDecl + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function test_func(x: number) {} + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + test("empty-function-with-string-param", function() { + // function test_func(x: string) { + // // empty + // } + + const sample_in = `` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const funcParams = [ + ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("x"), + undefined, + ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + undefined + ) + ] + const funcDecl = ts.factory.createFunctionDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("test_func"), + undefined, + funcParams, + undefined, + ts.factory.createBlock( + [], + true + ) + ) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + funcDecl + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function test_func(x: string) {} + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + test("async-empty-function", function() { + // async function test_func() {} + + const sample_in = `` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const funcDecl = ts.factory.createFunctionDeclaration( + [ + ts.factory.createToken(ts.SyntaxKind.AsyncKeyword) + ], + undefined, + ts.factory.createIdentifier("test_func"), + undefined, + [], + undefined, + ts.factory.createBlock( + [], + true + ) + ) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + funcDecl + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + async function test_func() {} + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + test.skip("empty-method-with-public-static-modifiers", function() { + const sample_in = + ` + class A { + } + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + let classDecl = sourceFile.statements[0] + util.assert(ts.isClassDeclaration(classDecl)) + + classDecl = factory.updateClassDeclaration( + classDecl, + undefined, + factory.createIdentifier("A"), + undefined, + undefined, + [ + factory.createMethodDeclaration( + [ + factory.createToken(ts.SyntaxKind.PublicKeyword), + factory.createToken(ts.SyntaxKind.StaticKeyword) + ], + undefined, + factory.createIdentifier("test_func"), + undefined, + undefined, + [], + undefined, + factory.createBlock( + [], + false + ) + ), + factory.createConstructorDeclaration( + [ + factory.createToken(ts.SyntaxKind.PublicKeyword) + ], + [], + factory.createBlock( + [], + false + ) + ) + ] + ) + + sourceFile = factory.updateSourceFile( + sourceFile, + [ + classDecl + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + class A { + public static test_func() {} + + public constructor() {} + + } + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + test("function-with-type-parameters", function() { + // function test_func(): void {} + + const sample_in = + ` + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const funcDecl = ts.factory.createFunctionDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("test_func"), + [ + ts.factory.createTSTypeParameterDeclaration( + undefined, + ts.factory.createIdentifier("T"), + undefined, + undefined + ), + ts.factory.createTSTypeParameterDeclaration( + undefined, + ts.factory.createIdentifier("K"), + undefined, + undefined + ) + ], + [], + ts.factory.createKeywordTypeNode(ts.SyntaxKind.VoidKeyword), + ts.factory.createBlock( + [], + true + ) + ) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + funcDecl + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function test_func(): void {} + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + // Improve: change 0 -> 777 (waiting fix) + test("sample-1", function() { + const sample_in = + ` + console.log("OK") + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const funcDecl = factory.createFunctionDeclaration( + undefined, + undefined, + factory.createIdentifier("foo"), + undefined, + [ + factory.createParameterDeclaration( + undefined, + undefined, + factory.createIdentifier("x"), + undefined, + factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), + factory.createNumericLiteral(0) + ), + factory.createParameterDeclaration( + undefined, + undefined, + factory.createIdentifier("y"), + undefined, + factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + factory.createStringLiteral("abc") + ) + ], + factory.createETSUnionTypeNode([ + factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), + factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword) + ]), + factory.createBlock( + [factory.createReturnStatement(factory.createBinaryExpression( + factory.createIdentifier("x"), + factory.createToken(ts.SyntaxKind.PlusToken), + factory.createIdentifier("y") + ))], + true + ) + ) + + sourceFile = factory.updateSourceFile( + sourceFile, + [ + funcDecl, + sourceFile.statements[0] + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function foo(x: number = 0, y: string = "abc"): number | string { + return x + y + } + console.log("OK") + ` + ) + }) + + // Improve: change 0 -> 777 (waiting fix) + test("sample-2", function() { + const sample_in = + ` + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const funcDecl = ts.factory.createFunctionDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("foo"), + undefined, + [ + ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("x"), + undefined, + ts.factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), + ts.factory.createNumericLiteral(0) + ), + ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("y"), + undefined, + ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + ts.factory.createStringLiteral("abc") + ) + ], + ts.factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), + ts.factory.createBlock( + [ + ts.factory.createReturnStatement( + ts.factory.createIdentifier("x") + ) + ], + true + ) + ) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + funcDecl, + // sourceFile.statements[0] + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function foo(x: number = 0, y: string = "abc"): number { + return x + } + `, + ts.ContextState.ES2PANDA_STATE_PARSED + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/functions/function-declaration/update-function-declaration.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/functions/function-declaration/update-function-declaration.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..ed3b74fe70182bc40478dc2bd9a5308c63621911 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/functions/function-declaration/update-function-declaration.test.ts @@ -0,0 +1,567 @@ +/* + * 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 * as util from "../../../test-util" +import * as ts from "../../../../src/ts-api" + +suite.skip(util.basename(__filename), () => { + // adding y: string to signature + test("update-name-and-add-param-to-function", function() { + // function new_test_func(x: number, y: string) { + // // empty + // } + + const sample_in = + ` + function test_func(x: number) { + // empty + } + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + let testFunc = sourceFile.statements[0] + util.assert(ts.isFunctionDeclaration(testFunc)) + + const newParam = ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("y"), + undefined, + ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + undefined + ) + testFunc = ts.factory.updateFunctionDeclaration( + testFunc, + undefined, + undefined, + ts.factory.createIdentifier("new_test_func"), + undefined, + [ + ...testFunc.parameters, + newParam + ], + undefined, + testFunc.body + ) + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + testFunc + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function new_test_func(x: number, y: string) {} + ` + ) + }) + + // adding memo params to signature + test("add-params-to-memo-function", function() { + // function foo(__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number) { + // // empty + // } + + const sample_in = + ` + function foo(x: number) { + // empty + } + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + let testFunc = sourceFile.statements[0] + util.assert(ts.isFunctionDeclaration(testFunc)) + + testFunc = util.addMemoParamsToFunctionDeclaration(testFunc) + util.assert(ts.isFunctionDeclaration(testFunc)) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + testFunc + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function foo(__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number) {} + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + // adding identifier x + test("add-identifier-to-function-body", function() { + // function foo() { + // x + // } + + const sample_in = + ` + function foo(x: string) { + // empty + } + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + let testFunc = sourceFile.statements[0] + util.assert(ts.isFunctionDeclaration(testFunc)) + util.assert(testFunc.body !== undefined) + + let body_statements = [ + ...testFunc.body.statements, + ts.factory.createExpressionStatement(ts.factory.createIdentifier("x")) + ] + + testFunc = ts.factory.updateFunctionDeclaration( + testFunc, + undefined, + undefined, + testFunc.name, + undefined, + testFunc.parameters, + undefined, + ts.factory.updateBlock( + testFunc.body, + body_statements + ) + ) + util.assert(ts.isFunctionDeclaration(testFunc)) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + testFunc + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function foo(x: string) { + x + } + ` + ) + }) + + // adding __memo_scope.recache + test("add-property-access-expression-to-function-body", function() { + // function foo() { + // __memo_scope.recache + // } + + const sample_in = + ` + function foo() { + // empty + } + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + let testFunc = sourceFile.statements[0] + util.assert(ts.isFunctionDeclaration(testFunc)) + util.assert(testFunc.body !== undefined) + + let body_statements = [ + ...testFunc.body.statements, + ts.factory.createExpressionStatement( + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("__memo_scope"), + ts.factory.createIdentifier("recache") + ) + ) + ] + + testFunc = ts.factory.updateFunctionDeclaration( + testFunc, + undefined, + undefined, + testFunc.name, + undefined, + testFunc.parameters, + undefined, + ts.factory.updateBlock( + testFunc.body, + body_statements + ) + ) + util.assert(ts.isFunctionDeclaration(testFunc)) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + testFunc + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function foo() { + __memo_scope.recache; + } + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + // body memo rewrite (adding return statement) + test("add-return-statement-to-function-body", function() { + // function foo() { + // return __memo_scope.recache() + // } + + const sample_in = + ` + function foo() { + // empty + } + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + let testFunc = sourceFile.statements[0] + util.assert(ts.isFunctionDeclaration(testFunc)) + util.assert(testFunc.body !== undefined) + + let body_statements = [ + ...testFunc.body.statements, + ts.factory.createReturnStatement( + ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("__memo_scope"), + ts.factory.createIdentifier("recache") + ), + undefined, + undefined + ) + ) + ] + + testFunc = ts.factory.updateFunctionDeclaration( + testFunc, + undefined, + undefined, + testFunc.name, + undefined, + testFunc.parameters, + undefined, + ts.factory.updateBlock( + testFunc.body, + body_statements + ) + ) + util.assert(ts.isFunctionDeclaration(testFunc)) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + testFunc + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function foo() { + return __memo_scope.recache(); + } + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + // body memo rewrite (adding if statement) + test("add-if-statement-to-function-body", function() { + // function foo() { + // if (__memo_scope.unchanged) + // return __memo_scope.cached + // } + + const sample_in = + ` + function foo() { + // empty + } + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + let testFunc = sourceFile.statements[0] + util.assert(ts.isFunctionDeclaration(testFunc)) + util.assert(testFunc.body !== undefined) + + let body_statements = [ + ts.factory.createIfStatement( + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("__memo_scope"), + ts.factory.createIdentifier("unchanged") + ), + ts.factory.createBlock([ + ts.factory.createReturnStatement( + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("__memo_scope"), + ts.factory.createIdentifier("cached") + ) + ) + ]), + undefined + ), + ...testFunc.body.statements + ] + + testFunc = ts.factory.updateFunctionDeclaration( + testFunc, + undefined, + undefined, + testFunc.name, + undefined, + testFunc.parameters, + undefined, + ts.factory.updateBlock( + testFunc.body, + body_statements + ) + ) + util.assert(ts.isFunctionDeclaration(testFunc)) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + testFunc + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function foo() { + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + } + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + // body memo rewrite + test("function-declaration-memo-rewrite", function() { + // function foo(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + // if (__memo_scope.unchanged) + // return __memo_scope.cached + // content(__memo_context, __memo_id + "key_id_main.ts") + // return __memo_scope.recache() + // } + + const sample_in = + ` + function foo() { + // empty + } + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + let testFunc = sourceFile.statements[0] + util.assert(ts.isFunctionDeclaration(testFunc)) + util.assert(testFunc.body !== undefined) + + let body_statements = [ + ts.factory.createIfStatement( + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("__memo_scope"), + ts.factory.createIdentifier("unchanged") + ), + ts.factory.createBlock([ + ts.factory.createReturnStatement( + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("__memo_scope"), + ts.factory.createIdentifier("cached") + ) + ) + ]), + undefined + ), + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + ts.factory.createIdentifier("content"), + undefined, + [ + ts.factory.createIdentifier("__memo_context"), + ts.factory.createBinaryExpression( + ts.factory.createIdentifier("__memo_id"), + ts.factory.createToken(ts.SyntaxKind.PlusToken), + ts.factory.createStringLiteral("key_id_main.ts") + ) + ] + )), + ts.factory.createReturnStatement( + ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("__memo_scope"), + ts.factory.createIdentifier("recache") + ), + undefined, + undefined + ) + ), + ...testFunc.body.statements + ] + + testFunc = util.addMemoParamsToFunctionDeclaration(testFunc) + util.assert(ts.isFunctionDeclaration(testFunc)) + util.assert(testFunc.body !== undefined) + + testFunc = ts.factory.updateFunctionDeclaration( + testFunc, + undefined, + undefined, + testFunc.name, + undefined, + testFunc.parameters, + undefined, + ts.factory.updateBlock( + testFunc.body, + body_statements + ) + ) + util.assert(ts.isFunctionDeclaration(testFunc)) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + testFunc + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function foo(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + content(__memo_context, ((__memo_id) + ("key_id_main.ts"))); + return __memo_scope.recache(); + } + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + test("return-lambda", function() { + const sample_in = + ` + function foo() {} + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + let testFunc = sourceFile.statements[0] + util.assert(ts.isFunctionDeclaration(testFunc)) + + testFunc = ts.factory.updateFunctionDeclaration( + testFunc, + undefined, + undefined, + ts.factory.createIdentifier("foo"), + undefined, + [ + ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("x"), + undefined, + ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + undefined + ) + ], + undefined, + ts.factory.createBlock( + [ + ts.factory.createReturnStatement( + ts.factory.createCallExpression( + ts.factory.createParenthesizedExpression( + ts.factory.createArrowFunction( + undefined, + undefined, + [ + ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("val"), + undefined, + ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + ts.factory.createIdentifier("x") + ) + ], + undefined, + ts.factory.createToken(ts.SyntaxKind.EqualsGreaterThanToken), + ts.factory.createBlock( + [ + ts.factory.createExpressionStatement( + ts.factory.createIdentifier("val") + ) + ], + false + ) + ) + ), + undefined, + [] + ) + ) + ], + true + ) + ) + util.assert(ts.isFunctionDeclaration(testFunc)) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + testFunc + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function foo(x: string) { + return ((val: string = x) => { val })() + } + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/functions/lambda-function/builder-lambda.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/functions/lambda-function/builder-lambda.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..8fd8ffb5f9c7115c533a0fdc4473102f58fa97a3 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/functions/lambda-function/builder-lambda.test.ts @@ -0,0 +1,166 @@ +/* + * 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 * as util from "../../../test-util" +import * as ts from "../../../../src/ts-api" + +suite.skip(util.basename(__filename), () => { + test("adding-lambda-param-to-signature", function() { + // _Foo((instance: string) => { + // // empty + // }, "label"); + + const sample_in = + ` + Foo("label") + + function Foo(text: string): void { + console.log(text) + } + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const newName = "_Foo" + const paramName = "instance" + + const firstStatement = sourceFile.statements[0] + util.assert(ts.isExpressionStatement(firstStatement)) + const node = firstStatement.expression + util.assert(ts.isCallExpression(node)) + + const instanceLambdaBody = ts.factory.createBlock([]) + const lambdaParams = [ + ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier(paramName), + undefined, + ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + undefined + ) + ] + + const lambda = ts.factory.createArrowFunction( + undefined, + undefined, + lambdaParams, + undefined, + undefined, + instanceLambdaBody + ) + + const result = ts.factory.updateCallExpression( + node, + ts.factory.createIdentifier(newName), + undefined, + [ + lambda, + ...node.arguments + ] + ) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + ts.factory.createExpressionStatement(result) + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + _Foo(((instance: string) => {}), "label") + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) + + test("adding-body-to-lambda-param", function() { + // _Foo((instance: string) => { + // instance.bar().qux(); + // }, "label1", "label2"); + + const sample_in = + ` + Foo(instance.bar().qux(), "label1", "label2") + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const newName = "_Foo" + const paramName = "instance" + + const firstStatement = sourceFile.statements[0] + util.assert(ts.isExpressionStatement(firstStatement)) + + const node = firstStatement.expression + util.assert(ts.isCallExpression(node)) + + const instanceLambdaBody = ts.factory.createBlock([ + ts.factory.createExpressionStatement( + node.arguments[0] + ) + ]) + const lambdaParams = [ + ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier(paramName), + undefined, + ts.factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + undefined + ) + ] + + const lambda = ts.factory.createArrowFunction( + undefined, + undefined, + lambdaParams, + undefined, + undefined, + instanceLambdaBody + ) + + const result = ts.factory.updateCallExpression( + node, + ts.factory.createIdentifier(newName), + undefined, + [ + lambda, + ...node.arguments.slice(1) + ] + ) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + ts.factory.createExpressionStatement(result) + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + _Foo(((instance: string) => { + instance.bar().qux(); + }), "label1", "label2") + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/functions/lambda-function/lambda-param-memoization.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/functions/lambda-function/lambda-param-memoization.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..2982ad6eaa21113e6345af17cd86d0977e908e49 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/functions/lambda-function/lambda-param-memoization.test.ts @@ -0,0 +1,169 @@ +/* + * 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 * as util from "../../../test-util" +import * as ts from "../../../../src/ts-api" + +suite.skip(util.basename(__filename), () => { + // full memo rewrite + test("memo-function-with-lambda-memo-param", function() { + // function foo( + // __memo_context: __memo_context_type, + // __memo_id: __memo_id_type, + // content: (__memo_context: __memo_context_type, __memo_id: __memo_id_type) => void + // ) { + // if (__memo_scope.unchanged) + // return __memo_scope.cached + // content(__memo_context, __memo_id + "key_id_main.ts") + // return __memo_scope.recache() + // } + + const sample_in = + ` + function foo( + content: () => void + ) { + content() + } + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + let testFunc = sourceFile.statements[0] + util.assert(ts.isFunctionDeclaration(testFunc)) + + let body_statements = [ + ts.factory.createIfStatement( + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("__memo_scope"), + ts.factory.createIdentifier("unchanged") + ), + ts.factory.createBlock([ + ts.factory.createReturnStatement( + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("__memo_scope"), + ts.factory.createIdentifier("cached") + ) + ) + ]), + undefined + ), + ts.factory.createExpressionStatement( + ts.factory.createCallExpression( + ts.factory.createIdentifier("content"), + undefined, + [ + ts.factory.createIdentifier("__memo_context"), + ts.factory.createBinaryExpression( + ts.factory.createIdentifier("__memo_id"), + ts.factory.createToken(ts.SyntaxKind.PlusToken), + ts.factory.createStringLiteral("key_id_main.ts") + ) + ] + )), + ts.factory.createReturnStatement( + ts.factory.createCallExpression( + ts.factory.createPropertyAccessExpression( + ts.factory.createIdentifier("__memo_scope"), + ts.factory.createIdentifier("recache") + ), + undefined, + undefined + ) + ) + ] + + testFunc = util.addMemoParamsToFunctionDeclaration(testFunc) + util.assert(ts.isFunctionDeclaration(testFunc)) + util.assert(testFunc.body !== undefined) + + const newLambdaParams = [ + ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("__memo_context"), + undefined, + ts.factory.createETSTypeReferenceNode( + ts.factory.createIdentifier("__memo_context_type"), + undefined + ) + ), + ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("__memo_id"), + undefined, + ts.factory.createETSTypeReferenceNode( + ts.factory.createIdentifier("__memo_id_type"), + undefined + ), + ) + ] + + const newLambdaParam = ts.factory.createParameterDeclaration( + undefined, + undefined, + ts.factory.createIdentifier("content"), + undefined, + ts.factory.createFunctionTypeNode( + undefined, + newLambdaParams, + ts.factory.createKeywordTypeNode(ts.SyntaxKind.VoidKeyword) + ), + undefined + ) + + testFunc = ts.factory.updateFunctionDeclaration( + testFunc, + undefined, + undefined, + testFunc.name, + undefined, + [ + testFunc.parameters[0], + testFunc.parameters[1], + newLambdaParam + ], + undefined, + ts.factory.updateBlock( + testFunc.body, + body_statements + ) + ) + util.assert(ts.isFunctionDeclaration(testFunc)) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + testFunc + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function foo(__memo_context: __memo_context_type, __memo_id: __memo_id_type, content: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) { + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + content(__memo_context, ((__memo_id) + ("key_id_main.ts"))); + return __memo_scope.recache(); + } + `, + ts.ContextState.ES2PANDA_STATE_PARSED, + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/general/abc-gen.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/general/abc-gen.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..0a8411de1c3e965ef51d80ddcfc59605c7635b4c --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/general/abc-gen.test.ts @@ -0,0 +1,190 @@ +/* + * 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 * as util from "../../test-util" +import * as ts from "../../../src/ts-api" + +// tests for abc generation (now failing on CI) +suite.skip(util.basename(__filename), () => { + test("updating-expression-statement", function() { + const sample_in = + ` + function foo(lambda: (instance: string) => string): void { + console.log(lambda("ABC")) + } + + foo((instance: string) => { return instance }) + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const expressionStatement = sourceFile.statements[1] + util.assert(ts.isExpressionStatement(expressionStatement)) + + const newStatements = [ + sourceFile.statements[0], + ts.factory.updateExpressionStatement( + expressionStatement, + expressionStatement.expression + ) + ] + + ts.factory.updateSourceFile(sourceFile, newStatements) + + util.assertEqualsBinaryOutput('ABC', this) + }) + + test("updating-function-declaration", function() { + const sample_in = + ` + function foo(): void { + console.log("A") + return + } + + foo() + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const funcDecl = sourceFile.statements[0] + util.assert(ts.isFunctionDeclaration(funcDecl)) + + const newStatements = [ + ts.factory.updateFunctionDeclaration( + funcDecl, + undefined, + undefined, + funcDecl.name, + undefined, + funcDecl.parameters, + undefined, + funcDecl.body, + ), + sourceFile.statements[1], + ] + + ts.factory.updateSourceFile(sourceFile, newStatements) + + util.assertEqualsBinaryOutput('A', this) + }) + + test("updating-lambda-call", function() { + const sample_in = + ` + function foo(builder: () => void) {} + foo(() => {}) + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + const exprStatement = sourceFile.statements[1] + util.assert(ts.isExpressionStatement(exprStatement)) + const callExpr = exprStatement.expression + util.assert(ts.isCallExpression(callExpr)) + + util.assert(ts.isArrowFunction(callExpr.arguments[0])) + const lambdaArg = + ts.factory.createArrowFunction( + undefined, + undefined, + [], + undefined, + undefined, + callExpr.arguments[0].body + ) + + util.assert(ts.isIdentifier(callExpr.expression)) + const newStatements = [ + sourceFile.statements[0], + ts.factory.updateExpressionStatement( + exprStatement, + ts.factory.updateCallExpression( + callExpr, + ts.factory.createIdentifier('foo'), + undefined, + [ + lambdaArg, + ] + ) + ) + ] + ts.factory.updateSourceFile(sourceFile, newStatements) + + util.assertEqualsBinaryOutput('', this) + }) + + test("changing-variable-annotation", function() { + const sample_in = + ` + class A {} + + let x: AB + + console.log("ok") + ` + + let sourceFile = ts.factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const varDecl = sourceFile.statements[1] + util.assert(ts.isVariableStatement(varDecl)) + + const declList = varDecl.declarationList + util.assert(ts.isVariableDeclarationList(declList)) + + const x = declList.declarations[0] + util.assert(ts.isVariableDeclaration(x)) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + sourceFile.statements[0], + ts.factory.updateVariableStatement( + varDecl, + undefined, + // declList + ts.factory.createVariableDeclarationList( + [ts.factory.createVariableDeclaration( + ts.factory.createIdentifier("x"), + undefined, + ts.factory.createETSTypeReferenceNode( + ts.factory.createIdentifier("A") + ), + undefined + )], + undefined + ) + ), + sourceFile.statements[2] + ] + ) + + util.assertEqualsBinaryOutput('ok', this) + }) + + test.skip("function-expression", function() { + const sample_in = + ` + const foo = function() { console.log("abc"); }; + foo(); + ` + + ts.factory.createSourceFile(sample_in) + util.assertEqualsBinaryOutput('abc', this) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/general/basic.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/general/basic.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..8f5a1a236a6ac581d1846d10fb330a240dec3523 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/general/basic.test.ts @@ -0,0 +1,191 @@ +/* + * 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 * as util from "../../test-util" +import * as ts from "../../../src/ts-api" +import { factory } from "../../../src/ts-api" + +suite.skip(util.basename(__filename), () => { + test("sample-1", function() { + const sample_in = + ` + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + sourceFile = factory.updateSourceFile( + sourceFile, + [ + factory.createExpressionStatement( + factory.createIdentifier("abc") + ) + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + abc + `, + ts.ContextState.ES2PANDA_STATE_PARSED + ) + }) + + test("sample-2", function() { + const sample_in = + ` + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + sourceFile = factory.updateSourceFile( + sourceFile, + [ + factory.createFunctionDeclaration( + undefined, + undefined, + factory.createIdentifier("test"), + undefined, + [], + undefined, + factory.createBlock( + [], + true + ) + ) + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function test() {} + `, + ts.ContextState.ES2PANDA_STATE_PARSED + ) + }) + + test("sample-3", function() { + const sample_in = + ` + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + sourceFile = factory.updateSourceFile( + sourceFile, + [ + factory.createFunctionDeclaration( + undefined, + undefined, + factory.createIdentifier("test"), + undefined, + [ + factory.createParameterDeclaration( + undefined, + undefined, + factory.createIdentifier("x"), + undefined, + factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + undefined + ) + ], + factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), + factory.createBlock( + [ + factory.createReturnStatement( + factory.createNumericLiteral(0) + ) + ], + true + ) + ) + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function test(x: string): number { + return 0; + } + `, + ts.ContextState.ES2PANDA_STATE_PARSED + ) + }) + + test("sample-4", function() { + const sample_in = + ` + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + sourceFile = factory.updateSourceFile( + sourceFile, + [ + factory.createFunctionDeclaration( + undefined, + undefined, + factory.createIdentifier("test"), + [ + factory.createTSTypeParameterDeclaration( + undefined, + factory.createIdentifier("T"), + factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + undefined + ) + ], + [ + factory.createParameterDeclaration( + undefined, + undefined, + factory.createIdentifier("x"), + undefined, + factory.createETSTypeReferenceNode( + factory.createIdentifier("T"), + undefined + ), + undefined + ) + ], + factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + factory.createBlock( + [ + factory.createReturnStatement( + factory.createStringLiteral("aaa") + ) + ], + true + ) + ) + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function test(x: T): string { + return "aaa" + } + `, + ts.ContextState.ES2PANDA_STATE_PARSED + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/general/import.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/general/import.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..8f649094a1aa83dc9f4d14a26a8b66b984e9ce68 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/general/import.test.ts @@ -0,0 +1,76 @@ +/* + * 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 * as util from "../../test-util" +import * as ts from "../../../src/ts-api" + +suite.skip(util.basename(__filename), () => { + // Improve: doesn't running now, but compiles (config gets only one file) + test("sample-1", function() { + const sample_in = + ` + import { TEST } from "./export" + console.log(TEST) + ` + + // util.getDefaultSetup(sample_in) + + // util.generateBinAndRun() + }) + + test("sample-2", function() { + const sample_in = + ` + import { power as F } from "std/math" + console.log(F(2, 10)) + ` + + // util.getDefaultSetup(sample_in) + + // arkts.proceedToState(arkts.ContextState.ES2PANDA_STATE_CHECKED) + + // const classDecl = arkts.nodeByPeer(util.getStatement(1)) + // util.assert(arkts.isClassDeclaration(classDecl)) + + // const method = classDecl.members[1] + // util.assert(arkts.isMethodDeclaration(method)) + + // const body = method.body! + // util.assert(arkts.isBlock(body)) + + // const exprStatement = body.statements[0] + // util.assert(arkts.isExpressionStatement(exprStatement)) + + // const callExpr = exprStatement.expression + // util.assert(arkts.isCallExpression(callExpr)) + + // const F = callExpr.arguments[0] + // util.assert(arkts.isCallExpression(F)) + + // const ident = F.expression + // util.assert(arkts.isIdentifier(ident)) + + // console.log(arkts.dumpJsonNode(ident)) + + // const decl = arkts.getDecl(ident) + // if (decl !== undefined) { + // console.log(arkts.dumpJsonNode(decl)) + // } else { + // console.log(decl) + // } + + // util.generateBinAndRun() + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/import-export/import.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/import-export/import.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..66c2928a22acbc045c59ad72df28aa3787591c5b --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/import-export/import.test.ts @@ -0,0 +1,63 @@ +/* + * 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 * as util from "../../test-util" +import * as ts from "../../../src/ts-api" +import { factory } from "../../../src/ts-api" + +// Improve: +suite.skip(util.basename(__filename), () => { + test("sample-1", function() { + const sample_in = + ` + import { X } from "./variable" + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + // sourceFile = factory.updateSourceFile( + // sourceFile, + // [ + // factory.createImportDeclaration( + // undefined, + // factory.createImportClause( + // false, + // undefined, + // factory.createNamedImports( + // [ + // factory.createImportSpecifier( + // false, + // undefined, + // factory.createIdentifier("X") + // ) + // ] + // ) + // ), + // factory.createStringLiteral("./variable"), + // undefined + // ) + // ] + // ) + + // util.assertEqualsAfter( + // sourceFile, + // ` + // import { X } from "./variable" + // `, + // ts.ContextState.ES2PANDA_STATE_PARSED + // ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/keyword-super/in-constructor.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/keyword-super/in-constructor.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..c51ab999aca8459253ab482f2bbbe0e7e2c16489 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/keyword-super/in-constructor.test.ts @@ -0,0 +1,109 @@ +/* + * 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 * as util from "../../test-util" +import * as ts from "../../../src/ts-api" +import { factory } from "../../../src/ts-api" + +// Improve: +suite.skip(util.basename(__filename), () => { + test("sample-1", function() { + const sample_in = + ` + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + // sourceFile = factory.updateSourceFile( + // sourceFile, + // [ + // factory.createClassDeclaration( + // [factory.createToken(ts.SyntaxKind.AbstractKeyword)], + // factory.createIdentifier("A"), + // undefined, + // undefined, + // [factory.createConstructorDeclaration( + // undefined, + // [factory.createParameterDeclaration( + // undefined, + // undefined, + // factory.createIdentifier("x"), + // undefined, + // factory.createETSTypeReferenceNode( + // factory.createIdentifier("int"), + // undefined + // ), + // undefined + // )], + // factory.createBlock( + // [], + // false + // ) + // )] + // ), + // factory.createClassDeclaration( + // undefined, + // factory.createIdentifier("B"), + // undefined, + // [factory.createHeritageClause( + // ts.SyntaxKind.ExtendsKeyword, + // [factory.createExpressionWithTypeArguments( + // factory.createIdentifier("A"), + // undefined + // )] + // )], + // [factory.createConstructorDeclaration( + // undefined, + // [factory.createParameterDeclaration( + // undefined, + // undefined, + // factory.createIdentifier("x"), + // undefined, + // factory.createETSTypeReferenceNode( + // factory.createIdentifier("int"), + // undefined + // ), + // undefined + // )], + // factory.createBlock( + // [factory.createExpressionStatement(factory.createCallExpression( + // factory.createSuper(), + // undefined, + // [factory.createIdentifier("x")] + // ))], + // true + // ) + // )] + // ) + // ] + // ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + abstract class A { + constructor(x: int) {} + }; + + class B extends A { + constructor(x: int) { + super(x) + } + } + ` + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/variables/create-variable.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/variables/create-variable.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..18fa959be431b68ca87325e2ae7002a6fcadbe72 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/variables/create-variable.test.ts @@ -0,0 +1,264 @@ +/* + * 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 * as util from "../../test-util" +import * as ts from "../../../src/ts-api" +import { factory } from "../../../src/ts-api" + +suite.skip(util.basename(__filename), () => { + test("const-number", function() { + const sample_in = + ` + function f() {} + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const varDecl = factory.createVariableStatement( + undefined, + factory.createVariableDeclarationList( + [ + factory.createVariableDeclaration( + factory.createIdentifier("x"), + undefined, + factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), + factory.createNumericLiteral(0) + ) + ], + ts.NodeFlags.Const + ) + ) + + const f = sourceFile.statements[0] + util.assert(ts.isFunctionDeclaration(f)) + + sourceFile = factory.updateSourceFile( + sourceFile, + [ + factory.updateFunctionDeclaration( + f, + f.modifiers, + undefined, + f.name, + f.typeParameters, + f.parameters, + f.type, + factory.createBlock([ + varDecl + ]) + ) + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function f() { + const x: number = 0 + } + ` + ) + }) + + test("declaration-list", function() { + // const x: number = 0, y: string = "a", z = 0 + + const sample_in = `const x = 1` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const varStatement = sourceFile.statements[0] + util.assert(ts.isVariableStatement(varStatement)) + + sourceFile = ts.factory.updateSourceFile( + sourceFile, + [ + factory.updateVariableStatement( + varStatement, + [ + // Improve: not ok maybe (problem with ModifierFlags) + factory.createToken(ts.SyntaxKind.PublicKeyword), + factory.createToken(ts.SyntaxKind.StaticKeyword), + factory.createToken(ts.SyntaxKind.ConstKeyword), + ], + factory.createVariableDeclarationList( + [ + factory.createVariableDeclaration( + factory.createIdentifier("x"), + undefined, + factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), + factory.createNumericLiteral(0) + ), + factory.createVariableDeclaration( + factory.createIdentifier("y"), + undefined, + factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + factory.createStringLiteral("a") + ), + factory.createVariableDeclaration( + factory.createIdentifier("z"), + undefined, + undefined, + factory.createNumericLiteral(0) + ) + ], + ts.NodeFlags.Const + ) + ) + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + const x: number = 0, y: string = "a", z = 0 + ` + ) + }) + + test.skip("let-vars", function() { + const sample_in = + ` + const x = 0 + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + const varStatement = sourceFile.statements[0] + util.assert(ts.isVariableStatement(varStatement)) + + sourceFile = factory.updateSourceFile( + sourceFile, + [ + factory.updateVariableStatement( + varStatement, + [ + // Improve: not ok maybe (problem with ModifierFlags) + factory.createToken(ts.SyntaxKind.PublicKeyword), + factory.createToken(ts.SyntaxKind.StaticKeyword), + ], + factory.createVariableDeclarationList( + [ + factory.createVariableDeclaration( + factory.createIdentifier("x"), + undefined, + factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), + factory.createNumericLiteral(0) + ), + factory.createVariableDeclaration( + factory.createIdentifier("y"), + undefined, + factory.createKeywordTypeNode(ts.SyntaxKind.StringKeyword), + factory.createStringLiteral("a") + ), + factory.createVariableDeclaration( + factory.createIdentifier("z"), + undefined, + undefined, + factory.createNumericLiteral(0) + ) + ], + ts.NodeFlags.Let + ) + ) + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + let x: number = 0, y: string = "a", z = 0 + ` + ) + }) + + test("parenthesized-expression", function() { + const sample_in = + ` + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + sourceFile = factory.updateSourceFile( + sourceFile, + [ + factory.createVariableStatement( + [ + // Improve: not ok maybe (problem with ModifierFlags) + factory.createToken(ts.SyntaxKind.PublicKeyword), + factory.createToken(ts.SyntaxKind.StaticKeyword), + factory.createToken(ts.SyntaxKind.ConstKeyword), + ], + factory.createVariableDeclarationList( + [ + factory.createVariableDeclaration( + factory.createIdentifier("x"), + undefined, + factory.createKeywordTypeNode(ts.SyntaxKind.NumberKeyword), + factory.createBinaryExpression( + factory.createParenthesizedExpression( + factory.createBinaryExpression( + factory.createNumericLiteral(0), + factory.createToken(ts.SyntaxKind.PlusToken), + factory.createNumericLiteral(0) + ) + ), + factory.createToken(ts.SyntaxKind.AsteriskToken), + factory.createNumericLiteral(0) + ) + ) + ], + ts.NodeFlags.Const + ) + ) + ] + ) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + const x: number = (0 + 0) * 0 + ` + ) + }) + + test.skip("question-mark", function() { + const sample_in = + ` + function foo(x?: number | undefined) { + console.log(x); + } + foo() + ` + + let sourceFile = factory.createSourceFile(sample_in) + util.assert(ts.isSourceFile(sourceFile)) + + util.TS_TEST_ASSERTION( + sourceFile, + ` + function foo(x?: number | undefined) { + console.log(x); + } + foo() + `, + ts.ContextState.ES2PANDA_STATE_PARSED + ) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/analysis-visitor.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/analysis-visitor.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..357d2204347ddb88855aa555e0007fe4927384cc --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/analysis-visitor.test.ts @@ -0,0 +1,50 @@ +/* + * 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 * as util from "../../test-util" +// import * as ts from "../../../src/ts-api" +// import { AnalysisVisitor } from "../../../plugins/src/analysis-visitor" +// import { Tracer } from "../../../plugins/src/util" +// import { Rewrite } from "../../../plugins/src/transformation-context" +// +// suite(util.getSuiteTitle(__filename), () => { +// test("sample-1", function() { +// const sample_in = +// ` +// const _memo_x: string = "A" +// +// function _memo_foo() {} +// +// _memo_foo() +// ` +// +// let sourceFile = ts.factory.createSourceFile(sample_in) +// util.assert(ts.isSourceFile(sourceFile)) +// +// // ts.proceedToState(ts.ContextState.ES2PANDA_STATE_CHECKED) +// +// const options = {} +// +// const tracer = new Tracer(options) +// const rewrite = new Rewrite(sourceFile, options) +// +// const result = new AnalysisVisitor(tracer, rewrite).visitor(sourceFile) +// util.assert(ts.isSourceFile(result)) +// +// util.assert(rewrite.functionTable.size === 1) +// util.assert(rewrite.callTable.size === 1) +// util.assert(rewrite.variableTable.size === 1) +// }) +// }) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/builder-lambda-rewrite.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/builder-lambda-rewrite.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..45c1407fb1516d38c04f2159a28f09c7fe7f5b45 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/builder-lambda-rewrite.test.ts @@ -0,0 +1,120 @@ +/* + * 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 * as util from "../../test-util" +// import * as ts from "../../../src/ts-api" +// import { factory } from "../../../src/ts-api" +// import { BuilderLambdaTransformer } from "../../../plugins/src/builder-lambda-transformer" +// +// suite.skip(util.getSuiteTitle(__filename), () => { +// test("builder-lambda-transformer-sample-1", function() { +// // foo((instance: string) => { +// // return instance; +// // }, "label"); +// +// const sample_in = +// ` +// _BuilderLambdaCall_foo("label") +// ` +// +// let sourceFile = factory.createSourceFile(sample_in) +// util.assert(ts.isSourceFile(sourceFile)) +// +// const builderLambdaTransformer = new BuilderLambdaTransformer() +// +// const result = builderLambdaTransformer.visitor(sourceFile) +// util.assert(ts.isSourceFile(result)) +// +// util.TS_TEST_ASSERTION( +// result, +// ` +// foo(((instance: string) => { +// return instance; +// }), "label") +// `, +// ts.ContextState.ES2PANDA_STATE_PARSED, +// ) +// }) +// +// test("builder-lambda-transformer-sample-2", function() { +// // foo((instance: string) => { +// // return instance.bar().qux(); +// // }, "label1", "label2"); +// +// const sample_in = +// ` +// _BuilderLambdaCall_foo("label1", "label2").bar().qux() +// ` +// +// let sourceFile = factory.createSourceFile(sample_in) +// util.assert(ts.isSourceFile(sourceFile)) +// +// const builderLambdaTransformer = new BuilderLambdaTransformer() +// +// const result = builderLambdaTransformer.visitor(sourceFile) +// util.assert(ts.isSourceFile(result)) +// +// util.TS_TEST_ASSERTION( +// result, +// ` +// foo(((instance: string) => { +// return instance.bar().qux(); +// }), "label1", "label2") +// `, +// ts.ContextState.ES2PANDA_STATE_PARSED, +// ) +// }) +// +// // Improve: update nodes properly (now failing to generate bin) +// test("builder-lambda-transformer-sample-3", function() { +// // function Foo(builder: (instance: string) => string, arg1: string): void { +// // console.log(arg1 + builder("ABC")) +// // } +// // Foo((instance: string) => { +// // return instance.charAt(1) +// // }, "> second_char_of_ABC: ") +// +// const sample_in = +// ` +// function Foo(builder: (instance: string) => string, arg1: string): void { +// console.log(arg1 + builder("ABC")) +// } +// +// _BuilderLambdaCall_Foo("> second_char_of_ABC: ").charAt(1) +// ` +// +// let sourceFile = factory.createSourceFile(sample_in) +// util.assert(ts.isSourceFile(sourceFile)) +// +// const builderLambdaTransformer = new BuilderLambdaTransformer() +// +// const result = builderLambdaTransformer.visitor(sourceFile) +// util.assert(ts.isSourceFile(result)) +// +// util.TS_TEST_ASSERTION( +// result, +// ` +// function Foo(builder: ((instance: string)=> string), arg1: string): void { +// console.log(((arg1) + (builder("ABC")))); +// } +// +// Foo(((instance: string) => { +// return instance.charAt(1); +// }), "> second_char_of_ABC: ") +// `, +// ts.ContextState.ES2PANDA_STATE_PARSED, +// ) +// }) +// }) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/function-rewrite.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/function-rewrite.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..acd40a0249789f7ed6eca281739326f802637c94 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/function-rewrite.test.ts @@ -0,0 +1,66 @@ +/* + * 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 * as util from "../../test-util" +// import * as ts from "../../../src/ts-api" +// import global from "src/arkts-api/static/global" +// import { FunctionTransformer } from "../../../plugins/src/function-transformer" +// import { PrintVisitor } from "../../../plugins/src/print-visitor" +// +// suite.skip(util.getSuiteTitle(__filename), () => { +// test("function-transformer-sample-1", function() { +// const sample_in = +// ` +// const x: string = "A" +// +// function _REWRITE_foo() { +// console.log("FUNC CALLED: " + x) +// } +// +// _REWRITE_foo() +// ` +// +// const sourceFile = ts.factory.createSourceFile(sample_in, ts.ContextState.ES2PANDA_STATE_CHECKED) +// util.assert(ts.isSourceFile(sourceFile)) +// +// // util.nativeModule._VarBinderSetContext(global.context) +// // util.nativeModule._VarBinderSetProgram(global.context) +// // util.nativeModule._VarBinderSetGenStdLib(global.context, false) +// // util.nativeModule._VarBinderInitTopScope(global.context) +// // util.nativeModule._VarBinderIdentifierAnalysis(global.context) +// +// const result = (new FunctionTransformer()).visitor(sourceFile) +// util.assert(ts.isSourceFile(result)) +// +// util.TS_TEST_ASSERTION( +// sourceFile, +// ` +// const x: string = "A" +// +// function foo(x: string) { +// console.log("FUNC CALLED: " + x) +// } +// +// foo("SAMPLE") +// `, +// ts.ContextState.ES2PANDA_STATE_CHECKED, +// ) +// +// // Improve: +// util.nativeModule._VarBinderInitTopScope(global.context) +// util.nativeModule._VarBinderIdentifierAnalysis(global.context) +// ts.proceedToState(ts.ContextState.ES2PANDA_STATE_BIN_GENERATED) +// }) +// }) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/memo-rewrite.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/memo-rewrite.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..2aa9d54d53f53f74a95b73e8b93e854371e7a217 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/memo-rewrite.test.ts @@ -0,0 +1,42 @@ +/* + * 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 * as util from "../../test-util" +import * as ts from "../../../src/ts-api" +import { MemoTransformer } from "../../../plugins/src/memo-transformer" + +suite.skip(util.basename(__filename), () => { + test("memo-transformer-sample-1", function() { + const sample_in = + ` + function _MEMO_foo() { + console.log("MEMO FUNC CALLED!") + } + + _MEMO_foo() + ` + + // util.getDefaultSetup(sample_in) + + // arkts.proceedToState(arkts.ContextState.ES2PANDA_STATE_CHECKED) + + // const sourceFile = arkts.makeView(util.AstProvider.provideAst()) + + // const memoTransformer = new MemoTransformer() + // const transformed = memoTransformer.visitor(sourceFile) + + // console.log(arkts.dumpSrcNode(sourceFile)) + }) +}) diff --git a/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/print-visitor.test.ts b/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/print-visitor.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..736a67e53db03887c81855e15bea58c92bd16f96 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/ts-api/visitors-and-transformers/print-visitor.test.ts @@ -0,0 +1,83 @@ +/* + * 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 * as ts from "../../../src/ts-api" +// import * as util from "../../test-util" +// import { PrintVisitor } from "../../../plugins/src/print-visitor" +// +// suite.skip(util.getSuiteTitle(__filename), () => { +// test("sample-1", function() { +// const source = +// ` +// class Base { +// public a: int = 1; +// public method() { +// this.a = 2; +// } +// } +// class Derived extends Base {} +// function foo() { +// } +// function goo() { +// } +// function main(): void { +// let derived: Base = new Derived(); +// derived.method(); +// } +// ` +// const expected = +// ` +// SourceFile (mods: []) +// ClassDeclaration (mods: [1,4]) +// Identifier (mods: []) +// PropertyDeclaration (mods: [4]) +// MethodDeclaration (mods: [4]) +// Identifier (mods: []) +// Block (mods: []) +// ExpressionStatement (mods: []) +// AssignmentExpression (mods: []) +// MethodDeclaration (mods: []) +// Identifier (mods: []) +// Block (mods: []) +// ClassDeclaration (mods: [1,4]) +// Identifier (mods: []) +// MethodDeclaration (mods: []) +// Identifier (mods: []) +// Block (mods: []) +// FunctionDeclaration (mods: [1,4]) +// Identifier (mods: []) +// Block (mods: []) +// FunctionDeclaration (mods: [1,4]) +// Identifier (mods: []) +// Block (mods: []) +// FunctionDeclaration (mods: [1,4]) +// Identifier (mods: []) +// ETSPrimitiveType (mods: []) +// Block (mods: []) +// VariableStatement (mods: []) +// VariableDeclarationList (mods: []) +// VariableDeclaration (mods: []) +// ExpressionStatement (mods: []) +// CallExpression (mods: []) +// PropertyAccessExpression (mods: []) +// Identifier (mods: []) +// Identifier (mods: []) +// ` +// let sourceFile = ts.factory.createSourceFile(source) +// const output = (new PrintVisitor()).astToString(sourceFile) +// +// util.assert.equal(util.alignText(output), util.alignText(expected)) +// }) +// }) diff --git a/koala_tools/ui2abc/libarkts/test/tsconfig.json b/koala_tools/ui2abc/libarkts/test/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..b66a126a9af084f18e03fae9afd97279dcdb50cc --- /dev/null +++ b/koala_tools/ui2abc/libarkts/test/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "@koalaui/build-common/tsconfig.json", + "compilerOptions": { + "rootDir": "../", + "baseUrl": "../", + "outDir": "build/test", + "module": "CommonJS" + }, + "include": [ + "../src/**/*.ts", + "../test/**/*.ts", + "../examples/**/*.ts" + ], + "exclude": [ + "./ts-api/**/*" + ] +} diff --git a/koala_tools/ui2abc/libarkts/tools/issue_gen.mjs b/koala_tools/ui2abc/libarkts/tools/issue_gen.mjs new file mode 100644 index 0000000000000000000000000000000000000000..f6e1bae225e72caa1425b042a35ae91328099180 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/tools/issue_gen.mjs @@ -0,0 +1,66 @@ +/* + * 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 * as fs from 'fs' +import * as path from 'path' + +process.chdir(path.resolve('./')) + +const issue_src = fs.readFileSync('../playground/src/playground.cc', { encoding: 'utf8', flag: 'r' }) + +const component_src = +` +### Component + +Plugin API + +` + +const revision_src = +` +### Revision + +"@panda/sdk": "1.5.0-dev.9184" + +` + +const reproduction_src = +` +### Reproduction + +\`\`\` +${issue_src} +\`\`\` + +` + +// Improve: +const log = `` + +const log_src = +` +### Log + +\`\`\` +${log} +\`\`\` +` + +console.log( + component_src + + revision_src + + reproduction_src + + log_src +) diff --git a/koala_tools/ui2abc/libarkts/tsconfig.host.json b/koala_tools/ui2abc/libarkts/tsconfig.host.json new file mode 100644 index 0000000000000000000000000000000000000000..73e04374e272aef15efa9265a13b154c18adbeca --- /dev/null +++ b/koala_tools/ui2abc/libarkts/tsconfig.host.json @@ -0,0 +1,12 @@ +{ + "extends": "@koalaui/build-common/tsconfig.json", + "compilerOptions": { + "outDir": "build", + "baseUrl": ".", + "rootDir": "./src-host", + "module": "esnext" + }, + "include": [ + "./src-host/**/*.ts" + ] +} diff --git a/koala_tools/ui2abc/libarkts/tsconfig.json b/koala_tools/ui2abc/libarkts/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..baa252e2361b92a1b9fcd3e31be0f6d29d9db982 --- /dev/null +++ b/koala_tools/ui2abc/libarkts/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "@koalaui/build-common/tsconfig.json", + "compilerOptions": { + "outDir": "build", + "baseUrl": ".", + "rootDir": "./src", + "module": "esnext", + "tsBuildInfoFile": "./build/tsconfig.tsbuildinfo" + }, + "include": [ + "./src/**/*.ts" + ], + "exclude": [ + "./src/ts-api/**/*.ts" + ] +} diff --git a/koala_tools/ui2abc/libarkts/tsconfig.plugin.json b/koala_tools/ui2abc/libarkts/tsconfig.plugin.json new file mode 100644 index 0000000000000000000000000000000000000000..b984e32b04420e5823c5b0ce024c019aefedcb8d --- /dev/null +++ b/koala_tools/ui2abc/libarkts/tsconfig.plugin.json @@ -0,0 +1,12 @@ +{ + "extends": "@koalaui/build-common/tsconfig.json", + "compilerOptions": { + "outDir": "build/plugins", + "baseUrl": ".", + "rootDir": "./plugins", + "module": "esnext" + }, + "include": [ + "./plugins/src/**/*.ts" + ] +} diff --git a/koala_tools/ui2abc/memo-plugin/.gitignore b/koala_tools/ui2abc/memo-plugin/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..5e609573d54e276b368ae101a121f07a16e194d8 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/.gitignore @@ -0,0 +1,3 @@ +.rollup.cache +test/out +test/ets diff --git a/koala_tools/ui2abc/memo-plugin/BUILD.gn b/koala_tools/ui2abc/memo-plugin/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..629577e1312eae33db0f946edf5c0cde14f333b8 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/BUILD.gn @@ -0,0 +1,58 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//foundation/arkui/ace_engine/frameworks/bridge/arkts_frontend/koala_mirror/gn/npm_util.gni") + +node_version = "v16.20.2" +host_arch = "${host_os}-${host_cpu}" + +ui2abc_root = ".." +libarkts_root = "${ui2abc_root}/libarkts" + +npm_cmd("memo_plugin_compile") { + outputs = [ + "$target_out_dir/entry.js" + ] + project_path = rebase_path(".") + run_tasks = [ "compile" ] + + deps = [ + "${libarkts_root}:libarkts" + ] +} + +action("gen_memo_plugin") { + script = "../gn/command/copy_libs.py" + args = [ + "--source_path", rebase_path(get_path_info(".", "abspath")), + "--output_path", rebase_path("$target_gen_dir"), + "--root_out_dir", rebase_path(root_out_dir) + ] + outputs = [ "$target_gen_dir" ] + deps = [ + ":memo_plugin_compile" + ] +} + +# Use from OHOS-SDK build (//build/ohos/sdk/ohos_sdk_description_std.json) + +ohos_copy("memo-plugin-sdk") { + deps = [ ":gen_memo_plugin" ] + sources = [ rebase_path("$target_gen_dir") ] + outputs = [ target_out_dir + "/$target_name" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" + subsystem_name = "arkui" + part_name = "ace_engine" +} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/annotate-test-executable.json b/koala_tools/ui2abc/memo-plugin/annotate-test-executable.json new file mode 100644 index 0000000000000000000000000000000000000000..6ee97e0a80810d6e23b5784787e941fe7f928804 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/annotate-test-executable.json @@ -0,0 +1,5 @@ +{ + "inputDir": "./test/executable", + "outputDir": "./test/ets", + "include": ["./test/executable/**/*.ts"] +} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/demo/demo/demo.ets b/koala_tools/ui2abc/memo-plugin/demo/demo/demo.ets new file mode 100644 index 0000000000000000000000000000000000000000..f25204e34d4229b1102c06e83093945a3d910290 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/demo/demo/demo.ets @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { IncrementalNode, + NodeAttach, mutableState, contextLocalValue, ReadonlyTreeNode, + memoRoot, updateStateManager, CONTEXT_ROOT_SCOPE, +} from "@koalaui/runtime" + +import { memo } from "@koalaui/runtime/annotations" + +class StringerNode extends IncrementalNode { + constructor(kind: int = 1) { + super(kind) + } + data: string | undefined = undefined +} + +@memo +function Stringer( + arg: string, + @memo + content?: () => void +): void { + NodeAttach(() => new StringerNode(), + (node: StringerNode) => { + node.data = arg + console.log("I am recomputing with arg: ", arg) + content?.() + } + ) +} + +const state = mutableState(17) + +@memo +function demo(node: StringerNode): void { + Stringer("First", () => { + console.log("Content of the first") + Stringer(`Second ${state.value}`, () => { + console.log("Content of the second") + Stringer("Third") + }) + Stringer("Fourth", () => { + console.log("Content of the 4th") + Stringer("5th") + }) + }) + + // This is to dump the complete managed incremental scope tree + const scope = contextLocalValue(CONTEXT_ROOT_SCOPE) + console.log(scope?.toHierarchy()) +} + +function main() { + console.log(state.value) + + // memoRoot is the entry point here. + // It initializes the incremental runtime and computes the first frame. + // Have a look at its implementation. + console.log("\nBuild first frame") + const root = memoRoot(new StringerNode(0), demo) + console.log(root.value.toHierarchy()) // dump ui subtree + + console.log("\nBuild second frame") + updateStateManager() // Compute next frame. + console.log(root.value.toHierarchy()) + + state.value = 19 + + console.log("\nBuild third frame") + updateStateManager() // Compute the next frame. + console.log(root.value.toHierarchy()) + console.log("-----END-----") +} diff --git a/koala_tools/ui2abc/memo-plugin/demo/package.json b/koala_tools/ui2abc/memo-plugin/demo/package.json new file mode 100644 index 0000000000000000000000000000000000000000..de3f67c8ba450758dc9a35e1ac3f3d54d18bcbd0 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/demo/package.json @@ -0,0 +1,12 @@ +{ + "scripts": { + "clean": "rimraf build", + "compile": "node ../../fast-arktsc --simultaneous --config ui2abcconfig.json --compiler ../../../incremental/tools/panda/arkts/ui2abc --compiler-flags '--trace' --link-name ./build/demo.abc && ninja ${NINJA_OPTIONS} -f build/abc/build.ninja", + "run": "../../../incremental/tools/panda/arkts/ark ./build/demo.abc --ark-boot-files ../../../incremental/runtime/build/incremental.abc --ark-entry-point @demo.demo.ETSGLOBAL::main", + "disasm": "$(find build -name '*.abc' -exec ../../../incremental/tools/panda/arkts/arkdisasm {} \\;)" + }, + "devDependencies": { + "@koalaui/ets-tsc": "4.9.5-r5", + "@koalaui/fast-arktsc": "1.5.15" + } +} diff --git a/koala_tools/ui2abc/memo-plugin/demo/ui2abcconfig.json b/koala_tools/ui2abc/memo-plugin/demo/ui2abcconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..8c774696ac57c6b7235ea4738776fc632cb2de86 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/demo/ui2abcconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "package": "@demo", + "outDir": "build/abc", + "baseUrl": "./demo", + "paths": { + "@koalaui/compat": [ "../../../../incremental/compat/src/arkts" ], + "#platform": [ "../../../../incremental/compat/src/arkts" ], + "@koalaui/common": [ "../../../../incremental/common/src" ], + "@koalaui/runtime": [ "../../../../incremental/runtime/ets" ], + "@koalaui/runtime/annotations": [ "../../../../incremental/runtime/annotations" ] + }, + "plugins": [ + { + "transform": "@koalaui/memo-plugin", + "state": "parsed", + "name": "memo" + }, + { + "transform": "@koalaui/memo-plugin", + "state": "checked", + "name": "memo" + } + ] + }, + "include": ["./demo/demo.ets"] +} diff --git a/koala_tools/ui2abc/memo-plugin/mocharc-diagnostics.json b/koala_tools/ui2abc/memo-plugin/mocharc-diagnostics.json new file mode 100644 index 0000000000000000000000000000000000000000..afa05ed4d79dabb20402b0c3e893e96e51c42113 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/mocharc-diagnostics.json @@ -0,0 +1,6 @@ +{ + "ui": "tdd", + "spec": "./test/diagnostics/diagnostics.test.ts", + "extension": ["ts"], + "require": ["../../incremental/test-utils/scripts/register"] +} diff --git a/koala_tools/ui2abc/memo-plugin/mocharc-rewrite.json b/koala_tools/ui2abc/memo-plugin/mocharc-rewrite.json new file mode 100644 index 0000000000000000000000000000000000000000..7bad5bbd0081c28529a7ff7a0d8c65c2374d485c --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/mocharc-rewrite.json @@ -0,0 +1,9 @@ +{ + "ui": "tdd", + "spec": "./test/rewrite.test.ts", + "extension": ["ts"], + "timeout": 10000, + "require": [ + "../../incremental/test-utils/scripts/register" + ] +} diff --git a/koala_tools/ui2abc/memo-plugin/package.json b/koala_tools/ui2abc/memo-plugin/package.json new file mode 100644 index 0000000000000000000000000000000000000000..5b35ad6e78e5801f3f6bc9e3e0a45f4e3f12f2cd --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/package.json @@ -0,0 +1,33 @@ +{ + "name": "@koalaui/memo-plugin", + "main": "./lib/entry.js", + "scripts": { + "clean": "rimraf build lib .rollup.cache ./test/out", + "compile": "rollup -c", + "runtime:clean": "npm run all:clean --prefix ../../incremental", + "runtime:prepare": "npm run annotate --prefix ../../incremental/runtime && npm run build --prefix ../../incremental", + "compile:libarkts": "npm run compile --prefix ../libarkts", + "demo:clean": "npm run clean --prefix demo", + "demo:run:light": "npm run compile --prefix demo && npm run run --prefix demo", + "demo:run": "npm run compile:libarkts && npm run compile && npm run demo:run:light", + "demo:disasm": "npm run disasm --prefix demo", + "compile:deps:harness": "cd ../../incremental/harness && npm run compile && npm run build", + "compile:deps": "npm run compile:libarkts && npm run compile && npm run compile:deps:harness && npm run runtime:prepare", + "compile:annotate": "npm run compile --prefix ../annotate", + "test": "npm run compile:libarkts && npm run compile && npm run test:rewrite:other", + "test:all": "npm run compile && npm run test:rewrite && npm run test:diagnostics && npm run test:executable", + "test:rewrite": "mocha --config ./mocharc-rewrite.json", + "test:rewrite:other": "TEST_OTHER=1 npm run test:rewrite", + "test:rewrite:update": "UPDATE_GOLDEN=1 npm run test:rewrite", + "test:diagnostics": "mocha --config ./mocharc-diagnostics.json", + "test:executable": "npm run test:ui2abc --prefix ../tests-memo", + "test:perf": "mkdir -p perf/build && npm run annotate --prefix ../../incremental/runtime && node ./perf/test_perf.js", + "test:perf:all": "npm run compile:libarkts && npm run compile && npm run test:perf" + }, + "dependencies": { + "@koalaui/harness": "1.7.9+devel", + "@types/mocha": "^9.1.0", + "mocha": "^9.2.2" + }, + "version": "1.7.9+devel" +} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/perf/test_perf.js b/koala_tools/ui2abc/memo-plugin/perf/test_perf.js new file mode 100644 index 0000000000000000000000000000000000000000..f924d69cf9678923d9d8683cbf85bdc2bdf10c5d --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/perf/test_perf.js @@ -0,0 +1,295 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +const fs = require('fs') +const path = require('path') +const child_process = require('child_process') + +const PANDA_SDK_PATH = path.join(__dirname, '../../../incremental/tools/panda/node_modules/@panda/sdk') +const ES2PANDA_JS_PATH = path.join(__dirname, '../../libarkts/lib/es2panda.js') + +const CONFIG_NO_MEMO = path.join(__dirname, 'ui2abcconfig-no-memo.json') +const CONFIG_MEMO = path.join(__dirname, 'ui2abcconfig-memo.json') +const CONFIG_UNMEMOIZED = path.join(__dirname, 'ui2abcconfig-unmemoized.json') + +const FILE_PATH = path.join(__dirname, 'input', 'main.ets') +const OUTPUT_PATH = path.join(__dirname, 'build', 'perf.abc') +const FILE_PATH_UNMEMOIZED = path.join(__dirname, 'input', 'unmemoized.ets') +const OUTPUT_PATH_UNMEMOIZED = path.join(__dirname, 'build', 'unmemoized-perf.abc') + +function append(str) { + fs.appendFileSync(FILE_PATH, str, 'utf-8') +} + +function appendUnmemoized(str) { + fs.appendFileSync(FILE_PATH_UNMEMOIZED, str, 'utf-8') +} + +function writeImport() { + append('import { memo } from "@koalaui/runtime/annotations"\n\n') +} + +function writeImportUnmemoized() { + appendUnmemoized('import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type } from "@koalaui/runtime"\n\n') + appendUnmemoized('import { memo as memo } from "@koalaui/runtime/annotations"\n\n') +} + +function writeFunction0(id = 0) { + append(`@memo function memo_function${id}(): void {}\n\n`) +} + +function writeFunction0Unmemoized(id = 0) { + appendUnmemoized(`@memo function memo_function${id}(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void {\n`), + appendUnmemoized(` const __memo_scope = __memo_context.scope(((__memo_id) + (123456789)), 0);\n`) + appendUnmemoized(` if (__memo_scope.unchanged) {\n`) + appendUnmemoized(` __memo_scope.cached;\n`) + appendUnmemoized(` return;\n`) + appendUnmemoized(` }\n`) + appendUnmemoized(` {\n`) + appendUnmemoized(` __memo_scope.recache();\n`) + appendUnmemoized(` return\n`) + appendUnmemoized(` }\n`) + appendUnmemoized(`}\n\n`) +} + +function writeFunction3(id = 0) { + append(`@memo function memo_function_with_params${id}(p1: int, p2: string, @memo p3: () => void): void {}\n\n`) +} + +function writeFunction3Unmemoized(id = 0) { + appendUnmemoized(`@memo function memo_function_with_params${id}(__memo_context: __memo_context_type, __memo_id: __memo_id_type, p1: int, p2: string, @memo() p3: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void {\n`), + appendUnmemoized(` const __memo_scope = __memo_context.scope(((__memo_id) + (987654321)), 3);\n`) + appendUnmemoized(` const __memo_parameter_p1 = __memo_scope.param(0, p1), __memo_parameter_p2 = __memo_scope.param(1, p2), __memo_parameter_p3 = __memo_scope.param(2, p3);\n`) + appendUnmemoized(` if (__memo_scope.unchanged) {\n`) + appendUnmemoized(` __memo_scope.cached;\n`) + appendUnmemoized(` return;\n`) + appendUnmemoized(` }\n`) + appendUnmemoized(` {\n`) + appendUnmemoized(` __memo_scope.recache();\n`) + appendUnmemoized(` return\n`) + appendUnmemoized(` }\n`) + appendUnmemoized(`}\n\n`) +} + +function writeFunctions(functions0 = 0, functions3 = 0) { + for (let i = 0; i < functions0; i++) { + writeFunction0(i) + } + for (let i = 0; i < functions3; i++) { + writeFunction3(i) + } +} + +function writeFunctionsUnmemoized(functions0 = 0, functions3 = 0) { + for (let i = 0; i < functions0; i++) { + writeFunction0Unmemoized(i) + } + for (let i = 0; i < functions3; i++) { + writeFunction3Unmemoized(i) + } +} + +function writeMethod0(id = 0) { + append(` @memo memo_method${id}(): void {}\n\n`) +} + +function writeMethod0Unmemoized(id = 0) { + appendUnmemoized(` @memo() public memo_method${id}(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void {\n`) + appendUnmemoized(` const __memo_scope = __memo_context.scope(((__memo_id) + (123456789)), 1);\n`) + appendUnmemoized(` const __memo_parameter_this = __memo_scope.param(0, this);\n`) + appendUnmemoized(` if (__memo_scope.unchanged) {\n`) + appendUnmemoized(` __memo_scope.cached;\n`) + appendUnmemoized(` return;\n`) + appendUnmemoized(` }\n`) + appendUnmemoized(` {\n`) + appendUnmemoized(` __memo_scope.recache();\n`) + appendUnmemoized(` return;\n`) + appendUnmemoized(` }\n`) + appendUnmemoized(` }\n\n`) +} + +function writeMethod3(id = 0) { + append(` @memo memo_method_with_params${id}(p1: int, p2: string, @memo p3: () => void): void {}\n\n`) +} + +function writeMethod3Unmemoized(id = 0) { + appendUnmemoized(` @memo() public memo_method_with_params${id}(__memo_context: __memo_context_type, __memo_id: __memo_id_type, p1: int, p2: string, @memo() p3: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void {\n`) + appendUnmemoized(` const __memo_scope = __memo_context.scope(((__memo_id) + (987654321)), 4);\n`) + appendUnmemoized(` const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_p1 = __memo_scope.param(1, p1), __memo_parameter_p2 = __memo_scope.param(2, p2), __memo_parameter_p3 = __memo_scope.param(3, p3);\n`) + appendUnmemoized(` if (__memo_scope.unchanged) {\n`) + appendUnmemoized(` __memo_scope.cached;\n`) + appendUnmemoized(` return;\n`) + appendUnmemoized(` }\n`) + appendUnmemoized(` {\n`) + appendUnmemoized(` __memo_scope.recache();\n`) + appendUnmemoized(` return;\n`) + appendUnmemoized(` }\n`) + appendUnmemoized(` }\n\n`) +} + +function writeClass(methods0 = 0, methods3 = 0) { + append(`class C {\n`) + for (let i = 0; i < methods0; i++) { + writeMethod0(i) + } + for (let i = 0; i < methods3; i++) { + writeMethod3(i) + } + append('}\n\n') +} + +function writeClassUnmemoized(methods0 = 0, methods3 = 0) { + appendUnmemoized(`class C {\n`) + for (let i = 0; i < methods0; i++) { + writeMethod0Unmemoized(i) + } + for (let i = 0; i < methods3; i++) { + writeMethod3Unmemoized(i) + } + appendUnmemoized('}\n\n') +} + +function writeCallFunction0() { + append(' memo_function0()\n') +} + +function writeCallFunction0Unmemoized() { + appendUnmemoized(' memo_function0(__memo_context, ((__memo_id) + (101010101)))\n') +} + +function writeCallFunction3() { + append(' memo_function_with_params0(1, "hello", (): void => { })\n') +} + +function writeCallFunction3Unmemoized() { + appendUnmemoized(' memo_function_with_params0(__memo_context, ((__memo_id) + (101010101)), 1, "hello", __memo_context.compute(((__memo_id) + (101010101)), ((): ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) => {\n') + appendUnmemoized(' return ((__memo_context: __memo_context_type, __memo_id: __memo_id_type): void => {\n') + appendUnmemoized(' const __memo_scope = __memo_context.scope(((__memo_id) + (777777777)), 0);\n') + appendUnmemoized(' if (__memo_scope.unchanged) {\n') + appendUnmemoized(' __memo_scope.cached;\n') + appendUnmemoized(' return;\n') + appendUnmemoized(' }\n') + appendUnmemoized(' {\n') + appendUnmemoized(' __memo_scope.recache();\n') + appendUnmemoized(' return;\n') + appendUnmemoized(' }\n') + appendUnmemoized(' });\n') + appendUnmemoized(' })));\n') +} + +function writeMain(call0 = 0, call3 = 0) { + append('@memo function main_entry(): void {\n') + for (let i = 0; i < call0; i++) { + writeCallFunction0(i) + } + for (let i = 0; i < call3; i++) { + writeCallFunction3(i) + } + append('}\n') +} + +function writeMainUnmemoized(call0 = 0, call3 = 0) { + appendUnmemoized('@memo() function main_entry(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void {\n') + appendUnmemoized('const __memo_scope = __memo_context.scope(((__memo_id) + (222222222)), 0);\n') + appendUnmemoized(' if (__memo_scope.unchanged) {\n') + appendUnmemoized(' __memo_scope.cached;\n') + appendUnmemoized(' return;\n') + appendUnmemoized(' }\n') + for (let i = 0; i < call0; i++) { + writeCallFunction0Unmemoized(i) + } + for (let i = 0; i < call3; i++) { + writeCallFunction3Unmemoized(i) + } + appendUnmemoized(' {\n') + appendUnmemoized(' __memo_scope.recache();\n') + appendUnmemoized(' return;\n') + appendUnmemoized(' }\n') + appendUnmemoized('}\n') +} + +function generateInput(difficulty) { + fs.mkdirSync(path.dirname(FILE_PATH), { recursive: true }) + if (fs.existsSync(FILE_PATH)) { + fs.rmSync(FILE_PATH) + } + + const start = Date.now() + + writeImport() + writeFunctions(difficulty, difficulty) + writeClass(difficulty, difficulty) + writeMain(difficulty, difficulty) + + const end = Date.now() + + console.log(`input file is generated in ${end - start}ms, size = ${fs.statSync(FILE_PATH).size} bytes\n`) +} + +function generateInputUnmemoized(difficulty) { + fs.mkdirSync(path.dirname(FILE_PATH_UNMEMOIZED), { recursive: true }) + if (fs.existsSync(FILE_PATH_UNMEMOIZED)) { + fs.rmSync(FILE_PATH_UNMEMOIZED) + } + + const start = Date.now() + + writeImportUnmemoized() + writeFunctionsUnmemoized(difficulty, difficulty) + writeClassUnmemoized(difficulty, difficulty) + writeMainUnmemoized(difficulty, difficulty) + + const end = Date.now() + + console.log(`unmemoized input file is generated in ${end - start}ms, size = ${fs.statSync(FILE_PATH_UNMEMOIZED).size} bytes\n`) +} + +function exec(cmd) { + const start = Date.now() + child_process.execSync(cmd, { stdio: "inherit" }) + const end = Date.now() + + console.log(`Time consumed: ${end - start}ms\n`) +} + +function execNoMemo() { + const cmd = `KOALA_WORKSPACE=1 PANDA_SDK_PATH=${PANDA_SDK_PATH} node ${ES2PANDA_JS_PATH} --ets-module --arktsconfig ${CONFIG_NO_MEMO} --output ${OUTPUT_PATH} --simultaneous --profile-memory ${FILE_PATH}` + console.log(`Command used for non memo compilation:`) + console.log(cmd) + exec(cmd) +} + +function execMemo() { + const cmd = `KOALA_WORKSPACE=1 PANDA_SDK_PATH=${PANDA_SDK_PATH} node ${ES2PANDA_JS_PATH} --ets-module --arktsconfig ${CONFIG_MEMO} --output ${OUTPUT_PATH} --simultaneous --profile-memory ${FILE_PATH}` + console.log(`Command used for memo compilation:`) + console.log(cmd) + exec(cmd) +} + +function execUnmemoized() { + const cmd = `KOALA_WORKSPACE=1 PANDA_SDK_PATH=${PANDA_SDK_PATH} node ${ES2PANDA_JS_PATH} --ets-module --arktsconfig ${CONFIG_UNMEMOIZED} --output ${OUTPUT_PATH_UNMEMOIZED} --simultaneous --profile-memory ${FILE_PATH_UNMEMOIZED}` + console.log(`Command used for unmemoized compilation:`) + console.log(cmd) + exec(cmd) +} + +generateInput(10000) +generateInputUnmemoized(10000) +execNoMemo() +execMemo() + +// This is not quite correct, as runtime should be unmemoized as well for more correct comparasion +execUnmemoized() diff --git a/koala_tools/ui2abc/memo-plugin/perf/ui2abcconfig-memo.json b/koala_tools/ui2abc/memo-plugin/perf/ui2abcconfig-memo.json new file mode 100644 index 0000000000000000000000000000000000000000..271f77ab973e7ab044e4ec1b8529f109ed3683b7 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/perf/ui2abcconfig-memo.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "package": "@perf", + "outDir": "./build", + "baseUrl": "./input", + "paths": { + "@koalaui/common": ["../../../../incremental/common/src"], + "@koalaui/compat": ["../../../../incremental/compat/src/arkts"], + "@koalaui/runtime": ["../../../../incremental/runtime/ets"], + "@koalaui/runtime/annotations": ["../../../../incremental/runtime/annotations"] + }, + "plugins": [ + { + "transform": "@koalaui/memo-plugin", + "state": "parsed", + "name": "memo" + }, + { + "transform": "@koalaui/memo-plugin", + "state": "checked", + "name": "memo" + } + ] + }, + "include": [ + "./input/main.ets" + ] +} diff --git a/koala_tools/ui2abc/memo-plugin/perf/ui2abcconfig-no-memo.json b/koala_tools/ui2abc/memo-plugin/perf/ui2abcconfig-no-memo.json new file mode 100644 index 0000000000000000000000000000000000000000..b03192d33c8bebcf8ced574a9f61020c1036a3d5 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/perf/ui2abcconfig-no-memo.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "package": "@perf", + "outDir": "./build", + "baseUrl": "./input", + "paths": { + "@koalaui/common": ["../../../../incremental/common/src"], + "@koalaui/compat": ["../../../../incremental/compat/src/arkts"], + "@koalaui/runtime": ["../../../../incremental/runtime/ets"], + "@koalaui/runtime/annotations": ["../../../../incremental/runtime/annotations"] + }, + "plugins": [ + { + "transform": "@koalaui/memo-plugin", + "state": "parsed", + "name": "memo", + "note": "Parsed state memo plugin takes almost no time, but adds runtime sources into compilation" + } + ] + }, + "include": [ + "./input/main.ets" + ] +} diff --git a/koala_tools/ui2abc/memo-plugin/perf/ui2abcconfig-unmemoized.json b/koala_tools/ui2abc/memo-plugin/perf/ui2abcconfig-unmemoized.json new file mode 100644 index 0000000000000000000000000000000000000000..cb890f52b52eada681cfbd41a0bd226c723159c1 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/perf/ui2abcconfig-unmemoized.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "package": "@perf", + "outDir": "./build", + "baseUrl": "./input", + "paths": { + "@koalaui/common": ["../../../../incremental/common/src"], + "@koalaui/compat": ["../../../../incremental/compat/src/arkts"], + "@koalaui/runtime": ["../../../../incremental/runtime/ets"], + "@koalaui/runtime/annotations": ["../../../../incremental/runtime/annotations"] + } + }, + "include": [ + "./input/unmemoized.ets" + ] +} diff --git a/koala_tools/ui2abc/memo-plugin/rollup.config.mjs b/koala_tools/ui2abc/memo-plugin/rollup.config.mjs new file mode 100644 index 0000000000000000000000000000000000000000..1c1d595f2d223e912f428f71aac0daa0fed1215e --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/rollup.config.mjs @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2024 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 nodeResolve from "@rollup/plugin-node-resolve"; +import typescript from "@rollup/plugin-typescript"; +import commonjs from '@rollup/plugin-commonjs' +import terser from "@rollup/plugin-terser" + +const ENABLE_SOURCE_MAPS = false; // Enable for debugging + +export default buildPlugin({ + src: "./src/entry.ts", + dst: "./lib/entry.js", + minimize: false, +}) + +/** @return {import("rollup").RollupOptions} */ +function buildPlugin({ src, dst, minimize = false }) { + return { + input: src, + output: { + file: dst, + format: "commonjs", + plugins: [ + minimize && terser({ + sourceMap: ENABLE_SOURCE_MAPS, + format: { + max_line_len: 800 + } + }), + replaceLibarktsImport() + ], + sourcemap: ENABLE_SOURCE_MAPS, + banner: APACHE_LICENSE_HEADER(), + sourcemap: ENABLE_SOURCE_MAPS + }, + external: ["@koalaui/libarkts"], + plugins: [ + commonjs(), + typescript({ + outputToFilesystem: false, + module: "esnext", + sourceMap: ENABLE_SOURCE_MAPS, + declarationMap: false, + declaration: false, + composite: false, + }), + nodeResolve({ + extensions: [".js", ".mjs", ".cjs", ".ts", ".cts", ".mts"] + }) + ], + } +} + +function APACHE_LICENSE_HEADER() { + return ` +/** +* @license +* Copyright (c) ${new Date().getUTCFullYear()} 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. +*/ + +` +} + +/** @returns {import("rollup").OutputPlugin} */ +function replaceLibarktsImport() { + const REQUIRE_PATTERN = `require('@koalaui/libarkts');` + return { + name: "replace-libarkts-import", + generateBundle(options, bundle) { + for (const [fileName, asset] of Object.entries(bundle)) { + if (!asset.code) continue + asset.code = asset.code.replace(REQUIRE_PATTERN, `require(process.env.LIBARKTS_PATH ?? "../../libarkts/lib/libarkts.js")`) + } + } + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/src/AnalysisVisitor.ts b/koala_tools/ui2abc/memo-plugin/src/AnalysisVisitor.ts new file mode 100644 index 0000000000000000000000000000000000000000..b5d89d06f0f0363e546f56c3c1c52de8e7d74b5e --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/AnalysisVisitor.ts @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { getDeclResolveGensym, getMemoFunctionKind, getMemoParameterKind, MemoFunctionKind } from "./utils" +import { getParams, isMemoAnnotatable, isMemoizable, MemoAnnotatable } from "./api-utils" + +class AnalysisVisitorOptions { + applyMemo?: MemoFunctionKind +} + +function isSetter(node: arkts.ScriptFunction) { + return node.flags & arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_SETTER +} + +function isGetter(node: arkts.ScriptFunction) { + return node.flags & arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_GETTER +} + +function updateOptions(options: AnalysisVisitorOptions | undefined, node: MemoAnnotatable): AnalysisVisitorOptions | undefined { + return { applyMemo: options?.applyMemo ? options?.applyMemo : getMemoFunctionKind(node) } +} + +export class AnalysisVisitor extends arkts.AbstractVisitor { + // Improve: migrate to wrappers instead of pointers + constructor( + public scriptFunctions: Map, + public ETSFunctionTypes: Map, + ) { + super() + } + + visitor(node: arkts.BlockStatement, options?: AnalysisVisitorOptions): arkts.BlockStatement + visitor(node: arkts.CallExpression, options?: AnalysisVisitorOptions): arkts.CallExpression + visitor(node: arkts.Expression, options?: AnalysisVisitorOptions): arkts.Expression + visitor(node: arkts.AstNode, options?: AnalysisVisitorOptions): arkts.AstNode { + if (arkts.isScriptFunction(node)) { + if (isSetter(node) || isGetter(node)) { + return this.visitEachChild(node, updateOptions(options, node)) + } + const kind = options?.applyMemo ? options?.applyMemo : getMemoFunctionKind(node) + this.scriptFunctions.set(node.originalPeer, kind) + return this.visitEachChild(node, { applyMemo: false }) + } + if (arkts.isETSFunctionType(node)) { + const kind = options?.applyMemo ? options?.applyMemo : getMemoFunctionKind(node) + this.ETSFunctionTypes.set(node.originalPeer, kind) + return this.visitEachChild(node, { applyMemo: false }) + } + + if (isMemoAnnotatable(node)) { + if (arkts.isClassProperty(node) && (getMemoFunctionKind(node) == MemoFunctionKind.NONE) && node.typeAnnotation && arkts.isETSFunctionType(node.typeAnnotation)) { + return this.visitEachChild(node, updateOptions(options, node.typeAnnotation)) + } + return this.visitEachChild(node, updateOptions(options, node)) + } + + if (arkts.isCallExpression(node)) { + const expr = node.callee + const decl = getDeclResolveGensym(expr!) + if (!isMemoizable(decl)) { + return node + } + const params = getParams(decl) + return arkts.factory.updateCallExpression( + node, + this.visitor(node.callee!, options), + node.arguments.map((arg, index) => this.visitor(arg, { applyMemo: params[index] ? getMemoParameterKind(params[index]) : undefined })), + node.typeParams ? this.visitor(node.typeParams, options) as arkts.TSTypeParameterInstantiation : undefined, + node.isOptional, + node.hasTrailingComma, + node.trailingBlock ? this.visitor(node.trailingBlock, options) : undefined, + ) + } + + return this.visitEachChild(node, options) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/FunctionTransformer.ts b/koala_tools/ui2abc/memo-plugin/src/FunctionTransformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..64ac706c6a1bffba46229eda045d1f0dfad1a46a --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/FunctionTransformer.ts @@ -0,0 +1,321 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { factory } from "./MemoFactory" +import { + MemoFunctionKind, + PositionalIdTracker, + RuntimeNames, + getDeclResolveGensym, + hasMemoStableAnnotation, + hasWrapAnnotation, + isTrackableParam, + moveToFront, + shouldWrap, +} from "./utils" +import { ParameterTransformer, ParamInfo } from "./ParameterTransformer" +import { ReturnTransformer } from "./ReturnTranformer" +import { InternalsTransformer } from "./InternalsTransformer" +import { SignatureTransformer } from "./SignatureTransformer" +import { + castParameters, + getName, + getParams, + getReturnTypeAnnotation, + isMemo, + isMemoizable, + memoizableHasReceiver, + parametersBlockHasReceiver, +} from "./api-utils" + +function needThisRewrite(hasReceiver: boolean, isStatic: boolean, stableThis: boolean) { + return hasReceiver && !isStatic && !stableThis +} + +function mayAddLastReturn(node: arkts.BlockStatement): boolean { + return node.statements.length == 0 || ( + !arkts.isReturnStatement(node.statements[node.statements.length - 1]) && + !arkts.isThrowStatement(node.statements[node.statements.length - 1]) + ) +} + +function dropUntrackableParameters(parameters: readonly arkts.ETSParameterExpression[], trackContentParam: boolean) { + return parameters.filter((it, index) => isTrackableParam(it, index + 1 == parameters.length, trackContentParam)) +} + +function getMemoParameterIdentifiers(parameters: readonly arkts.ETSParameterExpression[], trackContentParam: boolean) { + return [ + ...dropUntrackableParameters(parameters, trackContentParam).map(it => { + return { ident: it.ident!, param: it } + }) + ] +} + +function fixGensymParams(params: ParamInfo[], body: arkts.BlockStatement) { + var gensymParamsCount = 0; + for (var i = 0; i < params.length; i++) { + if (params[i].ident.name.startsWith(RuntimeNames.GENSYM)) { + if (gensymParamsCount >= body.statements.length) { + throw new Error(`Expected ${params[i].ident.name} replacement to original parameter`) + } + const declaration = body.statements[gensymParamsCount] + if (!arkts.isVariableDeclaration(declaration)) { + throw new Error(`Expected ${params[i].ident.name} replacement to original parameter`) + } + if (!arkts.isIdentifier(declaration.declarators[0].id)) { + throw new Error(`Expected ${params[i].ident.name} replacement to original parameter`) + } + params[i].ident = declaration.declarators[0].id + gensymParamsCount++ + } + } + return gensymParamsCount +} + +function updateFunctionBody( + node: arkts.BlockStatement, + parameters: readonly arkts.ETSParameterExpression[], + returnTypeAnnotation: arkts.TypeNode | undefined, + hasReceiver: boolean, + isStatic: boolean, + stableThis: boolean, + hash: arkts.Expression, + addLogging: boolean, + trackContentParam: boolean, +): [ + arkts.BlockStatement, + ParamInfo[], + arkts.VariableDeclaration | undefined, + arkts.ReturnStatement | arkts.BlockStatement | undefined, +] { + const shouldCreateMemoThisParam = needThisRewrite(hasReceiver, isStatic, stableThis) && !parametersBlockHasReceiver(parameters) + const parameterIdentifiers = getMemoParameterIdentifiers(parameters, trackContentParam) + const gensymParamsCount = fixGensymParams(parameterIdentifiers, node) + const parameterNames = [...(shouldCreateMemoThisParam ? [RuntimeNames.THIS.valueOf()] : []), ...parameterIdentifiers.map(it => it.ident.name)] + const scopeDeclaration = factory.createScopeDeclaration( + arkts.isTSThisType(returnTypeAnnotation) ? undefined : returnTypeAnnotation, + hash, parameterNames.length + ) + const memoParametersDeclaration = parameterNames.length ? factory.createMemoParameterDeclaration(parameterNames) : undefined + const syntheticReturnStatement = factory.createSyntheticReturnStatement(returnTypeAnnotation) + const unchangedCheck = [factory.createIfStatementWithSyntheticReturnStatement(syntheticReturnStatement)] + const thisParamSubscription = (arkts.isTSThisType(returnTypeAnnotation) && !stableThis) + ? [arkts.factory.createExpressionStatement(factory.createMemoParameterAccess("=t"))] + : [] + return [ + arkts.factory.updateBlockStatement( + node, + [ + ...node.statements.slice(0, gensymParamsCount), + scopeDeclaration, + ...(memoParametersDeclaration ? [memoParametersDeclaration] : []), + ...(addLogging ? [factory.createMemoParameterModifiedLogging(parameterNames)] : []), + ...(addLogging ? [factory.createUnchangedLogging()] : []), + ...unchangedCheck, + ...thisParamSubscription, + ...node.statements.slice(gensymParamsCount), + ...(mayAddLastReturn(node) ? [arkts.factory.createReturnStatement(undefined)] : []), + ] + ), + parameterIdentifiers, + memoParametersDeclaration, + syntheticReturnStatement, + ] +} + +class FunctionTransformerOptions { + receiverContext?: boolean +} + +export class FunctionTransformer extends arkts.AbstractVisitor { + constructor( + public scriptFunctions: Map, + public typeAliases: Map, + private positionalIdTracker: PositionalIdTracker, + private signatureTransformer: SignatureTransformer, + private internalsTransformer: InternalsTransformer, + private parameterTransformer: ParameterTransformer, + private returnTransformer: ReturnTransformer, + private addLogging: boolean, + private trackContentParam: boolean, + ) { + super() + } + + private stable: number = 0 + + public modified: boolean = false + + enter(node: arkts.AstNode) { + if (arkts.isClassDefinition(node)) { + if (hasMemoStableAnnotation(node)) { + this.stable++ + } + } + return this + } + + exit(node: arkts.AstNode) { + if (arkts.isClassDefinition(node)) { + if (hasMemoStableAnnotation(node)) { + this.stable-- + } + } + return this + } + + updateScriptFunction( + scriptFunction: arkts.ScriptFunction, + hasReceiver: boolean, + name: string = "", + ): arkts.ScriptFunction { + if (!scriptFunction.body || !arkts.isBlockStatement(scriptFunction.body)) { + return scriptFunction + } + const afterInternalsTransformer = this.internalsTransformer.visitor(scriptFunction.body) as arkts.BlockStatement + const kind = this.scriptFunctions.get(scriptFunction.originalPeer) ?? MemoFunctionKind.NONE + if (kind == MemoFunctionKind.INTRINSIC || kind == MemoFunctionKind.ENTRY) { + return arkts.factory.updateScriptFunction( + scriptFunction, + afterInternalsTransformer, + scriptFunction.typeParams, + scriptFunction.params, + scriptFunction.returnTypeAnnotation, + false, + scriptFunction.flags, + scriptFunction.modifierFlags, + scriptFunction.id, + scriptFunction.annotations, + scriptFunction.getSignaturePointer(), + scriptFunction.getPreferredReturnTypePointer(), + ) + } + + const isStatic = (scriptFunction.modifierFlags & arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC) != 0 + const isStableThis = this.stable > 0 + const [body, parameterIdentifiers, memoParametersDeclaration, syntheticReturnStatement] = updateFunctionBody( + afterInternalsTransformer, + castParameters(scriptFunction.params), + getReturnTypeAnnotation(scriptFunction), + hasReceiver, + isStatic, + isStableThis, + this.positionalIdTracker.id(name), + this.addLogging, + this.trackContentParam, + ) + const afterParameterTransformer = this.parameterTransformer + .withThis(needThisRewrite(hasReceiver, isStatic, isStableThis)) + .withParameters(parameterIdentifiers) + .skip(memoParametersDeclaration) + .visitor(body) + const afterReturnTransformer = this.returnTransformer + .skip(syntheticReturnStatement) + .rewriteThis(isStableThis) + .visitor(afterParameterTransformer) + return arkts.factory.updateScriptFunction( + scriptFunction, + afterReturnTransformer, + scriptFunction.typeParams, + scriptFunction.params, + scriptFunction.returnTypeAnnotation, + false, + scriptFunction.flags, + scriptFunction.modifierFlags, + scriptFunction.id, + scriptFunction.annotations, + scriptFunction.getSignaturePointer(), + scriptFunction.getPreferredReturnTypePointer(), + ) + } + + transformScriptFunction(node: arkts.ScriptFunction, options?: FunctionTransformerOptions): arkts.ScriptFunction { + const kind = this.scriptFunctions.get(node.originalPeer) ?? MemoFunctionKind.NONE // can it actually be undefined? + if (kind === MemoFunctionKind.NONE) { + return this.signatureTransformer.visitor(node) + } + this.modified = true + return this.signatureTransformer.visitor( + this.updateScriptFunction( + node, + node.hasReceiver || (options?.receiverContext == true), + node.id?.name, + ) + ) + } + + transformCallExpression(node: arkts.CallExpression, options?: FunctionTransformerOptions): arkts.CallExpression { + const expr = node.callee + const decl = getDeclResolveGensym(expr!) + if (decl === undefined) { + return node + } + if (!isMemoizable(decl) || !isMemo(decl)) { + return node + } + + const params = getParams(decl) + const updatedArguments = node.arguments.map((it, index) => { + if (!params[index]) return it + // Improve: this is not quite correct. + // This code is too dependent on the availability of parameter declaration and its type + // Most of the decisions should be taken basing on the fact that this is a memo call + if (shouldWrap(params[index], index + 1 == params.length, this.trackContentParam, it)) { + return factory.createComputeExpression(this.positionalIdTracker.id(getName(decl)), it) + } + return it + }) + this.modified = true + + let newArgs = [...factory.createHiddenArguments(this.positionalIdTracker.id(getName(decl))), ...updatedArguments] + if (memoizableHasReceiver(decl)) { + newArgs = moveToFront(newArgs, 2) + } + return arkts.factory.updateCallExpression( + node, + node.callee, + newArgs, + node.typeParams, + node.isOptional, + node.hasTrailingComma, + node.trailingBlock, + ) + } + + transformETSFunctionType(node: arkts.ETSFunctionType, options?: FunctionTransformerOptions): arkts.ETSFunctionType { + return this.signatureTransformer.visitor(node) + } + + visitor(beforeChildren: arkts.ETSModule, options?: FunctionTransformerOptions): arkts.ETSModule + visitor(beforeChildren: arkts.AstNode, options?: FunctionTransformerOptions): arkts.AstNode { + this.enter(beforeChildren) + const node = this.visitEachChild(beforeChildren, { + receiverContext: + (options?.receiverContext || arkts.isMethodDefinition(beforeChildren)) && !arkts.isScriptFunction(beforeChildren) + }) + this.exit(beforeChildren) + if (arkts.isScriptFunction(node)) { + return this.transformScriptFunction(node, options) + } + if (arkts.isCallExpression(node)) { + return this.transformCallExpression(node, options) + } + if (arkts.isETSFunctionType(node)) { + return this.transformETSFunctionType(node, options) + } + return node + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/InternalsTransformer.ts b/koala_tools/ui2abc/memo-plugin/src/InternalsTransformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..0f6d3169abb71d456d059bf78261c9ab73b6a280 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/InternalsTransformer.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { RuntimeNames, PositionalIdTracker } from "./utils" + +export class InternalsTransformer extends arkts.AbstractVisitor { + constructor(private positionalIdTracker: PositionalIdTracker) { + super() + } + + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + if (arkts.isCallExpression(node)) { + if (arkts.isIdentifier(node.callee)) { + if (node.callee.name == RuntimeNames.__CONTEXT) { + return arkts.factory.createIdentifier( + RuntimeNames.CONTEXT, + undefined + ) + } + if (node.callee.name == RuntimeNames.__ID) { + return arkts.factory.createIdentifier( + RuntimeNames.ID, + undefined + ) + } + if (node.callee.name == RuntimeNames.__KEY) { + return this.positionalIdTracker.id(RuntimeNames.__KEY) + } + } + } + return node + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/MemoFactory.ts b/koala_tools/ui2abc/memo-plugin/src/MemoFactory.ts new file mode 100644 index 0000000000000000000000000000000000000000..eb1e3603fbf6c3e9d96a06874bed281406336bbf --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/MemoFactory.ts @@ -0,0 +1,406 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { DebugNames, RuntimeNames, getRuntimePackage, isVoidReturn } from "./utils" + +export class factory { + // Importing + static createContextTypeImportSpecifier(): arkts.ImportSpecifier { + return arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier(RuntimeNames.CONTEXT_TYPE, undefined), + arkts.factory.createIdentifier(RuntimeNames.CONTEXT_TYPE, undefined), + ) + } + static createIdTypeImportSpecifier(): arkts.ImportSpecifier { + return arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier(RuntimeNames.ID_TYPE, undefined), + arkts.factory.createIdentifier(RuntimeNames.ID_TYPE, undefined), + ) + } + static createHashImportSpecifier(): arkts.ImportSpecifier { + return arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier(RuntimeNames.HASH, undefined), + arkts.factory.createIdentifier(RuntimeNames.HASH, undefined), + ) + } + + static createContextTypesImportDeclaration(debug: boolean, path?: string): arkts.ETSImportDeclaration { + const mandatory = [factory.createContextTypeImportSpecifier(), factory.createIdTypeImportSpecifier()] + return arkts.factory.createETSImportDeclaration( + arkts.factory.createStringLiteral(path ?? getRuntimePackage()), + debug ? [...mandatory, factory.createHashImportSpecifier()] : mandatory, + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL + ) + } + + // Parameters + static createContextParameter(): arkts.ETSParameterExpression { + return arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier( + RuntimeNames.CONTEXT, + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier(RuntimeNames.CONTEXT_TYPE, undefined), + undefined, + undefined + ) + ) + ), + false + ) + } + static createIdParameter(): arkts.ETSParameterExpression { + return arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier(RuntimeNames.ID, + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier(RuntimeNames.ID_TYPE, undefined), + undefined, + undefined + ) + ) + ), + false + ) + } + static createHiddenParameters(): arkts.ETSParameterExpression[] { + return [factory.createContextParameter(), factory.createIdParameter()] + } + + // Arguments + static createContextArgument(): arkts.Expression { + return arkts.factory.createIdentifier(RuntimeNames.CONTEXT, undefined) + } + static createIdArgument(hash: arkts.Expression): arkts.Expression { + return arkts.factory.createBinaryExpression( + arkts.factory.createIdentifier(RuntimeNames.ID, undefined), + hash, + arkts.Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_PLUS, + ) + } + static createHiddenArguments(hash: arkts.Expression): arkts.Expression[] { + return [factory.createContextArgument(), factory.createIdArgument(hash)] + } + + // Memo parameters + static createMemoParameterIdentifier(name: string): arkts.Identifier { + if (name === "=t") { + return arkts.factory.createIdentifier(`${RuntimeNames.PARAMETER}_this`, undefined) + } + return arkts.factory.createIdentifier(`${RuntimeNames.PARAMETER}_${name}`, undefined) + } + static createMemoParameterDeclarator(id: number, name: string): arkts.VariableDeclarator { + const original = (name == "this") ? + arkts.factory.createThisExpression() : + arkts.factory.createIdentifier(name, undefined) + return arkts.factory.createVariableDeclarator( + arkts.Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_CONST, + factory.createMemoParameterIdentifier(name), + arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier(RuntimeNames.SCOPE, undefined), + arkts.factory.createIdentifier(RuntimeNames.INTERNAL_PARAMETER_STATE, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + [ + arkts.factory.createNumberLiteral(id), + original, + ], + undefined, + false, + false, + undefined, + ) + ) + } + static createMemoParameterDeclaration(parameters: string[]): arkts.VariableDeclaration { + return arkts.factory.createVariableDeclaration( + arkts.Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_CONST, + parameters.map((name, id) => { return factory.createMemoParameterDeclarator(id, name) }), + ) + } + static createMemoParameterModifiedLogging(parameters: string[]): arkts.ExpressionStatement { + return arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier(DebugNames.CONSOLE, undefined), + arkts.factory.createIdentifier(DebugNames.LOG, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_NONE, + false, + false, + ), + [ + arkts.factory.createStringLiteral(DebugNames.BANNER_PARAMETER), + ...parameters.flatMap((name) => { return [ + arkts.factory.createStringLiteral(`( ${name} modified:`), + arkts.factory.createMemberExpression( + factory.createMemoParameterIdentifier(name), + arkts.factory.createIdentifier("modified", undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_GETTER, + false, + false + ), + arkts.factory.createStringLiteral(`)`), + ] }) + ], + undefined, + false, + false, + undefined, + ) + ) + } + static createMemoParameterAccess(name: string): arkts.MemberExpression { + return arkts.factory.createMemberExpression( + factory.createMemoParameterIdentifier(name), + arkts.factory.createIdentifier(RuntimeNames.VALUE, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_GETTER, + false, + false, + ) + } + static createMemoParameterAccessCall(name: string, passArgs?: arkts.Expression[]): arkts.CallExpression { + const updatedArgs = passArgs ? passArgs : [] + return arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + factory.createMemoParameterIdentifier(name), + arkts.factory.createIdentifier(RuntimeNames.VALUE, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_GETTER, + false, + false, + ), + [...updatedArgs], + undefined, + false, + false, + undefined, + ) + } + + // Recache + static createScopeDeclaration(returnTypeAnnotation: arkts.TypeNode | undefined, hash: arkts.Expression, cnt: number): arkts.VariableDeclaration { + return arkts.factory.createVariableDeclaration( + arkts.Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_CONST, + [ + arkts.factory.createVariableDeclarator( + arkts.Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_CONST, + arkts.factory.createIdentifier(RuntimeNames.SCOPE, undefined), + arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier(RuntimeNames.CONTEXT, undefined), + arkts.factory.createIdentifier(RuntimeNames.INTERNAL_SCOPE, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + [ + factory.createIdArgument(hash), + arkts.factory.createNumberLiteral(cnt) + ], + arkts.factory.createTSTypeParameterInstantiation( + returnTypeAnnotation + ? [returnTypeAnnotation.clone()] + : [arkts.factory.createETSPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID)], + ), + false, + false, + undefined, + ) + ) + ] + ) + } + static createRecacheCall(arg?: arkts.Expression): arkts.CallExpression { + return arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier(RuntimeNames.SCOPE, undefined), + arkts.factory.createIdentifier(RuntimeNames.INTERNAL_VALUE_NEW, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + arg ? [arg] : [], + undefined, + false, + false, + undefined, + ) + } + static createReturnThis(): arkts.BlockStatement { + return arkts.factory.createBlockStatement([ + arkts.factory.createExpressionStatement( + factory.createRecacheCall() + ), + arkts.factory.createReturnStatement( + arkts.factory.createThisExpression() + ) + ]) + } + static createCached(): arkts.Expression { + return arkts.factory.createMemberExpression( + arkts.factory.createIdentifier(RuntimeNames.SCOPE, undefined), + arkts.factory.createIdentifier(RuntimeNames.INTERNAL_VALUE, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false, + ) + } + static createSyntheticReturnStatement(returnTypeAnnotation: arkts.TypeNode | undefined): arkts.ReturnStatement | arkts.BlockStatement { + if (isVoidReturn(returnTypeAnnotation)) { + return arkts.factory.createBlockStatement([ + arkts.factory.createExpressionStatement( + this.createCached() + ), + arkts.factory.createReturnStatement(undefined) + ]) + } + if (arkts.isTSThisType(returnTypeAnnotation)) { + return arkts.factory.createBlockStatement([ + arkts.factory.createExpressionStatement( + this.createCached() + ), + arkts.factory.createReturnStatement(arkts.factory.createThisExpression()) + ]) + } + return arkts.factory.createReturnStatement( + this.createCached(), + ) + } + static createIfStatementWithSyntheticReturnStatement(syntheticReturnStatement: arkts.ReturnStatement | arkts.BlockStatement): arkts.IfStatement { + return arkts.factory.createIfStatement( + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier(RuntimeNames.SCOPE, undefined), + arkts.factory.createIdentifier(RuntimeNames.INTERNAL_VALUE_OK, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_GETTER, + false, + false, + ), + syntheticReturnStatement, + undefined, + ) + } + static createUnchangedLogging(): arkts.ExpressionStatement { + return arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier(DebugNames.CONSOLE, undefined), + arkts.factory.createIdentifier(DebugNames.LOG, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_NONE, + false, + false, + ), + [ + arkts.factory.createStringLiteral(DebugNames.BANNER_UNCHANGED), + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier(RuntimeNames.SCOPE, undefined), + arkts.factory.createIdentifier(RuntimeNames.INTERNAL_VALUE_OK, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_GETTER, + false, + false + ) + ], + undefined, + false, + false, + undefined, + ) + ) + } + + // All these deduce functions is a huge woraround for + // recheck incapable to infer proper return types on lambdas. + static deduceWrapperType(node: arkts.Expression): arkts.TypeNode|undefined { + if (arkts.isArrowFunctionExpression(node)) return factory.deduceArrowWrapperType(node) + if (arkts.isObjectExpression(node)) return factory.deduceObjectWrapperType(node) + if (arkts.isTSAsExpression(node)) return factory.deduceAsWrapperType(node) + return undefined + } + static deduceAsWrapperType(node: arkts.TSAsExpression): arkts.TypeNode|undefined { + return node.typeAnnotation?.clone() + } + static deduceObjectWrapperType(node: arkts.ObjectExpression): arkts.TypeNode|undefined { + const preferredTypePointer = node.getPreferredTypePointer() + if (!preferredTypePointer) { + return undefined + } + arkts.trace( + `Use inferred type of object`, + () => `Using inferred object type ${arkts.unpackString(arkts.global.es2panda._Checker_TypeToString(arkts.global.context, preferredTypePointer))} for object ${arkts.originalSourcePositionString(node)}` + ) + return arkts.factory.createOpaqueTypeNode(arkts.global.es2panda._Checker_TypeClone(arkts.global.context, preferredTypePointer)) + } + static deduceArrowWrapperType(arrow: arkts.ArrowFunctionExpression): arkts.TypeNode|undefined { + const origType: arkts.TypeNode | undefined = arrow.function?.returnTypeAnnotation + const origPreferredType: arkts.TypeNode | undefined = arkts.convertCheckerTypeToTypeNode( + arrow.function?.getPreferredReturnTypePointer() + ) + if (origType == undefined && origPreferredType == undefined) return undefined + const params = arrow.function?.params?.map(it => { + const param = it as arkts.ETSParameterExpression + return arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier(param.ident!.name, param.typeAnnotation), + param.isOptional, + undefined, + undefined + ) + }) ?? [] + return arkts.factory.createETSFunctionType( + undefined, + params, + origType ? origType.clone() : origPreferredType, + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_NONE, + undefined + ) + } + + // Compute + static createLambdaWrapper(node: arkts.Expression): arkts.ArrowFunctionExpression { + return arkts.factory.createArrowFunctionExpression( + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement([ + arkts.factory.createReturnStatement(node) + ]), + undefined, + [], + factory.deduceWrapperType(node), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_ARROW, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + undefined, + undefined, + ) + ) + } + static createComputeExpression(hash: arkts.Expression, node: arkts.Expression): arkts.CallExpression { + return arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createIdentifier(RuntimeNames.CONTEXT), + arkts.factory.createIdentifier(RuntimeNames.COMPUTE), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + [factory.createIdArgument(hash), factory.createLambdaWrapper(node)], + undefined, + false, + false, + undefined, + ) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/MemoTransformer.ts b/koala_tools/ui2abc/memo-plugin/src/MemoTransformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..e8e065422e9a3e02efef3399dbf847dc2d6ed576 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/MemoTransformer.ts @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { AnalysisVisitor } from "./AnalysisVisitor" +import { FunctionTransformer } from "./FunctionTransformer" +import { dumpAstToFile, MemoFunctionKind, PositionalIdTracker } from "./utils" +import { InternalsTransformer } from "./InternalsTransformer" +import { ParameterTransformer } from "./ParameterTransformer" +import { ReturnTransformer } from "./ReturnTranformer" +import { SignatureTransformer } from "./SignatureTransformer" +import { DiagnosticVisitor } from "./diagnostics/DiagnosticVisitor" + +export interface TransformerOptions { + trace?: boolean, + contextImport?: string, + stableForTests?: boolean, + keepTransformed?: string, + addLogging?: boolean, + trackContentParam?: boolean, +} + +export default function memoTransformer( + userPluginOptions?: TransformerOptions +) { + return (program: arkts.Program, options: arkts.CompilationOptions, context: arkts.PluginContext) => { + const scriptFunctions = new Map() + const ETSFunctionTypes = new Map() + const analysisVisitor = new AnalysisVisitor(scriptFunctions, ETSFunctionTypes) + const diagnosticVisitor = new DiagnosticVisitor(scriptFunctions) + const positionalIdTracker = new PositionalIdTracker(program.relativeFilePath, userPluginOptions?.stableForTests) + const signatureTransformer = new SignatureTransformer(scriptFunctions, ETSFunctionTypes) + const internalsTransformer = new InternalsTransformer(positionalIdTracker) + const parameterTransformer = new ParameterTransformer(positionalIdTracker) + const returnTransformer = new ReturnTransformer() + + const node = program.ast as arkts.ETSModule + analysisVisitor.visitor(node) + diagnosticVisitor.visitor(node) + + const functionTransformer = new FunctionTransformer( + scriptFunctions, + ETSFunctionTypes, + positionalIdTracker, + signatureTransformer, + internalsTransformer, + parameterTransformer, + returnTransformer, + userPluginOptions?.addLogging ?? false, + userPluginOptions?.trackContentParam ?? false, + ) + let result = functionTransformer.visitor(node) + if (userPluginOptions?.keepTransformed && options.isProgramForCodegeneration) { + dumpAstToFile(result, userPluginOptions.keepTransformed, userPluginOptions?.stableForTests ?? false) + } + program.setAst(result) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/ParameterTransformer.ts b/koala_tools/ui2abc/memo-plugin/src/ParameterTransformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..b3fdb642d1c0a590cafb9dae38da24401c75a4d2 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/ParameterTransformer.ts @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { factory } from "./MemoFactory" +import { KPointer } from "@koalaui/interop" +import { PositionalIdTracker, RuntimeNames } from "./utils" + +export type ParamInfo = { + ident: arkts.Identifier, + param: arkts.ETSParameterExpression +} + +export class ParameterTransformer extends arkts.AbstractVisitor { + private rewriteIdentifiers?: Map arkts.MemberExpression | arkts.Identifier> + private rewriteCalls?: Map arkts.CallExpression> + private rewriteThis?: boolean + private skipNode?: arkts.VariableDeclaration + + constructor(private positionalIdTracker: PositionalIdTracker) { + super() + } + + withThis(flag: boolean): ParameterTransformer { + this.rewriteThis = flag + return this + } + + withParameters(parameters: ParamInfo[]): ParameterTransformer { + this.rewriteCalls = new Map(parameters.filter(it => + it.param.typeAnnotation && (arkts.isETSFunctionType(it.param.typeAnnotation) || arkts.isETSUnionType(it.param.typeAnnotation))).map(it => { + return [it.param.ident!.name.startsWith(RuntimeNames.GENSYM) ? it.ident.originalPeer : it.param.originalPeer, (passArgs: arkts.Expression[]) => { + return factory.createMemoParameterAccessCall(it.ident.name, passArgs) + }] + }) + ) + this.rewriteIdentifiers = new Map(parameters.map(it => { + return [it.param.ident!.name.startsWith(RuntimeNames.GENSYM) ? it.ident.originalPeer : it.param.originalPeer, () => { + return factory.createMemoParameterAccess(it.ident.name) + }] + }) + ) + return this + } + + skip(memoParametersDeclaration?: arkts.VariableDeclaration): ParameterTransformer { + this.skipNode = memoParametersDeclaration + return this + } + + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + if (beforeChildren === this.skipNode) { + return beforeChildren + } + if (arkts.isVariableDeclaration(beforeChildren) && this.rewriteIdentifiers?.has(beforeChildren.declarators[0].id!.originalPeer)) { + return beforeChildren + } + if (arkts.isCallExpression(beforeChildren)) { + if (arkts.isIdentifier(beforeChildren.callee)) { + const decl = arkts.getPeerDecl(beforeChildren.callee.originalPeer) // Improve: here should be getDeclResolveGensym, but it would result in code not passing filterSource + if (decl && this.rewriteCalls?.has(decl.originalPeer)) { + return this.rewriteCalls.get(decl.originalPeer)!( + beforeChildren.arguments.map((it) => this.visitor(it) as arkts.Expression) // Improve: remove as + ) + } + } + } + const node = this.visitEachChild(beforeChildren) + if (arkts.isIdentifier(node)) { + const decl = arkts.getPeerDecl(node.originalPeer) // Improve: here should be getDeclResolveGensym, but it would result in code not passing filterSource + if (decl && this.rewriteIdentifiers?.has(decl.originalPeer)) { + return this.rewriteIdentifiers.get(decl.originalPeer)!() + } + } + if (arkts.isThisExpression(node) && this.rewriteThis) { + if (arkts.isReturnStatement(node.parent)) { + return node + } + return factory.createMemoParameterAccess(RuntimeNames.THIS) + } + return node + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/ParserTransformer.ts b/koala_tools/ui2abc/memo-plugin/src/ParserTransformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..d450609c18235d2c8be25e87df862d5e74f1b435 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/ParserTransformer.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { factory } from "./MemoFactory" + +const ignore = [ + "@koalaui/compat", + "@koalaui/common", + "@koalaui/harness", + "@koalaui/runtime/annotations", + + "@koalaui/runtime.internals", + "@koalaui/runtime.index", + + // Improve: this is a bad decision due to the way runtime tests are compiled + "@koalaui/runtime-tests.ets.internals", + "@koalaui/runtime-tests.ets.index", + "@koalaui/runtime-tests.annotations", + "@koalaui/runtime-tests.ets-test.tests", +] + +export interface TransformerOptions { + contextImport?: string, + stableForTests?: boolean +} + +export default function memoParserTransformer( + userPluginOptions?: TransformerOptions +) { + return (program: arkts.Program, options: arkts.CompilationOptions, context: arkts.PluginContext) => { + if (ignore.some(it => program.moduleName.startsWith(it)) || program.moduleName == "") { + /* Some files should not be processed by plugin actually */ + return + } + + const module = program.ast as arkts.ETSModule + program.setAst( + arkts.factory.updateETSModule( + module, + [ + factory.createContextTypesImportDeclaration(userPluginOptions?.stableForTests ?? false, userPluginOptions?.contextImport), + ...module.statements, + ], + module.ident, + module.getNamespaceFlag(), + module.program, + ) + ) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/ReturnTranformer.ts b/koala_tools/ui2abc/memo-plugin/src/ReturnTranformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..f6595b91da1e01f14281bc40a077d868e67c6aaf --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/ReturnTranformer.ts @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { factory } from "./MemoFactory" + +/** + * This transformer corrects function's body according to memo transformation + */ +export class ReturnTransformer extends arkts.AbstractVisitor { + private skipNode?: arkts.ReturnStatement | arkts.BlockStatement + private stableThis: boolean = false + + skip(syntheticReturnStatement?: arkts.ReturnStatement | arkts.BlockStatement): ReturnTransformer { + this.skipNode = syntheticReturnStatement + return this + } + + rewriteThis(stableThis: boolean): ReturnTransformer { + this.stableThis = stableThis + return this + } + + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + if (beforeChildren === this.skipNode) { + return beforeChildren + } + if (arkts.isScriptFunction(beforeChildren)) { + return beforeChildren + } + const node = this.visitEachChild(beforeChildren) + if (arkts.isReturnStatement(node)) { + if (node.argument == undefined || arkts.isThisExpression(node.argument)) { + return arkts.factory.createBlockStatement([ + arkts.factory.createExpressionStatement( + factory.createRecacheCall() + ), + node + ]) + } + return arkts.factory.updateReturnStatement(node, factory.createRecacheCall(node.argument)) + } + return node + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/SignatureTransformer.ts b/koala_tools/ui2abc/memo-plugin/src/SignatureTransformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..d2462c4e499ed20bff512c70d71b85aa37378507 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/SignatureTransformer.ts @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { factory } from "./MemoFactory" +import { + MemoFunctionKind, + moveToFront, +} from "./utils" +import { + parametrizedNodeHasReceiver, +} from "./api-utils" + +function extendParameters(params: readonly arkts.Expression[], hasReceiver: boolean) { + let newParams = [...factory.createHiddenParameters(), ...params] + if (hasReceiver) { + newParams = moveToFront(newParams, 2) + } + return newParams +} + +export class SignatureTransformer extends arkts.AbstractVisitor { + public modified = false + + constructor( + public scriptFunctions: Map, + public ETSFunctionTypes: Map, + ) { + super() + } + + visitor(node: arkts.ScriptFunction): arkts.ScriptFunction + visitor(node: arkts.ETSFunctionType): arkts.ETSFunctionType + visitor(node: arkts.AstNode): arkts.AstNode { + if (arkts.isScriptFunction(node)) { + const memo = this.scriptFunctions.get(node.originalPeer) + const shouldTransform = memo == MemoFunctionKind.MEMO || memo == MemoFunctionKind.INTRINSIC + if (!shouldTransform) { + return node + } + this.modified = true + return arkts.factory.updateScriptFunction( + node, + node.body, + node.typeParams, + extendParameters(node.params, parametrizedNodeHasReceiver(node)), + node.returnTypeAnnotation, + node.hasReceiver, + node.flags, + node.modifierFlags, + node.id, + node.annotations, + node.getSignaturePointer(), + node.getPreferredReturnTypePointer(), + ) + } + if (arkts.isETSFunctionType(node)) { + const memo = this.ETSFunctionTypes.get(node.originalPeer) + const shouldTransform = memo == MemoFunctionKind.MEMO || memo == MemoFunctionKind.INTRINSIC + if (!shouldTransform) { + return node + } + this.modified = true + return arkts.factory.updateETSFunctionType( + node, + node.typeParams, + extendParameters(node.params, parametrizedNodeHasReceiver(node)), + node.returnType, + node.isExtensionFunction, + node.flags, + node.annotations, + ) + } + + return this.visitEachChild(node) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/api-utils.ts b/koala_tools/ui2abc/memo-plugin/src/api-utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..1b4cbd23aa0338ede3250142b885820c77fd23f8 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/api-utils.ts @@ -0,0 +1,324 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { getMemoFunctionKind, getMemoParameterKind, MemoFunctionKind } from "./utils" + +/** + * Type of node which can be returned by getDecl and correspond to node which can have memo annotation + * + * @see getDecl + * @see getDeclResolveGensym + * @see MemoAnnotatable + */ +export type Memoizable = + arkts.MethodDefinition + | arkts.ETSParameterExpression + | arkts.Identifier + | arkts.ClassProperty + +/** + * Type of expression node which can have functional memo annotation + */ +export type MemoAnnotatableExpression = + arkts.ScriptFunction + | arkts.ArrowFunctionExpression + | arkts.ETSParameterExpression + | arkts.VariableDeclaration + | arkts.ClassProperty + | arkts.TSTypeAliasDeclaration + +/** + * Type of type node which can have functonal memo annotation + */ +export type MemoAnnotatableType = + arkts.ETSFunctionType + | arkts.ETSUnionType + +/** + * Type of type node which can correspond to functional memo type + */ +export type MemoAllowedType = + MemoAnnotatableType + | arkts.ETSTypeReference + +/** + * Type of node which can have functional memo annotation + */ +export type MemoAnnotatable = MemoAnnotatableExpression | MemoAnnotatableType + +/** + * Type of node which can have @memo_stable annotation + */ +export type MemoStableAnnotatable = arkts.ClassDefinition + +/** + * Type of node which can have @memo_skip annotation + */ +export type MemoSkipAnnotatable = arkts.ETSParameterExpression + +export function isMemoizable(node: arkts.AstNode | undefined): node is Memoizable { + return arkts.isMethodDefinition(node) + || arkts.isETSParameterExpression(node) + || arkts.isIdentifier(node) + || arkts.isClassProperty(node) +} + +export function isMemoAnnotatableExpression(node: arkts.AstNode | undefined): node is MemoAnnotatableExpression { + return arkts.isScriptFunction(node) + || arkts.isETSParameterExpression(node) + || arkts.isArrowFunctionExpression(node) + || arkts.isVariableDeclaration(node) + || arkts.isClassProperty(node) + || arkts.isTSTypeAliasDeclaration(node) +} + +export function isMemoAnnotatableType(node: arkts.AstNode | undefined): node is MemoAnnotatableType { + return arkts.isETSFunctionType(node) || arkts.isETSUnionType(node) +} + +export function isMemoAnnotatable(node: arkts.AstNode | undefined): node is MemoAnnotatable { + return isMemoAnnotatableExpression(node) || isMemoAnnotatableType(node) +} + +export function isMemoAllowedType(node: arkts.AstNode | undefined): node is MemoAllowedType { + return isMemoAnnotatableType(node) || arkts.isETSTypeReference(node) +} + +export function getName(node: Memoizable): string { + if (arkts.isMethodDefinition(node)) { + return node.id!.name + } + if (arkts.isETSParameterExpression(node)) { + return node.ident!.name + } + if (arkts.isIdentifier(node)) { + return node.name + } + if (arkts.isClassProperty(node)) { + return node.id!.name + } + assertIsNever(node) +} + +// Improve: this should use info from AnalysisVisitor, not obtain it from the node +// but this require AnalysisVisitor to be run on all sources +export function isMemo(node: Memoizable) { + if (arkts.isMethodDefinition(node)) { + let kind = getMemoFunctionKind(node.function!) + if (node.isGetter && isMemoAnnotatableType(node.function!.returnTypeAnnotation)) { + kind = getMemoFunctionKind(node.function!.returnTypeAnnotation) + } + if (kind == MemoFunctionKind.MEMO || kind == MemoFunctionKind.INTRINSIC) { + return true + } + } + if (arkts.isETSParameterExpression(node)) { + const kind = getMemoParameterKind(node) + if (kind == MemoFunctionKind.MEMO || kind == MemoFunctionKind.INTRINSIC) { + return true + } + } + if (arkts.isIdentifier(node)) { + if (arkts.isVariableDeclarator(node.parent) && arkts.isArrowFunctionExpression(node.parent.init)) { + const kind = getMemoFunctionKind(node.parent.init) + if (kind == MemoFunctionKind.MEMO || kind == MemoFunctionKind.INTRINSIC) { + return true + } + } + if (arkts.isVariableDeclarator(node.parent) && arkts.isVariableDeclaration(node.parent.parent)) { + const kind = getMemoFunctionKind(node.parent.parent) + if (kind == MemoFunctionKind.MEMO || kind == MemoFunctionKind.INTRINSIC) { + return true + } + } + } + if (arkts.isClassProperty(node)) { + let kind = getMemoFunctionKind(node) + if (kind == MemoFunctionKind.NONE && isMemoAnnotatableType(node.typeAnnotation)) { + kind = getMemoFunctionKind(node.typeAnnotation) + } + if (kind == MemoFunctionKind.MEMO || kind == MemoFunctionKind.INTRINSIC) { + return true + } + } + return false +} + +/** + * es2panda API is weird here + * + * @deprecated + */ +export function castParameters(params: readonly arkts.Expression[]): readonly arkts.ETSParameterExpression[] { + return params as readonly arkts.ETSParameterExpression[] +} + +export function correctObjectExpression(node: arkts.AstNode | undefined): boolean { + return arkts.isObjectExpression(node) || (arkts.isTSAsExpression(node) && correctObjectExpression(node.expr)) +} + +export function correctFunctionParamType(arg: arkts.Expression): boolean { + return arkts.isArrowFunctionExpression(arg) +} + +function assertIsNever(isNever: never): never { + throw new Error("Unreachable") +} + +/** + * This function is used to check whether some parameters of decl call should be rewritten + * + * For expressions that cannot accept @memo parameters it returns [] + */ +export function getParams(decl: Memoizable) { + if (arkts.isMethodDefinition(decl)) { + return castParameters(decl.function!.params) + } + if (arkts.isETSParameterExpression(decl)) { + if (arkts.isETSFunctionType(decl.typeAnnotation)) { + return castParameters(decl.typeAnnotation.params) + } + if (arkts.isETSUnionType(decl.typeAnnotation)) { + const nonUndefined: arkts.TypeNode[] = decl.typeAnnotation.types.filter((it) => { + return !arkts.isETSUndefinedType(it) + }) + if (nonUndefined.length != 1) { + return [] + } + if (arkts.isETSFunctionType(nonUndefined[0])) { + return castParameters(nonUndefined[0].params) + } + return [] + } + return [] + } + if (arkts.isIdentifier(decl)) { + if (arkts.isVariableDeclarator(decl.parent) && arkts.isArrowFunctionExpression(decl.parent.init)) { + return castParameters(decl.parent.init.function!.params) + } + return [] + } + if (arkts.isClassProperty(decl)) { + if (arkts.isArrowFunctionExpression(decl.value)) { + return castParameters(decl.value.function!.params) + } + return [] + } + assertIsNever(decl) +} + +function isThisParam(node: arkts.Expression | undefined): boolean { + if (node === undefined || !arkts.isETSParameterExpression(node)) { + return false + } + return node.ident?.isReceiver ?? false +} + +export function parametersBlockHasReceiver(params: readonly arkts.Expression[]): boolean { + return params.length > 0 && arkts.isETSParameterExpression(params[0]) && isThisParam(params[0]) +} + +export function parametrizedNodeHasReceiver(node: arkts.ScriptFunction | arkts.ETSFunctionType | undefined): boolean { + if (node === undefined) { + return false + } + return parametersBlockHasReceiver(node.params) +} + +export function memoizableHasReceiver(node: Memoizable): boolean { + if (arkts.isMethodDefinition(node)) { + return parametrizedNodeHasReceiver(node.function) + } + if (arkts.isETSParameterExpression(node)) { + if (arkts.isETSFunctionType(node.typeAnnotation)) { + return isThisParam(node.typeAnnotation.params[0]) + } + return false + } + if (arkts.isIdentifier(node)) { + if (arkts.isVariableDeclarator(node.parent) && arkts.isArrowFunctionExpression(node.parent.init)) { + return isThisParam(node.parent.init.function!.params[0]) + } + return false + } + if (arkts.isClassProperty(node)) { + if (arkts.isArrowFunctionExpression(node.value)) { + return isThisParam(node.value.function!.params[0]) + } + return false + } + assertIsNever(node) +} + +export function checkReturnTypeAnnotation(scriptFunction: arkts.ScriptFunction) { + if (scriptFunction.returnTypeAnnotation) { + return true + } + if (scriptFunction.getSignaturePointer() && arkts.signatureReturnType(scriptFunction.getSignaturePointer())) { + return true + } + if (scriptFunction.getPreferredReturnTypePointer()) { + return true + } + return false +} + +export function getReturnTypeAnnotation(scriptFunction: arkts.ScriptFunction) { + const returnTypeAnnotation = scriptFunction.returnTypeAnnotation + if (returnTypeAnnotation) { + return returnTypeAnnotation + } + + const signaturePointer = scriptFunction.getSignaturePointer() + if (signaturePointer) { + const signatureReturnType = arkts.convertCheckerTypeToTypeNode( + arkts.signatureReturnType(signaturePointer) + ) + if (signatureReturnType) { + if (scriptFunction.id) { + arkts.trace( + `Use inferred type of script function`, + () => `Using inferred return type ${signatureReturnType.dumpSrc()} for @memo function ${scriptFunction.id?.name} ${arkts.originalSourcePositionString(scriptFunction.parent)}` + ) + } else { + arkts.trace( + `Use inferred type of script function`, + () => `Using inferred return type ${signatureReturnType.dumpSrc()} for anonymous @memo function ${arkts.originalSourcePositionString(scriptFunction.parent)}` + ) + } + return signatureReturnType + } + } + + const preferredReturnType = arkts.convertCheckerTypeToTypeNode( + scriptFunction.getPreferredReturnTypePointer() + ) + if (preferredReturnType) { + if (scriptFunction.id) { + arkts.trace( + `Use inferred type of script function`, + () => `Using inferred return type ${preferredReturnType.dumpSrc()} for @memo function ${scriptFunction.id?.name} ${arkts.originalSourcePositionString(scriptFunction.parent)}` + ) + } else { + arkts.trace( + `Use inferred type of script function`, + () => `Using inferred return type ${preferredReturnType.dumpSrc()} for anonymous @memo function ${arkts.originalSourcePositionString(scriptFunction.parent)}` + ) + } + return preferredReturnType + } + return undefined +} diff --git a/koala_tools/ui2abc/memo-plugin/src/diagnostics/DiagnosticVisitor.ts b/koala_tools/ui2abc/memo-plugin/src/diagnostics/DiagnosticVisitor.ts new file mode 100644 index 0000000000000000000000000000000000000000..9dba318f68b6f685e082666f21fe1a3315cfb661 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/diagnostics/DiagnosticVisitor.ts @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { getDeclResolveGensym, isMemoCall, MemoFunctionKind, RuntimeNames } from "../utils" +import { getName, checkReturnTypeAnnotation, isMemo, isMemoizable } from "../api-utils" +import { ScopedVisitor } from "./ScopedVisitor" +import { Reporter } from "./Reporter" +import { toArray } from "./ToArrayVisitor" + +export class DiagnosticVisitor extends ScopedVisitor { + constructor(functionTable: Map) { + super(functionTable) + } + + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + this.enterScope(beforeChildren) + const node = this.visitEachChild(beforeChildren) + + // Improve: check state mutation, panda issue 26718 + this.checkDefaultValueMemoCall(node) + this.checkOutOfMemoContextMemoCall(node) + this.checkMemoDeclarationIsExplicitlyTyped(node) + this.checkParameterMutation(node) + + this.exitScope(beforeChildren) + return node + } + + private checkOutOfMemoContextMemoCall(node: arkts.AstNode): void { + if (!arkts.isCallExpression(node)) return + const callee = node.callee ?? arkts.throwError(`call expression has no callee`) + const decl = getDeclResolveGensym(callee) + if (!isMemoizable(decl)) return + if (!isMemo(decl)) return + if (this.isCurrentScopeMemo()) return + const callName = getName(decl) + const scopeName = this.currentScopeName() + Reporter.reportOutOfContextMemoCall(callName, scopeName) + } + + private checkDefaultValueMemoCall(node: arkts.AstNode): void { + if (!arkts.isVariableDeclarator(node)) return + if (!arkts.isIdentifier(node.id)) return + if (!arkts.isConditionalExpression(node.init)) return + if (node.init.test === undefined) return + if (node.init.alternate === undefined) return + const isGensym = (it: arkts.AstNode) => + arkts.isIdentifier(it) && it.name.includes(RuntimeNames.GENSYM) + if (toArray(node.init.test).some(isGensym) && toArray(node.init.alternate).some(isMemoCall)) { + Reporter.reportDefaultValueMemoCall(node.id.name) + } + } + + private checkMemoDeclarationIsExplicitlyTyped(node: arkts.AstNode): void { + if (!arkts.isScriptFunction(node)) return + const kind = this.scriptFunctions.get(node.originalPeer) + if (kind === undefined) return + if (kind === MemoFunctionKind.NONE) return + if (checkReturnTypeAnnotation(node)) return + Reporter.reportMemoFunctionIsNotExplicitlyTyped(node?.id?.name) + } + + private checkParameterMutation(node: arkts.AstNode): void { + if (!arkts.isAssignmentExpression(node)) return + if (!arkts.isIdentifier(node.left)) return + const decl = arkts.getDecl(node.left) + if (!arkts.isETSParameterExpression(decl)) return + if (!this.isCurrentScopeMemo()) return + + Reporter.reportParameterReassignment(node.left.name, this.currentScopeName()) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/diagnostics/Reporter.ts b/koala_tools/ui2abc/memo-plugin/src/diagnostics/Reporter.ts new file mode 100644 index 0000000000000000000000000000000000000000..9aca9fff192b4535437bded02a358619af382c95 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/diagnostics/Reporter.ts @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2024 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. + */ + +export class Reporter { + /* + No diagnostics API from es2panda yet, so using `console.error` for now + */ + static reportOutOfContextMemoCall(callName: string | undefined, contextName: string | undefined): void { + const call = callName !== undefined + ? `function ${callName}` + : `anonymous function` + const context = contextName !== undefined + ? `context ${contextName}` + : `anonymous context` + console.error(`Calling @memo ${call} from non-@memo ${context}`) + } + + static reportDefaultValueMemoCall(parameterName: string | undefined): void { + console.error(`Can not call @memo function at parameter default value expression. Parameter: ${parameterName}`) + } + + static reportMemoFunctionIsNotExplicitlyTyped(functionName: string | undefined): void { + const func = functionName ?? `anonymous function` + console.error(`@memo ${func} must have its return type explicitly specified`) + } + + static reportParameterReassignment(parameterName: string, contextName: string | undefined): void { + const context = contextName !== undefined + ? contextName + : `anonymous function` + console.error( + `@memo function parameter reassignment is forbidden: parameter ${parameterName} at function ${context}` + ) + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/src/diagnostics/ScopedVisitor.ts b/koala_tools/ui2abc/memo-plugin/src/diagnostics/ScopedVisitor.ts new file mode 100644 index 0000000000000000000000000000000000000000..065c8b84f8b98d8c926e21dce6eb1e65c14998ac --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/diagnostics/ScopedVisitor.ts @@ -0,0 +1,54 @@ +/* + * 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 * as arkts from "@koalaui/libarkts" +import { MemoFunctionKind } from "../utils" + +type ScopeInfo = { + name?: string, + isMemo: boolean +} + +export abstract class ScopedVisitor extends arkts.AbstractVisitor { + private scopes: ScopeInfo[] = [] + + protected constructor( + protected scriptFunctions: Map + ) { + super() + } + + protected enterScope(node: arkts.AstNode): void { + if (arkts.isScriptFunction(node)) { + const name = node.id?.name + const isMemo = this.scriptFunctions.get(node.originalPeer) !== MemoFunctionKind.NONE + this.scopes.push({ name , isMemo }) + } + } + + protected exitScope(node: arkts.AstNode): void { + if (arkts.isScriptFunction(node)) { + this.scopes.pop() + } + } + + protected isCurrentScopeMemo(): boolean { + return this.scopes[this.scopes.length - 1]?.isMemo ?? false + } + + protected currentScopeName(): string | undefined { + return this.scopes[this.scopes.length - 1]?.name + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/diagnostics/ToArrayVisitor.ts b/koala_tools/ui2abc/memo-plugin/src/diagnostics/ToArrayVisitor.ts new file mode 100644 index 0000000000000000000000000000000000000000..270caa5fec132e53dc5e9d44c5d8ba6d81c0d755 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/diagnostics/ToArrayVisitor.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2024 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 * as arkts from "@koalaui/libarkts" + +class ToArrayVisitor extends arkts.AbstractVisitor { + nodes: arkts.AstNode[] = [] + + visitor(node: arkts.AstNode): arkts.AstNode { + this.nodes.push(node) + return this.visitEachChild(node) + } +} + +export function toArray(node: arkts.AstNode): arkts.AstNode[] { + const visitor = new ToArrayVisitor() + visitor.visitor(node) + return visitor.nodes +} diff --git a/koala_tools/ui2abc/memo-plugin/src/entry.ts b/koala_tools/ui2abc/memo-plugin/src/entry.ts new file mode 100644 index 0000000000000000000000000000000000000000..9f8252848270206799e20fe746d2e22c641fafef --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/entry.ts @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import checkedTransformer from "./MemoTransformer" +import parsedTransformer from "./ParserTransformer" + +export function init(parsedJson?: Object, checkedJson?: Object) { + let pluginContext = new arkts.PluginContextImpl() + const parsedHooks = new arkts.DumpingHooks(arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED, "memo") + const checkedHooks = new arkts.DumpingHooks(arkts.Es2pandaContextState.ES2PANDA_STATE_CHECKED, "memo") + return { + name: "memo", + parsed(hooks: arkts.RunTransformerHooks = parsedHooks) { + arkts.Tracer.pushContext('memo-plugin') + arkts.traceGlobal(() => "Run parsed state plugin", true) + const transform = parsedTransformer(parsedJson) + const prog = arkts.arktsGlobal.compilerContext!.program + const state = arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED + try { + arkts.runTransformer(prog, state, transform, pluginContext, hooks) + arkts.Tracer.popContext() + } catch(e) { + console.trace(e) + throw e + } + }, + checked(hooks: arkts.RunTransformerHooks = checkedHooks) { + arkts.Tracer.pushContext('memo-plugin') + arkts.traceGlobal(() => "Run checked state plugin", true) + const transform = checkedTransformer(checkedJson) + const prog = arkts.arktsGlobal.compilerContext!.program + const state = arkts.Es2pandaContextState.ES2PANDA_STATE_CHECKED + try { + arkts.runTransformer(prog, state, transform, pluginContext, hooks) + arkts.recheckSubtree(prog.ast) + arkts.Tracer.popContext() + } catch(e) { + console.trace(e) + throw e + } + }, + clean() { + arkts.Tracer.pushContext('memo-plugin') + arkts.traceGlobal(() => "Clean", true) + arkts.Tracer.popContext() + pluginContext = new arkts.PluginContextImpl() + } + } +} diff --git a/koala_tools/ui2abc/memo-plugin/src/utils.ts b/koala_tools/ui2abc/memo-plugin/src/utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..1a1828cace55c53856e6216c34ed07a619273fc3 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/src/utils.ts @@ -0,0 +1,295 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { UniqueId } from "@koalaui/common" +import * as arkts from "@koalaui/libarkts" +import * as fs from "node:fs" +import * as path from "node:path" +import { + correctFunctionParamType, + correctObjectExpression, + isMemo, + isMemoAllowedType, + isMemoAnnotatableType, + MemoAllowedType, + MemoAnnotatable, + MemoSkipAnnotatable, + MemoStableAnnotatable +} from "./api-utils" +import { getDecl } from "@koalaui/libarkts" + +export enum RuntimeNames { + __CONTEXT = "__context", + __ID = "__id", + __KEY = "__key", + ANNOTATION = "memo", + ANNOTATION_ENTRY = "memo_entry", + ANNOTATION_INTRINSIC = "memo_intrinsic", + ANNOTATION_SKIP = "memo_skip", + ANNOTATION_STABLE = "memo_stable", + ANNOTATION_WRAP = "memo_wrap", + COMPUTE = "compute", + CONTENT = "content", + CONTEXT = "__memo_context", + CONTEXT_TYPE = "__memo_context_type", + GENSYM = "gensym%%_", + HASH = "__hash", + ID = "__memo_id", + ID_TYPE = "__memo_id_type", + INTERNAL_PARAMETER_STATE = "param", + INTERNAL_SCOPE = "scope", + INTERNAL_VALUE = "cached", + INTERNAL_VALUE_NEW = "recache", + INTERNAL_VALUE_OK = "unchanged", + PARAMETER = "__memo_parameter", + SCOPE = "__memo_scope", + THIS = "this", + VALUE = "value", +} + +export enum DebugNames { + BANNER_PARAMETER = "[MEMO PARAMETER DEBUG]", + BANNER_UNCHANGED = "[MEMO UNCHANGED DEBUG]", + CONSOLE = "console", + LOG = "log", +} + +export class PositionalIdTracker { + // Global for the whole program. + static callCount: number = 0 + + // Set `stable` to true if you want to have more predictable values. + // For example for tests. + // Don't use it in production! + constructor(public filename: string, public stableForTests: boolean = false) { + if (stableForTests) PositionalIdTracker.callCount = 0 + } + + sha1Id(callName: string, fileName: string): string { + const uniqId = new UniqueId() + uniqId.addString("memo call uniqid") + uniqId.addString(fileName) + uniqId.addString(callName) + uniqId.addI32(PositionalIdTracker.callCount++) + return uniqId.compute().substring(0, 7) + } + + stringId(callName: string, fileName: string): string { + if (this.stableForTests) { + return `id_${callName}_${fileName}` + } + return `${PositionalIdTracker.callCount++}_${callName}_${fileName}` + } + + id(callName: string = ""): arkts.Expression { + + const positionId = (this.stableForTests) ? + this.stringId(callName, this.filename) : + this.sha1Id(callName, this.filename) + + + return this.stableForTests + ? arkts.factory.createCallExpression( + arkts.factory.createIdentifier(RuntimeNames.HASH), + [arkts.factory.createStringLiteral(positionId)], + undefined, + false, + false, + undefined + ) + : arkts.factory.createNumberLiteral(parseInt(positionId, 16)) + } +} + +export enum MemoFunctionKind { + NONE = 0, + MEMO = 1, + INTRINSIC = 2, + ENTRY = 4, +} + +function hasMemoAnnotation(node: MemoAnnotatable) { + return node.annotations.some((it) => + it.expr !== undefined && arkts.isIdentifier(it.expr) && it.expr.name === RuntimeNames.ANNOTATION + ) +} + +function hasMemoEntryAnnotation(node: MemoAnnotatable) { + return node.annotations.some((it) => + it.expr !== undefined && arkts.isIdentifier(it.expr) && it.expr.name === RuntimeNames.ANNOTATION_ENTRY + ) +} + +function hasMemoIntrinsicAnnotation(node: MemoAnnotatable) { + return node.annotations.some((it) => + it.expr !== undefined && arkts.isIdentifier(it.expr) && it.expr.name === RuntimeNames.ANNOTATION_INTRINSIC + ) +} + +function hasMemoSkipAnnotation(node: MemoSkipAnnotatable) { + return node.annotations.some((it) => + it.expr !== undefined && arkts.isIdentifier(it.expr) && it.expr.name === RuntimeNames.ANNOTATION_SKIP + ) +} + +export function hasMemoStableAnnotation(node: MemoStableAnnotatable) { + return node.annotations.some((it) => + it.expr !== undefined && arkts.isIdentifier(it.expr) && it.expr.name === RuntimeNames.ANNOTATION_STABLE + ) +} + +export function hasWrapAnnotation(node: arkts.ETSParameterExpression) { + return node.annotations.some((it) => + it.expr !== undefined && arkts.isIdentifier(it.expr) && it.expr.name === RuntimeNames.ANNOTATION_WRAP + ) +} + +export function maskToKind(mask: number): MemoFunctionKind { + switch (mask) { + case 0: + return MemoFunctionKind.NONE + case 1: + return MemoFunctionKind.MEMO + case 2: + return MemoFunctionKind.INTRINSIC + case 4: + return MemoFunctionKind.ENTRY + default: + console.error(`Conflicting @memo annotations are not allowed`) + throw new Error(`Invalid @memo usage`) + } +} + +export function getMemoFunctionKind(node: MemoAnnotatable): MemoFunctionKind { + const mask = (+hasMemoEntryAnnotation(node) << 2) + (+hasMemoIntrinsicAnnotation(node) << 1) + (+hasMemoAnnotation(node)) + return maskToKind(mask) +} + +export function getMemoTypeKind(node: MemoAllowedType): MemoFunctionKind { + if (arkts.isETSFunctionType(node)) { + return getMemoFunctionKind(node) + } + if (arkts.isETSUnionType(node)) { + const directKind = getMemoFunctionKind(node) + const childKinds = node.types.map(it => isMemoAllowedType(it) ? getMemoTypeKind(it) : MemoFunctionKind.NONE) + const mask = childKinds.reduce((prev: number, cur: number) => prev | cur, directKind) + return maskToKind(mask) + } + if (arkts.isETSTypeReference(node)) { + const name = node.part?.name + if (!name) { + return MemoFunctionKind.NONE + } + const decl = getDeclResolveGensym(name) + if (!arkts.isTSTypeAliasDeclaration(decl)) { + return MemoFunctionKind.NONE + } + const directKind = getMemoFunctionKind(decl) + const typeKind = isMemoAllowedType(decl.typeAnnotation) ? getMemoTypeKind(decl.typeAnnotation) : MemoFunctionKind.NONE + return maskToKind(directKind | typeKind) + } + return MemoFunctionKind.NONE +} + +export function getMemoParameterKind(node: arkts.ETSParameterExpression): MemoFunctionKind { + const directKind = getMemoFunctionKind(node) + const typeAnnotation = node.ident?.typeAnnotation + const typeKind = isMemoAllowedType(typeAnnotation) + ? getMemoTypeKind(typeAnnotation) + : MemoFunctionKind.NONE + return maskToKind(directKind | typeKind) +} + +export function isWrappable(type: arkts.TypeNode | undefined, arg: arkts.Expression) { + return (type && correctFunctionParamType(arg)) || correctObjectExpression(arg) +} + +export function isTrackableParam(node: arkts.ETSParameterExpression, isLast: boolean, trackContentParam: boolean) { + return !hasMemoSkipAnnotation(node) && !(!trackContentParam && isLast && node.ident?.name == RuntimeNames.CONTENT) +} + +export function shouldWrap(param: arkts.ETSParameterExpression, isLastParam: boolean, trackContentParam: boolean, arg: arkts.Expression) { + return (isWrappable(param.typeAnnotation, arg) && isTrackableParam(param, isLastParam, trackContentParam)) || hasWrapAnnotation(param) +} + +function filterGensym(value: string): string { + return value.replaceAll(/gensym%%_[0-9]*/g, "gensym_XXX") +} + +export function dumpAstToFile(node: arkts.AstNode, keepTransformed: string, stableForTests: boolean) { + const relativeFromRoot = path.relative(arkts.global.arktsconfig!.baseUrl, arkts.global.filePath) + const fileName = path.isAbsolute(keepTransformed) ? + path.join(keepTransformed, relativeFromRoot) : path.join(__dirname, keepTransformed, relativeFromRoot) + fs.mkdirSync(path.dirname(fileName), { recursive: true }) + const astDump = node.dumpSrc() + fs.writeFileSync(fileName, stableForTests ? filterGensym(astDump) : astDump ) +} + + +/** + * Checks type node refers to void type + * + * Improve: remove when es2panda API allows to read return type + * @deprecated + */ +export function isVoidType(node: arkts.TypeNode) { + return node.dumpSrc() == "void" +} + +export function isVoidReturn(returnTypeAnnotation: arkts.TypeNode | undefined) { + return !returnTypeAnnotation || isVoidType(returnTypeAnnotation) +} + +export function getDeclResolveGensym(node: arkts.AstNode): arkts.AstNode | undefined { + const decl = arkts.getDecl(node) + if (arkts.isIdentifier(decl) && decl.name.startsWith(RuntimeNames.GENSYM)) { + if (arkts.isVariableDeclarator(decl.parent)) { + if (arkts.isIdentifier(decl.parent.init)) { + return getDeclResolveGensym(decl.parent.init) + } + if (arkts.isMemberExpression(decl.parent.init)) { + return getDeclResolveGensym(decl.parent.init.property!) + } + } + } + return decl +} + +export function moveToFront(arr: T[], idx: number): T[] { + if (idx >= arr.length) { + throw new Error(`Invalid argument, size of array: ${arr.length}, idx: ${idx}`) + } + return [arr[idx], ...arr.slice(0, idx), ...arr.slice(idx + 1)] +} + +export function isMemoCall(node: arkts.AstNode): boolean { + if (!arkts.isCallExpression(node)) return false + if (node.callee === undefined) return false + const decl = getDecl(node.callee) + if (!arkts.isMethodDefinition(decl)) return false + return isMemo(decl) +} + +function isKoalaWorkspace() { + return process.env.KOALA_WORKSPACE == "1" +} + +export function getRuntimePackage(): string { + if (isKoalaWorkspace()) { + return '@koalaui/runtime' + } else { + return 'arkui.stateManagement.runtime' + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/arktsconfig-executable.json b/koala_tools/ui2abc/memo-plugin/test/arktsconfig-executable.json new file mode 100644 index 0000000000000000000000000000000000000000..13d6ad4e858f205a246607d74b2d4cfebcdac7a7 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/arktsconfig-executable.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "package": "@test", + "outDir": "../build", + "baseUrl": ".", + "paths": { + "@koalaui/common": ["../../../incremental/common/src"], + "@koalaui/compat": ["../../../incremental/compat/src/arkts"], + "@koalaui/harness": ["../../../incremental/harness/src/arkts"], + "@koalaui/runtime": ["../../../incremental/runtime/src"], + "@koalaui/runtime/annotations": ["../../../incremental/runtime/annotations"] + }, + "plugins": [ + { + "transform": "@koalaui/memo-plugin", + "state": "parsed", + "name": "memo" + }, + { + "transform": "@koalaui/memo-plugin", + "state": "checked", + "name": "memo" + } + ] + }, + "include": [ + "./ets/**/*.ts" + ], + "exclude": [ + "./ets/diagnostics-input/**" + ] +} diff --git a/koala_tools/ui2abc/memo-plugin/test/arktsconfig-rewrite-other.json b/koala_tools/ui2abc/memo-plugin/test/arktsconfig-rewrite-other.json new file mode 100644 index 0000000000000000000000000000000000000000..93930ca32204c7a8c459f1b4e16f1ed7c05b4bd4 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/arktsconfig-rewrite-other.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "package": "@test", + "outDir": "../build/golden", + "baseUrl": ".", + "paths": { + "@koalaui/compat": [ "../../../incremental/compat/src/arkts" ], + "#platform": [ "../../../incremental/compat/src/arkts" ], + "@koalaui/common": [ "../../../incremental/common/src" ], + "@koalaui/runtime": [ "../../../incremental/runtime/ets" ], + "@koalaui/runtime/annotations": [ "../../../incremental/runtime/annotations" ] + }, + "plugins": [ + { + "transform": "..", + "state": "parsed", + "stableForTests": true + }, + { + "transform": "..", + "state": "checked", + "keepTransformed": "../test/out", + "stableForTests": true + } + ] + }, + "include": ["./input/other.ets"] +} diff --git a/koala_tools/ui2abc/memo-plugin/test/arktsconfig-rewrite.json b/koala_tools/ui2abc/memo-plugin/test/arktsconfig-rewrite.json new file mode 100644 index 0000000000000000000000000000000000000000..751108c074fb2dd704e07624e2d1459e1f6eb5a9 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/arktsconfig-rewrite.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "package": "@test", + "outDir": "../build/golden", + "baseUrl": ".", + "paths": { + "@koalaui/compat": [ "../../../incremental/compat/src/arkts" ], + "#platform": [ "../../../incremental/compat/src/arkts" ], + "@koalaui/common": [ "../../../incremental/common/src" ], + "@koalaui/runtime": [ "../../../incremental/runtime/ets" ], + "@koalaui/runtime/annotations": [ "../../../incremental/runtime/annotations" ] + }, + "plugins": [ + { + "transform": "..", + "state": "parsed", + "stableForTests": true + }, + { + "transform": "..", + "state": "checked", + "keepTransformed": "../test/out", + "stableForTests": true + } + ] + }, + "include": ["./input/**/*.ets"] +} diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/diagnostics.test.ts b/koala_tools/ui2abc/memo-plugin/test/diagnostics/diagnostics.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..8d5f1d0862e5bd9dd816ea2a1a6f9c68d630bf74 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/diagnostics.test.ts @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { assert } from "@koalaui/harness" +import * as child from "child_process" +import * as path from "path" + +function runCompiler(file: string) { + return child.spawnSync("../../incremental/tools/panda/arkts/ui2abc", [ + "--arktsconfig", path.resolve(path.join("test", "arktsconfig-rewrite.json")), + "--output", path.resolve(path.join("test/build/abc", file.replace(/\.ets$/, ".abc"))), + path.join("test", "diagnostics", "input", file), + ]) +} + +function diagnostics(name: string, file: string, message: string) { + test(name, () => { + const result = runCompiler(file) + const out = result.stdout.toString() + "\n" + result.stderr.toString() + if (!out.includes(message)) + console.error(out) + assert.include(out, message) + }).timeout(30000); +} + +function noDiagnostics(name: string, file: string, message: string) { + test(name, () => { + const result = runCompiler(file) + const out = result.stdout.toString() + "\n" + result.stderr.toString() + if (out.includes(message)) + console.error(out) + assert.notInclude(out, message) + }).timeout(30000); +} + +const isPandaIssue26911Fixed = false +if (isPandaIssue26911Fixed) { + suite("Smoke", () => { + diagnostics( + "smoke", + "smoke.ets", + `SyntaxError: Unexpected token 'syntax'.` + ) + }) +} + +suite("@memo function out of memo context", () => { + diagnostics( + "Global memo call", + "global-memo-call.ets", + `Calling @memo function foo from non-@memo context ` + ) + diagnostics( + "Memo in handler", + "memo-in-handler.ets", + `Calling @memo function foo from non-@memo anonymous context` + ) + diagnostics( + "Memo in inner function", + "memo-in-inner-function.ets", + `Calling @memo function foo from non-@memo anonymous context` + ) + noDiagnostics( + "Memo with @memo:entry", + "memo-entry.ets", + `Calling @memo function` + ) + diagnostics( + "Memo in non-memo stack", + "no-memo-entry.ets", + `Calling @memo function foo from non-@memo context bar` + ) +}) + +suite("Parameter with @memo initializer", () => { + noDiagnostics( + "Default non-memo argument", + "default-non-memo-argument.ets", + "Can not call @memo function at parameter default value expression. Parameter: x" + ) + diagnostics( + "Default memo argument", + "default-memo-argument.ets", + `Can not call @memo function at parameter default value expression. Parameter: x` + ) + diagnostics( + "Default complex memo argument", + "default-complex-memo-argument.ets", + "Can not call @memo function at parameter default value expression. Parameter: x" + ) + diagnostics( + "Default memo argument at arrow function definition", + "arrow-default-memo-argument.ets", + "Can not call @memo function at parameter default value expression. Parameter: x" + ) + noDiagnostics( + "Default non-memo argument at arrow function definition", + "arrow-default-non-memo-argument.ets", + "Can not call @memo function at parameter default value expression. Parameter: x" + ) +}) + +suite.skip("@memo function missing return type", () => { + diagnostics( + "Function", + "missing-type-function.ets", + "@memo foo must have its return type explicitly specified" + ) + diagnostics( + "Arrow function", + "missing-type-arrow-function.ets", + "@memo anonymous function must have its return type explicitly specified" + ) + diagnostics( + "Method", + "missing-type-method.ets", + "@memo foo must have its return type explicitly specified" + ) + noDiagnostics( + "Correct functions", + "correctly-typed-functions.ets", + "must have its return type explicitly specified" + ) +}) + +suite("@memo function parameter reassignment", () => { + diagnostics( + "@memo function parameter reassignment", + "memo-parameter-reassignment.ets", + "@memo function parameter reassignment is forbidden: parameter yyy at function foo" + ) + noDiagnostics( + "non-@memo function parameter reassignment", + "non-memo-parameter-reassignment.ets", + "reassignment is forbidden" + ) +}) \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/arrow-default-memo-argument.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/arrow-default-memo-argument.ets new file mode 100644 index 0000000000000000000000000000000000000000..7d8f0ca506334b30b87db6e30fec4b4c33f0a959 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/arrow-default-memo-argument.ets @@ -0,0 +1,22 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +@memo function bar(): number { + return 0.0 +} + +const x = (x: number = bar()) => {} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/arrow-default-non-memo-argument.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/arrow-default-non-memo-argument.ets new file mode 100644 index 0000000000000000000000000000000000000000..a8e657bec4f7130b93a0e9095f726553327c3e77 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/arrow-default-non-memo-argument.ets @@ -0,0 +1,20 @@ +/* + * 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. + */ + +function bar(): number { + return 0.0 +} + +const x = @memo (x: number = bar()) => {} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/correctly-typed-functions.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/correctly-typed-functions.ets new file mode 100644 index 0000000000000000000000000000000000000000..4cca267f3bc732976179a6a108dbd2a0470240cb --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/correctly-typed-functions.ets @@ -0,0 +1,30 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +export class C { + @memo protected foo(): (): void => void { + return (): void => {} + } +} + +const x = @memo (): string => { + return "string" +} + +@memo function foo(): Double { + return 1.0 +} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/default-complex-memo-argument.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/default-complex-memo-argument.ets new file mode 100644 index 0000000000000000000000000000000000000000..8fb92f9f32d535d5b28142f845ad7b5895ab5ceb --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/default-complex-memo-argument.ets @@ -0,0 +1,22 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +@memo function bar(): number { + return 0.0 +} + +@memo function foo(x: number = 1+2*bar()^3) {} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/default-memo-argument.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/default-memo-argument.ets new file mode 100644 index 0000000000000000000000000000000000000000..ac3d3861b767392a603124b000d9fa4c342e37cc --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/default-memo-argument.ets @@ -0,0 +1,22 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +@memo function bar(): number { + return 1.0 +} + +@memo function foo(x: number = bar()) {} diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/default-non-memo-argument.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/default-non-memo-argument.ets new file mode 100644 index 0000000000000000000000000000000000000000..72b23afc529db491f87e15b09a00b10c766e58b5 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/default-non-memo-argument.ets @@ -0,0 +1,22 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +function bar(): number { + return 1.0 +} + +@memo function foo(x: number = bar()) {} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/global-memo-call.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/global-memo-call.ets new file mode 100644 index 0000000000000000000000000000000000000000..77a4fa0305643016a7ca5b5c1689be9b2fea8c54 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/global-memo-call.ets @@ -0,0 +1,19 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +@memo function foo(x: string = "asd") { } +foo() diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-entry.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-entry.ets new file mode 100644 index 0000000000000000000000000000000000000000..89fd72c86c328ff17f451183f6aba6fc28cb55c8 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-entry.ets @@ -0,0 +1,24 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +@memo +function foo() { } + +@memo_entry +function bar() { + foo() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-in-handler.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-in-handler.ets new file mode 100644 index 0000000000000000000000000000000000000000..65b8f0213d5f14a442fbde6fae9ecfcc6af8dcac --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-in-handler.ets @@ -0,0 +1,26 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +@memo +function foo() { } + +@memo +function bar() { + const x = () => { + foo() + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-in-inner-function.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-in-inner-function.ets new file mode 100644 index 0000000000000000000000000000000000000000..d543f3ac472829d068a0bf74a583cd96b96300c5 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-in-inner-function.ets @@ -0,0 +1,26 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +@memo +function foo() { } + +@memo +function bar() { + const qux = () => { + foo() + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-parameter-reassignment.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-parameter-reassignment.ets new file mode 100644 index 0000000000000000000000000000000000000000..801e7c656082263b028755a2fd98e7dc569f5cf0 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/memo-parameter-reassignment.ets @@ -0,0 +1,20 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +@memo function foo(yyy: number) { + yyy = 4.0 +} diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/missing-type-arrow-function.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/missing-type-arrow-function.ets new file mode 100644 index 0000000000000000000000000000000000000000..f106f36da5415891fb94bb5dc3fad5583ac0278a --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/missing-type-arrow-function.ets @@ -0,0 +1,25 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +class C { + public x: number + constructor(x: number) { + this.x = x + } +} + +const x = @memo () => new C(1.0) diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/missing-type-function.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/missing-type-function.ets new file mode 100644 index 0000000000000000000000000000000000000000..1472e453c149f6919abb50b21e49f4a6983810b0 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/missing-type-function.ets @@ -0,0 +1,27 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +class C { + public x: number + constructor(x: number) { + this.x = x + } +} + +@memo function foo() { + return new C(1.0) +} diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/missing-type-method.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/missing-type-method.ets new file mode 100644 index 0000000000000000000000000000000000000000..169e762a12504194101a9685aa85bc855289c926 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/missing-type-method.ets @@ -0,0 +1,29 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +class Cstr { + public x: string + constructor(x: string) { + this.x = x + } +} + +export class C { + @memo protected foo() { + return new Cstr("string") + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/no-memo-entry.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/no-memo-entry.ets new file mode 100644 index 0000000000000000000000000000000000000000..76c782d51d461da55923ea0ee653b26c802ccdcf --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/no-memo-entry.ets @@ -0,0 +1,23 @@ +/* + * 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 { memo, memo_intrinsic, memo_entry, memo_stable, memo_skip } from "@koalaui/runtime/annotations" + +@memo +function foo() { } + +function bar() { + foo() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/non-memo-parameter-reassignment.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/non-memo-parameter-reassignment.ets new file mode 100644 index 0000000000000000000000000000000000000000..697a9064039ec957d6e39f858f6615419a381976 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/non-memo-parameter-reassignment.ets @@ -0,0 +1,18 @@ +/* + * 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. + */ + +function foo(yyy: number) { + yyy = 4.0 +} diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/smoke.ets b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/smoke.ets new file mode 100644 index 0000000000000000000000000000000000000000..797d4d30f2d8b4f099512925cadae88c40d1a815 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/smoke.ets @@ -0,0 +1,16 @@ +/* + * 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. + */ + +bad syntax here \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/state.ts b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/state.ts new file mode 100644 index 0000000000000000000000000000000000000000..1f2f19a5254fa75e29d665fe7255b05179c230b0 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/diagnostics/input/state.ts @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2022-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. + */ + +export interface State { + /** + * If state was modified since last UI computations. + */ + readonly modified: boolean + /** + * Current value of the state. + * State value doesn't change during memo code execution. + */ + readonly value: Value +} + +export interface MutableState extends State { + /** + * Current value of the state as a mutable value. + * You should not change state value from a memo code. + * State value doesn't change during memo code execution. + * In the event handlers and other non-memo code + * a changed value is immediately visible. + */ + value: Value +} + +export function mutableState(value: T): MutableState { + return { value, modified: false } +} + + +interface I { + s: string +} + +class Impl { + s = " asd" +} + +export function provideI(): I { + return new Impl() +} \ No newline at end of file diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/abstract.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/abstract.ets new file mode 100644 index 0000000000000000000000000000000000000000..022466b1a2380425fd41129f1c62765e7faa2967 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/abstract.ets @@ -0,0 +1,35 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +declare abstract class A { + @memo() public x(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void + + public test_signature(@memo() arg1: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void), @memo() arg2: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined), @memo() arg3: ((((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined) | (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> int) | undefined)), @memo() x: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, y: ((z: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void))=> void))=> void)): @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) + + public constructor() {} + +} + +class AA extends A { + @memo() public x(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_x_abstract.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/arrow-assignment.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/arrow-assignment.ets new file mode 100644 index 0000000000000000000000000000000000000000..c8b8cd647d1dd0901349ef6fb4ec500441e10284 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/arrow-assignment.ets @@ -0,0 +1,50 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public memo_variables(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_variables_arrow-assignment.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + @memo() const f = ((__memo_context: __memo_context_type, __memo_id: __memo_id_type): number => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__arrow-assignment.ets"))), 0); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(123); + }), g = ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number): number => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__arrow-assignment.ets"))), 1); + const __memo_parameter_x = __memo_scope.param(0, x); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(((123) + (__memo_parameter_x.value))); + }); + const h = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type): number => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__arrow-assignment.ets"))), 0); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(1); + }); + f(__memo_context, ((__memo_id) + (__hash("id_f_arrow-assignment.ets")))); + g(__memo_context, ((__memo_id) + (__hash("id_g_arrow-assignment.ets"))), 1); + h(__memo_context, ((__memo_id) + (__hash("id_h_arrow-assignment.ets")))); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/arrow.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/arrow.ets new file mode 100644 index 0000000000000000000000000000000000000000..d18fa11fb75f9a5ec0687281a261289f36b82bf2 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/arrow.ets @@ -0,0 +1,27 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + public memo_lambda() { + @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__arrow.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + }); + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/call-type.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/call-type.ets new file mode 100644 index 0000000000000000000000000000000000000000..bb62ebd577da11ee1e36a3e62746f30453695530 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/call-type.ets @@ -0,0 +1,29 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +type MemoType = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void); + +class Test { + @memo() public type_alias(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: MemoType) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_type_alias_call-type.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_parameter_arg.value(__memo_context, ((__memo_id) + (__hash("id_arg_call-type.ets")))); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/compute.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/compute.ets new file mode 100644 index 0000000000000000000000000000000000000000..e140b1dfbd0ba4cf93b098883ff62ff2dddf2ab6 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/compute.ets @@ -0,0 +1,60 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public compute_test(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() arg1: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined), arg2: ((()=> void) | undefined), content: ((()=> void) | undefined)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_compute_test_compute.ets"))), 3); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg1 = __memo_scope.param(1, arg1), __memo_parameter_arg2 = __memo_scope.param(2, arg2); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + +class Use { + @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_compute.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + const test = new Test(); + test.compute_test(__memo_context, ((__memo_id) + (__hash("id_compute_test_compute.ets"))), __memo_context.compute(((__memo_id) + (__hash("id_compute_test_compute.ets"))), ((): ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) => { + return ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__compute.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + }); + })), __memo_context.compute(((__memo_id) + (__hash("id_compute_test_compute.ets"))), ((): (()=> void) => { + return (() => {}); + })), (() => {})); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/content-usage.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/content-usage.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ece90a35485d817813b3c0d123168b592fd835c --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/content-usage.ets @@ -0,0 +1,27 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public memo_content(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() content: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_content_content-usage.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + content(__memo_context, ((__memo_id) + (__hash("id_content_content-usage.ets")))); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/entry.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/entry.ets new file mode 100644 index 0000000000000000000000000000000000000000..0296fc4745cceded7b3ed33573520623f1f3312d --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/entry.ets @@ -0,0 +1,29 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo, memo_entry as memo_entry } from "@koalaui/runtime/annotations"; + +import { __context as __context, __id as __id, __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type } from "@koalaui/runtime"; + +function main() {} + + +class Test { + @memo_entry() public memoEntry(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() entry: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> R)): R { + const getContext = (() => { + return __memo_context; + }); + const getId = (() => { + return __memo_id; + }); + { + const __memo_context = getContext(); + const __memo_id = getId(); + return entry(__memo_context, ((__memo_id) + (__hash("id_entry_entry.ets")))); + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/implicit-void-method.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/implicit-void-method.ets new file mode 100644 index 0000000000000000000000000000000000000000..29204a7954c9a01d4d6250172436e783e0639611 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/implicit-void-method.ets @@ -0,0 +1,26 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public a_method_with_implicit_return_type(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_a_method_with_implicit_return_type_implicit-void-method.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/instantiate.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/instantiate.ets new file mode 100644 index 0000000000000000000000000000000000000000..c7118c42a77833a82dd0832c8be18916d8b60a0d --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/instantiate.ets @@ -0,0 +1,31 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class C { + @memo() public static $_instantiate(__memo_context: __memo_context_type, __memo_id: __memo_id_type, factory: (()=> C)): C { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_$_instantiate_instantiate.ets"))), 1); + const __memo_parameter_factory = __memo_scope.param(0, factory); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(__memo_parameter_factory.value()); + } + + public constructor() {} + +} + +class D { + public static $_instantiate(factory: (()=> D), @memo() content?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): D { + return factory(); + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/internal-call.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/internal-call.ets new file mode 100644 index 0000000000000000000000000000000000000000..e4ae05d040f5e2706091e7779254f7b023426f68 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/internal-call.ets @@ -0,0 +1,40 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public void_method(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_void_method_internal-call.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + @memo() public internal_call(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_internal_call_internal-call.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_parameter_this.value.void_method(__memo_context, ((__memo_id) + (__hash("id_void_method_internal-call.ets")))); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/internals.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/internals.ets new file mode 100644 index 0000000000000000000000000000000000000000..168406678140bb56e0458dca5b965952692d12ee --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/internals.ets @@ -0,0 +1,30 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +import { __context as __context, __id as __id } from "@koalaui/runtime"; + +function main() {} + + +class Test { + @memo() public method_with_internals(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_method_with_internals_internals.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_context; + __memo_id; + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/intrinsic-call.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/intrinsic-call.ets new file mode 100644 index 0000000000000000000000000000000000000000..89b3624df0c02c2c17ee0cf83ba591a8558db7ef --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/intrinsic-call.ets @@ -0,0 +1,31 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo, memo_intrinsic as memo_intrinsic } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public void_method(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_void_method_intrinsic-call.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + @memo_intrinsic() public intrinsic_method_with_this(__memo_context: __memo_context_type, __memo_id: __memo_id_type): int { + this.void_method(__memo_context, ((__memo_id) + (__hash("id_void_method_intrinsic-call.ets")))); + return 0; + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/intrinsic.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/intrinsic.ets new file mode 100644 index 0000000000000000000000000000000000000000..5671c4fd60ae29c552eddc802d9f7518d229edd5 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/intrinsic.ets @@ -0,0 +1,17 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo_intrinsic as memo_intrinsic } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo_intrinsic() public intrinsic_method(__memo_context: __memo_context_type, __memo_id: __memo_id_type): int { + return 0; + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/invoke-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/invoke-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..ae76ad3b0f5b320f35be5be26a1640fddeba913f --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/invoke-param.ets @@ -0,0 +1,15 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class B { + public static $_invoke(@memo() p?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void {} + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/invoke.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/invoke.ets new file mode 100644 index 0000000000000000000000000000000000000000..b9d48d4366923218b6c3284a6d04e7aa344b9f49 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/invoke.ets @@ -0,0 +1,25 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class A { + @memo() public static $_invoke(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_$_invoke_invoke.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property-optional.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property-optional.ets new file mode 100644 index 0000000000000000000000000000000000000000..d965719792447192cdc0e204d133e45e687bd57e --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property-optional.ets @@ -0,0 +1,15 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +interface A { + @memo() set memo_optional_arg(memo_optional_arg: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined)) + + @memo() get memo_optional_arg(): (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined) + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property-type.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property-type.ets new file mode 100644 index 0000000000000000000000000000000000000000..c7e48a37f790938d90818df0dfce7048ec6ef5cf --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property-type.ets @@ -0,0 +1,15 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +interface A { + set arg_memo_type(arg_memo_type: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) + + get arg_memo_type(): @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property-union-type.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property-union-type.ets new file mode 100644 index 0000000000000000000000000000000000000000..28b299e649cfee519943663eb93e60ab70d62fb7 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property-union-type.ets @@ -0,0 +1,15 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +interface A { + @memo() set memo_union_arg(memo_union_arg: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined)) + + @memo() get memo_union_arg(): (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined) + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property.ets new file mode 100644 index 0000000000000000000000000000000000000000..be094cd47df9356862127c9ca1d879965fef4cda --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-interface-property.ets @@ -0,0 +1,15 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +interface A { + @memo() set memo_arg(memo_arg: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) + + @memo() get memo_arg(): ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property-optional.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property-optional.ets new file mode 100644 index 0000000000000000000000000000000000000000..d2fd1bc3a3146b539e0b6a8433f6ab760860ddfb --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property-optional.ets @@ -0,0 +1,15 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class A { + @memo() public memo_optional_arg?: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined); + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property-type.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property-type.ets new file mode 100644 index 0000000000000000000000000000000000000000..0a0b255622d44e60827915f026add4c33019b50e --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property-type.ets @@ -0,0 +1,31 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class A { + public arg_memo_type: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void); + + public constructor() { + this.arg_memo_type = (() => {}); + } + + @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_build_memo-property-type.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_parameter_this.value.arg_memo_type(__memo_context, ((__memo_id) + (__hash("id_arg_memo_type_memo-property-type.ets")))); + { + __memo_scope.recache(); + return; + } + } + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property-union-type.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property-union-type.ets new file mode 100644 index 0000000000000000000000000000000000000000..f55aaf094af210f925bfebf434a6d047af672602 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property-union-type.ets @@ -0,0 +1,25 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class A { + @memo() public memo_union_arg: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined) = ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__memo-property-union-type.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + }); + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd40bec5837ae251ac5287566fb0e118b8145519 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/memo-property.ets @@ -0,0 +1,31 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class A { + @memo() public memo_arg: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void); + + public constructor() { + this.memo_arg = (() => {}); + } + + @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_build_memo-property.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_parameter_this.value.memo_arg(__memo_context, ((__memo_id) + (__hash("id_memo_arg_memo-property.ets")))); + { + __memo_scope.recache(); + return; + } + } + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/non-memo-interface-property.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/non-memo-interface-property.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a4acf77b72fa6f76fd2500d13f81a73c93b5be4 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/non-memo-interface-property.ets @@ -0,0 +1,15 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +interface A { + set arg(arg: (()=> void)) + + get arg(): (()=> void) + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/non-memo-property.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/non-memo-property.ets new file mode 100644 index 0000000000000000000000000000000000000000..f6bab57e89f1e49fe5281fce3db14eae9c086791 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/non-memo-property.ets @@ -0,0 +1,31 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class A { + public arg: (()=> void); + + public constructor() { + this.arg = (() => {}); + } + + @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_build_non-memo-property.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_parameter_this.value.arg(); + { + __memo_scope.recache(); + return; + } + } + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/object-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/object-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e5b70019a575926ab563fd8c50ca7d42185f6cc --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/object-param.ets @@ -0,0 +1,60 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class A { + public x: int; + + public y: int; + + public constructor() {} + +} + +class Test { + @memo() public obj_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: A) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_obj_arg_object-param.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + +class Use { + @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_object-param.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + const test = new Test(); + test.obj_arg(__memo_context, ((__memo_id) + (__hash("id_obj_arg_object-param.ets"))), __memo_context.compute(((__memo_id) + (__hash("id_obj_arg_object-param.ets"))), ((): A => { + return { + x: 1, + y: 2, + }; + }))); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/param-calls-optional.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/param-calls-optional.ets new file mode 100644 index 0000000000000000000000000000000000000000..e423701033f26d10819b0a2df2de56326ab8709c --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/param-calls-optional.ets @@ -0,0 +1,30 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public optional_args(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg1?: int, arg2?: (()=> int)) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_optional_args_param-calls-optional.ets"))), 3); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg1 = __memo_scope.param(1, arg1), __memo_parameter_arg2 = __memo_scope.param(2, arg2); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + console.log(__memo_parameter_arg1.value); + console.log(__memo_parameter_arg2.value); + console.log(({let gensym_XXX = __memo_parameter_arg2.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX())})); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/param-calls.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/param-calls.ets new file mode 100644 index 0000000000000000000000000000000000000000..89c435a3b0b55ae33592ebe91a483fb8d5c3e00c --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/param-calls.ets @@ -0,0 +1,33 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public args_with_default_values(__memo_context: __memo_context_type, __memo_id: __memo_id_type, gensym_XXX?: int, gensym_XXX?: (()=> int), gensym_XXX?: int, arg4?: int): void { + let arg1: int = (((gensym_XXX) !== (undefined)) ? gensym_XXX : (10 as int)); + let arg2: (()=> int) = (((gensym_XXX) !== (undefined)) ? gensym_XXX : ((() => { + return 20; + }) as (()=> int))); + let arg3: int = (((gensym_XXX) !== (undefined)) ? gensym_XXX : (arg1 as int)); + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_args_with_default_values_param-calls.ets"))), 5); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg1 = __memo_scope.param(1, arg1), __memo_parameter_arg2 = __memo_scope.param(2, arg2), __memo_parameter_arg3 = __memo_scope.param(3, arg3), __memo_parameter_arg4 = __memo_scope.param(4, arg4); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + console.log(__memo_parameter_arg1.value, __memo_parameter_arg2.value, __memo_parameter_arg3.value, __memo_parameter_arg4.value); + console.log(__memo_parameter_arg2.value()); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/property-constructor.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/property-constructor.ets new file mode 100644 index 0000000000000000000000000000000000000000..9129ca487ce4618dbd11459c4fb1ed09904a86cc --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/property-constructor.ets @@ -0,0 +1,44 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +interface A { + @memo() set a(a: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) + + @memo() get a(): ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) + +} + +class AA { + @memo() public a: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined); + + constructor() { + this(undefined); + } + + public constructor(arg: (A | undefined)) { + this.a = ({let gensym_XXX = arg; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX.a)}); + } + + @memo() public build(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_build_property-constructor.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + ({let gensym_XXX = __memo_parameter_this.value.a; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_context, ((__memo_id) + (__hash("id_a_property-constructor.ets")))))}); + { + __memo_scope.recache(); + return; + } + } + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/static-void-method.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/static-void-method.ets new file mode 100644 index 0000000000000000000000000000000000000000..ad10376ee9272d1e74138bd6098f892a4722067a --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/static-void-method.ets @@ -0,0 +1,45 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public static static_method_with_type_parameter(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: T): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_static_method_with_type_parameter_static-void-method.ets"))), 1); + const __memo_parameter_arg = __memo_scope.param(0, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + +class Use { + @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_static-void-method.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + Test.static_method_with_type_parameter(__memo_context, ((__memo_id) + (__hash("id_static_method_with_type_parameter_static-void-method.ets"))), "I'm static"); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/string-compute.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/string-compute.ets new file mode 100644 index 0000000000000000000000000000000000000000..a6eda1c9891ce5f0bacc4ab4e853f1c2a0805544 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/string-compute.ets @@ -0,0 +1,55 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public lambda_arg_with_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() arg: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string)=> string)) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_lambda_arg_with_arg_string-compute.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + +class Use { + @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_string-compute.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + const test = new Test(); + test.lambda_arg_with_arg(__memo_context, ((__memo_id) + (__hash("id_lambda_arg_with_arg_string-compute.ets"))), __memo_context.compute(((__memo_id) + (__hash("id_lambda_arg_with_arg_string-compute.ets"))), ((): ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string)=> string) => { + return ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string): string => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__string-compute.ets"))), 1); + const __memo_parameter_value = __memo_scope.param(0, value); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(__memo_parameter_value.value); + }); + }))); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/string-method.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/string-method.ets new file mode 100644 index 0000000000000000000000000000000000000000..c6f12d20a3fbe09e9978a3b7c50c8c6f42ddeac0 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/string-method.ets @@ -0,0 +1,42 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public string_method_with_return(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: string): string { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_string_method_with_return_string-method.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(__memo_parameter_arg.value); + } + + public constructor() {} + +} + +class Use { + @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_string-method.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + const test = new Test(); + test.string_method_with_return(__memo_context, ((__memo_id) + (__hash("id_string_method_with_return_string-method.ets"))), "a string"); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/type-param-method.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/type-param-method.ets new file mode 100644 index 0000000000000000000000000000000000000000..719450770280059e4d2df4f1550a09fd280ce788 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/type-param-method.ets @@ -0,0 +1,42 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public method_with_type_parameter(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: T): T { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_method_with_type_parameter_type-param-method.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(__memo_parameter_arg.value); + } + + public constructor() {} + +} + +class Use { + @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_type-param-method.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + const test = new Test(); + test.method_with_type_parameter(__memo_context, ((__memo_id) + (__hash("id_method_with_type_parameter_type-param-method.ets"))), "I'm string"); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-compute.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-compute.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa575c89eb9e06fcdd4851142a6e76e1f1546bc8 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-compute.ets @@ -0,0 +1,58 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public lambda_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() arg: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_lambda_arg_void-compute.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + +class Use { + @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_void-compute.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + const test = new Test(); + test.lambda_arg(__memo_context, ((__memo_id) + (__hash("id_lambda_arg_void-compute.ets"))), __memo_context.compute(((__memo_id) + (__hash("id_lambda_arg_void-compute.ets"))), ((): ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) => { + return ((__memo_context: __memo_context_type, __memo_id: __memo_id_type): void => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__void-compute.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + }); + }))); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-method-with-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-method-with-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..399575202d88e406748d8707a41e9bad1bf2eab8 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-method-with-param.ets @@ -0,0 +1,46 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public void_method_with_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: string) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_void_method_with_arg_void-method-with-param.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + +class Use { + @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_void-method-with-param.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + const test = new Test(); + test.void_method_with_arg(__memo_context, ((__memo_id) + (__hash("id_void_method_with_arg_void-method-with-param.ets"))), "an arg"); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-method-with-return.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-method-with-return.ets new file mode 100644 index 0000000000000000000000000000000000000000..01b7638139568628cdf92d8d62f01200d91a08b9 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-method-with-return.ets @@ -0,0 +1,46 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public void_method_with_return(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: string) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_void_method_with_return_void-method-with-return.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + +class Use { + @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_void-method-with-return.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + const test = new Test(); + test.void_method_with_return(__memo_context, ((__memo_id) + (__hash("id_void_method_with_return_void-method-with-return.ets"))), "a value"); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-method.ets b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-method.ets new file mode 100644 index 0000000000000000000000000000000000000000..ed2845963afab7171e2ab205b0824537cfb47b02 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/HQ/void-method.ets @@ -0,0 +1,46 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class Test { + @memo() public void_method(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_void_method_void-method.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + +class Use { + @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_void-method.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + const test = new Test(); + test.void_method(__memo_context, ((__memo_id) + (__hash("id_void_method_void-method.ets")))); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/basic/arrow.ets b/koala_tools/ui2abc/memo-plugin/test/golden/basic/arrow.ets new file mode 100644 index 0000000000000000000000000000000000000000..b52f3e8c1eab8c907ad2cca0207c09907ddfd47c --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/basic/arrow.ets @@ -0,0 +1,8 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/basic/function.ets b/koala_tools/ui2abc/memo-plugin/test/golden/basic/function.ets new file mode 100644 index 0000000000000000000000000000000000000000..19d04bf261aca4bc3a905b8df0301f498268a4e5 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/basic/function.ets @@ -0,0 +1,22 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_function.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } +} + +function non_memo_function(): void {} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/basic/method.ets b/koala_tools/ui2abc/memo-plugin/test/golden/basic/method.ets new file mode 100644 index 0000000000000000000000000000000000000000..d16166fc90efa05437db8362da99d53c7da02767 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/basic/method.ets @@ -0,0 +1,28 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + + +class C { + @memo() public memo_method(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_method_method.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public non_memo_method(): void {} + + public constructor() {} + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/implicit-type/main.ets b/koala_tools/ui2abc/memo-plugin/test/golden/implicit-type/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..6c9fd088a26c277e45668efeb7098b1b7e0e4980 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/implicit-type/main.ets @@ -0,0 +1,18 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +import { function_returning_local_type as function_returning_local_type } from "./test"; + +function main() {} + +@memo() function function_with_implicit_return_type(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_function_with_implicit_return_type_main.ets"))), 0); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(function_returning_local_type(__memo_context, ((__memo_id) + (__hash("id_function_returning_local_type_main.ets"))))); +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/other.ets b/koala_tools/ui2abc/memo-plugin/test/golden/other.ets new file mode 100644 index 0000000000000000000000000000000000000000..1dde3bb7d1cfa2d3eca8ba85194e936a27033104 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/other.ets @@ -0,0 +1,608 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo, memo_stable as memo_stable, memo_intrinsic as memo_intrinsic, memo_entry as memo_entry, memo_wrap as memo_wrap } from "@koalaui/runtime/annotations"; + +import { __context as __context, __id as __id, __key as __key } from "@koalaui/runtime"; + +function main() {} + +@memo() function param_capturing(__memo_context: __memo_context_type, __memo_id: __memo_id_type, s: string) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_param_capturing_other.ets"))), 1); + const __memo_parameter_s = __memo_scope.param(0, s); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + let x = (() => { + console.log(__memo_parameter_s.value); + }); + x(); + let y = ((s: string) => { + console.log(s); + }); + y("she"); + { + __memo_scope.recache(); + return; + } +} + +@memo() function memo_arg_call(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg1: number, arg2: ((x: number)=> number), @memo() arg3: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number)=> number), arg4?: ((x: number)=> number), @memo() arg5?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number)=> number)) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_arg_call_other.ets"))), 5); + const __memo_parameter_arg1 = __memo_scope.param(0, arg1), __memo_parameter_arg2 = __memo_scope.param(1, arg2), __memo_parameter_arg3 = __memo_scope.param(2, arg3), __memo_parameter_arg4 = __memo_scope.param(3, arg4), __memo_parameter_arg5 = __memo_scope.param(4, arg5); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_parameter_arg2.value(__memo_parameter_arg1.value); + __memo_parameter_arg3.value(__memo_context, ((__memo_id) + (__hash("id_arg3_other.ets"))), __memo_parameter_arg1.value); + ({let gensym_XXX = __memo_parameter_arg4.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_parameter_arg1.value))}); + ({let gensym_XXX = __memo_parameter_arg5.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_context, ((__memo_id) + (__hash("id_arg5_other.ets"))), __memo_parameter_arg1.value))}); + { + __memo_scope.recache(); + return; + } +} + +@memo() function call_with_receiver(__memo_context: __memo_context_type, __memo_id: __memo_id_type, obj: A, @memo() v: ((this: A, __memo_context: __memo_context_type, __memo_id: __memo_id_type)=> int)) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_call_with_receiver_other.ets"))), 2); + const __memo_parameter_obj = __memo_scope.param(0, obj), __memo_parameter_v = __memo_scope.param(1, v); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + const x = __memo_parameter_v.value(__memo_parameter_obj.value, __memo_context, ((__memo_id) + (__hash("id_v_other.ets")))); + const y = __memo_parameter_v.value(__memo_parameter_obj.value, __memo_context, ((__memo_id) + (__hash("id_v_other.ets")))); + return __memo_scope.recache(((x) + (y))); +} + +@memo() function test_call_with_receiver(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_call_with_receiver_other.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + const a = new A(); + const f = @memo() ((this: A, __memo_context: __memo_context_type, __memo_id: __memo_id_type): int => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__other.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(11); + }); + call_with_receiver(__memo_context, ((__memo_id) + (__hash("id_call_with_receiver_other.ets"))), a, f); + { + __memo_scope.recache(); + return; + } +} + + +type MemoType = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void); + +@memo() type AnotherMemoType = ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void); + +@memo() type OneMoreMemoType = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void); + +class A { + public x: int; + + public y: int; + + public constructor() {} + +} + +class Test { + @memo() public void_method(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_void_method_other.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + @memo() public a_method_with_implicit_return_type(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_a_method_with_implicit_return_type_other.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + @memo() public void_method_with_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: string) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_void_method_with_arg_other.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + @memo() public void_method_with_return(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: string) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_void_method_with_return_other.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + @memo() public string_method_with_return(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: string) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_string_method_with_return_other.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(__memo_parameter_arg.value); + } + + @memo() public method_with_type_parameter(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: T): T { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_method_with_type_parameter_other.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(__memo_parameter_arg.value); + } + + @memo() public static static_method_with_type_parameter(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: T) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_static_method_with_type_parameter_other.ets"))), 1); + const __memo_parameter_arg = __memo_scope.param(0, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + @memo() public internal_call(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_internal_call_other.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_parameter_this.value.void_method(__memo_context, ((__memo_id) + (__hash("id_void_method_other.ets")))); + { + __memo_scope.recache(); + return; + } + } + + @memo() public lambda_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() arg: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_lambda_arg_other.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + @memo() public lambda_arg_with_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() arg: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string)=> string)) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_lambda_arg_with_arg_other.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + @memo_intrinsic() public intrinsic_method(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + return 0; + } + + @memo_intrinsic() public intrinsic_method_with_this(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + this.void_method(__memo_context, ((__memo_id) + (__hash("id_void_method_other.ets")))); + return 0; + } + + @memo() public method_with_internals(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_method_with_internals_other.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_context; + __memo_id; + { + __memo_scope.recache(); + return; + } + } + + @memo() public obj_arg(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: A) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_obj_arg_other.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + @memo_entry() public memoEntry(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() entry: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> R)): R { + const getContext = (() => { + return __memo_context; + }); + const getId = (() => { + return __memo_id; + }); + { + const __memo_context = getContext(); + const __memo_id = getId(); + return entry(__memo_context, ((__memo_id) + (__hash("id_entry_other.ets")))); + } + } + + @memo() public memo_content(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() content: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_content_other.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + content(__memo_context, ((__memo_id) + (__hash("id_content_other.ets")))); + { + __memo_scope.recache(); + return; + } + } + + public memo_lambda() { + @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__other.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + }); + } + + @memo() public memo_variables(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_variables_other.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + @memo() const f = ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__other.ets"))), 0); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(123); + }), g = ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number) => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__other.ets"))), 1); + const __memo_parameter_x = __memo_scope.param(0, x); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(((123) + (__memo_parameter_x.value))); + }); + const h = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__other.ets"))), 0); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(1); + }); + f(__memo_context, ((__memo_id) + (__hash("id_f_other.ets")))); + g(__memo_context, ((__memo_id) + (__hash("id_g_other.ets"))), 1); + h(__memo_context, ((__memo_id) + (__hash("id_h_other.ets")))); + { + __memo_scope.recache(); + return; + } + } + + @memo() public compute_test(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() arg1: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined), arg2: ((()=> void) | undefined), content: ((()=> void) | undefined)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_compute_test_other.ets"))), 3); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg1 = __memo_scope.param(1, arg1), __memo_parameter_arg2 = __memo_scope.param(2, arg2); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + @memo() public args_with_default_values(__memo_context: __memo_context_type, __memo_id: __memo_id_type, gensym_XXX?: int, gensym_XXX?: (()=> int), gensym_XXX?: int, arg4?: int): void { + let arg1: int = (((gensym_XXX) !== (undefined)) ? gensym_XXX : (10 as int)); + let arg2: (()=> int) = (((gensym_XXX) !== (undefined)) ? gensym_XXX : ((() => { + return 20; + }) as (()=> int))); + let arg3: int = (((gensym_XXX) !== (undefined)) ? gensym_XXX : (arg1 as int)); + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_args_with_default_values_other.ets"))), 5); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg1 = __memo_scope.param(1, arg1), __memo_parameter_arg2 = __memo_scope.param(2, arg2), __memo_parameter_arg3 = __memo_scope.param(3, arg3), __memo_parameter_arg4 = __memo_scope.param(4, arg4); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + console.log(__memo_parameter_arg1.value, __memo_parameter_arg2.value, __memo_parameter_arg3.value, __memo_parameter_arg4.value); + console.log(__memo_parameter_arg2.value()); + { + __memo_scope.recache(); + return; + } + } + + @memo() public optional_args(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg1?: int, arg2?: (()=> int)) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_optional_args_other.ets"))), 3); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg1 = __memo_scope.param(1, arg1), __memo_parameter_arg2 = __memo_scope.param(2, arg2); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + console.log(__memo_parameter_arg1.value); + console.log(__memo_parameter_arg2.value); + console.log(({let gensym_XXX = __memo_parameter_arg2.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX())})); + { + __memo_scope.recache(); + return; + } + } + + @memo() public type_alias(__memo_context: __memo_context_type, __memo_id: __memo_id_type, arg: MemoType) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_type_alias_other.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_arg = __memo_scope.param(1, arg); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_parameter_arg.value(__memo_context, ((__memo_id) + (__hash("id_arg_other.ets")))); + { + __memo_scope.recache(); + return; + } + } + + @memo_intrinsic() public static intrinsicKeyAccessor(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { + let key = __hash("id___key_other.ets"); + } + + @memo() public wrap_param_test(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo_wrap() obj: A): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_wrap_param_test_other.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_obj = __memo_scope.param(1, obj); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + } + + public prop_func: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) = ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__other.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + }); + + set property(x: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number)=> void)) {} + + public get property(): @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number)=> void) { + return @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number) => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__other.ets"))), 1); + const __memo_parameter_x = __memo_scope.param(0, x); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + console.log(__memo_parameter_x.value); + { + __memo_scope.recache(); + return; + } + }); + } + + public constructor() {} + +} + +declare class AbstractTest { + public test_signature(@memo() arg1: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void), @memo() arg2: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined), @memo() arg3: ((((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined) | (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> int) | undefined)), @memo() x: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, y: ((z: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void))=> void))=> void)): @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) + + public constructor() {} + +} + +@memo_stable() class MemoStableClass { + @memo() public test1(__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: string): string { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test1_other.ets"))), 1); + const __memo_parameter_x = __memo_scope.param(0, x); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(__memo_parameter_x.value); + } + + @memo() public test2(__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: int): this { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test2_other.ets"))), 1); + const __memo_parameter_value = __memo_scope.param(0, value); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return this; + } + console.log(__memo_parameter_value.value); + { + __memo_scope.recache(); + return this; + } + } + + public constructor() {} + +} + +class MemoUnstableClass { + @memo() public test2(__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: int): this { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test2_other.ets"))), 2); + const __memo_parameter_this = __memo_scope.param(0, this), __memo_parameter_value = __memo_scope.param(1, value); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return this; + } + __memo_parameter_this.value; + console.log(__memo_parameter_value.value); + { + __memo_scope.recache(); + return this; + } + } + + public constructor() {} + +} + +class Use { + @memo() public test(__memo_context: __memo_context_type, __memo_id: __memo_id_type) { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_test_other.ets"))), 1); + const __memo_parameter_this = __memo_scope.param(0, this); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + const test = new Test(); + test.void_method(__memo_context, ((__memo_id) + (__hash("id_void_method_other.ets")))); + test.void_method_with_arg(__memo_context, ((__memo_id) + (__hash("id_void_method_with_arg_other.ets"))), "an arg"); + test.void_method_with_return(__memo_context, ((__memo_id) + (__hash("id_void_method_with_return_other.ets"))), "a value"); + Test.static_method_with_type_parameter(__memo_context, ((__memo_id) + (__hash("id_static_method_with_type_parameter_other.ets"))), "I'm static"); + test.string_method_with_return(__memo_context, ((__memo_id) + (__hash("id_string_method_with_return_other.ets"))), "a string"); + test.method_with_type_parameter(__memo_context, ((__memo_id) + (__hash("id_method_with_type_parameter_other.ets"))), "I'm string"); + test.lambda_arg(__memo_context, ((__memo_id) + (__hash("id_lambda_arg_other.ets"))), __memo_context.compute(((__memo_id) + (__hash("id_lambda_arg_other.ets"))), ((): ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) => { + return ((__memo_context: __memo_context_type, __memo_id: __memo_id_type): void => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__other.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + }); + }))); + test.lambda_arg_with_arg(__memo_context, ((__memo_id) + (__hash("id_lambda_arg_with_arg_other.ets"))), __memo_context.compute(((__memo_id) + (__hash("id_lambda_arg_with_arg_other.ets"))), ((): ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string)=> string) => { + return ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, value: string): string => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__other.ets"))), 1); + const __memo_parameter_value = __memo_scope.param(0, value); + if (__memo_scope.unchanged) { + return __memo_scope.cached; + } + return __memo_scope.recache(__memo_parameter_value.value); + }); + }))); + test.obj_arg(__memo_context, ((__memo_id) + (__hash("id_obj_arg_other.ets"))), __memo_context.compute(((__memo_id) + (__hash("id_obj_arg_other.ets"))), ((): A => { + return { + x: 1, + y: 2, + }; + }))); + test.compute_test(__memo_context, ((__memo_id) + (__hash("id_compute_test_other.ets"))), __memo_context.compute(((__memo_id) + (__hash("id_compute_test_other.ets"))), ((): ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) => { + return ((__memo_context: __memo_context_type, __memo_id: __memo_id_type): void => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__other.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + }); + })), __memo_context.compute(((__memo_id) + (__hash("id_compute_test_other.ets"))), ((): (()=> void) => { + return ((): void => {}); + })), ((): void => {})); + const MemoStableClass_instance = new MemoStableClass(); + MemoStableClass_instance.test1(__memo_context, ((__memo_id) + (__hash("id_test1_other.ets"))), "a"); + MemoStableClass_instance.test2(__memo_context, ((__memo_id) + (__hash("id_test2_other.ets"))), 5); + const obj: A = new A(); + test.wrap_param_test(__memo_context, ((__memo_id) + (__hash("id_wrap_param_test_other.ets"))), __memo_context.compute(((__memo_id) + (__hash("id_wrap_param_test_other.ets"))), (() => { + return obj; + }))); + test.prop_func(__memo_context, ((__memo_id) + (__hash("id_prop_func_other.ets")))); + test.property(__memo_context, ((__memo_id) + (__hash("id_property_other.ets"))), 12345); + test.property = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type, x: number) => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__other.ets"))), 1); + const __memo_parameter_x = __memo_scope.param(0, x); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + }); + { + __memo_scope.recache(); + return; + } + } + + public constructor() {} + +} + +interface InterfaceWithSetter { + @memo() set f(f: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)) + +} + +interface InterfaceWithGetter { + @memo() get f(): ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) + +} + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-optional-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-optional-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..548be9fc4ca481fc0930bd05737cfbaf5de60433 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-optional-param.ets @@ -0,0 +1,23 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() param?: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-optional-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + ({let gensym_XXX = __memo_parameter_param.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-optional-param.ets")))))}); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-optional-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-optional-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..f11530fc700bd7f8df0719e50715695e5294f513 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-optional-possibly-undefined-param.ets @@ -0,0 +1,23 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() param?: (@memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-optional-possibly-undefined-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + ({let gensym_XXX = __memo_parameter_param.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-optional-possibly-undefined-param.ets")))))}); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..2d181bd0fb18d9d11997aa7e5e0af34566e03ebb --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-param.ets @@ -0,0 +1,22 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() param: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_parameter_param.value(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-param.ets")))); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2950f4624262aad2377cfd67bdf67c9860e60b9 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param-and-type/memo-on-possibly-undefined-param.ets @@ -0,0 +1,23 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() param: (@memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-possibly-undefined-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + ({let gensym_XXX = __memo_parameter_param.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-possibly-undefined-param.ets")))))}); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-optional-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-optional-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..84f7beb80dfd12799d640cc2d8ccb29c68e64668 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-optional-param.ets @@ -0,0 +1,23 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() param?: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-optional-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + ({let gensym_XXX = __memo_parameter_param.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-optional-param.ets")))))}); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-optional-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-optional-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..220a8d4333a4597d8e9af8098ca94ddfadd72780 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-optional-possibly-undefined-param.ets @@ -0,0 +1,23 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() param?: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-optional-possibly-undefined-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + ({let gensym_XXX = __memo_parameter_param.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-optional-possibly-undefined-param.ets")))))}); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..79884f8ecf88b88c0feaf0b02d5cd20f93d7c031 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-param.ets @@ -0,0 +1,22 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() param: ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_parameter_param.value(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-param.ets")))); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..807e51fbee41dc1d4638ec06d781a8d37f1e9f66 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-param/memo-on-possibly-undefined-param.ets @@ -0,0 +1,23 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo() param: (((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-possibly-undefined-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + ({let gensym_XXX = __memo_parameter_param.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-possibly-undefined-param.ets")))))}); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-optional-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-optional-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..babe837b160a24752e8c108198c9c9e6c38cf031 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-optional-param.ets @@ -0,0 +1,23 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, param?: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-optional-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + ({let gensym_XXX = __memo_parameter_param.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-optional-param.ets")))))}); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-optional-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-optional-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..73ec75b52e2dbbd776d502fa1e75363693ee29c7 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-optional-possibly-undefined-param.ets @@ -0,0 +1,23 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, param?: (@memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-optional-possibly-undefined-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + ({let gensym_XXX = __memo_parameter_param.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-optional-possibly-undefined-param.ets")))))}); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..0fcce435048247266af820d2a3fbeb73e103dcf8 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-param.ets @@ -0,0 +1,22 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, param: @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + __memo_parameter_param.value(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-param.ets")))); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..cdc9d61066c4b5b31c3e6345450e34b6240c3eb7 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/on-type/memo-on-possibly-undefined-param.ets @@ -0,0 +1,23 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, param: (@memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void) | undefined)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_memo-on-possibly-undefined-param.ets"))), 1); + const __memo_parameter_param = __memo_scope.param(0, param); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + ({let gensym_XXX = __memo_parameter_param.value; + (((gensym_XXX) == (null)) ? undefined : gensym_XXX(__memo_context, ((__memo_id) + (__hash("id_param_memo-on-possibly-undefined-param.ets")))))}); + { + __memo_scope.recache(); + return; + } +} + + diff --git a/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/union-with-non-memo/primitive.ets b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/union-with-non-memo/primitive.ets new file mode 100644 index 0000000000000000000000000000000000000000..ec3e2e7e3ea2147134dc3018bfae603e0ca4cac2 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/golden/param-usage/union-with-non-memo/primitive.ets @@ -0,0 +1,51 @@ + +import { __memo_context_type as __memo_context_type, __memo_id_type as __memo_id_type, __hash as __hash } from "@koalaui/runtime"; + +import { memo as memo, memo_skip as memo_skip } from "@koalaui/runtime/annotations"; + +function main() {} + +@memo() function memo_function(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo_skip() param: (Builder | string)): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_memo_function_primitive.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + if (((param) instanceof (Builder))) { + param(__memo_context, ((__memo_id) + (__hash("id_param_primitive.ets")))); + } else { + param; + } + { + __memo_scope.recache(); + return; + } +} + +@memo() function callsite(__memo_context: __memo_context_type, __memo_id: __memo_id_type): void { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id_callsite_primitive.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + memo_function(__memo_context, ((__memo_id) + (__hash("id_memo_function_primitive.ets"))), ((__memo_context: __memo_context_type, __memo_id: __memo_id_type) => { + const __memo_scope = __memo_context.scope(((__memo_id) + (__hash("id__primitive.ets"))), 0); + if (__memo_scope.unchanged) { + __memo_scope.cached; + return; + } + { + __memo_scope.recache(); + return; + } + })); + memo_function(__memo_context, ((__memo_id) + (__hash("id_memo_function_primitive.ets"))), "hello"); + { + __memo_scope.recache(); + return; + } +} + + +type Builder = @memo() ((__memo_context: __memo_context_type, __memo_id: __memo_id_type)=> void); + diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/abstract.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/abstract.ets new file mode 100644 index 0000000000000000000000000000000000000000..5336ae2a1c1334f384339f46718a2b17130cd895 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/abstract.ets @@ -0,0 +1,25 @@ +import { memo } from "@koalaui/runtime/annotations" + +declare abstract class A { + @memo + x(): void; + + test_signature( + @memo arg1: () => void, + @memo arg2: (() => void) | undefined, + @memo arg3: ((() => void) | undefined) | ((() => int) | undefined), + @memo x: (y: (z: @memo () => void) => void) => void, + ): @memo () => void; +} + +class AA extends A { + @memo x(): void {} +} + +@memo +() => { + new AA().x(); + + const a: A = new AA(); + a.x(); +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/arrow-assignment.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/arrow-assignment.ets new file mode 100644 index 0000000000000000000000000000000000000000..19acbf53b3039db067e4d55b54c6b8dc2132e651 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/arrow-assignment.ets @@ -0,0 +1,19 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo memo_variables() { + @memo const f = (): number => { + return 123 + }, g = (x: number): number => { + return 123 + x + } + + const h = @memo (): number => { + return 1 + } + + f() + g(1) + h() + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/arrow.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/arrow.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e4b2dfc7227aa46729892afc475aa4bef3f3f29 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/arrow.ets @@ -0,0 +1,9 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + memo_lambda() { + @memo () => { + + } + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/call-type.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/call-type.ets new file mode 100644 index 0000000000000000000000000000000000000000..1abe32fe02f95b956f2bde0a0c1efc739e23ff1b --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/call-type.ets @@ -0,0 +1,11 @@ +import { memo } from "@koalaui/runtime/annotations" + +type MemoType = @memo () => void + +class Test { + @memo type_alias( + arg: MemoType + ) { + arg() + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/compute.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/compute.ets new file mode 100644 index 0000000000000000000000000000000000000000..abe14500e844b7e41597ae5d6a6fadad6edd819f --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/compute.ets @@ -0,0 +1,18 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo compute_test( + @memo arg1: (() => void) | undefined, + arg2: (() => void) | undefined, + content: (() => void) | undefined + ): void { + + } +} + +class Use { + @memo test() { + const test = new Test() + test.compute_test(() => {}, () => {}, () => {}) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/content-usage.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/content-usage.ets new file mode 100644 index 0000000000000000000000000000000000000000..004af9dd19b678709120508866b74ab20e1ea4a2 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/content-usage.ets @@ -0,0 +1,7 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo memo_content(@memo content: () => void) { + content() + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/entry.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/entry.ets new file mode 100644 index 0000000000000000000000000000000000000000..4f4763972b929a7827042def5291f6c060c32a22 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/entry.ets @@ -0,0 +1,18 @@ +import { memo, memo_entry } from "@koalaui/runtime/annotations" +import { __context, __id, __memo_context_type, __memo_id_type } from "@koalaui/runtime" + +class Test { + @memo_entry memoEntry(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo entry: () => R): R { + const getContext = () => { + return __context() + } + const getId = () => { + return __id() + } + { + const __memo_context = getContext() + const __memo_id = getId() + return entry() + } + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/implemented-property.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/implemented-property.ets new file mode 100644 index 0000000000000000000000000000000000000000..dc8d84cc9b2c776bbe4dc38304ea37cfbe51b1bd --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/implemented-property.ets @@ -0,0 +1,9 @@ +import { memo } from "@koalaui/runtime/annotations" + +interface A { + @memo prop: (() => void) | undefined +} + +class AA implements A { + @memo prop: (() => void) | undefined +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/implicit-void-method.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/implicit-void-method.ets new file mode 100644 index 0000000000000000000000000000000000000000..9b6744dd7bbc39070cbd19511e1501fb66b50396 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/implicit-void-method.ets @@ -0,0 +1,6 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo a_method_with_implicit_return_type() { + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/instantiate.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/instantiate.ets new file mode 100644 index 0000000000000000000000000000000000000000..341205ae3551d5887ba2143bf4c8d508dfb745e2 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/instantiate.ets @@ -0,0 +1,20 @@ +import { memo } from "@koalaui/runtime/annotations" + +class C { + @memo + static $_instantiate(factory: () => C): C { + return factory(); + } +} + +class D { + static $_instantiate(factory: () => D, @memo content?: () => void): D { + return factory(); + } +} + +@memo +() => { + let x: C | D = C(); + x = D(); +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/internal-call.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/internal-call.ets new file mode 100644 index 0000000000000000000000000000000000000000..2afc40b1e2a96633a64d0a48da63d2033a8cf73b --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/internal-call.ets @@ -0,0 +1,10 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo void_method(): void { + } + + @memo internal_call() { + this.void_method() + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/internals.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/internals.ets new file mode 100644 index 0000000000000000000000000000000000000000..ff4bbacfea946c70512c0ab42ee69a3740f8bcd1 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/internals.ets @@ -0,0 +1,9 @@ +import { memo } from "@koalaui/runtime/annotations" +import { __context, __id } from "@koalaui/runtime" + +class Test { + @memo method_with_internals() { + __context() + __id() + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/intrinsic-call.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/intrinsic-call.ets new file mode 100644 index 0000000000000000000000000000000000000000..771bbb618516f6d8adfab9e476d1ff5ac9fc2275 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/intrinsic-call.ets @@ -0,0 +1,11 @@ +import { memo, memo_intrinsic } from "@koalaui/runtime/annotations" + +class Test { + @memo void_method(): void { + } + + @memo_intrinsic intrinsic_method_with_this(): int { + this.void_method() + return 0 + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/intrinsic.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/intrinsic.ets new file mode 100644 index 0000000000000000000000000000000000000000..7b8235bebb568de280ae82676597d2f5fc7fc3a7 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/intrinsic.ets @@ -0,0 +1,7 @@ +import { memo_intrinsic } from "@koalaui/runtime/annotations" + +class Test { + @memo_intrinsic intrinsic_method(): int { + return 0 + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/invoke-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/invoke-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..704b675e38a0896e9fdf20100d6beba6e689516c --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/invoke-param.ets @@ -0,0 +1,10 @@ +import { memo } from "@koalaui/runtime/annotations" + +class B { + static $_invoke(@memo p?: () => void): void {} +} + +@memo +() => { + B(() => {}); +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/invoke.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/invoke.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9626626dedb314328a41469f36db8fa6b371ded --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/invoke.ets @@ -0,0 +1,11 @@ +import { memo } from "@koalaui/runtime/annotations" + +class A { + @memo + static $_invoke(): void {} +} + +@memo +() => { + A(); +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property-optional.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property-optional.ets new file mode 100644 index 0000000000000000000000000000000000000000..17e4c965235ea448c755482af25af3d4b901a4a2 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property-optional.ets @@ -0,0 +1,10 @@ +import { memo } from "@koalaui/runtime/annotations" + +interface A { + @memo memo_optional_arg?: () => void +} + +@memo() (() => { + let a: A = { + }; +}); diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property-type.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property-type.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e6d7bb62fcbd2fe1a2b376965b7061c9ab7166f --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property-type.ets @@ -0,0 +1,11 @@ +import { memo } from "@koalaui/runtime/annotations" + +interface A { + arg_memo_type: @memo () => void +} + +@memo() (() => { + let a: A = { + arg_memo_type: (() => {}), + }; +}); diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property-union-type.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property-union-type.ets new file mode 100644 index 0000000000000000000000000000000000000000..544a230d19b43b1cb148db5c7181bca046ae056d --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property-union-type.ets @@ -0,0 +1,11 @@ +import { memo } from "@koalaui/runtime/annotations" + +interface A { + @memo memo_union_arg: (() => void) | undefined +} + +@memo() (() => { + let a: A = { + memo_union_arg: (() => {}) + }; +}); diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property.ets new file mode 100644 index 0000000000000000000000000000000000000000..9b5bd646041f0a23aaaf26fc5c1f51a2aee3f7bb --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-interface-property.ets @@ -0,0 +1,11 @@ +import { memo } from "@koalaui/runtime/annotations" + +interface A { + @memo memo_arg: () => void +} + +@memo() (() => { + let a: A = { + memo_arg: (() => {}) + }; +}); diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property-optional.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property-optional.ets new file mode 100644 index 0000000000000000000000000000000000000000..28cbe949318e9cb46fd3f1f1ec8aca24418b59a3 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property-optional.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +class A { + @memo memo_optional_arg?: () => void +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property-type.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property-type.ets new file mode 100644 index 0000000000000000000000000000000000000000..2751c8add24ea314cb02afffd50c9329877f47dc --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property-type.ets @@ -0,0 +1,15 @@ +import { memo } from "@koalaui/runtime/annotations" + +class A { + arg_memo_type: @memo () => void + + constructor() { + this.arg_memo_type = () => {}; + } + + @memo + build() { + this.arg_memo_type(); + } + +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property-union-type.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property-union-type.ets new file mode 100644 index 0000000000000000000000000000000000000000..545d3cad867f37c87234f2742184d357c5864a7c --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property-union-type.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +class A { + @memo memo_union_arg: (() => void) | undefined = () => {} +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property.ets new file mode 100644 index 0000000000000000000000000000000000000000..6ec74ea75ef8c241b3058c9108b7f4e65af93682 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/memo-property.ets @@ -0,0 +1,15 @@ +import { memo } from "@koalaui/runtime/annotations" + +class A { + @memo memo_arg: () => void + + constructor() { + this.memo_arg = () => {}; + } + + @memo + build() { + this.memo_arg(); + } + +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/non-memo-interface-property.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/non-memo-interface-property.ets new file mode 100644 index 0000000000000000000000000000000000000000..07ae0b2d1780fb2c57189d001354a9d18ad31877 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/non-memo-interface-property.ets @@ -0,0 +1,11 @@ +import { memo } from "@koalaui/runtime/annotations" + +interface A { + arg: () => void +} + +@memo() (() => { + let a: A = { + arg: (() => {}) + }; +}); diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/non-memo-property.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/non-memo-property.ets new file mode 100644 index 0000000000000000000000000000000000000000..851e8a42630dfa1ba8bff0a40a42e6906f09b2b8 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/non-memo-property.ets @@ -0,0 +1,15 @@ +import { memo } from "@koalaui/runtime/annotations" + +class A { + arg: () => void + + constructor() { + this.arg = () => {}; + } + + @memo + build() { + this.arg(); + } + +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/object-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/object-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..e839a2eb50bd5aa78fa15e9e2e30cdd5045ca116 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/object-param.ets @@ -0,0 +1,20 @@ +import { memo } from "@koalaui/runtime/annotations" + +class A { + x: int + y: int +} + +class Test { + @memo obj_arg(arg: A) { + + } +} + +class Use { + @memo test() { + const test = new Test() + + test.obj_arg({ x: 1, y: 2 }) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/param-calls-optional.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/param-calls-optional.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5b89029073fc0674342b9d188845d7254c06fbc --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/param-calls-optional.ets @@ -0,0 +1,12 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo optional_args( + arg1?: int, + arg2?: () => int + ) { + console.log(arg1) + console.log(arg2) + console.log(arg2?.()) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/param-calls.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/param-calls.ets new file mode 100644 index 0000000000000000000000000000000000000000..41ec8b4781916e80fc780e572f808bb053370a9d --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/param-calls.ets @@ -0,0 +1,13 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo args_with_default_values( + arg1: int = 10, + arg2: () => int = () => { return 20 }, + arg3: int = arg1, + arg4?: int + ): void { + console.log(arg1, arg2, arg3, arg4) + console.log(arg2()) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/property-constructor.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/property-constructor.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9a5abc015fe3b4976a455c4989a20cc6fc62af5 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/property-constructor.ets @@ -0,0 +1,24 @@ +import { memo } from "@koalaui/runtime/annotations" + +interface A { + @memo a: () => void +} + +class AA { + + @memo a: (() => void) | undefined + + constructor(arg?: A) { + this.a = arg?.a; + } + + @memo + build() { + this.a?.(); + } +} + +@memo +() => { + let a = new AA({ a: () => {} }) +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/static-void-method.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/static-void-method.ets new file mode 100644 index 0000000000000000000000000000000000000000..e2e3dfa1c53b91f34a01be356430305c8d6e069e --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/static-void-method.ets @@ -0,0 +1,14 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo static static_method_with_type_parameter(arg: T): void { + return + } +} + +class Use { + @memo test() { + + Test.static_method_with_type_parameter("I'm static") + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/string-compute.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/string-compute.ets new file mode 100644 index 0000000000000000000000000000000000000000..fb958aaa49ee8adf29f40e872b6ad6298eae2663 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/string-compute.ets @@ -0,0 +1,14 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo lambda_arg_with_arg(@memo arg: (value: string) => string) { + + } +} + +class Use { + @memo test() { + const test = new Test() + test.lambda_arg_with_arg((value: string): string => value) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/string-method.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/string-method.ets new file mode 100644 index 0000000000000000000000000000000000000000..87c16fbcba168820a861bf4e04464094eddf16ac --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/string-method.ets @@ -0,0 +1,15 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo string_method_with_return(arg: string): string { + return arg + } +} + +class Use { + @memo test() { + const test = new Test() + + test.string_method_with_return("a string") + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/type-param-method.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/type-param-method.ets new file mode 100644 index 0000000000000000000000000000000000000000..5caa0dcf92888ce69318cfcd782351443eac38a1 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/type-param-method.ets @@ -0,0 +1,15 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo method_with_type_parameter(arg: T): T { + return arg + } +} + +class Use { + @memo test() { + const test = new Test() + + test.method_with_type_parameter("I'm string") + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-compute.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-compute.ets new file mode 100644 index 0000000000000000000000000000000000000000..bf0bc01eb26d1e299d1834001faad80d05dade92 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-compute.ets @@ -0,0 +1,14 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo lambda_arg(@memo arg: () => void) { + + } +} + +class Use { + @memo test() { + const test = new Test() + test.lambda_arg((): void => {}) + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-method-with-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-method-with-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..861cd765da619ffd29e06c210a6e12e997b513b9 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-method-with-param.ets @@ -0,0 +1,14 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo void_method_with_arg(arg: string) { + } +} + +class Use { + @memo test() { + const test = new Test() + + test.void_method_with_arg("an arg") + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-method-with-return.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-method-with-return.ets new file mode 100644 index 0000000000000000000000000000000000000000..548aea8a6a71201ae1ccab28d7b2fb6fbaed8a07 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-method-with-return.ets @@ -0,0 +1,15 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo void_method_with_return(arg: string) { + return + } +} + +class Use { + @memo test() { + const test = new Test() + + test.void_method_with_return("a value") + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-method.ets b/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-method.ets new file mode 100644 index 0000000000000000000000000000000000000000..eca677ee475e0d9b6e2ad0aa4fb677aae9c633ed --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/HQ/void-method.ets @@ -0,0 +1,14 @@ +import { memo } from "@koalaui/runtime/annotations" + +class Test { + @memo void_method(): void { + } +} + +class Use { + @memo test() { + const test = new Test() + + test.void_method() + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/basic/arrow.ets b/koala_tools/ui2abc/memo-plugin/test/input/basic/arrow.ets new file mode 100644 index 0000000000000000000000000000000000000000..096fe3e24194366e3ae1599625517eb2551a7cda --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/basic/arrow.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo (): void => {} + +(): void => {} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/basic/function.ets b/koala_tools/ui2abc/memo-plugin/test/input/basic/function.ets new file mode 100644 index 0000000000000000000000000000000000000000..5671531b16b37ec59d6fc2dd61a429f8d78ad220 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/basic/function.ets @@ -0,0 +1,9 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(): void { + +} + +function non_memo_function(): void { + +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/basic/method.ets b/koala_tools/ui2abc/memo-plugin/test/input/basic/method.ets new file mode 100644 index 0000000000000000000000000000000000000000..81cff968aa06b1e20158305bb20444cf5112928f --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/basic/method.ets @@ -0,0 +1,11 @@ +import { memo } from "@koalaui/runtime/annotations" + +class C { + @memo memo_method(): void { + + } + + non_memo_method(): void { + + } +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/implicit-type/main.ets b/koala_tools/ui2abc/memo-plugin/test/input/implicit-type/main.ets new file mode 100644 index 0000000000000000000000000000000000000000..59a075f90919e183613739a83ae1715b701ece3d --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/implicit-type/main.ets @@ -0,0 +1,7 @@ +import { memo } from "@koalaui/runtime/annotations" + +import { function_returning_local_type } from "./test" + +@memo function function_with_implicit_return_type() { + return function_returning_local_type() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/implicit-type/test.ets b/koala_tools/ui2abc/memo-plugin/test/input/implicit-type/test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f1642730064ae7d22c06a267201a142bf736b96a --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/implicit-type/test.ets @@ -0,0 +1,9 @@ +import { memo } from "@koalaui/runtime/annotations" + +class C { + +} + +@memo export function function_returning_local_type() { + return new C() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/other.ets b/koala_tools/ui2abc/memo-plugin/test/input/other.ets new file mode 100644 index 0000000000000000000000000000000000000000..548488dcac988749a12d4544f4ee18b92c445af1 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/other.ets @@ -0,0 +1,289 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { memo, memo_stable, memo_intrinsic, memo_entry, memo_wrap } from "@koalaui/runtime/annotations" +import { __context, __id, __key } from "@koalaui/runtime" + +type MemoType = @memo () => void +@memo type AnotherMemoType = () => void +@memo type OneMoreMemoType = @memo () => void + + +@memo function param_capturing(s: string) { + let x = () => { + console.log(s) + } + x() + let y = (s: string) => { + console.log(s) + } + y("she") +} + +@memo function memo_arg_call( + arg1: number, + arg2: (x: number) => number, + @memo arg3: (x: number) => number, + arg4?: (x: number) => number, + @memo arg5?: (x: number) => number, +) { + arg2(arg1) + arg3(arg1) + arg4?.(arg1) + arg5?.(arg1) +} + +@memo function call_with_receiver(obj: A, @memo v: (this: A) => int) { + const x = obj.v() + const y = v(obj) + return x + y +} + +@memo function test_call_with_receiver() { + const a = new A() + const f = @memo (this: A): int => { + return 11 + } + call_with_receiver(a, f) +} +class A { + x: int + y: int +} + +class Test { + + @memo void_method() { + } + + @memo a_method_with_implicit_return_type() { + } + + @memo void_method_with_arg(arg: string) { + } + + @memo void_method_with_return(arg: string) { + return + } + + @memo string_method_with_return(arg: string) { + return arg + } + + @memo method_with_type_parameter(arg: T): T { + return arg + } + + @memo static static_method_with_type_parameter(arg: T) { + return + } + + @memo internal_call() { + this.void_method() + } + + @memo lambda_arg(@memo arg: () => void) { + + } + + @memo lambda_arg_with_arg(@memo arg: (value: string) => string) { + + } + + @memo_intrinsic intrinsic_method() { + return 0 + } + + @memo_intrinsic intrinsic_method_with_this() { + this.void_method() + return 0 + } + + @memo method_with_internals() { + __context() + __id() + } + + @memo obj_arg(arg: A) { + + } + + @memo_entry memoEntry(__memo_context: __memo_context_type, __memo_id: __memo_id_type, @memo entry: () => R): R { + const getContext = () => { + return __context() + } + const getId = () => { + return __id() + } + { + const __memo_context = getContext() + const __memo_id = getId() + return entry() + } + } + + @memo memo_content(@memo content: () => void) { + content() + } + + memo_lambda() { + @memo () => { + + } + } + + @memo memo_variables() { + @memo const f = () => { + return 123 + }, g = (x: number) => { + return 123 + x + } + + const h = @memo () => { + return 1 + } + + f() + g(1) + h() + } + + @memo compute_test( + @memo arg1: (() => void) | undefined, + arg2: (() => void) | undefined, + content: (() => void) | undefined + ): void { + + } + + @memo args_with_default_values( + arg1: int = 10, + arg2: () => int = () => { return 20 }, + arg3: int = arg1, + arg4?: int + ): void { + console.log(arg1, arg2, arg3, arg4) + console.log(arg2()) + } + + @memo optional_args( + arg1?: int, + arg2?: () => int + ) { + console.log(arg1) + console.log(arg2) + console.log(arg2?.()) + } + + @memo type_alias( + arg: MemoType + ) { + arg() + } + + @memo_intrinsic + static intrinsicKeyAccessor(): void { + let key = __key() + } + + @memo wrap_param_test( + @memo_wrap obj: A + ): void { + } + + prop_func: (@memo () => void) = (() => {}) + + get property(): (@memo (x: number) => void) { + return (@memo (x: number) => { + console.log(x) + }) + } + + set property(x: @memo (x: number) => void) { + } +} + +declare class AbstractTest { + test_signature( + @memo arg1: () => void, + @memo arg2: (() => void) | undefined, + @memo arg3: ((() => void) | undefined) | ((() => int) | undefined), + @memo x: (y: (z: @memo () => void) => void) => void, + ): @memo () => void +} + +@memo_stable +class MemoStableClass { + // default memo method + @memo + test1(x: string): string { + return x; + } + + // memo method returns this + @memo + test2(value: int): this { + console.log(value) + return this + } +} + +class MemoUnstableClass { + @memo + test2(value: int): this { + console.log(value) + return this + } +} + +class Use { + @memo test() { + const test = new Test() + + test.void_method() + test.void_method_with_arg("an arg") + test.void_method_with_return("a value") + Test.static_method_with_type_parameter("I'm static") + + test.string_method_with_return("a string") + test.method_with_type_parameter("I'm string") + + test.lambda_arg((): void => {}) + test.lambda_arg_with_arg((value: string): string => value) + + test.obj_arg({ x: 1, y: 2 }) + test.compute_test((): void => {}, (): void => {}, (): void => {}) + + const MemoStableClass_instance = new MemoStableClass() + MemoStableClass_instance.test1("a") + MemoStableClass_instance.test2(5) + + const obj: A = new A() + test.wrap_param_test(obj) + + test.prop_func() + + test.property(12345) + test.property = @memo (x: number) => {} + } +} + +interface InterfaceWithSetter { + @memo set f(f: () => void) +} + +interface InterfaceWithGetter { + @memo get f(): () => void +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-optional-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-optional-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..1cfa8cc4a4a9d0b7b5c73c34d23e3a543e5a85d5 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-optional-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(@memo param?: @memo () => void): void { + param?.() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-optional-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-optional-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..32a89f04d3e3bdb44d3c9aa5d47860b4bc88dbd7 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-optional-possibly-undefined-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(@memo param?: @memo ((() => void) | undefined)): void { + param?.() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..2e9f0dc2e9fab7f2c8eef26ec331404b4859fabe --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(@memo param: @memo () => void): void { + param() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..b0cb0033759f77ce268de4e7bae98377973bac5d --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param-and-type/memo-on-possibly-undefined-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(@memo param: @memo ((() => void) | undefined)): void { + param?.() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-optional-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-optional-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..d52c4ca0d29f4613434a64f35d0e713e7e7a4515 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-optional-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(@memo param?: () => void): void { + param?.() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-optional-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-optional-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..ac65ddff86bfd77a8a767103f0df17824d46e69e --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-optional-possibly-undefined-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(@memo param?: (() => void) | undefined): void { + param?.() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..12f071dbfe8cca9658275f64dbbf9ddf0f524517 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(@memo param: () => void): void { + param() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..497839f712f1e5151c2c4b87b61180a44be637c8 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-param/memo-on-possibly-undefined-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(@memo param: (() => void) | undefined): void { + param?.() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-optional-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-optional-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..6a2d6c78c8eafbc86290119b60e9662aff342b96 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-optional-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(param?: @memo () => void): void { + param?.() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-optional-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-optional-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f06f46068aec6e883f835e26498dda5e3c2b2bc --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-optional-possibly-undefined-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(param?: @memo ((() => void) | undefined)): void { + param?.() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..20cb4012d416e84d738fc423a54f86ce5b79e787 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(param: @memo () => void): void { + param() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-possibly-undefined-param.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-possibly-undefined-param.ets new file mode 100644 index 0000000000000000000000000000000000000000..9b40da24822d417d4a85ca9d1cc48ff05f74ef53 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/on-type/memo-on-possibly-undefined-param.ets @@ -0,0 +1,5 @@ +import { memo } from "@koalaui/runtime/annotations" + +@memo function memo_function(param: @memo ((() => void) | undefined)): void { + param?.() +} diff --git a/koala_tools/ui2abc/memo-plugin/test/input/param-usage/union-with-non-memo/primitive.ets b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/union-with-non-memo/primitive.ets new file mode 100644 index 0000000000000000000000000000000000000000..9de85bc28d58b5b1916f3575b7325614bb921309 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/input/param-usage/union-with-non-memo/primitive.ets @@ -0,0 +1,16 @@ +import { memo, memo_skip } from "@koalaui/runtime/annotations" + +type Builder = @memo () => void + +@memo function memo_function(@memo_skip param: Builder | string): void { + if (param instanceof Builder) { + param() + } else { + param + } +} + +@memo function callsite(): void { + memo_function(() => {}) + memo_function("hello") +} diff --git a/koala_tools/ui2abc/memo-plugin/test/rewrite.test.ts b/koala_tools/ui2abc/memo-plugin/test/rewrite.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..097a5d00b050d9304935b3486d077b24b2a5eb1c --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/rewrite.test.ts @@ -0,0 +1,298 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as fs from "node:fs" +import * as child_process from "node:child_process" +import * as path from "node:path" +import { assert, suite, test } from "../../../incremental/harness/src/typescript" + +function makeFilesEqual(filePath: string) { + const out = fs.readFileSync(`./test/out/input/${filePath}.ets`, 'utf-8') + fs.mkdirSync(path.dirname(`./test/golden/${filePath}`), { recursive: true }) + fs.writeFileSync(`./test/golden/${filePath}.ets`, out) +} + +function filterGensym(value: string): string { + return value.replaceAll(/gensym%%_[0-9]*/g, "gensym_XXX") +} + +function assertFilesEqual(filePath: string) { + const golden = fs.readFileSync(`./test/golden/${filePath}.ets`, 'utf-8') + const out = fs.readFileSync(`./test/out/input/${filePath}.ets`, 'utf-8') + assert.equal(filterGensym(out), filterGensym(golden)) +} + +function testBody(path: string) { + if (process.env.UPDATE_GOLDEN == "1") { + makeFilesEqual(path) + return + } + if (process.env.TEST_OTHER == "1" && path != "other") { + return + } + assertFilesEqual(path) +} + +suite("golden tests", () => { + test.expectFailure("", "dumps files to ./test/out", () => { + child_process.execSync("rm -rf ./build/golden", { stdio: "inherit" }) + child_process.execSync("rm -rf ./test/out", { stdio: "inherit" }) + const configPath: string = (process.env.TEST_OTHER == "1") ? "./test/arktsconfig-rewrite-other.json" : "./test/arktsconfig-rewrite.json" + child_process.execSync(`npx fast-arktsc --config ${configPath} --compiler ../../incremental/tools/panda/arkts/ui2abc --link-name ./build/golden/all.abc --simultaneous && ninja -f ./build/golden/build.ninja`, { stdio: "inherit" }) + if (process.env.TEST_OTHER == "1") { + throw new Error() + } + }) + + suite("other", () => { + test("other", () => { + testBody("other") + }) + }) + + suite("basic", () => { + test("function", () => { + testBody("basic/function") + }) + + test("method", () => { + testBody("basic/method") + }) + + test("arrow", () => { + testBody("basic/arrow") + }) + }) + + suite("param-usage", () => { + suite("memo on param", () => { + test("memo on param", () => { + testBody("param-usage/on-param/memo-on-param") + }) + + test("memo on optional param", () => { + testBody("param-usage/on-param/memo-on-optional-param") + }) + + test("memo on possibly undefined param", () => { + testBody("param-usage/on-param/memo-on-possibly-undefined-param") + }) + + test("memo on optional possibly undefined param", () => { + testBody("param-usage/on-param/memo-on-optional-possibly-undefined-param") + }) + }) + + suite("memo on type", () => { + test("memo on param's type", () => { + testBody("param-usage/on-type/memo-on-param") + }) + + test("memo on optional param's type", () => { + testBody("param-usage/on-type/memo-on-optional-param") + }) + + test("memo on possibly undefined param's type", () => { + testBody("param-usage/on-type/memo-on-possibly-undefined-param") + }) + + test("memo on optional possibly undefined param's type", () => { + testBody("param-usage/on-type/memo-on-optional-possibly-undefined-param") + }) + }) + + suite("memo on param and type", () => { + test("memo on param and its type", () => { + testBody("param-usage/on-param-and-type/memo-on-param") + }) + + test("memo on optional param and its type", () => { + testBody("param-usage/on-param-and-type/memo-on-optional-param") + }) + + test("memo on possibly undefined param and its type", () => { + testBody("param-usage/on-param-and-type/memo-on-possibly-undefined-param") + }) + + test("memo on optional possibly undefined param and its type", () => { + testBody("param-usage/on-param-and-type/memo-on-optional-possibly-undefined-param") + }) + }) + + suite("union-with-non-memo", () => { + test("memo on (Builder | string)", () => { + testBody("param-usage/union-with-non-memo/primitive") + }) + }) + }) + + test("implicit return type", () => { + testBody("implicit-type/main") + }) + + suite("HQ", () => { + test.skip("memo class property implemented from interface", () => { + testBody("HQ/implemented-property") + }) + + test("memo class method with memo argument with void return type", () => { + testBody("HQ/void-compute") + }) + + test("memo class method with memo argument with argument with void return type", () => { + testBody("HQ/string-compute") + }) + + test("memo class method with memo argument with void return type and call the memo argument within the method", () => { + testBody("HQ/content-usage") + }) + + test("memo class method with memo argument with void return type (for `compute` function)", () => { + testBody("HQ/compute") + }) + + test("callable class with memo $_invoke", () => { + testBody("HQ/invoke") + }) + + test("callable class with non-memo $_invoke with memo argument", () => { + testBody("HQ/invoke-param") + }) + + test("callable class with $_instantiate with memo argument", () => { + testBody("HQ/instantiate") + }) + + test("declared abstract class with memo method with argument", () => { + testBody("HQ/abstract") + }) + + test("memo class method with internal call", () => { + testBody("HQ/internal-call") + }) + + test("memo class method with internal __context() and __id()", () => { + testBody("HQ/internals") + }) + + test("class method with internal memo lambda", () => { + testBody("HQ/arrow") + }) + + test("memo class method with internal variables assigned to memo lambda", () => { + testBody("HQ/arrow-assignment") + }) + + test("memo class method with internal function calls that has default value in parameter", () => { + testBody("HQ/param-calls") + }) + + test("memo class method with internal function calls that is optional parameter", () => { + testBody("HQ/param-calls-optional") + }) + + test("memo class method with internal argument call with reffered memo type", () => { + testBody("HQ/call-type") + }) + + test("memo class method with void return type", () => { + testBody("HQ/void-method") + }) + + test("memo class method with non-void return type", () => { + testBody("HQ/string-method") + }) + + test("memo class method with type parameter", () => { + testBody("HQ/type-param-method") + }) + + test("memo class method with @memo_intrinsic", () => { + testBody("HQ/intrinsic") + }) + + test("memo class method with @memo_intrinsic and internal call memo method", () => { + testBody("HQ/intrinsic-call") + }) + + test("memo class method with @memo_entry", () => { + testBody("HQ/entry") + }) + + test("memo class method with implicit return type", () => { + testBody("HQ/implicit-void-method") + }) + + test("memo class method with parameter with void return type", () => { + testBody("HQ/void-method-with-param") + }) + + test("memo class method with return in function body with void return type", () => { + testBody("HQ/void-method-with-return") + }) + + test("memo static class method with void return type", () => { + testBody("HQ/static-void-method") + }) + + test("memo class method with object parameter with void return type", () => { + testBody("HQ/object-param") + }) + + test("class constructor has parameter that is referred to a defined interface with memo property", () => { + testBody("HQ/property-constructor") + }) + + test("non memo class property", () => { + testBody("HQ/non-memo-property") + }) + + test("memo class property", () => { + testBody("HQ/memo-property") + }) + + test("optional memo class property", () => { + testBody("HQ/memo-property-optional") + }) + + test("union memo class property with default value", () => { + testBody("HQ/memo-property-union-type") + }) + + test("class property with memo type", () => { + testBody("HQ/memo-property-type") + }) + + test("non-memo interface property", () => { + testBody("HQ/non-memo-interface-property") + }) + + test("memo interface property", () => { + testBody("HQ/memo-interface-property") + }) + + test("optional memo interface property", () => { + testBody("HQ/memo-interface-property-optional") + }) + + test("memo interface property with union type", () => { + testBody("HQ/memo-interface-property-union-type") + }) + + test("interface property with memo type", () => { + testBody("HQ/memo-interface-property-type") + }) + }) +}) diff --git a/koala_tools/ui2abc/memo-plugin/test/tsconfig.json b/koala_tools/ui2abc/memo-plugin/test/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..c54dd48f5aacb9ea593507912c5d26f0f4ecb2a5 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/test/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "baseUrl": "./", + "outDir": "../build/test", + "module": "CommonJS", + "noEmit": true, + "removeComments": false, + "paths": { + "@koalaui/harness": ["../../../incremental/harness/src/typescript"] + } + }, + "include": ["./rewrite.test.ts"] +} diff --git a/koala_tools/ui2abc/memo-plugin/tsconfig.json b/koala_tools/ui2abc/memo-plugin/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..a9b6345804a40b8ef2f71a89294e1f14b504db93 --- /dev/null +++ b/koala_tools/ui2abc/memo-plugin/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "@koalaui/build-common/tsconfig.json", + "compilerOptions": { + "rootDir": ".", + "baseUrl": ".", + "outDir": "./lib", + "module": "ESNext" + }, + "include": [ + "./src/**/*.ts" + ], + "references": [ + { "path": "../../incremental/compat" }, + { "path": "../../incremental/common" } + ] +} diff --git a/koala_tools/ui2abc/package.json b/koala_tools/ui2abc/package.json new file mode 100644 index 0000000000000000000000000000000000000000..7385a2245a7b8f1af2fe0a0e3dbac07967a6a969 --- /dev/null +++ b/koala_tools/ui2abc/package.json @@ -0,0 +1,49 @@ +{ + "name": "ui2abc", + "private": true, + "workspaces": [ + "./annotate", + "./libarkts", + "./fast-arktsc", + "./memo-plugin", + "./ui-plugins", + "./tests-memo", + "../incremental/build-common", + "../interop", + "../incremental/runtime", + "../incremental/harness", + "../incremental/common", + "../incremental/compat" + ], + "dependencies": { + "@koalaui/libarkts": "file:./libarkts" + }, + "devDependencies": { + "@koalaui/ets-tsc": "4.9.5-r6", + "@koalaui/harness": "1.7.8+devel", + "bin-links": "^4.0.4", + "node-addon-api": "8.0.0", + "node-api-headers": "0.0.5", + "read-package-json-fast": "^3.0.2", + "ts-loader": "^9.2.8", + "ts-node": "^10.7.0", + "tslib": "^2.3.1", + "typescript": "4.9.5", + "tsconfig-paths": "^4.2.0", + "commander": "^13.1.0" + }, + "overrides": { + "ts-node": { + "@types/node": "^18.0.0" + } + }, + "scripts": { + "clean:all": "npm run clean --prefix libarkts && npm run clean:plugins --prefix libarkts && npm run clean --prefix memo-plugin && npm run runtime:clean --prefix memo-plugin && npm run clean --prefix memo-plugin/demo && npm run clean --prefix ../arkoala-arkts/trivial/user && npm run clean --prefix ../incremental/harness && npm run clean --prefix tests-memo", + "build:all": "npm run compile --prefix libarkts && npm run compile --prefix annotate && npm run build:fast-arktsc && npm run build:plugins && npm run compile:plugins --prefix libarkts && npm run runtime:prepare --prefix memo-plugin", + "build:fast-arktsc": "npm run compile --prefix fast-arktsc", + "build:plugins": "npm run compile --prefix memo-plugin && npm run compile --prefix ui-plugins", + "test:all": "npm run build:all --prefix ../incremental/harness && npm run test:light --prefix libarkts && npm run demo:run:light --prefix memo-plugin && npm run test:all --prefix memo-plugin", + "all": "npm run clean:all && npm run build:all && npm run test:all" + } +} + diff --git a/koala_tools/ui2abc/perf-tests/.gitignore b/koala_tools/ui2abc/perf-tests/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..3766050bedffb7f7da136b12814c6d3fdb47c5d9 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/.gitignore @@ -0,0 +1 @@ +performance-results \ No newline at end of file diff --git a/koala_tools/ui2abc/perf-tests/package.json b/koala_tools/ui2abc/perf-tests/package.json new file mode 100644 index 0000000000000000000000000000000000000000..f6969528b1a821888decdca0d0709894dda65bbd --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/package.json @@ -0,0 +1,11 @@ +{ + "name": "@ui2abc/perf-tests", + "private": true, + "description": "ui2abc performance tests", + "scripts": { + "clean": "rimraf build", + "prepare": "npm run -C ../../ets-tests build:deps", + "recheck:inc": "node ../../ui2abc/fast-arktsc --config ./ui2abcconfig.json --compiler ../../incremental/tools/panda/arkts/ui2abc --link-name ./build/out-recheck.abc && time ninja ${NINJA_OPTIONS} -f build/build.ninja", + "recheck": "npm run clean && npm run recheck:inc" + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/builtinComponents.ets b/koala_tools/ui2abc/perf-tests/src/1.1/builtinComponents.ets new file mode 100644 index 0000000000000000000000000000000000000000..6cffa05f20ee025efdda9e66584a6072393ac69a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/builtinComponents.ets @@ -0,0 +1,22651 @@ + +/** + * 内置组件 builtinComponents.ets + */ + +@Entry +@Component +struct BuiltinComponents { + @State message: string = 'Hello ArkTS' + @State sliderValue: number = 50 + @State toggleValue: boolean = false + @State pickerValue: string = 'Option1' + @State dateValue: Date = new Date() + @State progressValue: number = 0.3 + @State textValue: string = '' + @State radioValue: string = 'Radio1' + @State checkboxValues: boolean[] = [false, false, false] + @State indexValue: number = 0 + + build() { + Column() { + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + +// 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.Normal) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + }) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + }) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + }) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } ) + } + + // 10. 列表组件 + List() { + ForEach([1, 2, 3, 4, 5], (item: number) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + } + } +} + diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/customComponents.ets b/koala_tools/ui2abc/perf-tests/src/1.1/customComponents.ets new file mode 100644 index 0000000000000000000000000000000000000000..ec20f42df2d1e2c5be4950e40598de93c6e207da --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/customComponents.ets @@ -0,0 +1,36016 @@ + +/** + * 自定义组件 customComponents.ets + */ + +@Entry +@Component +struct CustomComponentsMain { + build() { + Column() { + Component0() + Component1() + Component2() + Component3() + Component4() + Component5() + Component6() + Component7() + Component8() + Component9() + Component10() + Component11() + Component12() + Component13() + Component14() + Component15() + Component16() + Component17() + Component18() + Component19() + Component20() + Component21() + Component22() + Component23() + Component24() + Component25() + Component26() + Component27() + Component28() + Component29() + Component30() + Component31() + Component32() + Component33() + Component34() + Component35() + Component36() + Component37() + Component38() + Component39() + Component40() + Component41() + Component42() + Component43() + Component44() + Component45() + Component46() + Component47() + Component48() + Component49() + Component50() + Component51() + Component52() + Component53() + Component54() + Component55() + Component56() + Component57() + Component58() + Component59() + Component60() + Component61() + Component62() + Component63() + Component64() + Component65() + Component66() + Component67() + Component68() + Component69() + Component70() + Component71() + Component72() + Component73() + Component74() + Component75() + Component76() + Component77() + Component78() + Component79() + Component80() + Component81() + Component82() + Component83() + Component84() + Component85() + Component86() + Component87() + Component88() + Component89() + Component90() + Component91() + Component92() + Component93() + Component94() + Component95() + Component96() + Component97() + Component98() + Component99() + Component100() + Component101() + Component102() + Component103() + Component104() + Component105() + Component106() + Component107() + Component108() + Component109() + Component110() + Component111() + Component112() + Component113() + Component114() + Component115() + Component116() + Component117() + Component118() + Component119() + Component120() + Component121() + Component122() + Component123() + Component124() + Component125() + Component126() + Component127() + Component128() + Component129() + Component130() + Component131() + Component132() + Component133() + Component134() + Component135() + Component136() + Component137() + Component138() + Component139() + Component140() + Component141() + Component142() + Component143() + Component144() + Component145() + Component146() + Component147() + Component148() + Component149() + Component150() + Component151() + Component152() + Component153() + Component154() + Component155() + Component156() + Component157() + Component158() + Component159() + Component160() + Component161() + Component162() + Component163() + Component164() + Component165() + Component166() + Component167() + Component168() + Component169() + Component170() + Component171() + Component172() + Component173() + Component174() + Component175() + Component176() + Component177() + Component178() + Component179() + Component180() + Component181() + Component182() + Component183() + Component184() + Component185() + Component186() + Component187() + Component188() + Component189() + Component190() + Component191() + Component192() + Component193() + Component194() + Component195() + Component196() + Component197() + Component198() + Component199() + Component200() + Component201() + Component202() + Component203() + Component204() + Component205() + Component206() + Component207() + Component208() + Component209() + Component210() + Component211() + Component212() + Component213() + Component214() + Component215() + Component216() + Component217() + Component218() + Component219() + Component220() + Component221() + Component222() + Component223() + Component224() + Component225() + Component226() + Component227() + Component228() + Component229() + Component230() + Component231() + Component232() + Component233() + Component234() + Component235() + Component236() + Component237() + Component238() + Component239() + Component240() + Component241() + Component242() + Component243() + Component244() + Component245() + Component246() + Component247() + Component248() + Component249() + Component250() + Component251() + Component252() + Component253() + Component254() + Component255() + Component256() + Component257() + Component258() + Component259() + Component260() + Component261() + Component262() + Component263() + Component264() + Component265() + Component266() + Component267() + Component268() + Component269() + Component270() + Component271() + Component272() + Component273() + Component274() + Component275() + Component276() + Component277() + Component278() + Component279() + Component280() + Component281() + Component282() + Component283() + Component284() + Component285() + Component286() + Component287() + Component288() + Component289() + Component290() + Component291() + Component292() + Component293() + Component294() + Component295() + Component296() + Component297() + Component298() + Component299() + Component300() + Component301() + Component302() + Component303() + Component304() + Component305() + Component306() + Component307() + Component308() + Component309() + Component310() + Component311() + Component312() + Component313() + Component314() + Component315() + Component316() + Component317() + Component318() + Component319() + Component320() + Component321() + Component322() + Component323() + Component324() + Component325() + Component326() + Component327() + Component328() + Component329() + Component330() + Component331() + Component332() + Component333() + Component334() + Component335() + Component336() + Component337() + Component338() + Component339() + Component340() + Component341() + Component342() + Component343() + Component344() + Component345() + Component346() + Component347() + Component348() + Component349() + Component350() + Component351() + Component352() + Component353() + Component354() + Component355() + Component356() + Component357() + Component358() + Component359() + Component360() + Component361() + Component362() + Component363() + Component364() + Component365() + Component366() + Component367() + Component368() + Component369() + Component370() + Component371() + Component372() + Component373() + Component374() + Component375() + Component376() + Component377() + Component378() + Component379() + Component380() + Component381() + Component382() + Component383() + Component384() + Component385() + Component386() + Component387() + Component388() + Component389() + Component390() + Component391() + Component392() + Component393() + Component394() + Component395() + Component396() + Component397() + Component398() + Component399() + Component400() + Component401() + Component402() + Component403() + Component404() + Component405() + Component406() + Component407() + Component408() + Component409() + Component410() + Component411() + Component412() + Component413() + Component414() + Component415() + Component416() + Component417() + Component418() + Component419() + Component420() + Component421() + Component422() + Component423() + Component424() + Component425() + Component426() + Component427() + Component428() + Component429() + Component430() + Component431() + Component432() + Component433() + Component434() + Component435() + Component436() + Component437() + Component438() + Component439() + Component440() + Component441() + Component442() + Component443() + Component444() + Component445() + Component446() + Component447() + Component448() + Component449() + Component450() + Component451() + Component452() + Component453() + Component454() + Component455() + Component456() + Component457() + Component458() + Component459() + Component460() + Component461() + Component462() + Component463() + Component464() + Component465() + Component466() + Component467() + Component468() + Component469() + Component470() + Component471() + Component472() + Component473() + Component474() + Component475() + Component476() + Component477() + Component478() + Component479() + Component480() + Component481() + Component482() + Component483() + Component484() + Component485() + Component486() + Component487() + Component488() + Component489() + Component490() + Component491() + Component492() + Component493() + Component494() + Component495() + Component496() + Component497() + Component498() + Component499() + Component500() + Component501() + Component502() + Component503() + Component504() + Component505() + Component506() + Component507() + Component508() + Component509() + Component510() + Component511() + Component512() + Component513() + Component514() + Component515() + Component516() + Component517() + Component518() + Component519() + Component520() + Component521() + Component522() + Component523() + Component524() + Component525() + Component526() + Component527() + Component528() + Component529() + Component530() + Component531() + Component532() + Component533() + Component534() + Component535() + Component536() + Component537() + Component538() + Component539() + Component540() + Component541() + Component542() + Component543() + Component544() + Component545() + Component546() + Component547() + Component548() + Component549() + Component550() + Component551() + Component552() + Component553() + Component554() + Component555() + Component556() + Component557() + Component558() + Component559() + Component560() + Component561() + Component562() + Component563() + Component564() + Component565() + Component566() + Component567() + Component568() + Component569() + Component570() + Component571() + Component572() + Component573() + Component574() + Component575() + Component576() + Component577() + Component578() + Component579() + Component580() + Component581() + Component582() + Component583() + Component584() + Component585() + Component586() + Component587() + Component588() + Component589() + Component590() + Component591() + Component592() + Component593() + Component594() + Component595() + Component596() + Component597() + Component598() + Component599() + Component600() + Component601() + Component602() + Component603() + Component604() + Component605() + Component606() + Component607() + Component608() + Component609() + Component610() + Component611() + Component612() + Component613() + Component614() + Component615() + Component616() + Component617() + Component618() + Component619() + Component620() + Component621() + Component622() + Component623() + Component624() + Component625() + Component626() + Component627() + Component628() + Component629() + Component630() + Component631() + Component632() + Component633() + Component634() + Component635() + Component636() + Component637() + Component638() + Component639() + Component640() + Component641() + Component642() + Component643() + Component644() + Component645() + Component646() + Component647() + Component648() + Component649() + Component650() + Component651() + Component652() + Component653() + Component654() + Component655() + Component656() + Component657() + Component658() + Component659() + Component660() + Component661() + Component662() + Component663() + Component664() + Component665() + Component666() + Component667() + Component668() + Component669() + Component670() + Component671() + Component672() + Component673() + Component674() + Component675() + Component676() + Component677() + Component678() + Component679() + Component680() + Component681() + Component682() + Component683() + Component684() + Component685() + Component686() + Component687() + Component688() + Component689() + Component690() + Component691() + Component692() + Component693() + Component694() + Component695() + Component696() + Component697() + Component698() + Component699() + Component700() + Component701() + Component702() + Component703() + Component704() + Component705() + Component706() + Component707() + Component708() + Component709() + Component710() + Component711() + Component712() + Component713() + Component714() + Component715() + Component716() + Component717() + Component718() + Component719() + Component720() + Component721() + Component722() + Component723() + Component724() + Component725() + Component726() + Component727() + Component728() + Component729() + Component730() + Component731() + Component732() + Component733() + Component734() + Component735() + Component736() + Component737() + Component738() + Component739() + Component740() + Component741() + Component742() + Component743() + Component744() + Component745() + Component746() + Component747() + Component748() + Component749() + Component750() + Component751() + Component752() + Component753() + Component754() + Component755() + Component756() + Component757() + Component758() + Component759() + Component760() + Component761() + Component762() + Component763() + Component764() + Component765() + Component766() + Component767() + Component768() + Component769() + Component770() + Component771() + Component772() + Component773() + Component774() + Component775() + Component776() + Component777() + Component778() + Component779() + Component780() + Component781() + Component782() + Component783() + Component784() + Component785() + Component786() + Component787() + Component788() + Component789() + Component790() + Component791() + Component792() + Component793() + Component794() + Component795() + Component796() + Component797() + Component798() + Component799() + Component800() + Component801() + Component802() + Component803() + Component804() + Component805() + Component806() + Component807() + Component808() + Component809() + Component810() + Component811() + Component812() + Component813() + Component814() + Component815() + Component816() + Component817() + Component818() + Component819() + Component820() + Component821() + Component822() + Component823() + Component824() + Component825() + Component826() + Component827() + Component828() + Component829() + Component830() + Component831() + Component832() + Component833() + Component834() + Component835() + Component836() + Component837() + Component838() + Component839() + Component840() + Component841() + Component842() + Component843() + Component844() + Component845() + Component846() + Component847() + Component848() + Component849() + Component850() + Component851() + Component852() + Component853() + Component854() + Component855() + Component856() + Component857() + Component858() + Component859() + Component860() + Component861() + Component862() + Component863() + Component864() + Component865() + Component866() + Component867() + Component868() + Component869() + Component870() + Component871() + Component872() + Component873() + Component874() + Component875() + Component876() + Component877() + Component878() + Component879() + Component880() + Component881() + Component882() + Component883() + Component884() + Component885() + Component886() + Component887() + Component888() + Component889() + Component890() + Component891() + Component892() + Component893() + Component894() + Component895() + Component896() + Component897() + Component898() + Component899() + Component900() + Component901() + Component902() + Component903() + Component904() + Component905() + Component906() + Component907() + Component908() + Component909() + Component910() + Component911() + Component912() + Component913() + Component914() + Component915() + Component916() + Component917() + Component918() + Component919() + Component920() + Component921() + Component922() + Component923() + Component924() + Component925() + Component926() + Component927() + Component928() + Component929() + Component930() + Component931() + Component932() + Component933() + Component934() + Component935() + Component936() + Component937() + Component938() + Component939() + Component940() + Component941() + Component942() + Component943() + Component944() + Component945() + Component946() + Component947() + Component948() + Component949() + Component950() + Component951() + Component952() + Component953() + Component954() + Component955() + Component956() + Component957() + Component958() + Component959() + Component960() + Component961() + Component962() + Component963() + Component964() + Component965() + Component966() + Component967() + Component968() + Component969() + Component970() + Component971() + Component972() + Component973() + Component974() + Component975() + Component976() + Component977() + Component978() + Component979() + Component980() + Component981() + Component982() + Component983() + Component984() + Component985() + Component986() + Component987() + Component988() + Component989() + Component990() + Component991() + Component992() + Component993() + Component994() + Component995() + Component996() + Component997() + Component998() + Component999() + Component1000() + Component1001() + Component1002() + Component1003() + Component1004() + Component1005() + Component1006() + Component1007() + Component1008() + Component1009() + Component1010() + Component1011() + Component1012() + Component1013() + Component1014() + Component1015() + Component1016() + Component1017() + Component1018() + Component1019() + Component1020() + Component1021() + Component1022() + Component1023() + Component1024() + Component1025() + Component1026() + Component1027() + Component1028() + Component1029() + Component1030() + Component1031() + Component1032() + Component1033() + Component1034() + Component1035() + Component1036() + Component1037() + Component1038() + Component1039() + Component1040() + Component1041() + Component1042() + Component1043() + Component1044() + Component1045() + Component1046() + Component1047() + Component1048() + Component1049() + Component1050() + Component1051() + Component1052() + Component1053() + Component1054() + Component1055() + Component1056() + Component1057() + Component1058() + Component1059() + Component1060() + Component1061() + Component1062() + Component1063() + Component1064() + Component1065() + Component1066() + Component1067() + Component1068() + Component1069() + Component1070() + Component1071() + Component1072() + Component1073() + Component1074() + Component1075() + Component1076() + Component1077() + Component1078() + Component1079() + Component1080() + Component1081() + Component1082() + Component1083() + Component1084() + Component1085() + Component1086() + Component1087() + Component1088() + Component1089() + Component1090() + Component1091() + Component1092() + Component1093() + Component1094() + Component1095() + Component1096() + Component1097() + Component1098() + Component1099() + Component1100() + Component1101() + Component1102() + Component1103() + Component1104() + Component1105() + Component1106() + Component1107() + Component1108() + Component1109() + Component1110() + Component1111() + Component1112() + Component1113() + Component1114() + Component1115() + Component1116() + Component1117() + Component1118() + Component1119() + Component1120() + Component1121() + Component1122() + Component1123() + Component1124() + Component1125() + Component1126() + Component1127() + Component1128() + Component1129() + Component1130() + Component1131() + Component1132() + Component1133() + Component1134() + Component1135() + Component1136() + Component1137() + Component1138() + Component1139() + Component1140() + Component1141() + Component1142() + Component1143() + Component1144() + Component1145() + Component1146() + Component1147() + Component1148() + Component1149() + Component1150() + Component1151() + Component1152() + Component1153() + Component1154() + Component1155() + Component1156() + Component1157() + Component1158() + Component1159() + Component1160() + Component1161() + Component1162() + Component1163() + Component1164() + Component1165() + Component1166() + Component1167() + Component1168() + Component1169() + Component1170() + Component1171() + Component1172() + Component1173() + Component1174() + Component1175() + Component1176() + Component1177() + Component1178() + Component1179() + Component1180() + Component1181() + Component1182() + Component1183() + Component1184() + Component1185() + Component1186() + Component1187() + Component1188() + Component1189() + Component1190() + Component1191() + Component1192() + Component1193() + Component1194() + Component1195() + Component1196() + Component1197() + Component1198() + Component1199() + Component1200() + Component1201() + Component1202() + Component1203() + Component1204() + Component1205() + Component1206() + Component1207() + Component1208() + Component1209() + Component1210() + Component1211() + Component1212() + Component1213() + Component1214() + Component1215() + Component1216() + Component1217() + Component1218() + Component1219() + Component1220() + Component1221() + Component1222() + Component1223() + Component1224() + Component1225() + Component1226() + Component1227() + Component1228() + Component1229() + Component1230() + Component1231() + Component1232() + Component1233() + Component1234() + Component1235() + Component1236() + Component1237() + Component1238() + Component1239() + Component1240() + Component1241() + Component1242() + Component1243() + Component1244() + Component1245() + Component1246() + Component1247() + Component1248() + Component1249() + Component1250() + Component1251() + Component1252() + Component1253() + Component1254() + Component1255() + Component1256() + Component1257() + Component1258() + Component1259() + Component1260() + Component1261() + Component1262() + Component1263() + Component1264() + Component1265() + Component1266() + Component1267() + Component1268() + Component1269() + Component1270() + Component1271() + Component1272() + Component1273() + Component1274() + Component1275() + Component1276() + Component1277() + Component1278() + Component1279() + Component1280() + Component1281() + Component1282() + Component1283() + Component1284() + Component1285() + Component1286() + Component1287() + Component1288() + Component1289() + Component1290() + Component1291() + Component1292() + Component1293() + Component1294() + Component1295() + Component1296() + Component1297() + Component1298() + Component1299() + Component1300() + Component1301() + Component1302() + Component1303() + Component1304() + Component1305() + Component1306() + Component1307() + Component1308() + Component1309() + Component1310() + Component1311() + Component1312() + Component1313() + Component1314() + Component1315() + Component1316() + Component1317() + Component1318() + Component1319() + Component1320() + Component1321() + Component1322() + Component1323() + Component1324() + Component1325() + Component1326() + Component1327() + Component1328() + Component1329() + Component1330() + Component1331() + Component1332() + Component1333() + Component1334() + Component1335() + Component1336() + Component1337() + Component1338() + Component1339() + Component1340() + Component1341() + Component1342() + Component1343() + Component1344() + Component1345() + Component1346() + Component1347() + Component1348() + Component1349() + Component1350() + Component1351() + Component1352() + Component1353() + Component1354() + Component1355() + Component1356() + Component1357() + Component1358() + Component1359() + Component1360() + Component1361() + Component1362() + Component1363() + Component1364() + Component1365() + Component1366() + Component1367() + Component1368() + Component1369() + Component1370() + Component1371() + Component1372() + Component1373() + Component1374() + Component1375() + Component1376() + Component1377() + Component1378() + Component1379() + Component1380() + Component1381() + Component1382() + Component1383() + Component1384() + Component1385() + Component1386() + Component1387() + Component1388() + Component1389() + Component1390() + Component1391() + Component1392() + Component1393() + Component1394() + Component1395() + Component1396() + Component1397() + Component1398() + Component1399() + Component1400() + Component1401() + Component1402() + Component1403() + Component1404() + Component1405() + Component1406() + Component1407() + Component1408() + Component1409() + Component1410() + Component1411() + Component1412() + Component1413() + Component1414() + Component1415() + Component1416() + Component1417() + Component1418() + Component1419() + Component1420() + Component1421() + Component1422() + Component1423() + Component1424() + Component1425() + Component1426() + Component1427() + Component1428() + Component1429() + Component1430() + Component1431() + Component1432() + Component1433() + Component1434() + Component1435() + Component1436() + Component1437() + Component1438() + Component1439() + Component1440() + Component1441() + Component1442() + Component1443() + Component1444() + Component1445() + Component1446() + Component1447() + Component1448() + Component1449() + Component1450() + Component1451() + Component1452() + Component1453() + Component1454() + Component1455() + Component1456() + Component1457() + Component1458() + Component1459() + Component1460() + Component1461() + Component1462() + Component1463() + Component1464() + Component1465() + Component1466() + Component1467() + Component1468() + Component1469() + Component1470() + Component1471() + Component1472() + Component1473() + Component1474() + Component1475() + Component1476() + Component1477() + Component1478() + Component1479() + Component1480() + Component1481() + Component1482() + Component1483() + Component1484() + Component1485() + Component1486() + Component1487() + Component1488() + Component1489() + Component1490() + Component1491() + Component1492() + Component1493() + Component1494() + Component1495() + Component1496() + Component1497() + Component1498() + Component1499() + Component1500() + Component1501() + Component1502() + Component1503() + Component1504() + Component1505() + Component1506() + Component1507() + Component1508() + Component1509() + Component1510() + Component1511() + Component1512() + Component1513() + Component1514() + Component1515() + Component1516() + Component1517() + Component1518() + Component1519() + Component1520() + Component1521() + Component1522() + Component1523() + Component1524() + Component1525() + Component1526() + Component1527() + Component1528() + Component1529() + Component1530() + Component1531() + Component1532() + Component1533() + Component1534() + Component1535() + Component1536() + Component1537() + Component1538() + Component1539() + Component1540() + Component1541() + Component1542() + Component1543() + Component1544() + Component1545() + Component1546() + Component1547() + Component1548() + Component1549() + Component1550() + Component1551() + Component1552() + Component1553() + Component1554() + Component1555() + Component1556() + Component1557() + Component1558() + Component1559() + Component1560() + Component1561() + Component1562() + Component1563() + Component1564() + Component1565() + Component1566() + Component1567() + Component1568() + Component1569() + Component1570() + Component1571() + Component1572() + Component1573() + Component1574() + Component1575() + Component1576() + Component1577() + Component1578() + Component1579() + Component1580() + Component1581() + Component1582() + Component1583() + Component1584() + Component1585() + Component1586() + Component1587() + Component1588() + Component1589() + Component1590() + Component1591() + Component1592() + Component1593() + Component1594() + Component1595() + Component1596() + Component1597() + Component1598() + Component1599() + Component1600() + Component1601() + Component1602() + Component1603() + Component1604() + Component1605() + Component1606() + Component1607() + Component1608() + Component1609() + Component1610() + Component1611() + Component1612() + Component1613() + Component1614() + Component1615() + Component1616() + Component1617() + Component1618() + Component1619() + Component1620() + Component1621() + Component1622() + Component1623() + Component1624() + Component1625() + Component1626() + Component1627() + Component1628() + Component1629() + Component1630() + Component1631() + Component1632() + Component1633() + Component1634() + Component1635() + Component1636() + Component1637() + Component1638() + Component1639() + Component1640() + Component1641() + Component1642() + Component1643() + Component1644() + Component1645() + Component1646() + Component1647() + Component1648() + Component1649() + Component1650() + Component1651() + Component1652() + Component1653() + Component1654() + Component1655() + Component1656() + Component1657() + Component1658() + Component1659() + Component1660() + Component1661() + Component1662() + Component1663() + Component1664() + Component1665() + Component1666() + Component1667() + Component1668() + Component1669() + Component1670() + Component1671() + Component1672() + Component1673() + Component1674() + Component1675() + Component1676() + Component1677() + Component1678() + Component1679() + Component1680() + Component1681() + Component1682() + Component1683() + Component1684() + Component1685() + Component1686() + Component1687() + Component1688() + Component1689() + Component1690() + Component1691() + Component1692() + Component1693() + Component1694() + Component1695() + Component1696() + Component1697() + Component1698() + Component1699() + Component1700() + Component1701() + Component1702() + Component1703() + Component1704() + Component1705() + Component1706() + Component1707() + Component1708() + Component1709() + Component1710() + Component1711() + Component1712() + Component1713() + Component1714() + Component1715() + Component1716() + Component1717() + Component1718() + Component1719() + Component1720() + Component1721() + Component1722() + Component1723() + Component1724() + Component1725() + Component1726() + Component1727() + Component1728() + Component1729() + Component1730() + Component1731() + Component1732() + Component1733() + Component1734() + Component1735() + Component1736() + Component1737() + Component1738() + Component1739() + Component1740() + Component1741() + Component1742() + Component1743() + Component1744() + Component1745() + Component1746() + Component1747() + Component1748() + Component1749() + Component1750() + Component1751() + Component1752() + Component1753() + Component1754() + Component1755() + Component1756() + Component1757() + Component1758() + Component1759() + Component1760() + Component1761() + Component1762() + Component1763() + Component1764() + Component1765() + Component1766() + Component1767() + Component1768() + Component1769() + Component1770() + Component1771() + Component1772() + Component1773() + Component1774() + Component1775() + Component1776() + Component1777() + Component1778() + Component1779() + Component1780() + Component1781() + Component1782() + Component1783() + Component1784() + Component1785() + Component1786() + Component1787() + Component1788() + Component1789() + Component1790() + Component1791() + Component1792() + Component1793() + Component1794() + Component1795() + Component1796() + Component1797() + Component1798() + Component1799() + Component1800() + Component1801() + Component1802() + Component1803() + Component1804() + Component1805() + Component1806() + Component1807() + Component1808() + Component1809() + Component1810() + Component1811() + Component1812() + Component1813() + Component1814() + Component1815() + Component1816() + Component1817() + Component1818() + Component1819() + Component1820() + Component1821() + Component1822() + Component1823() + Component1824() + Component1825() + Component1826() + Component1827() + Component1828() + Component1829() + Component1830() + Component1831() + Component1832() + Component1833() + Component1834() + Component1835() + Component1836() + Component1837() + Component1838() + Component1839() + Component1840() + Component1841() + Component1842() + Component1843() + Component1844() + Component1845() + Component1846() + Component1847() + Component1848() + Component1849() + Component1850() + Component1851() + Component1852() + Component1853() + Component1854() + Component1855() + Component1856() + Component1857() + Component1858() + Component1859() + Component1860() + Component1861() + Component1862() + Component1863() + Component1864() + Component1865() + Component1866() + Component1867() + Component1868() + Component1869() + Component1870() + Component1871() + Component1872() + Component1873() + Component1874() + Component1875() + Component1876() + Component1877() + Component1878() + Component1879() + Component1880() + Component1881() + Component1882() + Component1883() + Component1884() + Component1885() + Component1886() + Component1887() + Component1888() + Component1889() + Component1890() + Component1891() + Component1892() + Component1893() + Component1894() + Component1895() + Component1896() + Component1897() + Component1898() + Component1899() + Component1900() + Component1901() + Component1902() + Component1903() + Component1904() + Component1905() + Component1906() + Component1907() + Component1908() + Component1909() + Component1910() + Component1911() + Component1912() + Component1913() + Component1914() + Component1915() + Component1916() + Component1917() + Component1918() + Component1919() + Component1920() + Component1921() + Component1922() + Component1923() + Component1924() + Component1925() + Component1926() + Component1927() + Component1928() + Component1929() + Component1930() + Component1931() + Component1932() + Component1933() + Component1934() + Component1935() + Component1936() + Component1937() + Component1938() + Component1939() + Component1940() + Component1941() + Component1942() + Component1943() + Component1944() + Component1945() + Component1946() + Component1947() + Component1948() + Component1949() + Component1950() + Component1951() + Component1952() + Component1953() + Component1954() + Component1955() + Component1956() + Component1957() + Component1958() + Component1959() + Component1960() + Component1961() + Component1962() + Component1963() + Component1964() + Component1965() + Component1966() + Component1967() + Component1968() + Component1969() + Component1970() + Component1971() + Component1972() + Component1973() + Component1974() + Component1975() + Component1976() + Component1977() + Component1978() + Component1979() + Component1980() + Component1981() + Component1982() + Component1983() + Component1984() + Component1985() + Component1986() + Component1987() + Component1988() + Component1989() + Component1990() + Component1991() + Component1992() + Component1993() + Component1994() + Component1995() + Component1996() + Component1997() + Component1998() + Component1999() + + } + } +} + + +@Component +struct Component0 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component2 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component3 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component4 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component5 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component6 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component7 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component8 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component9 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component10 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component11 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component12 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component13 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component14 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component15 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component16 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component17 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component18 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component19 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component20 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component21 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component22 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component23 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component24 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component25 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component26 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component27 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component28 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component29 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component30 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component31 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component32 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component33 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component34 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component35 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component36 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component37 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component38 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component39 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component40 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component41 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component42 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component43 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component44 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component45 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component46 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component47 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component48 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component49 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component50 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component51 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component52 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component53 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component54 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component55 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component56 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component57 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component58 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component59 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component60 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component61 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component62 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component63 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component64 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component65 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component66 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component67 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component68 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component69 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component70 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component71 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component72 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component73 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component74 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component75 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component76 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component77 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component78 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component79 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component80 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component81 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component82 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component83 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component84 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component85 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component86 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component87 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component88 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component89 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component90 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component91 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component92 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component93 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component94 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component95 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component96 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component97 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component98 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component99 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component100 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component101 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component102 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component103 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component104 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component105 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component106 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component107 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component108 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component109 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component110 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component111 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component112 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component113 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component114 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component115 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component116 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component117 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component118 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component119 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component120 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component121 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component122 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component123 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component124 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component125 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component126 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component127 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component128 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component129 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component130 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component131 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component132 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component133 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component134 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component135 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component136 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component137 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component138 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component139 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component140 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component141 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component142 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component143 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component144 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component145 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component146 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component147 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component148 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component149 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component150 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component151 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component152 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component153 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component154 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component155 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component156 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component157 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component158 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component159 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component160 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component161 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component162 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component163 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component164 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component165 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component166 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component167 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component168 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component169 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component170 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component171 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component172 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component173 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component174 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component175 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component176 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component177 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component178 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component179 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component180 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component181 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component182 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component183 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component184 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component185 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component186 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component187 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component188 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component189 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component190 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component191 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component192 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component193 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component194 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component195 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component196 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component197 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component198 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component199 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component200 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component201 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component202 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component203 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component204 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component205 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component206 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component207 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component208 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component209 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component210 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component211 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component212 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component213 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component214 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component215 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component216 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component217 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component218 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component219 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component220 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component221 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component222 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component223 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component224 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component225 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component226 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component227 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component228 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component229 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component230 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component231 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component232 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component233 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component234 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component235 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component236 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component237 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component238 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component239 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component240 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component241 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component242 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component243 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component244 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component245 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component246 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component247 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component248 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component249 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component250 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component251 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component252 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component253 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component254 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component255 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component256 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component257 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component258 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component259 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component260 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component261 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component262 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component263 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component264 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component265 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component266 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component267 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component268 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component269 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component270 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component271 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component272 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component273 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component274 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component275 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component276 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component277 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component278 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component279 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component280 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component281 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component282 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component283 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component284 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component285 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component286 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component287 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component288 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component289 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component290 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component291 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component292 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component293 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component294 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component295 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component296 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component297 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component298 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component299 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component300 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component301 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component302 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component303 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component304 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component305 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component306 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component307 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component308 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component309 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component310 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component311 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component312 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component313 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component314 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component315 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component316 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component317 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component318 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component319 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component320 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component321 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component322 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component323 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component324 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component325 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component326 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component327 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component328 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component329 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component330 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component331 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component332 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component333 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component334 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component335 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component336 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component337 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component338 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component339 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component340 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component341 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component342 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component343 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component344 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component345 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component346 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component347 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component348 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component349 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component350 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component351 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component352 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component353 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component354 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component355 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component356 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component357 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component358 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component359 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component360 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component361 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component362 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component363 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component364 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component365 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component366 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component367 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component368 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component369 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component370 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component371 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component372 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component373 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component374 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component375 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component376 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component377 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component378 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component379 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component380 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component381 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component382 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component383 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component384 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component385 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component386 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component387 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component388 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component389 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component390 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component391 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component392 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component393 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component394 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component395 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component396 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component397 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component398 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component399 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component400 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component401 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component402 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component403 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component404 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component405 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component406 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component407 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component408 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component409 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component410 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component411 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component412 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component413 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component414 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component415 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component416 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component417 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component418 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component419 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component420 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component421 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component422 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component423 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component424 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component425 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component426 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component427 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component428 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component429 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component430 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component431 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component432 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component433 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component434 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component435 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component436 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component437 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component438 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component439 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component440 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component441 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component442 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component443 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component444 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component445 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component446 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component447 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component448 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component449 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component450 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component451 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component452 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component453 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component454 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component455 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component456 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component457 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component458 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component459 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component460 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component461 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component462 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component463 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component464 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component465 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component466 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component467 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component468 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component469 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component470 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component471 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component472 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component473 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component474 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component475 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component476 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component477 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component478 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component479 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component480 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component481 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component482 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component483 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component484 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component485 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component486 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component487 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component488 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component489 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component490 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component491 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component492 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component493 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component494 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component495 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component496 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component497 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component498 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component499 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component500 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component501 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component502 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component503 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component504 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component505 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component506 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component507 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component508 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component509 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component510 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component511 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component512 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component513 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component514 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component515 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component516 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component517 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component518 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component519 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component520 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component521 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component522 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component523 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component524 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component525 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component526 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component527 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component528 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component529 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component530 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component531 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component532 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component533 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component534 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component535 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component536 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component537 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component538 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component539 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component540 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component541 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component542 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component543 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component544 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component545 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component546 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component547 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component548 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component549 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component550 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component551 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component552 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component553 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component554 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component555 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component556 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component557 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component558 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component559 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component560 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component561 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component562 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component563 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component564 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component565 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component566 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component567 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component568 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component569 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component570 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component571 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component572 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component573 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component574 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component575 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component576 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component577 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component578 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component579 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component580 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component581 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component582 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component583 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component584 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component585 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component586 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component587 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component588 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component589 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component590 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component591 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component592 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component593 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component594 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component595 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component596 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component597 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component598 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component599 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component600 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component601 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component602 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component603 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component604 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component605 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component606 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component607 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component608 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component609 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component610 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component611 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component612 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component613 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component614 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component615 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component616 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component617 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component618 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component619 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component620 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component621 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component622 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component623 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component624 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component625 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component626 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component627 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component628 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component629 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component630 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component631 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component632 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component633 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component634 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component635 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component636 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component637 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component638 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component639 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component640 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component641 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component642 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component643 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component644 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component645 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component646 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component647 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component648 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component649 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component650 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component651 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component652 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component653 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component654 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component655 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component656 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component657 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component658 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component659 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component660 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component661 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component662 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component663 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component664 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component665 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component666 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component667 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component668 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component669 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component670 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component671 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component672 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component673 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component674 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component675 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component676 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component677 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component678 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component679 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component680 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component681 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component682 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component683 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component684 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component685 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component686 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component687 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component688 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component689 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component690 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component691 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component692 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component693 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component694 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component695 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component696 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component697 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component698 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component699 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component700 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component701 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component702 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component703 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component704 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component705 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component706 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component707 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component708 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component709 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component710 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component711 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component712 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component713 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component714 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component715 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component716 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component717 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component718 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component719 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component720 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component721 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component722 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component723 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component724 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component725 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component726 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component727 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component728 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component729 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component730 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component731 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component732 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component733 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component734 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component735 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component736 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component737 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component738 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component739 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component740 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component741 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component742 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component743 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component744 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component745 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component746 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component747 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component748 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component749 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component750 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component751 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component752 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component753 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component754 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component755 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component756 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component757 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component758 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component759 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component760 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component761 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component762 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component763 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component764 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component765 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component766 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component767 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component768 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component769 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component770 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component771 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component772 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component773 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component774 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component775 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component776 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component777 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component778 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component779 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component780 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component781 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component782 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component783 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component784 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component785 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component786 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component787 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component788 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component789 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component790 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component791 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component792 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component793 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component794 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component795 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component796 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component797 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component798 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component799 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component800 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component801 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component802 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component803 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component804 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component805 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component806 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component807 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component808 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component809 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component810 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component811 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component812 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component813 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component814 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component815 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component816 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component817 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component818 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component819 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component820 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component821 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component822 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component823 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component824 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component825 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component826 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component827 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component828 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component829 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component830 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component831 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component832 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component833 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component834 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component835 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component836 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component837 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component838 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component839 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component840 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component841 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component842 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component843 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component844 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component845 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component846 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component847 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component848 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component849 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component850 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component851 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component852 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component853 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component854 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component855 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component856 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component857 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component858 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component859 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component860 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component861 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component862 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component863 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component864 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component865 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component866 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component867 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component868 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component869 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component870 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component871 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component872 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component873 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component874 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component875 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component876 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component877 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component878 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component879 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component880 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component881 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component882 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component883 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component884 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component885 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component886 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component887 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component888 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component889 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component890 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component891 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component892 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component893 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component894 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component895 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component896 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component897 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component898 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component899 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component900 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component901 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component902 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component903 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component904 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component905 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component906 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component907 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component908 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component909 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component910 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component911 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component912 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component913 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component914 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component915 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component916 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component917 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component918 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component919 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component920 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component921 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component922 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component923 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component924 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component925 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component926 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component927 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component928 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component929 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component930 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component931 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component932 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component933 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component934 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component935 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component936 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component937 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component938 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component939 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component940 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component941 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component942 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component943 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component944 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component945 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component946 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component947 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component948 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component949 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component950 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component951 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component952 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component953 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component954 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component955 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component956 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component957 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component958 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component959 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component960 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component961 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component962 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component963 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component964 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component965 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component966 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component967 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component968 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component969 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component970 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component971 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component972 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component973 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component974 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component975 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component976 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component977 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component978 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component979 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component980 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component981 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component982 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component983 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component984 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component985 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component986 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component987 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component988 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component989 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component990 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component991 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component992 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component993 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component994 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component995 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component996 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component997 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component998 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component999 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1000 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1001 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1002 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1003 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1004 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1005 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1006 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1007 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1008 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1009 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1010 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1011 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1012 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1013 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1014 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1015 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1016 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1017 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1018 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1019 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1020 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1021 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1022 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1023 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1024 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1025 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1026 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1027 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1028 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1029 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1030 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1031 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1032 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1033 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1034 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1035 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1036 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1037 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1038 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1039 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1040 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1041 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1042 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1043 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1044 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1045 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1046 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1047 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1048 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1049 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1050 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1051 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1052 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1053 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1054 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1055 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1056 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1057 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1058 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1059 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1060 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1061 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1062 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1063 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1064 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1065 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1066 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1067 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1068 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1069 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1070 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1071 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1072 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1073 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1074 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1075 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1076 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1077 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1078 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1079 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1080 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1081 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1082 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1083 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1084 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1085 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1086 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1087 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1088 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1089 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1090 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1091 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1092 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1093 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1094 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1095 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1096 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1097 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1098 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1099 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1100 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1101 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1102 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1103 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1104 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1105 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1106 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1107 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1108 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1109 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1110 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1111 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1112 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1113 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1114 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1115 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1116 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1117 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1118 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1119 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1120 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1121 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1122 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1123 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1124 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1125 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1126 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1127 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1128 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1129 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1130 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1131 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1132 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1133 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1134 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1135 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1136 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1137 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1138 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1139 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1140 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1141 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1142 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1143 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1144 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1145 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1146 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1147 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1148 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1149 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1150 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1151 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1152 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1153 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1154 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1155 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1156 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1157 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1158 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1159 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1160 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1161 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1162 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1163 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1164 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1165 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1166 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1167 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1168 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1169 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1170 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1171 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1172 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1173 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1174 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1175 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1176 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1177 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1178 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1179 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1180 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1181 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1182 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1183 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1184 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1185 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1186 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1187 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1188 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1189 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1190 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1191 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1192 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1193 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1194 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1195 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1196 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1197 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1198 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1199 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1200 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1201 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1202 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1203 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1204 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1205 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1206 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1207 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1208 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1209 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1210 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1211 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1212 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1213 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1214 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1215 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1216 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1217 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1218 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1219 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1220 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1221 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1222 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1223 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1224 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1225 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1226 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1227 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1228 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1229 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1230 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1231 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1232 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1233 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1234 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1235 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1236 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1237 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1238 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1239 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1240 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1241 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1242 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1243 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1244 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1245 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1246 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1247 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1248 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1249 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1250 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1251 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1252 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1253 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1254 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1255 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1256 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1257 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1258 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1259 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1260 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1261 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1262 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1263 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1264 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1265 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1266 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1267 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1268 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1269 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1270 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1271 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1272 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1273 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1274 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1275 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1276 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1277 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1278 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1279 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1280 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1281 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1282 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1283 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1284 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1285 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1286 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1287 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1288 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1289 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1290 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1291 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1292 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1293 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1294 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1295 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1296 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1297 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1298 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1299 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1300 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1301 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1302 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1303 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1304 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1305 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1306 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1307 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1308 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1309 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1310 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1311 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1312 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1313 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1314 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1315 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1316 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1317 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1318 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1319 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1320 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1321 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1322 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1323 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1324 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1325 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1326 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1327 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1328 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1329 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1330 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1331 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1332 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1333 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1334 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1335 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1336 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1337 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1338 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1339 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1340 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1341 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1342 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1343 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1344 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1345 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1346 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1347 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1348 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1349 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1350 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1351 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1352 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1353 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1354 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1355 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1356 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1357 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1358 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1359 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1360 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1361 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1362 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1363 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1364 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1365 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1366 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1367 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1368 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1369 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1370 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1371 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1372 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1373 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1374 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1375 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1376 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1377 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1378 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1379 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1380 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1381 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1382 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1383 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1384 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1385 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1386 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1387 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1388 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1389 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1390 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1391 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1392 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1393 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1394 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1395 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1396 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1397 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1398 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1399 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1400 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1401 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1402 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1403 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1404 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1405 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1406 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1407 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1408 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1409 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1410 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1411 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1412 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1413 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1414 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1415 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1416 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1417 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1418 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1419 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1420 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1421 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1422 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1423 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1424 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1425 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1426 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1427 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1428 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1429 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1430 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1431 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1432 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1433 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1434 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1435 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1436 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1437 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1438 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1439 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1440 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1441 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1442 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1443 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1444 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1445 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1446 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1447 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1448 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1449 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1450 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1451 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1452 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1453 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1454 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1455 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1456 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1457 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1458 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1459 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1460 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1461 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1462 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1463 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1464 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1465 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1466 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1467 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1468 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1469 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1470 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1471 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1472 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1473 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1474 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1475 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1476 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1477 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1478 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1479 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1480 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1481 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1482 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1483 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1484 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1485 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1486 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1487 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1488 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1489 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1490 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1491 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1492 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1493 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1494 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1495 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1496 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1497 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1498 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1499 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1500 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1501 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1502 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1503 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1504 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1505 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1506 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1507 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1508 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1509 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1510 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1511 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1512 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1513 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1514 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1515 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1516 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1517 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1518 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1519 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1520 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1521 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1522 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1523 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1524 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1525 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1526 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1527 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1528 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1529 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1530 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1531 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1532 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1533 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1534 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1535 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1536 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1537 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1538 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1539 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1540 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1541 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1542 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1543 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1544 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1545 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1546 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1547 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1548 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1549 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1550 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1551 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1552 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1553 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1554 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1555 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1556 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1557 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1558 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1559 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1560 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1561 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1562 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1563 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1564 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1565 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1566 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1567 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1568 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1569 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1570 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1571 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1572 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1573 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1574 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1575 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1576 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1577 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1578 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1579 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1580 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1581 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1582 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1583 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1584 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1585 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1586 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1587 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1588 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1589 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1590 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1591 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1592 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1593 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1594 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1595 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1596 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1597 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1598 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1599 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1600 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1601 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1602 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1603 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1604 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1605 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1606 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1607 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1608 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1609 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1610 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1611 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1612 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1613 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1614 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1615 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1616 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1617 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1618 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1619 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1620 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1621 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1622 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1623 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1624 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1625 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1626 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1627 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1628 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1629 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1630 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1631 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1632 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1633 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1634 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1635 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1636 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1637 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1638 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1639 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1640 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1641 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1642 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1643 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1644 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1645 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1646 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1647 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1648 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1649 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1650 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1651 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1652 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1653 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1654 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1655 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1656 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1657 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1658 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1659 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1660 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1661 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1662 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1663 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1664 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1665 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1666 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1667 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1668 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1669 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1670 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1671 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1672 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1673 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1674 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1675 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1676 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1677 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1678 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1679 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1680 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1681 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1682 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1683 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1684 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1685 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1686 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1687 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1688 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1689 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1690 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1691 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1692 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1693 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1694 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1695 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1696 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1697 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1698 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1699 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1700 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1701 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1702 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1703 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1704 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1705 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1706 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1707 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1708 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1709 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1710 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1711 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1712 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1713 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1714 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1715 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1716 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1717 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1718 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1719 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1720 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1721 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1722 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1723 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1724 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1725 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1726 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1727 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1728 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1729 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1730 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1731 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1732 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1733 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1734 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1735 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1736 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1737 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1738 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1739 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1740 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1741 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1742 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1743 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1744 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1745 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1746 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1747 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1748 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1749 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1750 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1751 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1752 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1753 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1754 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1755 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1756 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1757 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1758 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1759 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1760 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1761 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1762 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1763 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1764 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1765 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1766 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1767 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1768 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1769 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1770 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1771 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1772 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1773 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1774 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1775 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1776 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1777 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1778 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1779 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1780 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1781 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1782 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1783 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1784 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1785 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1786 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1787 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1788 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1789 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1790 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1791 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1792 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1793 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1794 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1795 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1796 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1797 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1798 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1799 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1800 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1801 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1802 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1803 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1804 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1805 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1806 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1807 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1808 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1809 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1810 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1811 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1812 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1813 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1814 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1815 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1816 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1817 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1818 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1819 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1820 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1821 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1822 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1823 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1824 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1825 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1826 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1827 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1828 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1829 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1830 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1831 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1832 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1833 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1834 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1835 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1836 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1837 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1838 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1839 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1840 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1841 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1842 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1843 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1844 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1845 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1846 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1847 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1848 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1849 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1850 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1851 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1852 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1853 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1854 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1855 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1856 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1857 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1858 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1859 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1860 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1861 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1862 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1863 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1864 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1865 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1866 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1867 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1868 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1869 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1870 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1871 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1872 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1873 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1874 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1875 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1876 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1877 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1878 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1879 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1880 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1881 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1882 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1883 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1884 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1885 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1886 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1887 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1888 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1889 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1890 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1891 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1892 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1893 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1894 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1895 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1896 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1897 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1898 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1899 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1900 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1901 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1902 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1903 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1904 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1905 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1906 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1907 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1908 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1909 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1910 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1911 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1912 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1913 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1914 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1915 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1916 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1917 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1918 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1919 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1920 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1921 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1922 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1923 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1924 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1925 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1926 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1927 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1928 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1929 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1930 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1931 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1932 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1933 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1934 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1935 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1936 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1937 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1938 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1939 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1940 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1941 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1942 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1943 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1944 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1945 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1946 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1947 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1948 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1949 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1950 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1951 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1952 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1953 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1954 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1955 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1956 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1957 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1958 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1959 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1960 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1961 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1962 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1963 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1964 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1965 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1966 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1967 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1968 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1969 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1970 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1971 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1972 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1973 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1974 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1975 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1976 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1977 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1978 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1979 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1980 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1981 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1982 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1983 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1984 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1985 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1986 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1987 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1988 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1989 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1990 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1991 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1992 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1993 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1994 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1995 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1996 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1997 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1998 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1999 { + @State message: string = "hello world" + + build() { + Column() { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile1.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile1.ets new file mode 100644 index 0000000000000000000000000000000000000000..d6fd7dde09b847b021cd2140e75ad1b557d5d5cd --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile1.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent2 } from "./manyImportFile2" +import { ManyImportComponent3 } from "./manyImportFile3" + + +@Component +export struct ManyImportComponent1 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent2() + ManyImportComponent3() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile10.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile10.ets new file mode 100644 index 0000000000000000000000000000000000000000..92dbe9aa1138a6c8ec841da73388ea2fcc324b17 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile10.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent20 } from "./manyImportFile20" +import { ManyImportComponent21 } from "./manyImportFile21" + + +@Component +export struct ManyImportComponent10 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent20() + ManyImportComponent21() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile100.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile100.ets new file mode 100644 index 0000000000000000000000000000000000000000..8bb9fccd0b43598bad962190d75850e882572450 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile100.ets @@ -0,0 +1,16 @@ + +import { ManyImportComponent200 } from "./manyImportFile200" + + +@Component +export struct ManyImportComponent100 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent200() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile101.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile101.ets new file mode 100644 index 0000000000000000000000000000000000000000..de18ab67ae28ffc9bb39f1b58523b5ac75d15211 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile101.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent101 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile102.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile102.ets new file mode 100644 index 0000000000000000000000000000000000000000..2e24c9b0173129a95c94b297dec4cd12bfc3a32c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile102.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent102 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile103.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile103.ets new file mode 100644 index 0000000000000000000000000000000000000000..cc4215dc50b5b83908b73c5095100fcaae4505f4 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile103.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent103 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile104.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile104.ets new file mode 100644 index 0000000000000000000000000000000000000000..2f009d1566fbb6cfe7f6c44380cc4f7f072767e1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile104.ets @@ -0,0 +1,11 @@ +@Component +export struct ManyImportComponent104 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile105.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile105.ets new file mode 100644 index 0000000000000000000000000000000000000000..4dc0083241361df50f99c1a614a9865cc7a4c5cf --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile105.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent105 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile106.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile106.ets new file mode 100644 index 0000000000000000000000000000000000000000..087fa980c93cc6d53b45e3402bd4d55eeecf2a33 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile106.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent106 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile107.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile107.ets new file mode 100644 index 0000000000000000000000000000000000000000..2e1f63c0108fb60d56a4b404fb7933e4dccc0400 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile107.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent107 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile108.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile108.ets new file mode 100644 index 0000000000000000000000000000000000000000..876d4f42ca3f292fff97054caa1ec0084086adc4 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile108.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent108 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile109.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile109.ets new file mode 100644 index 0000000000000000000000000000000000000000..355c9e088298d6b5b8e4a4f0d91ca9c7cfa540b4 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile109.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent109 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile11.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile11.ets new file mode 100644 index 0000000000000000000000000000000000000000..3bc310e1ee90fe239b5a4fac6f5c2ff3e259c6bb --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile11.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent22 } from "./manyImportFile22" +import { ManyImportComponent23 } from "./manyImportFile23" + + +@Component +export struct ManyImportComponent11 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent22() + ManyImportComponent23() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile110.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile110.ets new file mode 100644 index 0000000000000000000000000000000000000000..9257311d7a053861d746b18ddc25c6bc4a43554a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile110.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent110 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile111.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile111.ets new file mode 100644 index 0000000000000000000000000000000000000000..f93b765cd2a2e0eda7c601a596d8745f542104d8 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile111.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent111 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile112.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile112.ets new file mode 100644 index 0000000000000000000000000000000000000000..b0a0f79a15630646d68fab14e2c774c99de08d61 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile112.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent112 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile113.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile113.ets new file mode 100644 index 0000000000000000000000000000000000000000..3b87b736dbb6046b952ebed0391460de5d548067 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile113.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent113 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile114.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile114.ets new file mode 100644 index 0000000000000000000000000000000000000000..94730b3c077c742feb1419c12d9f23fea64263c4 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile114.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent114 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile115.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile115.ets new file mode 100644 index 0000000000000000000000000000000000000000..b550a8df8fe06aa7bbc2cdae9b2672000371f1d1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile115.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent115 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile116.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile116.ets new file mode 100644 index 0000000000000000000000000000000000000000..1458a54b9d50b07256c48cefdf5d72d6842a0d55 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile116.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent116 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile117.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile117.ets new file mode 100644 index 0000000000000000000000000000000000000000..f20b90d3514909bfec3129dad762ad97fe308d4f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile117.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent117 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile118.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile118.ets new file mode 100644 index 0000000000000000000000000000000000000000..c31f9fab181921fe582f87c7a86ae8b2cff3874f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile118.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent118 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile119.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile119.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9e1cbacef32204e5ff25509e215e4e0a01b88e5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile119.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent119 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile12.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile12.ets new file mode 100644 index 0000000000000000000000000000000000000000..0e7563bd431d157e88f9c1e64985c199e5287dbe --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile12.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent24 } from "./manyImportFile24" +import { ManyImportComponent25 } from "./manyImportFile25" + + +@Component +export struct ManyImportComponent12 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent24() + ManyImportComponent25() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile120.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile120.ets new file mode 100644 index 0000000000000000000000000000000000000000..9e17af5bbb9b7d736a05cefdea0463f3fe2848a6 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile120.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent120 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile121.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile121.ets new file mode 100644 index 0000000000000000000000000000000000000000..43c5234f2fd29fe498907cf7b84f1905cca2338d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile121.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent121 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile122.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile122.ets new file mode 100644 index 0000000000000000000000000000000000000000..3fb7895355d007ea364c1cd5d05d90a9734b3956 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile122.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent122 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile123.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile123.ets new file mode 100644 index 0000000000000000000000000000000000000000..4a8f00c809a11769948ea28b0b6ee5afcccbf6c6 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile123.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent123 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile124.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile124.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4dfa5eba4a5ff4ce5ae7a2158f42fd5ecc28f01 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile124.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent124 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile125.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile125.ets new file mode 100644 index 0000000000000000000000000000000000000000..97c77600912ceee44b424be2d8fd3ec3a6f95317 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile125.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent125 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile126.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile126.ets new file mode 100644 index 0000000000000000000000000000000000000000..ab77b899d971002cbcbb6a4d876a119cd10b6af0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile126.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent126 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile127.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile127.ets new file mode 100644 index 0000000000000000000000000000000000000000..23b816b63eeca298d7b3b66c9c75d2a114641e56 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile127.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent127 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile128.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile128.ets new file mode 100644 index 0000000000000000000000000000000000000000..ba89fe08d95b965697289e119224388623188e5d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile128.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent128 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile129.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile129.ets new file mode 100644 index 0000000000000000000000000000000000000000..96ed3cfd8918b2b9f348ee4b60aec0c7cecf6c5a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile129.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent129 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile13.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile13.ets new file mode 100644 index 0000000000000000000000000000000000000000..ece41a91ed00aa3e21cebf21b9080d00999586a8 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile13.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent26 } from "./manyImportFile26" +import { ManyImportComponent27 } from "./manyImportFile27" + + +@Component +export struct ManyImportComponent13 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent26() + ManyImportComponent27() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile130.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile130.ets new file mode 100644 index 0000000000000000000000000000000000000000..edb8bf3b737d57d56a9a9b1d3839e07cb9c78775 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile130.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent130 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile131.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile131.ets new file mode 100644 index 0000000000000000000000000000000000000000..f8826d67771383e30fd4bf72e7d3b7215c0e0c06 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile131.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent131 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile132.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile132.ets new file mode 100644 index 0000000000000000000000000000000000000000..dcc727af61a1fe8f2ce4686625e9d4acf616be36 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile132.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent132 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile133.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile133.ets new file mode 100644 index 0000000000000000000000000000000000000000..bed4122da6cf36ec47f89fc3ea42bd7887f8d7c7 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile133.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent133 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile134.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile134.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e49e63246fed396f25ba827376421d7c13d515d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile134.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent134 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile135.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile135.ets new file mode 100644 index 0000000000000000000000000000000000000000..d31c52af123a3c3b2e6a65daab873f7f0b204b13 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile135.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent135 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile136.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile136.ets new file mode 100644 index 0000000000000000000000000000000000000000..f35868d67eb6c23293f500f461bf4f37a46b3ca9 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile136.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent136 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile137.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile137.ets new file mode 100644 index 0000000000000000000000000000000000000000..ace336a2b5a0dc18b578d89428bfaef83dec4be7 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile137.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent137 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile138.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile138.ets new file mode 100644 index 0000000000000000000000000000000000000000..7b1217e5095cd33d75a940cfcfe4e535c3e8c718 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile138.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent138 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile139.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile139.ets new file mode 100644 index 0000000000000000000000000000000000000000..6d9f3e7125c5b11c86d220c203de4dc2a8e31107 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile139.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent139 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile14.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile14.ets new file mode 100644 index 0000000000000000000000000000000000000000..e24bd163a97a1ed4664167244cddaf2d779eeee0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile14.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent28 } from "./manyImportFile28" +import { ManyImportComponent29 } from "./manyImportFile29" + + +@Component +export struct ManyImportComponent14 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent28() + ManyImportComponent29() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile140.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile140.ets new file mode 100644 index 0000000000000000000000000000000000000000..13f93329f767e1f54bba62fd732d87b813af9539 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile140.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent140 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile141.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile141.ets new file mode 100644 index 0000000000000000000000000000000000000000..feb98020eb7a54e84f57903f045fcebe42edf067 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile141.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent141 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile142.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile142.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce7fab8c3b44e80c71d735deae09bfb85345d58a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile142.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent142 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile143.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile143.ets new file mode 100644 index 0000000000000000000000000000000000000000..557aa5110dad0a6d0e48b9762a3be5e74add80aa --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile143.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent143 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile144.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile144.ets new file mode 100644 index 0000000000000000000000000000000000000000..ec19b264dfd72e31c66ab0c2ec4b52fcbb57b698 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile144.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent144 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile145.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile145.ets new file mode 100644 index 0000000000000000000000000000000000000000..f885321142b89f9942e4a3b5ca96ba61c2c5484f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile145.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent145 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile146.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile146.ets new file mode 100644 index 0000000000000000000000000000000000000000..5e6e537178183612eee6bfdce5da84544dcffbbf --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile146.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent146 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile147.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile147.ets new file mode 100644 index 0000000000000000000000000000000000000000..a952da05ce0d37befb2cf65417ab747cdd1214ec --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile147.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent147 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile148.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile148.ets new file mode 100644 index 0000000000000000000000000000000000000000..fbcc2e84e816699972c79b45a30ddeb04063d568 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile148.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent148 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile149.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile149.ets new file mode 100644 index 0000000000000000000000000000000000000000..a49f82c69667deb84bf1c2019a1ae021d75c6cb1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile149.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent149 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile15.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile15.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ef8629fa8096752a64dfc3d7742ee083768dbde --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile15.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent30 } from "./manyImportFile30" +import { ManyImportComponent31 } from "./manyImportFile31" + + +@Component +export struct ManyImportComponent15 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent30() + ManyImportComponent31() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile150.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile150.ets new file mode 100644 index 0000000000000000000000000000000000000000..99c25dd1ce995f5c9a3f66e78eaf49a5818a78b9 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile150.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent150 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile151.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile151.ets new file mode 100644 index 0000000000000000000000000000000000000000..90455dedda329055ce93894e9a287c3c3ef078ef --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile151.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent151 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile152.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile152.ets new file mode 100644 index 0000000000000000000000000000000000000000..465cb60302928cc8bbd0e29a789b57e586a2661a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile152.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent152 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile153.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile153.ets new file mode 100644 index 0000000000000000000000000000000000000000..2466f1a675e514e29ce84b7dc0427f2f9fc822cc --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile153.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent153 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile154.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile154.ets new file mode 100644 index 0000000000000000000000000000000000000000..23c3a9caba8aeab4f8d94cde0ed6a5f0435bfd51 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile154.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent154 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile155.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile155.ets new file mode 100644 index 0000000000000000000000000000000000000000..3bdb289448a5e4f36f18f67715038cb7dd727608 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile155.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent155 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile156.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile156.ets new file mode 100644 index 0000000000000000000000000000000000000000..aff1aa35d5c090a5adb2b47460282057332922c0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile156.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent156 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile157.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile157.ets new file mode 100644 index 0000000000000000000000000000000000000000..1b8766792266241080009fd1709d159576e95c6a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile157.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent157 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile158.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile158.ets new file mode 100644 index 0000000000000000000000000000000000000000..53f67c550d4cb08bc16b68ad438783102705c282 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile158.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent158 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile159.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile159.ets new file mode 100644 index 0000000000000000000000000000000000000000..f863f12e3baeceb4824661df3864c3740bbd4d9f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile159.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent159 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile16.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile16.ets new file mode 100644 index 0000000000000000000000000000000000000000..a61647ab720c7ead7f1e3851c218865af18575c6 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile16.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent32 } from "./manyImportFile32" +import { ManyImportComponent33 } from "./manyImportFile33" + + +@Component +export struct ManyImportComponent16 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent32() + ManyImportComponent33() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile160.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile160.ets new file mode 100644 index 0000000000000000000000000000000000000000..5a8146baf5b246e2a4c8b0a65853cc84fb7c64e3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile160.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent160 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile161.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile161.ets new file mode 100644 index 0000000000000000000000000000000000000000..af565397d3ac573221e0d4c537cd9727a48d60cc --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile161.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent161 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile162.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile162.ets new file mode 100644 index 0000000000000000000000000000000000000000..a19b69003f4dd074edff78c51ba30e54560daf54 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile162.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent162 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile163.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile163.ets new file mode 100644 index 0000000000000000000000000000000000000000..d88f3711ba5bb038f9e4354e30475d5e3788309c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile163.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent163 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile164.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile164.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2c8ef9ae75838f8381256e642d8c58900dac80b --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile164.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent164 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile165.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile165.ets new file mode 100644 index 0000000000000000000000000000000000000000..9a93490b2cec7f53e8261ec4837675c7ef8837d8 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile165.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent165 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile166.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile166.ets new file mode 100644 index 0000000000000000000000000000000000000000..64ffbe6b0c072406299034a52833aaa570764667 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile166.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent166 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile167.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile167.ets new file mode 100644 index 0000000000000000000000000000000000000000..a11448798371b2af701efc076e2379f2c7f73ec7 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile167.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent167 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile168.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile168.ets new file mode 100644 index 0000000000000000000000000000000000000000..6bea62b5faa85cf1aa6555cf34fc99eae9256e0e --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile168.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent168 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile169.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile169.ets new file mode 100644 index 0000000000000000000000000000000000000000..9d3b7a2f0354f3c8f2153796a98b971d156bd2b3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile169.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent169 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile17.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile17.ets new file mode 100644 index 0000000000000000000000000000000000000000..659cf1007827531af3c9d36a276ead1dd1e22c53 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile17.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent34 } from "./manyImportFile34" +import { ManyImportComponent35 } from "./manyImportFile35" + + +@Component +export struct ManyImportComponent17 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent34() + ManyImportComponent35() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile170.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile170.ets new file mode 100644 index 0000000000000000000000000000000000000000..5eb11f0c1196fd92945a0733ce0412f2af0da3dd --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile170.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent170 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile171.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile171.ets new file mode 100644 index 0000000000000000000000000000000000000000..5513947c3b4dbe64917b35982c48a424f7819291 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile171.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent171 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile172.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile172.ets new file mode 100644 index 0000000000000000000000000000000000000000..a6aee59f42b5a4d30669106743510c5a1a437966 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile172.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent172 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile173.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile173.ets new file mode 100644 index 0000000000000000000000000000000000000000..cddf98415fbb52011ad65ee0b90ccb9d09a9fe5c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile173.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent173 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile174.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile174.ets new file mode 100644 index 0000000000000000000000000000000000000000..f7d8bbee452e47c78ecf829790fa6c13add7de1d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile174.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent174 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile175.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile175.ets new file mode 100644 index 0000000000000000000000000000000000000000..f004308a8523fd177b843b77dae96dea05668598 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile175.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent175 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile176.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile176.ets new file mode 100644 index 0000000000000000000000000000000000000000..874fcb77183d3f58cb0ed627948fa02d41b44755 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile176.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent176 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile177.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile177.ets new file mode 100644 index 0000000000000000000000000000000000000000..bfd79ccf9665d43d4d3c2e5b7fd7afaa1b9b634c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile177.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent177 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile178.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile178.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5de54638a233c059d3595a8a793f4d837ba1970 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile178.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent178 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile179.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile179.ets new file mode 100644 index 0000000000000000000000000000000000000000..2b7b38aba68ba5a1c5cd9a91095a758685b7d68d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile179.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent179 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile18.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile18.ets new file mode 100644 index 0000000000000000000000000000000000000000..8bf28fa7a4ee64aaf5dc4e4a88142be40d66b2dd --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile18.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent36 } from "./manyImportFile36" +import { ManyImportComponent37 } from "./manyImportFile37" + + +@Component +export struct ManyImportComponent18 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent36() + ManyImportComponent37() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile180.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile180.ets new file mode 100644 index 0000000000000000000000000000000000000000..fa918ad6f368621c69c79461284690fa363e5a3c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile180.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent180 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile181.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile181.ets new file mode 100644 index 0000000000000000000000000000000000000000..2ee73104cdbad1a01f29469ab702126134b6ef9d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile181.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent181 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile182.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile182.ets new file mode 100644 index 0000000000000000000000000000000000000000..6b8f1b00de409dabc4696728aacaef6e03e1b747 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile182.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent182 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile183.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile183.ets new file mode 100644 index 0000000000000000000000000000000000000000..5893b377134fe7d2aeff3f0b312701baecca3626 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile183.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent183 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile184.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile184.ets new file mode 100644 index 0000000000000000000000000000000000000000..19e1e4c51af34345df0a6ea03d0aafdf21fb1925 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile184.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent184 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile185.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile185.ets new file mode 100644 index 0000000000000000000000000000000000000000..11cceee04bd6e3c786ad3b93a7aa3fa031fbc5bd --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile185.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent185 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile186.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile186.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2d2dbb97c0d44f2bc6c74c9b167149b7c2319de --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile186.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent186 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile187.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile187.ets new file mode 100644 index 0000000000000000000000000000000000000000..41b1320decfd545563054a0773d420513987afd3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile187.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent187 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile188.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile188.ets new file mode 100644 index 0000000000000000000000000000000000000000..8505db61aae0787fbf5f79bdfcf0fbf18884ac70 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile188.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent188 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile189.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile189.ets new file mode 100644 index 0000000000000000000000000000000000000000..0aca9a32ad234e64b577e01c8e969b004084d079 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile189.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent189 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile19.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile19.ets new file mode 100644 index 0000000000000000000000000000000000000000..128644499bc4f152cd0673ddd8f57b99abf3d8d2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile19.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent38 } from "./manyImportFile38" +import { ManyImportComponent39 } from "./manyImportFile39" + + +@Component +export struct ManyImportComponent19 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent38() + ManyImportComponent39() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile190.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile190.ets new file mode 100644 index 0000000000000000000000000000000000000000..b5b9be0790bcc3461f2889b7e0f920f1dc258900 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile190.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent190 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile191.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile191.ets new file mode 100644 index 0000000000000000000000000000000000000000..998fcb3373ce21ad31b8937ce1168634bf5ef6cc --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile191.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent191 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile192.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile192.ets new file mode 100644 index 0000000000000000000000000000000000000000..92b8577950c82d6696cd5e1a9ab4619cd72114fb --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile192.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent192 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile193.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile193.ets new file mode 100644 index 0000000000000000000000000000000000000000..29b3aa84030df62aa6260e03a821118aa455b88f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile193.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent193 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile194.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile194.ets new file mode 100644 index 0000000000000000000000000000000000000000..a2374a5d9872ca7131777f86bfac8b284eac5be9 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile194.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent194 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile195.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile195.ets new file mode 100644 index 0000000000000000000000000000000000000000..ce7ac3103e87a4be9f50a86e6a1aff8412b9087c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile195.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent195 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile196.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile196.ets new file mode 100644 index 0000000000000000000000000000000000000000..a62de3c6cf5d73aac81b5a34630f07760e973814 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile196.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent196 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile197.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile197.ets new file mode 100644 index 0000000000000000000000000000000000000000..4fcc8df346111c37a0b1a1eefafec5a5e69cda26 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile197.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent197 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile198.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile198.ets new file mode 100644 index 0000000000000000000000000000000000000000..9b4c54b15ea864b343fcf8a17316d23499262de5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile198.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent198 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile199.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile199.ets new file mode 100644 index 0000000000000000000000000000000000000000..0835e2beed42a5f6954cb219ac4e19e3506eca64 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile199.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent199 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile2.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile2.ets new file mode 100644 index 0000000000000000000000000000000000000000..3317cd9d19521c044e772fb160f630329eb05ee9 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile2.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent4 } from "./manyImportFile4" +import { ManyImportComponent5 } from "./manyImportFile5" + + +@Component +export struct ManyImportComponent2 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent4() + ManyImportComponent5() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile20.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile20.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e03c1fd59c3586a9106a3ec0c731fdb550aa90d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile20.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent40 } from "./manyImportFile40" +import { ManyImportComponent41 } from "./manyImportFile41" + + +@Component +export struct ManyImportComponent20 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent40() + ManyImportComponent41() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile200.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile200.ets new file mode 100644 index 0000000000000000000000000000000000000000..2ada6f1d613a20a6d3422160d3d2e7c1588782c3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile200.ets @@ -0,0 +1,14 @@ + + + +@Component +export struct ManyImportComponent200 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile21.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile21.ets new file mode 100644 index 0000000000000000000000000000000000000000..12c7b4329a41406f1f61b9f8d9b6f0be90ca3eb4 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile21.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent42 } from "./manyImportFile42" +import { ManyImportComponent43 } from "./manyImportFile43" + + +@Component +export struct ManyImportComponent21 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent42() + ManyImportComponent43() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile22.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile22.ets new file mode 100644 index 0000000000000000000000000000000000000000..12a06d87b65e5e40586a87018e390e946c1b9ac0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile22.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent44 } from "./manyImportFile44" +import { ManyImportComponent45 } from "./manyImportFile45" + + +@Component +export struct ManyImportComponent22 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent44() + ManyImportComponent45() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile23.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile23.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ddc2ce70671868cc76ef3452a67c4efbec67ca7 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile23.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent46 } from "./manyImportFile46" +import { ManyImportComponent47 } from "./manyImportFile47" + + +@Component +export struct ManyImportComponent23 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent46() + ManyImportComponent47() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile24.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile24.ets new file mode 100644 index 0000000000000000000000000000000000000000..bf04efbdca52e626a713d5faff4c048a2a23b8a1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile24.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent48 } from "./manyImportFile48" +import { ManyImportComponent49 } from "./manyImportFile49" + + +@Component +export struct ManyImportComponent24 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent48() + ManyImportComponent49() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile25.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile25.ets new file mode 100644 index 0000000000000000000000000000000000000000..6fae7d53d6f6a3b5430c5b61973d48b8a8f3a239 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile25.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent50 } from "./manyImportFile50" +import { ManyImportComponent51 } from "./manyImportFile51" + + +@Component +export struct ManyImportComponent25 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent50() + ManyImportComponent51() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile26.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile26.ets new file mode 100644 index 0000000000000000000000000000000000000000..9287a4e10551f3213d64b7e57e8225c3d81d2a04 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile26.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent52 } from "./manyImportFile52" +import { ManyImportComponent53 } from "./manyImportFile53" + + +@Component +export struct ManyImportComponent26 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent52() + ManyImportComponent53() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile27.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile27.ets new file mode 100644 index 0000000000000000000000000000000000000000..b6a21c7b8448698b3399535f448d03aa43881ef5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile27.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent54 } from "./manyImportFile54" +import { ManyImportComponent55 } from "./manyImportFile55" + + +@Component +export struct ManyImportComponent27 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent54() + ManyImportComponent55() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile28.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile28.ets new file mode 100644 index 0000000000000000000000000000000000000000..2e8627fb614592a28c5d671382595bd9e97a95ea --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile28.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent56 } from "./manyImportFile56" +import { ManyImportComponent57 } from "./manyImportFile57" + + +@Component +export struct ManyImportComponent28 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent56() + ManyImportComponent57() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile29.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile29.ets new file mode 100644 index 0000000000000000000000000000000000000000..551fdb30c05a48d412515beded16c3cb72e54f06 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile29.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent58 } from "./manyImportFile58" +import { ManyImportComponent59 } from "./manyImportFile59" + + +@Component +export struct ManyImportComponent29 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent58() + ManyImportComponent59() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile3.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile3.ets new file mode 100644 index 0000000000000000000000000000000000000000..52d11541e3a2ecff747cfdfd54919d701b11f408 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile3.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent6 } from "./manyImportFile6" +import { ManyImportComponent7 } from "./manyImportFile7" + + +@Component +export struct ManyImportComponent3 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent6() + ManyImportComponent7() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile30.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile30.ets new file mode 100644 index 0000000000000000000000000000000000000000..c80a7dd3e6ded7efe4193f1054e695032a929c80 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile30.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent60 } from "./manyImportFile60" +import { ManyImportComponent61 } from "./manyImportFile61" + + +@Component +export struct ManyImportComponent30 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent60() + ManyImportComponent61() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile31.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile31.ets new file mode 100644 index 0000000000000000000000000000000000000000..e115c27a1f20fefb2b6282b3f71c0f57a679b691 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile31.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent62 } from "./manyImportFile62" +import { ManyImportComponent63 } from "./manyImportFile63" + + +@Component +export struct ManyImportComponent31 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent62() + ManyImportComponent63() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile32.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile32.ets new file mode 100644 index 0000000000000000000000000000000000000000..f54bd42778fbf0a519ccb150e2bfbcaa08cb9fed --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile32.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent64 } from "./manyImportFile64" +import { ManyImportComponent65 } from "./manyImportFile65" + + +@Component +export struct ManyImportComponent32 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent64() + ManyImportComponent65() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile33.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile33.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ee164b4687d2cc01185f4cf1bb5d669bc30efb3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile33.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent66 } from "./manyImportFile66" +import { ManyImportComponent67 } from "./manyImportFile67" + + +@Component +export struct ManyImportComponent33 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent66() + ManyImportComponent67() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile34.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile34.ets new file mode 100644 index 0000000000000000000000000000000000000000..49b14dc9d6b00961ba012b8eb6345eb74f8d710c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile34.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent68 } from "./manyImportFile68" +import { ManyImportComponent69 } from "./manyImportFile69" + + +@Component +export struct ManyImportComponent34 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent68() + ManyImportComponent69() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile35.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile35.ets new file mode 100644 index 0000000000000000000000000000000000000000..5b047350b4534040f3775becfb7bb8b8bb30c4f6 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile35.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent70 } from "./manyImportFile70" +import { ManyImportComponent71 } from "./manyImportFile71" + + +@Component +export struct ManyImportComponent35 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent70() + ManyImportComponent71() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile36.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile36.ets new file mode 100644 index 0000000000000000000000000000000000000000..8c1afdd46c4c2323c583c2e0da92a8d21e4f3403 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile36.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent72 } from "./manyImportFile72" +import { ManyImportComponent73 } from "./manyImportFile73" + + +@Component +export struct ManyImportComponent36 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent72() + ManyImportComponent73() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile37.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile37.ets new file mode 100644 index 0000000000000000000000000000000000000000..63303acfdee8dda5556c62e4bdf8917f04af3d92 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile37.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent74 } from "./manyImportFile74" +import { ManyImportComponent75 } from "./manyImportFile75" + + +@Component +export struct ManyImportComponent37 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent74() + ManyImportComponent75() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile38.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile38.ets new file mode 100644 index 0000000000000000000000000000000000000000..4a6db3b8d978d826df046a8a17e39a2e3e54ca47 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile38.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent76 } from "./manyImportFile76" +import { ManyImportComponent77 } from "./manyImportFile77" + + +@Component +export struct ManyImportComponent38 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent76() + ManyImportComponent77() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile39.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile39.ets new file mode 100644 index 0000000000000000000000000000000000000000..d89fd9ef933751ff93d40d7e986ef407ce8b56e3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile39.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent78 } from "./manyImportFile78" +import { ManyImportComponent79 } from "./manyImportFile79" + + +@Component +export struct ManyImportComponent39 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent78() + ManyImportComponent79() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile4.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile4.ets new file mode 100644 index 0000000000000000000000000000000000000000..ee478f6874751a5823dbde800b1e5aa34cb871f5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile4.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent8 } from "./manyImportFile8" +import { ManyImportComponent9 } from "./manyImportFile9" + + +@Component +export struct ManyImportComponent4 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent8() + ManyImportComponent9() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile40.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile40.ets new file mode 100644 index 0000000000000000000000000000000000000000..47d4e716314507584b3f7f9ba6c2fc6d4679694d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile40.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent80 } from "./manyImportFile80" +import { ManyImportComponent81 } from "./manyImportFile81" + + +@Component +export struct ManyImportComponent40 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent80() + ManyImportComponent81() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile41.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile41.ets new file mode 100644 index 0000000000000000000000000000000000000000..e5d1ce6e749cda068360ab77e87bf42189fab9ff --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile41.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent82 } from "./manyImportFile82" +import { ManyImportComponent83 } from "./manyImportFile83" + + +@Component +export struct ManyImportComponent41 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent82() + ManyImportComponent83() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile42.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile42.ets new file mode 100644 index 0000000000000000000000000000000000000000..4e6a24432adb544744363a9b73f3989d9fedf392 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile42.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent84 } from "./manyImportFile84" +import { ManyImportComponent85 } from "./manyImportFile85" + + +@Component +export struct ManyImportComponent42 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent84() + ManyImportComponent85() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile43.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile43.ets new file mode 100644 index 0000000000000000000000000000000000000000..52afe1881ebb7059894957d1721b52f6faac4bd0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile43.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent86 } from "./manyImportFile86" +import { ManyImportComponent87 } from "./manyImportFile87" + + +@Component +export struct ManyImportComponent43 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent86() + ManyImportComponent87() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile44.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile44.ets new file mode 100644 index 0000000000000000000000000000000000000000..2aec45b73ddc2c5918f01ee746aa7e502c128a4b --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile44.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent88 } from "./manyImportFile88" +import { ManyImportComponent89 } from "./manyImportFile89" + + +@Component +export struct ManyImportComponent44 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent88() + ManyImportComponent89() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile45.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile45.ets new file mode 100644 index 0000000000000000000000000000000000000000..cd2219c4e990a833348276ae96fb3617b859b285 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile45.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent90 } from "./manyImportFile90" +import { ManyImportComponent91 } from "./manyImportFile91" + + +@Component +export struct ManyImportComponent45 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent90() + ManyImportComponent91() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile46.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile46.ets new file mode 100644 index 0000000000000000000000000000000000000000..92cd16c7feb99cc04b5b02be7bf88ca1e44d6a23 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile46.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent92 } from "./manyImportFile92" +import { ManyImportComponent93 } from "./manyImportFile93" + + +@Component +export struct ManyImportComponent46 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent92() + ManyImportComponent93() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile47.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile47.ets new file mode 100644 index 0000000000000000000000000000000000000000..d9d7290c13efadc2527cdae30eb1dd157bfd62cb --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile47.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent94 } from "./manyImportFile94" +import { ManyImportComponent95 } from "./manyImportFile95" + + +@Component +export struct ManyImportComponent47 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent94() + ManyImportComponent95() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile48.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile48.ets new file mode 100644 index 0000000000000000000000000000000000000000..59c2d56c83e4af8c21eead62e49bb1977ef44838 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile48.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent96 } from "./manyImportFile96" +import { ManyImportComponent97 } from "./manyImportFile97" + + +@Component +export struct ManyImportComponent48 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent96() + ManyImportComponent97() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile49.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile49.ets new file mode 100644 index 0000000000000000000000000000000000000000..60a67ec361b12f697df9c2019b8013d14da8dc67 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile49.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent98 } from "./manyImportFile98" +import { ManyImportComponent99 } from "./manyImportFile99" + + +@Component +export struct ManyImportComponent49 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent98() + ManyImportComponent99() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile5.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile5.ets new file mode 100644 index 0000000000000000000000000000000000000000..ef95a3e0aa120ebc41cbf4c9cb8fec67bc862c27 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile5.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent10 } from "./manyImportFile10" +import { ManyImportComponent11 } from "./manyImportFile11" + + +@Component +export struct ManyImportComponent5 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent10() + ManyImportComponent11() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile50.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile50.ets new file mode 100644 index 0000000000000000000000000000000000000000..dc74e1398208bc213bc0eb9feab0c5dee4161e38 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile50.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent100 } from "./manyImportFile100" +import { ManyImportComponent101 } from "./manyImportFile101" + + +@Component +export struct ManyImportComponent50 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent100() + ManyImportComponent101() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile51.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile51.ets new file mode 100644 index 0000000000000000000000000000000000000000..53c586db7850252adbf159d787ea33dd0aa7dea6 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile51.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent102 } from "./manyImportFile102" +import { ManyImportComponent103 } from "./manyImportFile103" + + +@Component +export struct ManyImportComponent51 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent102() + ManyImportComponent103() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile52.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile52.ets new file mode 100644 index 0000000000000000000000000000000000000000..da820a8a404496389f16148c12d86ab28c338271 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile52.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent104 } from "./manyImportFile104" +import { ManyImportComponent105 } from "./manyImportFile105" + + +@Component +export struct ManyImportComponent52 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent104() + ManyImportComponent105() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile53.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile53.ets new file mode 100644 index 0000000000000000000000000000000000000000..d9b1ea943e110e5ca426f86ed440d94562a892d5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile53.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent106 } from "./manyImportFile106" +import { ManyImportComponent107 } from "./manyImportFile107" + + +@Component +export struct ManyImportComponent53 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent106() + ManyImportComponent107() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile54.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile54.ets new file mode 100644 index 0000000000000000000000000000000000000000..e79fcc03e9f36d5fb8f48acdfd2ffc51d3198210 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile54.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent108 } from "./manyImportFile108" +import { ManyImportComponent109 } from "./manyImportFile109" + + +@Component +export struct ManyImportComponent54 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent108() + ManyImportComponent109() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile55.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile55.ets new file mode 100644 index 0000000000000000000000000000000000000000..04b310697f28b05b9aeb98bb4d3dcd5e4c62cee1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile55.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent110 } from "./manyImportFile110" +import { ManyImportComponent111 } from "./manyImportFile111" + + +@Component +export struct ManyImportComponent55 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent110() + ManyImportComponent111() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile56.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile56.ets new file mode 100644 index 0000000000000000000000000000000000000000..d53d57d44cb771b32172a8bac849ab55b66501bc --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile56.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent112 } from "./manyImportFile112" +import { ManyImportComponent113 } from "./manyImportFile113" + + +@Component +export struct ManyImportComponent56 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent112() + ManyImportComponent113() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile57.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile57.ets new file mode 100644 index 0000000000000000000000000000000000000000..d56d498d6ca5723965f28222a0a3fb548908de18 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile57.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent114 } from "./manyImportFile114" +import { ManyImportComponent115 } from "./manyImportFile115" + + +@Component +export struct ManyImportComponent57 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent114() + ManyImportComponent115() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile58.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile58.ets new file mode 100644 index 0000000000000000000000000000000000000000..46d8caefde651fe05171ec9225fcc9adc196ca46 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile58.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent116 } from "./manyImportFile116" +import { ManyImportComponent117 } from "./manyImportFile117" + + +@Component +export struct ManyImportComponent58 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent116() + ManyImportComponent117() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile59.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile59.ets new file mode 100644 index 0000000000000000000000000000000000000000..10bd0c29033b2f3d24dd766b61f3bdc131335726 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile59.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent118 } from "./manyImportFile118" +import { ManyImportComponent119 } from "./manyImportFile119" + + +@Component +export struct ManyImportComponent59 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent118() + ManyImportComponent119() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile6.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile6.ets new file mode 100644 index 0000000000000000000000000000000000000000..4eb6e065d01cd36bf92d2b426e1696784d516ce3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile6.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent12 } from "./manyImportFile12" +import { ManyImportComponent13 } from "./manyImportFile13" + + +@Component +export struct ManyImportComponent6 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent12() + ManyImportComponent13() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile60.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile60.ets new file mode 100644 index 0000000000000000000000000000000000000000..33723a237ce93bb0e30f3dc9dd82730d1a30c3b1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile60.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent120 } from "./manyImportFile120" +import { ManyImportComponent121 } from "./manyImportFile121" + + +@Component +export struct ManyImportComponent60 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent120() + ManyImportComponent121() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile61.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile61.ets new file mode 100644 index 0000000000000000000000000000000000000000..d04efc15c0ba4970c2ee642f252e3ca39c37c9bd --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile61.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent122 } from "./manyImportFile122" +import { ManyImportComponent123 } from "./manyImportFile123" + + +@Component +export struct ManyImportComponent61 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent122() + ManyImportComponent123() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile62.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile62.ets new file mode 100644 index 0000000000000000000000000000000000000000..86e414eb4eeae368fc4a7ad00b70f390f3c924a3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile62.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent124 } from "./manyImportFile124" +import { ManyImportComponent125 } from "./manyImportFile125" + + +@Component +export struct ManyImportComponent62 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent124() + ManyImportComponent125() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile63.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile63.ets new file mode 100644 index 0000000000000000000000000000000000000000..b24ea801a17b107c8fd1d0080bccdcaa1ce63980 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile63.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent126 } from "./manyImportFile126" +import { ManyImportComponent127 } from "./manyImportFile127" + + +@Component +export struct ManyImportComponent63 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent126() + ManyImportComponent127() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile64.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile64.ets new file mode 100644 index 0000000000000000000000000000000000000000..f90b8ca8b4f0e4ce70ce77592d0ca7d293065ada --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile64.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent128 } from "./manyImportFile128" +import { ManyImportComponent129 } from "./manyImportFile129" + + +@Component +export struct ManyImportComponent64 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent128() + ManyImportComponent129() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile65.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile65.ets new file mode 100644 index 0000000000000000000000000000000000000000..56e843cf7659c6aac2fc20c1fb9a5cf9d9d823d1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile65.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent130 } from "./manyImportFile130" +import { ManyImportComponent131 } from "./manyImportFile131" + + +@Component +export struct ManyImportComponent65 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent130() + ManyImportComponent131() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile66.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile66.ets new file mode 100644 index 0000000000000000000000000000000000000000..cb16f5756bf571231e0ad2290c97001867fc68d2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile66.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent132 } from "./manyImportFile132" +import { ManyImportComponent133 } from "./manyImportFile133" + + +@Component +export struct ManyImportComponent66 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent132() + ManyImportComponent133() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile67.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile67.ets new file mode 100644 index 0000000000000000000000000000000000000000..ebd669a91190fe8ce8314222c507b24846d97287 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile67.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent134 } from "./manyImportFile134" +import { ManyImportComponent135 } from "./manyImportFile135" + + +@Component +export struct ManyImportComponent67 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent134() + ManyImportComponent135() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile68.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile68.ets new file mode 100644 index 0000000000000000000000000000000000000000..e44d72f2140f22a5b2c264a7e594ef9ac6008236 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile68.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent136 } from "./manyImportFile136" +import { ManyImportComponent137 } from "./manyImportFile137" + + +@Component +export struct ManyImportComponent68 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent136() + ManyImportComponent137() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile69.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile69.ets new file mode 100644 index 0000000000000000000000000000000000000000..6d6af1a12ba977625d3c63d63a2d936ea94d1cc0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile69.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent138 } from "./manyImportFile138" +import { ManyImportComponent139 } from "./manyImportFile139" + + +@Component +export struct ManyImportComponent69 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent138() + ManyImportComponent139() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile7.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile7.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd7ecf4ff646d4467d8cb7aac8c5183556ea29ef --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile7.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent14 } from "./manyImportFile14" +import { ManyImportComponent15 } from "./manyImportFile15" + + +@Component +export struct ManyImportComponent7 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent14() + ManyImportComponent15() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile70.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile70.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c7ed165f7c36aa9cde22a9bc0c625171a6eb818 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile70.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent140 } from "./manyImportFile140" +import { ManyImportComponent141 } from "./manyImportFile141" + + +@Component +export struct ManyImportComponent70 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent140() + ManyImportComponent141() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile71.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile71.ets new file mode 100644 index 0000000000000000000000000000000000000000..8441b01a3323fef558240ca5bcaaf1b6f07e4d3e --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile71.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent142 } from "./manyImportFile142" +import { ManyImportComponent143 } from "./manyImportFile143" + + +@Component +export struct ManyImportComponent71 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent142() + ManyImportComponent143() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile72.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile72.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c53b2f7b46c41fabd9c7dd827457ea0ab30b1fc --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile72.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent144 } from "./manyImportFile144" +import { ManyImportComponent145 } from "./manyImportFile145" + + +@Component +export struct ManyImportComponent72 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent144() + ManyImportComponent145() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile73.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile73.ets new file mode 100644 index 0000000000000000000000000000000000000000..5e577264d9515f60a4d57006cd2e9c2f3344948c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile73.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent146 } from "./manyImportFile146" +import { ManyImportComponent147 } from "./manyImportFile147" + + +@Component +export struct ManyImportComponent73 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent146() + ManyImportComponent147() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile74.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile74.ets new file mode 100644 index 0000000000000000000000000000000000000000..700c394cabba056960138688f0bf517731a366ff --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile74.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent148 } from "./manyImportFile148" +import { ManyImportComponent149 } from "./manyImportFile149" + + +@Component +export struct ManyImportComponent74 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent148() + ManyImportComponent149() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile75.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile75.ets new file mode 100644 index 0000000000000000000000000000000000000000..bd4c2f8dfd4f66b8400132901d9c282d9c56fb18 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile75.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent150 } from "./manyImportFile150" +import { ManyImportComponent151 } from "./manyImportFile151" + + +@Component +export struct ManyImportComponent75 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent150() + ManyImportComponent151() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile76.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile76.ets new file mode 100644 index 0000000000000000000000000000000000000000..1cf4d67ef277a8728f14f06b59b25a374258d90f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile76.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent152 } from "./manyImportFile152" +import { ManyImportComponent153 } from "./manyImportFile153" + + +@Component +export struct ManyImportComponent76 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent152() + ManyImportComponent153() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile77.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile77.ets new file mode 100644 index 0000000000000000000000000000000000000000..7141b4b93fc6da1947b8c52116ba94d63ac9db95 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile77.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent154 } from "./manyImportFile154" +import { ManyImportComponent155 } from "./manyImportFile155" + + +@Component +export struct ManyImportComponent77 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent154() + ManyImportComponent155() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile78.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile78.ets new file mode 100644 index 0000000000000000000000000000000000000000..e921d29b56fb5e068ab00f5ee2c8b920b73b253d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile78.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent156 } from "./manyImportFile156" +import { ManyImportComponent157 } from "./manyImportFile157" + + +@Component +export struct ManyImportComponent78 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent156() + ManyImportComponent157() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile79.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile79.ets new file mode 100644 index 0000000000000000000000000000000000000000..9082b42f96de1e236edb90918656bff6afbd0c9a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile79.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent158 } from "./manyImportFile158" +import { ManyImportComponent159 } from "./manyImportFile159" + + +@Component +export struct ManyImportComponent79 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent158() + ManyImportComponent159() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile8.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile8.ets new file mode 100644 index 0000000000000000000000000000000000000000..cab88fe9b33a1b5adac60606236e7d93bfb91b97 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile8.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent16 } from "./manyImportFile16" +import { ManyImportComponent17 } from "./manyImportFile17" + + +@Component +export struct ManyImportComponent8 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent16() + ManyImportComponent17() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile80.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile80.ets new file mode 100644 index 0000000000000000000000000000000000000000..0c0df4d2666aeb1f6aea0a54526a61c59ff4a840 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile80.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent160 } from "./manyImportFile160" +import { ManyImportComponent161 } from "./manyImportFile161" + + +@Component +export struct ManyImportComponent80 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent160() + ManyImportComponent161() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile81.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile81.ets new file mode 100644 index 0000000000000000000000000000000000000000..9692e7178c4f30d188924b8d8cf436ea44456b53 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile81.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent162 } from "./manyImportFile162" +import { ManyImportComponent163 } from "./manyImportFile163" + + +@Component +export struct ManyImportComponent81 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent162() + ManyImportComponent163() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile82.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile82.ets new file mode 100644 index 0000000000000000000000000000000000000000..db2359828217747c60ece0fd5e7623fc6dfe7c14 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile82.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent164 } from "./manyImportFile164" +import { ManyImportComponent165 } from "./manyImportFile165" + + +@Component +export struct ManyImportComponent82 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent164() + ManyImportComponent165() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile83.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile83.ets new file mode 100644 index 0000000000000000000000000000000000000000..cc9289c38c38f011ebe2088e928127e6b7427e72 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile83.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent166 } from "./manyImportFile166" +import { ManyImportComponent167 } from "./manyImportFile167" + + +@Component +export struct ManyImportComponent83 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent166() + ManyImportComponent167() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile84.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile84.ets new file mode 100644 index 0000000000000000000000000000000000000000..ed10dfae216a83ea2ffcf8ddd46309f36584c668 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile84.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent168 } from "./manyImportFile168" +import { ManyImportComponent169 } from "./manyImportFile169" + + +@Component +export struct ManyImportComponent84 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent168() + ManyImportComponent169() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile85.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile85.ets new file mode 100644 index 0000000000000000000000000000000000000000..df620c24980c6808e82c315a701c3ddec0ad6e74 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile85.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent170 } from "./manyImportFile170" +import { ManyImportComponent171 } from "./manyImportFile171" + + +@Component +export struct ManyImportComponent85 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent170() + ManyImportComponent171() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile86.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile86.ets new file mode 100644 index 0000000000000000000000000000000000000000..9cdb9ef0f8665ab27d91b84f9f9f7cf463698359 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile86.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent172 } from "./manyImportFile172" +import { ManyImportComponent173 } from "./manyImportFile173" + + +@Component +export struct ManyImportComponent86 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent172() + ManyImportComponent173() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile87.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile87.ets new file mode 100644 index 0000000000000000000000000000000000000000..3944b524bc8c2b572435da5981711eba3d11aff7 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile87.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent174 } from "./manyImportFile174" +import { ManyImportComponent175 } from "./manyImportFile175" + + +@Component +export struct ManyImportComponent87 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent174() + ManyImportComponent175() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile88.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile88.ets new file mode 100644 index 0000000000000000000000000000000000000000..d353a0da2addcc6e66b2e7b2f956f98868384297 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile88.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent176 } from "./manyImportFile176" +import { ManyImportComponent177 } from "./manyImportFile177" + + +@Component +export struct ManyImportComponent88 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent176() + ManyImportComponent177() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile89.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile89.ets new file mode 100644 index 0000000000000000000000000000000000000000..73a2dc1393cac2a8a8a7995e65723c0dd1881519 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile89.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent178 } from "./manyImportFile178" +import { ManyImportComponent179 } from "./manyImportFile179" + + +@Component +export struct ManyImportComponent89 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent178() + ManyImportComponent179() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile9.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile9.ets new file mode 100644 index 0000000000000000000000000000000000000000..24cc9f7ccb801f851a476e0fee5908382de7f8e6 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile9.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent18 } from "./manyImportFile18" +import { ManyImportComponent19 } from "./manyImportFile19" + + +@Component +export struct ManyImportComponent9 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent18() + ManyImportComponent19() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile90.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile90.ets new file mode 100644 index 0000000000000000000000000000000000000000..c5b0533ffa206dfe7c90a418ada9bdef3de4265f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile90.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent180 } from "./manyImportFile180" +import { ManyImportComponent181 } from "./manyImportFile181" + + +@Component +export struct ManyImportComponent90 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent180() + ManyImportComponent181() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile91.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile91.ets new file mode 100644 index 0000000000000000000000000000000000000000..4691bb188c8ce6e52450acc13f4ec00cb7e73c58 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile91.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent182 } from "./manyImportFile182" +import { ManyImportComponent183 } from "./manyImportFile183" + + +@Component +export struct ManyImportComponent91 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent182() + ManyImportComponent183() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile92.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile92.ets new file mode 100644 index 0000000000000000000000000000000000000000..de85365f71e1c8561bd880a59aa0167492f04aca --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile92.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent184 } from "./manyImportFile184" +import { ManyImportComponent185 } from "./manyImportFile185" + + +@Component +export struct ManyImportComponent92 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent184() + ManyImportComponent185() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile93.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile93.ets new file mode 100644 index 0000000000000000000000000000000000000000..03d00170def455869cde953acff39d0fc3b8d1e1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile93.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent186 } from "./manyImportFile186" +import { ManyImportComponent187 } from "./manyImportFile187" + + +@Component +export struct ManyImportComponent93 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent186() + ManyImportComponent187() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile94.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile94.ets new file mode 100644 index 0000000000000000000000000000000000000000..e01974aa86d6fdd273966d21adbf954d2a41d7df --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile94.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent188 } from "./manyImportFile188" +import { ManyImportComponent189 } from "./manyImportFile189" + + +@Component +export struct ManyImportComponent94 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent188() + ManyImportComponent189() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile95.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile95.ets new file mode 100644 index 0000000000000000000000000000000000000000..23b3565b2a87abba4b19510aaf5db11239b62153 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile95.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent190 } from "./manyImportFile190" +import { ManyImportComponent191 } from "./manyImportFile191" + + +@Component +export struct ManyImportComponent95 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent190() + ManyImportComponent191() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile96.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile96.ets new file mode 100644 index 0000000000000000000000000000000000000000..fe95aa5c97e9eb5c40318cc1a002f7439eea9ccb --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile96.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent192 } from "./manyImportFile192" +import { ManyImportComponent193 } from "./manyImportFile193" + + +@Component +export struct ManyImportComponent96 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent192() + ManyImportComponent193() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile97.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile97.ets new file mode 100644 index 0000000000000000000000000000000000000000..8575a5a0e07b957a6082c304b1a2e4e35ccd3aae --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile97.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent194 } from "./manyImportFile194" +import { ManyImportComponent195 } from "./manyImportFile195" + + +@Component +export struct ManyImportComponent97 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent194() + ManyImportComponent195() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile98.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile98.ets new file mode 100644 index 0000000000000000000000000000000000000000..00322c08966045832592f5515b2f1afd54cd4d76 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile98.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent196 } from "./manyImportFile196" +import { ManyImportComponent197 } from "./manyImportFile197" + + +@Component +export struct ManyImportComponent98 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent196() + ManyImportComponent197() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile99.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile99.ets new file mode 100644 index 0000000000000000000000000000000000000000..1aa85be2c93b5bba1f353829d4032742f89e7b0b --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportFiles/manyImportFile99.ets @@ -0,0 +1,18 @@ + +import { ManyImportComponent198 } from "./manyImportFile198" +import { ManyImportComponent199 } from "./manyImportFile199" + + +@Component +export struct ManyImportComponent99 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent198() + ManyImportComponent199() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/manyImportMain.ets b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportMain.ets new file mode 100644 index 0000000000000000000000000000000000000000..598b381e1f0e06f2f6cfa6347c424d864ccf1e2d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/manyImportMain.ets @@ -0,0 +1,14 @@ + +/** + * 多级import manyImportMain.ets + */ + +@Entry +@Component +struct ManyImportMain { + build() { + Column() { + ManyImportComponent1() + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/resourceReference.ets b/koala_tools/ui2abc/perf-tests/src/1.1/resourceReference.ets new file mode 100644 index 0000000000000000000000000000000000000000..6878c52797aec5fb8ec345a7c1c347e146dcd628 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/resourceReference.ets @@ -0,0 +1,16014 @@ + +/** + * $r resourceReference.ets + */ + +@Entry +@Component +struct ResourceReferenceMain { + build() { + Column() { + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/1.1/stateVariables.ets b/koala_tools/ui2abc/perf-tests/src/1.1/stateVariables.ets new file mode 100644 index 0000000000000000000000000000000000000000..228d8ab30835713802f0ee56ee9c3e28dff60478 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/1.1/stateVariables.ets @@ -0,0 +1,3748 @@ + +/** + * 状态变量 stateVariables1_1.ets + */ + +@Entry +@Component +struct StateVariablesMain { + //============================================================================= + @State prop_num0: number = 0; + @State prop_num1: number = 0; + @State prop_num2: number = 0; + @State prop_num3: number = 0; + @State prop_num4: number = 0; + @State prop_num5: number = 0; + @State prop_num6: number = 0; + @State prop_num7: number = 0; + @State prop_num8: number = 0; + @State prop_num9: number = 0; + @State prop_num10: number = 0; + @State prop_num11: number = 0; + @State prop_num12: number = 0; + @State prop_num13: number = 0; + @State prop_num14: number = 0; + @State prop_num15: number = 0; + @State prop_num16: number = 0; + @State prop_num17: number = 0; + @State prop_num18: number = 0; + @State prop_num19: number = 0; + @State prop_num20: number = 0; + @State prop_num21: number = 0; + @State prop_num22: number = 0; + @State prop_num23: number = 0; + @State prop_num24: number = 0; + @State prop_num25: number = 0; + @State prop_num26: number = 0; + @State prop_num27: number = 0; + @State prop_num28: number = 0; + @State prop_num29: number = 0; + @State prop_num30: number = 0; + @State prop_num31: number = 0; + @State prop_num32: number = 0; + @State prop_num33: number = 0; + @State prop_num34: number = 0; + @State prop_num35: number = 0; + @State prop_num36: number = 0; + @State prop_num37: number = 0; + @State prop_num38: number = 0; + @State prop_num39: number = 0; + @State prop_num40: number = 0; + @State prop_num41: number = 0; + @State prop_num42: number = 0; + @State prop_num43: number = 0; + @State prop_num44: number = 0; + @State prop_num45: number = 0; + @State prop_num46: number = 0; + @State prop_num47: number = 0; + @State prop_num48: number = 0; + @State prop_num49: number = 0; + @State prop_num50: number = 0; + @State prop_num51: number = 0; + @State prop_num52: number = 0; + @State prop_num53: number = 0; + @State prop_num54: number = 0; + @State prop_num55: number = 0; + @State prop_num56: number = 0; + @State prop_num57: number = 0; + @State prop_num58: number = 0; + @State prop_num59: number = 0; + @State prop_num60: number = 0; + @State prop_num61: number = 0; + @State prop_num62: number = 0; + @State prop_num63: number = 0; + @State prop_num64: number = 0; + @State prop_num65: number = 0; + @State prop_num66: number = 0; + @State prop_num67: number = 0; + @State prop_num68: number = 0; + @State prop_num69: number = 0; + @State prop_num70: number = 0; + @State prop_num71: number = 0; + @State prop_num72: number = 0; + @State prop_num73: number = 0; + @State prop_num74: number = 0; + @State prop_num75: number = 0; + @State prop_num76: number = 0; + @State prop_num77: number = 0; + @State prop_num78: number = 0; + @State prop_num79: number = 0; + @State prop_num80: number = 0; + @State prop_num81: number = 0; + @State prop_num82: number = 0; + @State prop_num83: number = 0; + @State prop_num84: number = 0; + @State prop_num85: number = 0; + @State prop_num86: number = 0; + @State prop_num87: number = 0; + @State prop_num88: number = 0; + @State prop_num89: number = 0; + @State prop_num90: number = 0; + @State prop_num91: number = 0; + @State prop_num92: number = 0; + @State prop_num93: number = 0; + @State prop_num94: number = 0; + @State prop_num95: number = 0; + @State prop_num96: number = 0; + @State prop_num97: number = 0; + @State prop_num98: number = 0; + @State prop_num99: number = 0; + @State prop_num100: number = 0; + @State prop_num101: number = 0; + @State prop_num102: number = 0; + @State prop_num103: number = 0; + @State prop_num104: number = 0; + @State prop_num105: number = 0; + @State prop_num106: number = 0; + @State prop_num107: number = 0; + @State prop_num108: number = 0; + @State prop_num109: number = 0; + @State prop_num110: number = 0; + @State prop_num111: number = 0; + @State prop_num112: number = 0; + @State prop_num113: number = 0; + @State prop_num114: number = 0; + @State prop_num115: number = 0; + @State prop_num116: number = 0; + @State prop_num117: number = 0; + @State prop_num118: number = 0; + @State prop_num119: number = 0; + @State prop_num120: number = 0; + @State prop_num121: number = 0; + @State prop_num122: number = 0; + @State prop_num123: number = 0; + @State prop_num124: number = 0; + @State prop_num125: number = 0; + @State prop_num126: number = 0; + @State prop_num127: number = 0; + @State prop_num128: number = 0; + @State prop_num129: number = 0; + @State prop_num130: number = 0; + @State prop_num131: number = 0; + @State prop_num132: number = 0; + @State prop_num133: number = 0; + @State prop_num134: number = 0; + @State prop_num135: number = 0; + @State prop_num136: number = 0; + @State prop_num137: number = 0; + @State prop_num138: number = 0; + @State prop_num139: number = 0; + @State prop_num140: number = 0; + @State prop_num141: number = 0; + @State prop_num142: number = 0; + @State prop_num143: number = 0; + @State prop_num144: number = 0; + @State prop_num145: number = 0; + @State prop_num146: number = 0; + @State prop_num147: number = 0; + @State prop_num148: number = 0; + @State prop_num149: number = 0; + @State prop_num150: number = 0; + @State prop_num151: number = 0; + @State prop_num152: number = 0; + @State prop_num153: number = 0; + @State prop_num154: number = 0; + @State prop_num155: number = 0; + @State prop_num156: number = 0; + @State prop_num157: number = 0; + @State prop_num158: number = 0; + @State prop_num159: number = 0; + @State prop_num160: number = 0; + @State prop_num161: number = 0; + @State prop_num162: number = 0; + @State prop_num163: number = 0; + @State prop_num164: number = 0; + @State prop_num165: number = 0; + @State prop_num166: number = 0; + @State prop_num167: number = 0; + @State prop_num168: number = 0; + @State prop_num169: number = 0; + @State prop_num170: number = 0; + @State prop_num171: number = 0; + @State prop_num172: number = 0; + @State prop_num173: number = 0; + @State prop_num174: number = 0; + @State prop_num175: number = 0; + @State prop_num176: number = 0; + @State prop_num177: number = 0; + @State prop_num178: number = 0; + @State prop_num179: number = 0; + @State prop_num180: number = 0; + @State prop_num181: number = 0; + @State prop_num182: number = 0; + @State prop_num183: number = 0; + @State prop_num184: number = 0; + @State prop_num185: number = 0; + @State prop_num186: number = 0; + @State prop_num187: number = 0; + @State prop_num188: number = 0; + @State prop_num189: number = 0; + @State prop_num190: number = 0; + @State prop_num191: number = 0; + @State prop_num192: number = 0; + @State prop_num193: number = 0; + @State prop_num194: number = 0; + @State prop_num195: number = 0; + @State prop_num196: number = 0; + @State prop_num197: number = 0; + @State prop_num198: number = 0; + @State prop_num199: number = 0; + @State prop_num200: number = 0; + @State prop_num201: number = 0; + @State prop_num202: number = 0; + @State prop_num203: number = 0; + @State prop_num204: number = 0; + @State prop_num205: number = 0; + @State prop_num206: number = 0; + @State prop_num207: number = 0; + @State prop_num208: number = 0; + @State prop_num209: number = 0; + @State prop_num210: number = 0; + @State prop_num211: number = 0; + @State prop_num212: number = 0; + @State prop_num213: number = 0; + @State prop_num214: number = 0; + @State prop_num215: number = 0; + @State prop_num216: number = 0; + @State prop_num217: number = 0; + @State prop_num218: number = 0; + @State prop_num219: number = 0; + @State prop_num220: number = 0; + @State prop_num221: number = 0; + @State prop_num222: number = 0; + @State prop_num223: number = 0; + @State prop_num224: number = 0; + @State prop_num225: number = 0; + @State prop_num226: number = 0; + @State prop_num227: number = 0; + @State prop_num228: number = 0; + @State prop_num229: number = 0; + @State prop_num230: number = 0; + @State prop_num231: number = 0; + @State prop_num232: number = 0; + @State prop_num233: number = 0; + @State prop_num234: number = 0; + @State prop_num235: number = 0; + @State prop_num236: number = 0; + @State prop_num237: number = 0; + @State prop_num238: number = 0; + @State prop_num239: number = 0; + @State prop_num240: number = 0; + @State prop_num241: number = 0; + @State prop_num242: number = 0; + @State prop_num243: number = 0; + @State prop_num244: number = 0; + @State prop_num245: number = 0; + @State prop_num246: number = 0; + @State prop_num247: number = 0; + @State prop_num248: number = 0; + @State prop_num249: number = 0; + @State prop_num250: number = 0; + @State prop_num251: number = 0; + @State prop_num252: number = 0; + @State prop_num253: number = 0; + @State prop_num254: number = 0; + @State prop_num255: number = 0; + @State prop_num256: number = 0; + @State prop_num257: number = 0; + @State prop_num258: number = 0; + @State prop_num259: number = 0; + @State prop_num260: number = 0; + @State prop_num261: number = 0; + @State prop_num262: number = 0; + @State prop_num263: number = 0; + @State prop_num264: number = 0; + @State prop_num265: number = 0; + @State prop_num266: number = 0; + @State prop_num267: number = 0; + @State prop_num268: number = 0; + @State prop_num269: number = 0; + @State prop_num270: number = 0; + @State prop_num271: number = 0; + @State prop_num272: number = 0; + @State prop_num273: number = 0; + @State prop_num274: number = 0; + @State prop_num275: number = 0; + @State prop_num276: number = 0; + @State prop_num277: number = 0; + @State prop_num278: number = 0; + @State prop_num279: number = 0; + @State prop_num280: number = 0; + @State prop_num281: number = 0; + @State prop_num282: number = 0; + @State prop_num283: number = 0; + @State prop_num284: number = 0; + @State prop_num285: number = 0; + @State prop_num286: number = 0; + @State prop_num287: number = 0; + @State prop_num288: number = 0; + @State prop_num289: number = 0; + @State prop_num290: number = 0; + @State prop_num291: number = 0; + @State prop_num292: number = 0; + @State prop_num293: number = 0; + @State prop_num294: number = 0; + @State prop_num295: number = 0; + @State prop_num296: number = 0; + @State prop_num297: number = 0; + @State prop_num298: number = 0; + @State prop_num299: number = 0; + @State prop_num300: number = 0; + @State prop_num301: number = 0; + @State prop_num302: number = 0; + @State prop_num303: number = 0; + @State prop_num304: number = 0; + @State prop_num305: number = 0; + @State prop_num306: number = 0; + @State prop_num307: number = 0; + @State prop_num308: number = 0; + @State prop_num309: number = 0; + @State prop_num310: number = 0; + @State prop_num311: number = 0; + @State prop_num312: number = 0; + @State prop_num313: number = 0; + @State prop_num314: number = 0; + @State prop_num315: number = 0; + @State prop_num316: number = 0; + @State prop_num317: number = 0; + @State prop_num318: number = 0; + @State prop_num319: number = 0; + @State prop_num320: number = 0; + @State prop_num321: number = 0; + @State prop_num322: number = 0; + @State prop_num323: number = 0; + @State prop_num324: number = 0; + @State prop_num325: number = 0; + @State prop_num326: number = 0; + @State prop_num327: number = 0; + @State prop_num328: number = 0; + @State prop_num329: number = 0; + @State prop_num330: number = 0; + @State prop_num331: number = 0; + @State prop_num332: number = 0; + + + //============================================================================= + @State link_num0: number = 0; + @State link_num1: number = 0; + @State link_num2: number = 0; + @State link_num3: number = 0; + @State link_num4: number = 0; + @State link_num5: number = 0; + @State link_num6: number = 0; + @State link_num7: number = 0; + @State link_num8: number = 0; + @State link_num9: number = 0; + @State link_num10: number = 0; + @State link_num11: number = 0; + @State link_num12: number = 0; + @State link_num13: number = 0; + @State link_num14: number = 0; + @State link_num15: number = 0; + @State link_num16: number = 0; + @State link_num17: number = 0; + @State link_num18: number = 0; + @State link_num19: number = 0; + @State link_num20: number = 0; + @State link_num21: number = 0; + @State link_num22: number = 0; + @State link_num23: number = 0; + @State link_num24: number = 0; + @State link_num25: number = 0; + @State link_num26: number = 0; + @State link_num27: number = 0; + @State link_num28: number = 0; + @State link_num29: number = 0; + @State link_num30: number = 0; + @State link_num31: number = 0; + @State link_num32: number = 0; + @State link_num33: number = 0; + @State link_num34: number = 0; + @State link_num35: number = 0; + @State link_num36: number = 0; + @State link_num37: number = 0; + @State link_num38: number = 0; + @State link_num39: number = 0; + @State link_num40: number = 0; + @State link_num41: number = 0; + @State link_num42: number = 0; + @State link_num43: number = 0; + @State link_num44: number = 0; + @State link_num45: number = 0; + @State link_num46: number = 0; + @State link_num47: number = 0; + @State link_num48: number = 0; + @State link_num49: number = 0; + @State link_num50: number = 0; + @State link_num51: number = 0; + @State link_num52: number = 0; + @State link_num53: number = 0; + @State link_num54: number = 0; + @State link_num55: number = 0; + @State link_num56: number = 0; + @State link_num57: number = 0; + @State link_num58: number = 0; + @State link_num59: number = 0; + @State link_num60: number = 0; + @State link_num61: number = 0; + @State link_num62: number = 0; + @State link_num63: number = 0; + @State link_num64: number = 0; + @State link_num65: number = 0; + @State link_num66: number = 0; + @State link_num67: number = 0; + @State link_num68: number = 0; + @State link_num69: number = 0; + @State link_num70: number = 0; + @State link_num71: number = 0; + @State link_num72: number = 0; + @State link_num73: number = 0; + @State link_num74: number = 0; + @State link_num75: number = 0; + @State link_num76: number = 0; + @State link_num77: number = 0; + @State link_num78: number = 0; + @State link_num79: number = 0; + @State link_num80: number = 0; + @State link_num81: number = 0; + @State link_num82: number = 0; + @State link_num83: number = 0; + @State link_num84: number = 0; + @State link_num85: number = 0; + @State link_num86: number = 0; + @State link_num87: number = 0; + @State link_num88: number = 0; + @State link_num89: number = 0; + @State link_num90: number = 0; + @State link_num91: number = 0; + @State link_num92: number = 0; + @State link_num93: number = 0; + @State link_num94: number = 0; + @State link_num95: number = 0; + @State link_num96: number = 0; + @State link_num97: number = 0; + @State link_num98: number = 0; + @State link_num99: number = 0; + @State link_num100: number = 0; + @State link_num101: number = 0; + @State link_num102: number = 0; + @State link_num103: number = 0; + @State link_num104: number = 0; + @State link_num105: number = 0; + @State link_num106: number = 0; + @State link_num107: number = 0; + @State link_num108: number = 0; + @State link_num109: number = 0; + @State link_num110: number = 0; + @State link_num111: number = 0; + @State link_num112: number = 0; + @State link_num113: number = 0; + @State link_num114: number = 0; + @State link_num115: number = 0; + @State link_num116: number = 0; + @State link_num117: number = 0; + @State link_num118: number = 0; + @State link_num119: number = 0; + @State link_num120: number = 0; + @State link_num121: number = 0; + @State link_num122: number = 0; + @State link_num123: number = 0; + @State link_num124: number = 0; + @State link_num125: number = 0; + @State link_num126: number = 0; + @State link_num127: number = 0; + @State link_num128: number = 0; + @State link_num129: number = 0; + @State link_num130: number = 0; + @State link_num131: number = 0; + @State link_num132: number = 0; + @State link_num133: number = 0; + @State link_num134: number = 0; + @State link_num135: number = 0; + @State link_num136: number = 0; + @State link_num137: number = 0; + @State link_num138: number = 0; + @State link_num139: number = 0; + @State link_num140: number = 0; + @State link_num141: number = 0; + @State link_num142: number = 0; + @State link_num143: number = 0; + @State link_num144: number = 0; + @State link_num145: number = 0; + @State link_num146: number = 0; + @State link_num147: number = 0; + @State link_num148: number = 0; + @State link_num149: number = 0; + @State link_num150: number = 0; + @State link_num151: number = 0; + @State link_num152: number = 0; + @State link_num153: number = 0; + @State link_num154: number = 0; + @State link_num155: number = 0; + @State link_num156: number = 0; + @State link_num157: number = 0; + @State link_num158: number = 0; + @State link_num159: number = 0; + @State link_num160: number = 0; + @State link_num161: number = 0; + @State link_num162: number = 0; + @State link_num163: number = 0; + @State link_num164: number = 0; + @State link_num165: number = 0; + @State link_num166: number = 0; + @State link_num167: number = 0; + @State link_num168: number = 0; + @State link_num169: number = 0; + @State link_num170: number = 0; + @State link_num171: number = 0; + @State link_num172: number = 0; + @State link_num173: number = 0; + @State link_num174: number = 0; + @State link_num175: number = 0; + @State link_num176: number = 0; + @State link_num177: number = 0; + @State link_num178: number = 0; + @State link_num179: number = 0; + @State link_num180: number = 0; + @State link_num181: number = 0; + @State link_num182: number = 0; + @State link_num183: number = 0; + @State link_num184: number = 0; + @State link_num185: number = 0; + @State link_num186: number = 0; + @State link_num187: number = 0; + @State link_num188: number = 0; + @State link_num189: number = 0; + @State link_num190: number = 0; + @State link_num191: number = 0; + @State link_num192: number = 0; + @State link_num193: number = 0; + @State link_num194: number = 0; + @State link_num195: number = 0; + @State link_num196: number = 0; + @State link_num197: number = 0; + @State link_num198: number = 0; + @State link_num199: number = 0; + @State link_num200: number = 0; + @State link_num201: number = 0; + @State link_num202: number = 0; + @State link_num203: number = 0; + @State link_num204: number = 0; + @State link_num205: number = 0; + @State link_num206: number = 0; + @State link_num207: number = 0; + @State link_num208: number = 0; + @State link_num209: number = 0; + @State link_num210: number = 0; + @State link_num211: number = 0; + @State link_num212: number = 0; + @State link_num213: number = 0; + @State link_num214: number = 0; + @State link_num215: number = 0; + @State link_num216: number = 0; + @State link_num217: number = 0; + @State link_num218: number = 0; + @State link_num219: number = 0; + @State link_num220: number = 0; + @State link_num221: number = 0; + @State link_num222: number = 0; + @State link_num223: number = 0; + @State link_num224: number = 0; + @State link_num225: number = 0; + @State link_num226: number = 0; + @State link_num227: number = 0; + @State link_num228: number = 0; + @State link_num229: number = 0; + @State link_num230: number = 0; + @State link_num231: number = 0; + @State link_num232: number = 0; + @State link_num233: number = 0; + @State link_num234: number = 0; + @State link_num235: number = 0; + @State link_num236: number = 0; + @State link_num237: number = 0; + @State link_num238: number = 0; + @State link_num239: number = 0; + @State link_num240: number = 0; + @State link_num241: number = 0; + @State link_num242: number = 0; + @State link_num243: number = 0; + @State link_num244: number = 0; + @State link_num245: number = 0; + @State link_num246: number = 0; + @State link_num247: number = 0; + @State link_num248: number = 0; + @State link_num249: number = 0; + @State link_num250: number = 0; + @State link_num251: number = 0; + @State link_num252: number = 0; + @State link_num253: number = 0; + @State link_num254: number = 0; + @State link_num255: number = 0; + @State link_num256: number = 0; + @State link_num257: number = 0; + @State link_num258: number = 0; + @State link_num259: number = 0; + @State link_num260: number = 0; + @State link_num261: number = 0; + @State link_num262: number = 0; + @State link_num263: number = 0; + @State link_num264: number = 0; + @State link_num265: number = 0; + @State link_num266: number = 0; + @State link_num267: number = 0; + @State link_num268: number = 0; + @State link_num269: number = 0; + @State link_num270: number = 0; + @State link_num271: number = 0; + @State link_num272: number = 0; + @State link_num273: number = 0; + @State link_num274: number = 0; + @State link_num275: number = 0; + @State link_num276: number = 0; + @State link_num277: number = 0; + @State link_num278: number = 0; + @State link_num279: number = 0; + @State link_num280: number = 0; + @State link_num281: number = 0; + @State link_num282: number = 0; + @State link_num283: number = 0; + @State link_num284: number = 0; + @State link_num285: number = 0; + @State link_num286: number = 0; + @State link_num287: number = 0; + @State link_num288: number = 0; + @State link_num289: number = 0; + @State link_num290: number = 0; + @State link_num291: number = 0; + @State link_num292: number = 0; + @State link_num293: number = 0; + @State link_num294: number = 0; + @State link_num295: number = 0; + @State link_num296: number = 0; + @State link_num297: number = 0; + @State link_num298: number = 0; + @State link_num299: number = 0; + @State link_num300: number = 0; + @State link_num301: number = 0; + @State link_num302: number = 0; + @State link_num303: number = 0; + @State link_num304: number = 0; + @State link_num305: number = 0; + @State link_num306: number = 0; + @State link_num307: number = 0; + @State link_num308: number = 0; + @State link_num309: number = 0; + @State link_num310: number = 0; + @State link_num311: number = 0; + @State link_num312: number = 0; + @State link_num313: number = 0; + @State link_num314: number = 0; + @State link_num315: number = 0; + @State link_num316: number = 0; + @State link_num317: number = 0; + @State link_num318: number = 0; + @State link_num319: number = 0; + @State link_num320: number = 0; + @State link_num321: number = 0; + @State link_num322: number = 0; + @State link_num323: number = 0; + @State link_num324: number = 0; + @State link_num325: number = 0; + @State link_num326: number = 0; + @State link_num327: number = 0; + @State link_num328: number = 0; + @State link_num329: number = 0; + @State link_num330: number = 0; + @State link_num331: number = 0; + @State link_num332: number = 0; + + + //============================================================================= + @Provide consume_num0: number = 0; + @Provide consume_num1: number = 0; + @Provide consume_num2: number = 0; + @Provide consume_num3: number = 0; + @Provide consume_num4: number = 0; + @Provide consume_num5: number = 0; + @Provide consume_num6: number = 0; + @Provide consume_num7: number = 0; + @Provide consume_num8: number = 0; + @Provide consume_num9: number = 0; + @Provide consume_num10: number = 0; + @Provide consume_num11: number = 0; + @Provide consume_num12: number = 0; + @Provide consume_num13: number = 0; + @Provide consume_num14: number = 0; + @Provide consume_num15: number = 0; + @Provide consume_num16: number = 0; + @Provide consume_num17: number = 0; + @Provide consume_num18: number = 0; + @Provide consume_num19: number = 0; + @Provide consume_num20: number = 0; + @Provide consume_num21: number = 0; + @Provide consume_num22: number = 0; + @Provide consume_num23: number = 0; + @Provide consume_num24: number = 0; + @Provide consume_num25: number = 0; + @Provide consume_num26: number = 0; + @Provide consume_num27: number = 0; + @Provide consume_num28: number = 0; + @Provide consume_num29: number = 0; + @Provide consume_num30: number = 0; + @Provide consume_num31: number = 0; + @Provide consume_num32: number = 0; + @Provide consume_num33: number = 0; + @Provide consume_num34: number = 0; + @Provide consume_num35: number = 0; + @Provide consume_num36: number = 0; + @Provide consume_num37: number = 0; + @Provide consume_num38: number = 0; + @Provide consume_num39: number = 0; + @Provide consume_num40: number = 0; + @Provide consume_num41: number = 0; + @Provide consume_num42: number = 0; + @Provide consume_num43: number = 0; + @Provide consume_num44: number = 0; + @Provide consume_num45: number = 0; + @Provide consume_num46: number = 0; + @Provide consume_num47: number = 0; + @Provide consume_num48: number = 0; + @Provide consume_num49: number = 0; + @Provide consume_num50: number = 0; + @Provide consume_num51: number = 0; + @Provide consume_num52: number = 0; + @Provide consume_num53: number = 0; + @Provide consume_num54: number = 0; + @Provide consume_num55: number = 0; + @Provide consume_num56: number = 0; + @Provide consume_num57: number = 0; + @Provide consume_num58: number = 0; + @Provide consume_num59: number = 0; + @Provide consume_num60: number = 0; + @Provide consume_num61: number = 0; + @Provide consume_num62: number = 0; + @Provide consume_num63: number = 0; + @Provide consume_num64: number = 0; + @Provide consume_num65: number = 0; + @Provide consume_num66: number = 0; + @Provide consume_num67: number = 0; + @Provide consume_num68: number = 0; + @Provide consume_num69: number = 0; + @Provide consume_num70: number = 0; + @Provide consume_num71: number = 0; + @Provide consume_num72: number = 0; + @Provide consume_num73: number = 0; + @Provide consume_num74: number = 0; + @Provide consume_num75: number = 0; + @Provide consume_num76: number = 0; + @Provide consume_num77: number = 0; + @Provide consume_num78: number = 0; + @Provide consume_num79: number = 0; + @Provide consume_num80: number = 0; + @Provide consume_num81: number = 0; + @Provide consume_num82: number = 0; + @Provide consume_num83: number = 0; + @Provide consume_num84: number = 0; + @Provide consume_num85: number = 0; + @Provide consume_num86: number = 0; + @Provide consume_num87: number = 0; + @Provide consume_num88: number = 0; + @Provide consume_num89: number = 0; + @Provide consume_num90: number = 0; + @Provide consume_num91: number = 0; + @Provide consume_num92: number = 0; + @Provide consume_num93: number = 0; + @Provide consume_num94: number = 0; + @Provide consume_num95: number = 0; + @Provide consume_num96: number = 0; + @Provide consume_num97: number = 0; + @Provide consume_num98: number = 0; + @Provide consume_num99: number = 0; + @Provide consume_num100: number = 0; + @Provide consume_num101: number = 0; + @Provide consume_num102: number = 0; + @Provide consume_num103: number = 0; + @Provide consume_num104: number = 0; + @Provide consume_num105: number = 0; + @Provide consume_num106: number = 0; + @Provide consume_num107: number = 0; + @Provide consume_num108: number = 0; + @Provide consume_num109: number = 0; + @Provide consume_num110: number = 0; + @Provide consume_num111: number = 0; + @Provide consume_num112: number = 0; + @Provide consume_num113: number = 0; + @Provide consume_num114: number = 0; + @Provide consume_num115: number = 0; + @Provide consume_num116: number = 0; + @Provide consume_num117: number = 0; + @Provide consume_num118: number = 0; + @Provide consume_num119: number = 0; + @Provide consume_num120: number = 0; + @Provide consume_num121: number = 0; + @Provide consume_num122: number = 0; + @Provide consume_num123: number = 0; + @Provide consume_num124: number = 0; + @Provide consume_num125: number = 0; + @Provide consume_num126: number = 0; + @Provide consume_num127: number = 0; + @Provide consume_num128: number = 0; + @Provide consume_num129: number = 0; + @Provide consume_num130: number = 0; + @Provide consume_num131: number = 0; + @Provide consume_num132: number = 0; + @Provide consume_num133: number = 0; + @Provide consume_num134: number = 0; + @Provide consume_num135: number = 0; + @Provide consume_num136: number = 0; + @Provide consume_num137: number = 0; + @Provide consume_num138: number = 0; + @Provide consume_num139: number = 0; + @Provide consume_num140: number = 0; + @Provide consume_num141: number = 0; + @Provide consume_num142: number = 0; + @Provide consume_num143: number = 0; + @Provide consume_num144: number = 0; + @Provide consume_num145: number = 0; + @Provide consume_num146: number = 0; + @Provide consume_num147: number = 0; + @Provide consume_num148: number = 0; + @Provide consume_num149: number = 0; + @Provide consume_num150: number = 0; + @Provide consume_num151: number = 0; + @Provide consume_num152: number = 0; + @Provide consume_num153: number = 0; + @Provide consume_num154: number = 0; + @Provide consume_num155: number = 0; + @Provide consume_num156: number = 0; + @Provide consume_num157: number = 0; + @Provide consume_num158: number = 0; + @Provide consume_num159: number = 0; + @Provide consume_num160: number = 0; + @Provide consume_num161: number = 0; + @Provide consume_num162: number = 0; + @Provide consume_num163: number = 0; + @Provide consume_num164: number = 0; + @Provide consume_num165: number = 0; + @Provide consume_num166: number = 0; + @Provide consume_num167: number = 0; + @Provide consume_num168: number = 0; + @Provide consume_num169: number = 0; + @Provide consume_num170: number = 0; + @Provide consume_num171: number = 0; + @Provide consume_num172: number = 0; + @Provide consume_num173: number = 0; + @Provide consume_num174: number = 0; + @Provide consume_num175: number = 0; + @Provide consume_num176: number = 0; + @Provide consume_num177: number = 0; + @Provide consume_num178: number = 0; + @Provide consume_num179: number = 0; + @Provide consume_num180: number = 0; + @Provide consume_num181: number = 0; + @Provide consume_num182: number = 0; + @Provide consume_num183: number = 0; + @Provide consume_num184: number = 0; + @Provide consume_num185: number = 0; + @Provide consume_num186: number = 0; + @Provide consume_num187: number = 0; + @Provide consume_num188: number = 0; + @Provide consume_num189: number = 0; + @Provide consume_num190: number = 0; + @Provide consume_num191: number = 0; + @Provide consume_num192: number = 0; + @Provide consume_num193: number = 0; + @Provide consume_num194: number = 0; + @Provide consume_num195: number = 0; + @Provide consume_num196: number = 0; + @Provide consume_num197: number = 0; + @Provide consume_num198: number = 0; + @Provide consume_num199: number = 0; + @Provide consume_num200: number = 0; + @Provide consume_num201: number = 0; + @Provide consume_num202: number = 0; + @Provide consume_num203: number = 0; + @Provide consume_num204: number = 0; + @Provide consume_num205: number = 0; + @Provide consume_num206: number = 0; + @Provide consume_num207: number = 0; + @Provide consume_num208: number = 0; + @Provide consume_num209: number = 0; + @Provide consume_num210: number = 0; + @Provide consume_num211: number = 0; + @Provide consume_num212: number = 0; + @Provide consume_num213: number = 0; + @Provide consume_num214: number = 0; + @Provide consume_num215: number = 0; + @Provide consume_num216: number = 0; + @Provide consume_num217: number = 0; + @Provide consume_num218: number = 0; + @Provide consume_num219: number = 0; + @Provide consume_num220: number = 0; + @Provide consume_num221: number = 0; + @Provide consume_num222: number = 0; + @Provide consume_num223: number = 0; + @Provide consume_num224: number = 0; + @Provide consume_num225: number = 0; + @Provide consume_num226: number = 0; + @Provide consume_num227: number = 0; + @Provide consume_num228: number = 0; + @Provide consume_num229: number = 0; + @Provide consume_num230: number = 0; + @Provide consume_num231: number = 0; + @Provide consume_num232: number = 0; + @Provide consume_num233: number = 0; + @Provide consume_num234: number = 0; + @Provide consume_num235: number = 0; + @Provide consume_num236: number = 0; + @Provide consume_num237: number = 0; + @Provide consume_num238: number = 0; + @Provide consume_num239: number = 0; + @Provide consume_num240: number = 0; + @Provide consume_num241: number = 0; + @Provide consume_num242: number = 0; + @Provide consume_num243: number = 0; + @Provide consume_num244: number = 0; + @Provide consume_num245: number = 0; + @Provide consume_num246: number = 0; + @Provide consume_num247: number = 0; + @Provide consume_num248: number = 0; + @Provide consume_num249: number = 0; + @Provide consume_num250: number = 0; + @Provide consume_num251: number = 0; + @Provide consume_num252: number = 0; + @Provide consume_num253: number = 0; + @Provide consume_num254: number = 0; + @Provide consume_num255: number = 0; + @Provide consume_num256: number = 0; + @Provide consume_num257: number = 0; + @Provide consume_num258: number = 0; + @Provide consume_num259: number = 0; + @Provide consume_num260: number = 0; + @Provide consume_num261: number = 0; + @Provide consume_num262: number = 0; + @Provide consume_num263: number = 0; + @Provide consume_num264: number = 0; + @Provide consume_num265: number = 0; + @Provide consume_num266: number = 0; + @Provide consume_num267: number = 0; + @Provide consume_num268: number = 0; + @Provide consume_num269: number = 0; + @Provide consume_num270: number = 0; + @Provide consume_num271: number = 0; + @Provide consume_num272: number = 0; + @Provide consume_num273: number = 0; + @Provide consume_num274: number = 0; + @Provide consume_num275: number = 0; + @Provide consume_num276: number = 0; + @Provide consume_num277: number = 0; + @Provide consume_num278: number = 0; + @Provide consume_num279: number = 0; + @Provide consume_num280: number = 0; + @Provide consume_num281: number = 0; + @Provide consume_num282: number = 0; + @Provide consume_num283: number = 0; + @Provide consume_num284: number = 0; + @Provide consume_num285: number = 0; + @Provide consume_num286: number = 0; + @Provide consume_num287: number = 0; + @Provide consume_num288: number = 0; + @Provide consume_num289: number = 0; + @Provide consume_num290: number = 0; + @Provide consume_num291: number = 0; + @Provide consume_num292: number = 0; + @Provide consume_num293: number = 0; + @Provide consume_num294: number = 0; + @Provide consume_num295: number = 0; + @Provide consume_num296: number = 0; + @Provide consume_num297: number = 0; + @Provide consume_num298: number = 0; + @Provide consume_num299: number = 0; + @Provide consume_num300: number = 0; + @Provide consume_num301: number = 0; + @Provide consume_num302: number = 0; + @Provide consume_num303: number = 0; + @Provide consume_num304: number = 0; + @Provide consume_num305: number = 0; + @Provide consume_num306: number = 0; + @Provide consume_num307: number = 0; + @Provide consume_num308: number = 0; + @Provide consume_num309: number = 0; + @Provide consume_num310: number = 0; + @Provide consume_num311: number = 0; + @Provide consume_num312: number = 0; + @Provide consume_num313: number = 0; + @Provide consume_num314: number = 0; + @Provide consume_num315: number = 0; + @Provide consume_num316: number = 0; + @Provide consume_num317: number = 0; + @Provide consume_num318: number = 0; + @Provide consume_num319: number = 0; + @Provide consume_num320: number = 0; + @Provide consume_num321: number = 0; + @Provide consume_num322: number = 0; + @Provide consume_num323: number = 0; + @Provide consume_num324: number = 0; + @Provide consume_num325: number = 0; + @Provide consume_num326: number = 0; + @Provide consume_num327: number = 0; + @Provide consume_num328: number = 0; + @Provide consume_num329: number = 0; + @Provide consume_num330: number = 0; + @Provide consume_num331: number = 0; + @Provide consume_num332: number = 0; + + + build() { + Column() { + //============================================================================= + PropVariables( + { + prop_num0: this.prop_num0, + prop_num1: this.prop_num1, + prop_num2: this.prop_num2, + prop_num3: this.prop_num3, + prop_num4: this.prop_num4, + prop_num5: this.prop_num5, + prop_num6: this.prop_num6, + prop_num7: this.prop_num7, + prop_num8: this.prop_num8, + prop_num9: this.prop_num9, + prop_num10: this.prop_num10, + prop_num11: this.prop_num11, + prop_num12: this.prop_num12, + prop_num13: this.prop_num13, + prop_num14: this.prop_num14, + prop_num15: this.prop_num15, + prop_num16: this.prop_num16, + prop_num17: this.prop_num17, + prop_num18: this.prop_num18, + prop_num19: this.prop_num19, + prop_num20: this.prop_num20, + prop_num21: this.prop_num21, + prop_num22: this.prop_num22, + prop_num23: this.prop_num23, + prop_num24: this.prop_num24, + prop_num25: this.prop_num25, + prop_num26: this.prop_num26, + prop_num27: this.prop_num27, + prop_num28: this.prop_num28, + prop_num29: this.prop_num29, + prop_num30: this.prop_num30, + prop_num31: this.prop_num31, + prop_num32: this.prop_num32, + prop_num33: this.prop_num33, + prop_num34: this.prop_num34, + prop_num35: this.prop_num35, + prop_num36: this.prop_num36, + prop_num37: this.prop_num37, + prop_num38: this.prop_num38, + prop_num39: this.prop_num39, + prop_num40: this.prop_num40, + prop_num41: this.prop_num41, + prop_num42: this.prop_num42, + prop_num43: this.prop_num43, + prop_num44: this.prop_num44, + prop_num45: this.prop_num45, + prop_num46: this.prop_num46, + prop_num47: this.prop_num47, + prop_num48: this.prop_num48, + prop_num49: this.prop_num49, + prop_num50: this.prop_num50, + prop_num51: this.prop_num51, + prop_num52: this.prop_num52, + prop_num53: this.prop_num53, + prop_num54: this.prop_num54, + prop_num55: this.prop_num55, + prop_num56: this.prop_num56, + prop_num57: this.prop_num57, + prop_num58: this.prop_num58, + prop_num59: this.prop_num59, + prop_num60: this.prop_num60, + prop_num61: this.prop_num61, + prop_num62: this.prop_num62, + prop_num63: this.prop_num63, + prop_num64: this.prop_num64, + prop_num65: this.prop_num65, + prop_num66: this.prop_num66, + prop_num67: this.prop_num67, + prop_num68: this.prop_num68, + prop_num69: this.prop_num69, + prop_num70: this.prop_num70, + prop_num71: this.prop_num71, + prop_num72: this.prop_num72, + prop_num73: this.prop_num73, + prop_num74: this.prop_num74, + prop_num75: this.prop_num75, + prop_num76: this.prop_num76, + prop_num77: this.prop_num77, + prop_num78: this.prop_num78, + prop_num79: this.prop_num79, + prop_num80: this.prop_num80, + prop_num81: this.prop_num81, + prop_num82: this.prop_num82, + prop_num83: this.prop_num83, + prop_num84: this.prop_num84, + prop_num85: this.prop_num85, + prop_num86: this.prop_num86, + prop_num87: this.prop_num87, + prop_num88: this.prop_num88, + prop_num89: this.prop_num89, + prop_num90: this.prop_num90, + prop_num91: this.prop_num91, + prop_num92: this.prop_num92, + prop_num93: this.prop_num93, + prop_num94: this.prop_num94, + prop_num95: this.prop_num95, + prop_num96: this.prop_num96, + prop_num97: this.prop_num97, + prop_num98: this.prop_num98, + prop_num99: this.prop_num99, + prop_num100: this.prop_num100, + prop_num101: this.prop_num101, + prop_num102: this.prop_num102, + prop_num103: this.prop_num103, + prop_num104: this.prop_num104, + prop_num105: this.prop_num105, + prop_num106: this.prop_num106, + prop_num107: this.prop_num107, + prop_num108: this.prop_num108, + prop_num109: this.prop_num109, + prop_num110: this.prop_num110, + prop_num111: this.prop_num111, + prop_num112: this.prop_num112, + prop_num113: this.prop_num113, + prop_num114: this.prop_num114, + prop_num115: this.prop_num115, + prop_num116: this.prop_num116, + prop_num117: this.prop_num117, + prop_num118: this.prop_num118, + prop_num119: this.prop_num119, + prop_num120: this.prop_num120, + prop_num121: this.prop_num121, + prop_num122: this.prop_num122, + prop_num123: this.prop_num123, + prop_num124: this.prop_num124, + prop_num125: this.prop_num125, + prop_num126: this.prop_num126, + prop_num127: this.prop_num127, + prop_num128: this.prop_num128, + prop_num129: this.prop_num129, + prop_num130: this.prop_num130, + prop_num131: this.prop_num131, + prop_num132: this.prop_num132, + prop_num133: this.prop_num133, + prop_num134: this.prop_num134, + prop_num135: this.prop_num135, + prop_num136: this.prop_num136, + prop_num137: this.prop_num137, + prop_num138: this.prop_num138, + prop_num139: this.prop_num139, + prop_num140: this.prop_num140, + prop_num141: this.prop_num141, + prop_num142: this.prop_num142, + prop_num143: this.prop_num143, + prop_num144: this.prop_num144, + prop_num145: this.prop_num145, + prop_num146: this.prop_num146, + prop_num147: this.prop_num147, + prop_num148: this.prop_num148, + prop_num149: this.prop_num149, + prop_num150: this.prop_num150, + prop_num151: this.prop_num151, + prop_num152: this.prop_num152, + prop_num153: this.prop_num153, + prop_num154: this.prop_num154, + prop_num155: this.prop_num155, + prop_num156: this.prop_num156, + prop_num157: this.prop_num157, + prop_num158: this.prop_num158, + prop_num159: this.prop_num159, + prop_num160: this.prop_num160, + prop_num161: this.prop_num161, + prop_num162: this.prop_num162, + prop_num163: this.prop_num163, + prop_num164: this.prop_num164, + prop_num165: this.prop_num165, + prop_num166: this.prop_num166, + prop_num167: this.prop_num167, + prop_num168: this.prop_num168, + prop_num169: this.prop_num169, + prop_num170: this.prop_num170, + prop_num171: this.prop_num171, + prop_num172: this.prop_num172, + prop_num173: this.prop_num173, + prop_num174: this.prop_num174, + prop_num175: this.prop_num175, + prop_num176: this.prop_num176, + prop_num177: this.prop_num177, + prop_num178: this.prop_num178, + prop_num179: this.prop_num179, + prop_num180: this.prop_num180, + prop_num181: this.prop_num181, + prop_num182: this.prop_num182, + prop_num183: this.prop_num183, + prop_num184: this.prop_num184, + prop_num185: this.prop_num185, + prop_num186: this.prop_num186, + prop_num187: this.prop_num187, + prop_num188: this.prop_num188, + prop_num189: this.prop_num189, + prop_num190: this.prop_num190, + prop_num191: this.prop_num191, + prop_num192: this.prop_num192, + prop_num193: this.prop_num193, + prop_num194: this.prop_num194, + prop_num195: this.prop_num195, + prop_num196: this.prop_num196, + prop_num197: this.prop_num197, + prop_num198: this.prop_num198, + prop_num199: this.prop_num199, + prop_num200: this.prop_num200, + prop_num201: this.prop_num201, + prop_num202: this.prop_num202, + prop_num203: this.prop_num203, + prop_num204: this.prop_num204, + prop_num205: this.prop_num205, + prop_num206: this.prop_num206, + prop_num207: this.prop_num207, + prop_num208: this.prop_num208, + prop_num209: this.prop_num209, + prop_num210: this.prop_num210, + prop_num211: this.prop_num211, + prop_num212: this.prop_num212, + prop_num213: this.prop_num213, + prop_num214: this.prop_num214, + prop_num215: this.prop_num215, + prop_num216: this.prop_num216, + prop_num217: this.prop_num217, + prop_num218: this.prop_num218, + prop_num219: this.prop_num219, + prop_num220: this.prop_num220, + prop_num221: this.prop_num221, + prop_num222: this.prop_num222, + prop_num223: this.prop_num223, + prop_num224: this.prop_num224, + prop_num225: this.prop_num225, + prop_num226: this.prop_num226, + prop_num227: this.prop_num227, + prop_num228: this.prop_num228, + prop_num229: this.prop_num229, + prop_num230: this.prop_num230, + prop_num231: this.prop_num231, + prop_num232: this.prop_num232, + prop_num233: this.prop_num233, + prop_num234: this.prop_num234, + prop_num235: this.prop_num235, + prop_num236: this.prop_num236, + prop_num237: this.prop_num237, + prop_num238: this.prop_num238, + prop_num239: this.prop_num239, + prop_num240: this.prop_num240, + prop_num241: this.prop_num241, + prop_num242: this.prop_num242, + prop_num243: this.prop_num243, + prop_num244: this.prop_num244, + prop_num245: this.prop_num245, + prop_num246: this.prop_num246, + prop_num247: this.prop_num247, + prop_num248: this.prop_num248, + prop_num249: this.prop_num249, + prop_num250: this.prop_num250, + prop_num251: this.prop_num251, + prop_num252: this.prop_num252, + prop_num253: this.prop_num253, + prop_num254: this.prop_num254, + prop_num255: this.prop_num255, + prop_num256: this.prop_num256, + prop_num257: this.prop_num257, + prop_num258: this.prop_num258, + prop_num259: this.prop_num259, + prop_num260: this.prop_num260, + prop_num261: this.prop_num261, + prop_num262: this.prop_num262, + prop_num263: this.prop_num263, + prop_num264: this.prop_num264, + prop_num265: this.prop_num265, + prop_num266: this.prop_num266, + prop_num267: this.prop_num267, + prop_num268: this.prop_num268, + prop_num269: this.prop_num269, + prop_num270: this.prop_num270, + prop_num271: this.prop_num271, + prop_num272: this.prop_num272, + prop_num273: this.prop_num273, + prop_num274: this.prop_num274, + prop_num275: this.prop_num275, + prop_num276: this.prop_num276, + prop_num277: this.prop_num277, + prop_num278: this.prop_num278, + prop_num279: this.prop_num279, + prop_num280: this.prop_num280, + prop_num281: this.prop_num281, + prop_num282: this.prop_num282, + prop_num283: this.prop_num283, + prop_num284: this.prop_num284, + prop_num285: this.prop_num285, + prop_num286: this.prop_num286, + prop_num287: this.prop_num287, + prop_num288: this.prop_num288, + prop_num289: this.prop_num289, + prop_num290: this.prop_num290, + prop_num291: this.prop_num291, + prop_num292: this.prop_num292, + prop_num293: this.prop_num293, + prop_num294: this.prop_num294, + prop_num295: this.prop_num295, + prop_num296: this.prop_num296, + prop_num297: this.prop_num297, + prop_num298: this.prop_num298, + prop_num299: this.prop_num299, + prop_num300: this.prop_num300, + prop_num301: this.prop_num301, + prop_num302: this.prop_num302, + prop_num303: this.prop_num303, + prop_num304: this.prop_num304, + prop_num305: this.prop_num305, + prop_num306: this.prop_num306, + prop_num307: this.prop_num307, + prop_num308: this.prop_num308, + prop_num309: this.prop_num309, + prop_num310: this.prop_num310, + prop_num311: this.prop_num311, + prop_num312: this.prop_num312, + prop_num313: this.prop_num313, + prop_num314: this.prop_num314, + prop_num315: this.prop_num315, + prop_num316: this.prop_num316, + prop_num317: this.prop_num317, + prop_num318: this.prop_num318, + prop_num319: this.prop_num319, + prop_num320: this.prop_num320, + prop_num321: this.prop_num321, + prop_num322: this.prop_num322, + prop_num323: this.prop_num323, + prop_num324: this.prop_num324, + prop_num325: this.prop_num325, + prop_num326: this.prop_num326, + prop_num327: this.prop_num327, + prop_num328: this.prop_num328, + prop_num329: this.prop_num329, + prop_num330: this.prop_num330, + prop_num331: this.prop_num331, + prop_num332: this.prop_num332, + + } + ) + + //============================================================================= + LinkVariables( + { + link_num0: this.link_num0, + link_num1: this.link_num1, + link_num2: this.link_num2, + link_num3: this.link_num3, + link_num4: this.link_num4, + link_num5: this.link_num5, + link_num6: this.link_num6, + link_num7: this.link_num7, + link_num8: this.link_num8, + link_num9: this.link_num9, + link_num10: this.link_num10, + link_num11: this.link_num11, + link_num12: this.link_num12, + link_num13: this.link_num13, + link_num14: this.link_num14, + link_num15: this.link_num15, + link_num16: this.link_num16, + link_num17: this.link_num17, + link_num18: this.link_num18, + link_num19: this.link_num19, + link_num20: this.link_num20, + link_num21: this.link_num21, + link_num22: this.link_num22, + link_num23: this.link_num23, + link_num24: this.link_num24, + link_num25: this.link_num25, + link_num26: this.link_num26, + link_num27: this.link_num27, + link_num28: this.link_num28, + link_num29: this.link_num29, + link_num30: this.link_num30, + link_num31: this.link_num31, + link_num32: this.link_num32, + link_num33: this.link_num33, + link_num34: this.link_num34, + link_num35: this.link_num35, + link_num36: this.link_num36, + link_num37: this.link_num37, + link_num38: this.link_num38, + link_num39: this.link_num39, + link_num40: this.link_num40, + link_num41: this.link_num41, + link_num42: this.link_num42, + link_num43: this.link_num43, + link_num44: this.link_num44, + link_num45: this.link_num45, + link_num46: this.link_num46, + link_num47: this.link_num47, + link_num48: this.link_num48, + link_num49: this.link_num49, + link_num50: this.link_num50, + link_num51: this.link_num51, + link_num52: this.link_num52, + link_num53: this.link_num53, + link_num54: this.link_num54, + link_num55: this.link_num55, + link_num56: this.link_num56, + link_num57: this.link_num57, + link_num58: this.link_num58, + link_num59: this.link_num59, + link_num60: this.link_num60, + link_num61: this.link_num61, + link_num62: this.link_num62, + link_num63: this.link_num63, + link_num64: this.link_num64, + link_num65: this.link_num65, + link_num66: this.link_num66, + link_num67: this.link_num67, + link_num68: this.link_num68, + link_num69: this.link_num69, + link_num70: this.link_num70, + link_num71: this.link_num71, + link_num72: this.link_num72, + link_num73: this.link_num73, + link_num74: this.link_num74, + link_num75: this.link_num75, + link_num76: this.link_num76, + link_num77: this.link_num77, + link_num78: this.link_num78, + link_num79: this.link_num79, + link_num80: this.link_num80, + link_num81: this.link_num81, + link_num82: this.link_num82, + link_num83: this.link_num83, + link_num84: this.link_num84, + link_num85: this.link_num85, + link_num86: this.link_num86, + link_num87: this.link_num87, + link_num88: this.link_num88, + link_num89: this.link_num89, + link_num90: this.link_num90, + link_num91: this.link_num91, + link_num92: this.link_num92, + link_num93: this.link_num93, + link_num94: this.link_num94, + link_num95: this.link_num95, + link_num96: this.link_num96, + link_num97: this.link_num97, + link_num98: this.link_num98, + link_num99: this.link_num99, + link_num100: this.link_num100, + link_num101: this.link_num101, + link_num102: this.link_num102, + link_num103: this.link_num103, + link_num104: this.link_num104, + link_num105: this.link_num105, + link_num106: this.link_num106, + link_num107: this.link_num107, + link_num108: this.link_num108, + link_num109: this.link_num109, + link_num110: this.link_num110, + link_num111: this.link_num111, + link_num112: this.link_num112, + link_num113: this.link_num113, + link_num114: this.link_num114, + link_num115: this.link_num115, + link_num116: this.link_num116, + link_num117: this.link_num117, + link_num118: this.link_num118, + link_num119: this.link_num119, + link_num120: this.link_num120, + link_num121: this.link_num121, + link_num122: this.link_num122, + link_num123: this.link_num123, + link_num124: this.link_num124, + link_num125: this.link_num125, + link_num126: this.link_num126, + link_num127: this.link_num127, + link_num128: this.link_num128, + link_num129: this.link_num129, + link_num130: this.link_num130, + link_num131: this.link_num131, + link_num132: this.link_num132, + link_num133: this.link_num133, + link_num134: this.link_num134, + link_num135: this.link_num135, + link_num136: this.link_num136, + link_num137: this.link_num137, + link_num138: this.link_num138, + link_num139: this.link_num139, + link_num140: this.link_num140, + link_num141: this.link_num141, + link_num142: this.link_num142, + link_num143: this.link_num143, + link_num144: this.link_num144, + link_num145: this.link_num145, + link_num146: this.link_num146, + link_num147: this.link_num147, + link_num148: this.link_num148, + link_num149: this.link_num149, + link_num150: this.link_num150, + link_num151: this.link_num151, + link_num152: this.link_num152, + link_num153: this.link_num153, + link_num154: this.link_num154, + link_num155: this.link_num155, + link_num156: this.link_num156, + link_num157: this.link_num157, + link_num158: this.link_num158, + link_num159: this.link_num159, + link_num160: this.link_num160, + link_num161: this.link_num161, + link_num162: this.link_num162, + link_num163: this.link_num163, + link_num164: this.link_num164, + link_num165: this.link_num165, + link_num166: this.link_num166, + link_num167: this.link_num167, + link_num168: this.link_num168, + link_num169: this.link_num169, + link_num170: this.link_num170, + link_num171: this.link_num171, + link_num172: this.link_num172, + link_num173: this.link_num173, + link_num174: this.link_num174, + link_num175: this.link_num175, + link_num176: this.link_num176, + link_num177: this.link_num177, + link_num178: this.link_num178, + link_num179: this.link_num179, + link_num180: this.link_num180, + link_num181: this.link_num181, + link_num182: this.link_num182, + link_num183: this.link_num183, + link_num184: this.link_num184, + link_num185: this.link_num185, + link_num186: this.link_num186, + link_num187: this.link_num187, + link_num188: this.link_num188, + link_num189: this.link_num189, + link_num190: this.link_num190, + link_num191: this.link_num191, + link_num192: this.link_num192, + link_num193: this.link_num193, + link_num194: this.link_num194, + link_num195: this.link_num195, + link_num196: this.link_num196, + link_num197: this.link_num197, + link_num198: this.link_num198, + link_num199: this.link_num199, + link_num200: this.link_num200, + link_num201: this.link_num201, + link_num202: this.link_num202, + link_num203: this.link_num203, + link_num204: this.link_num204, + link_num205: this.link_num205, + link_num206: this.link_num206, + link_num207: this.link_num207, + link_num208: this.link_num208, + link_num209: this.link_num209, + link_num210: this.link_num210, + link_num211: this.link_num211, + link_num212: this.link_num212, + link_num213: this.link_num213, + link_num214: this.link_num214, + link_num215: this.link_num215, + link_num216: this.link_num216, + link_num217: this.link_num217, + link_num218: this.link_num218, + link_num219: this.link_num219, + link_num220: this.link_num220, + link_num221: this.link_num221, + link_num222: this.link_num222, + link_num223: this.link_num223, + link_num224: this.link_num224, + link_num225: this.link_num225, + link_num226: this.link_num226, + link_num227: this.link_num227, + link_num228: this.link_num228, + link_num229: this.link_num229, + link_num230: this.link_num230, + link_num231: this.link_num231, + link_num232: this.link_num232, + link_num233: this.link_num233, + link_num234: this.link_num234, + link_num235: this.link_num235, + link_num236: this.link_num236, + link_num237: this.link_num237, + link_num238: this.link_num238, + link_num239: this.link_num239, + link_num240: this.link_num240, + link_num241: this.link_num241, + link_num242: this.link_num242, + link_num243: this.link_num243, + link_num244: this.link_num244, + link_num245: this.link_num245, + link_num246: this.link_num246, + link_num247: this.link_num247, + link_num248: this.link_num248, + link_num249: this.link_num249, + link_num250: this.link_num250, + link_num251: this.link_num251, + link_num252: this.link_num252, + link_num253: this.link_num253, + link_num254: this.link_num254, + link_num255: this.link_num255, + link_num256: this.link_num256, + link_num257: this.link_num257, + link_num258: this.link_num258, + link_num259: this.link_num259, + link_num260: this.link_num260, + link_num261: this.link_num261, + link_num262: this.link_num262, + link_num263: this.link_num263, + link_num264: this.link_num264, + link_num265: this.link_num265, + link_num266: this.link_num266, + link_num267: this.link_num267, + link_num268: this.link_num268, + link_num269: this.link_num269, + link_num270: this.link_num270, + link_num271: this.link_num271, + link_num272: this.link_num272, + link_num273: this.link_num273, + link_num274: this.link_num274, + link_num275: this.link_num275, + link_num276: this.link_num276, + link_num277: this.link_num277, + link_num278: this.link_num278, + link_num279: this.link_num279, + link_num280: this.link_num280, + link_num281: this.link_num281, + link_num282: this.link_num282, + link_num283: this.link_num283, + link_num284: this.link_num284, + link_num285: this.link_num285, + link_num286: this.link_num286, + link_num287: this.link_num287, + link_num288: this.link_num288, + link_num289: this.link_num289, + link_num290: this.link_num290, + link_num291: this.link_num291, + link_num292: this.link_num292, + link_num293: this.link_num293, + link_num294: this.link_num294, + link_num295: this.link_num295, + link_num296: this.link_num296, + link_num297: this.link_num297, + link_num298: this.link_num298, + link_num299: this.link_num299, + link_num300: this.link_num300, + link_num301: this.link_num301, + link_num302: this.link_num302, + link_num303: this.link_num303, + link_num304: this.link_num304, + link_num305: this.link_num305, + link_num306: this.link_num306, + link_num307: this.link_num307, + link_num308: this.link_num308, + link_num309: this.link_num309, + link_num310: this.link_num310, + link_num311: this.link_num311, + link_num312: this.link_num312, + link_num313: this.link_num313, + link_num314: this.link_num314, + link_num315: this.link_num315, + link_num316: this.link_num316, + link_num317: this.link_num317, + link_num318: this.link_num318, + link_num319: this.link_num319, + link_num320: this.link_num320, + link_num321: this.link_num321, + link_num322: this.link_num322, + link_num323: this.link_num323, + link_num324: this.link_num324, + link_num325: this.link_num325, + link_num326: this.link_num326, + link_num327: this.link_num327, + link_num328: this.link_num328, + link_num329: this.link_num329, + link_num330: this.link_num330, + link_num331: this.link_num331, + link_num332: this.link_num332, + + } + ) + + //============================================================================= + ConsumeVariables() + } + } +} + +@Component +struct PropVariables { + //============================================================================= + @Prop prop_num0: number = 0; + @Prop prop_num1: number = 0; + @Prop prop_num2: number = 0; + @Prop prop_num3: number = 0; + @Prop prop_num4: number = 0; + @Prop prop_num5: number = 0; + @Prop prop_num6: number = 0; + @Prop prop_num7: number = 0; + @Prop prop_num8: number = 0; + @Prop prop_num9: number = 0; + @Prop prop_num10: number = 0; + @Prop prop_num11: number = 0; + @Prop prop_num12: number = 0; + @Prop prop_num13: number = 0; + @Prop prop_num14: number = 0; + @Prop prop_num15: number = 0; + @Prop prop_num16: number = 0; + @Prop prop_num17: number = 0; + @Prop prop_num18: number = 0; + @Prop prop_num19: number = 0; + @Prop prop_num20: number = 0; + @Prop prop_num21: number = 0; + @Prop prop_num22: number = 0; + @Prop prop_num23: number = 0; + @Prop prop_num24: number = 0; + @Prop prop_num25: number = 0; + @Prop prop_num26: number = 0; + @Prop prop_num27: number = 0; + @Prop prop_num28: number = 0; + @Prop prop_num29: number = 0; + @Prop prop_num30: number = 0; + @Prop prop_num31: number = 0; + @Prop prop_num32: number = 0; + @Prop prop_num33: number = 0; + @Prop prop_num34: number = 0; + @Prop prop_num35: number = 0; + @Prop prop_num36: number = 0; + @Prop prop_num37: number = 0; + @Prop prop_num38: number = 0; + @Prop prop_num39: number = 0; + @Prop prop_num40: number = 0; + @Prop prop_num41: number = 0; + @Prop prop_num42: number = 0; + @Prop prop_num43: number = 0; + @Prop prop_num44: number = 0; + @Prop prop_num45: number = 0; + @Prop prop_num46: number = 0; + @Prop prop_num47: number = 0; + @Prop prop_num48: number = 0; + @Prop prop_num49: number = 0; + @Prop prop_num50: number = 0; + @Prop prop_num51: number = 0; + @Prop prop_num52: number = 0; + @Prop prop_num53: number = 0; + @Prop prop_num54: number = 0; + @Prop prop_num55: number = 0; + @Prop prop_num56: number = 0; + @Prop prop_num57: number = 0; + @Prop prop_num58: number = 0; + @Prop prop_num59: number = 0; + @Prop prop_num60: number = 0; + @Prop prop_num61: number = 0; + @Prop prop_num62: number = 0; + @Prop prop_num63: number = 0; + @Prop prop_num64: number = 0; + @Prop prop_num65: number = 0; + @Prop prop_num66: number = 0; + @Prop prop_num67: number = 0; + @Prop prop_num68: number = 0; + @Prop prop_num69: number = 0; + @Prop prop_num70: number = 0; + @Prop prop_num71: number = 0; + @Prop prop_num72: number = 0; + @Prop prop_num73: number = 0; + @Prop prop_num74: number = 0; + @Prop prop_num75: number = 0; + @Prop prop_num76: number = 0; + @Prop prop_num77: number = 0; + @Prop prop_num78: number = 0; + @Prop prop_num79: number = 0; + @Prop prop_num80: number = 0; + @Prop prop_num81: number = 0; + @Prop prop_num82: number = 0; + @Prop prop_num83: number = 0; + @Prop prop_num84: number = 0; + @Prop prop_num85: number = 0; + @Prop prop_num86: number = 0; + @Prop prop_num87: number = 0; + @Prop prop_num88: number = 0; + @Prop prop_num89: number = 0; + @Prop prop_num90: number = 0; + @Prop prop_num91: number = 0; + @Prop prop_num92: number = 0; + @Prop prop_num93: number = 0; + @Prop prop_num94: number = 0; + @Prop prop_num95: number = 0; + @Prop prop_num96: number = 0; + @Prop prop_num97: number = 0; + @Prop prop_num98: number = 0; + @Prop prop_num99: number = 0; + @Prop prop_num100: number = 0; + @Prop prop_num101: number = 0; + @Prop prop_num102: number = 0; + @Prop prop_num103: number = 0; + @Prop prop_num104: number = 0; + @Prop prop_num105: number = 0; + @Prop prop_num106: number = 0; + @Prop prop_num107: number = 0; + @Prop prop_num108: number = 0; + @Prop prop_num109: number = 0; + @Prop prop_num110: number = 0; + @Prop prop_num111: number = 0; + @Prop prop_num112: number = 0; + @Prop prop_num113: number = 0; + @Prop prop_num114: number = 0; + @Prop prop_num115: number = 0; + @Prop prop_num116: number = 0; + @Prop prop_num117: number = 0; + @Prop prop_num118: number = 0; + @Prop prop_num119: number = 0; + @Prop prop_num120: number = 0; + @Prop prop_num121: number = 0; + @Prop prop_num122: number = 0; + @Prop prop_num123: number = 0; + @Prop prop_num124: number = 0; + @Prop prop_num125: number = 0; + @Prop prop_num126: number = 0; + @Prop prop_num127: number = 0; + @Prop prop_num128: number = 0; + @Prop prop_num129: number = 0; + @Prop prop_num130: number = 0; + @Prop prop_num131: number = 0; + @Prop prop_num132: number = 0; + @Prop prop_num133: number = 0; + @Prop prop_num134: number = 0; + @Prop prop_num135: number = 0; + @Prop prop_num136: number = 0; + @Prop prop_num137: number = 0; + @Prop prop_num138: number = 0; + @Prop prop_num139: number = 0; + @Prop prop_num140: number = 0; + @Prop prop_num141: number = 0; + @Prop prop_num142: number = 0; + @Prop prop_num143: number = 0; + @Prop prop_num144: number = 0; + @Prop prop_num145: number = 0; + @Prop prop_num146: number = 0; + @Prop prop_num147: number = 0; + @Prop prop_num148: number = 0; + @Prop prop_num149: number = 0; + @Prop prop_num150: number = 0; + @Prop prop_num151: number = 0; + @Prop prop_num152: number = 0; + @Prop prop_num153: number = 0; + @Prop prop_num154: number = 0; + @Prop prop_num155: number = 0; + @Prop prop_num156: number = 0; + @Prop prop_num157: number = 0; + @Prop prop_num158: number = 0; + @Prop prop_num159: number = 0; + @Prop prop_num160: number = 0; + @Prop prop_num161: number = 0; + @Prop prop_num162: number = 0; + @Prop prop_num163: number = 0; + @Prop prop_num164: number = 0; + @Prop prop_num165: number = 0; + @Prop prop_num166: number = 0; + @Prop prop_num167: number = 0; + @Prop prop_num168: number = 0; + @Prop prop_num169: number = 0; + @Prop prop_num170: number = 0; + @Prop prop_num171: number = 0; + @Prop prop_num172: number = 0; + @Prop prop_num173: number = 0; + @Prop prop_num174: number = 0; + @Prop prop_num175: number = 0; + @Prop prop_num176: number = 0; + @Prop prop_num177: number = 0; + @Prop prop_num178: number = 0; + @Prop prop_num179: number = 0; + @Prop prop_num180: number = 0; + @Prop prop_num181: number = 0; + @Prop prop_num182: number = 0; + @Prop prop_num183: number = 0; + @Prop prop_num184: number = 0; + @Prop prop_num185: number = 0; + @Prop prop_num186: number = 0; + @Prop prop_num187: number = 0; + @Prop prop_num188: number = 0; + @Prop prop_num189: number = 0; + @Prop prop_num190: number = 0; + @Prop prop_num191: number = 0; + @Prop prop_num192: number = 0; + @Prop prop_num193: number = 0; + @Prop prop_num194: number = 0; + @Prop prop_num195: number = 0; + @Prop prop_num196: number = 0; + @Prop prop_num197: number = 0; + @Prop prop_num198: number = 0; + @Prop prop_num199: number = 0; + @Prop prop_num200: number = 0; + @Prop prop_num201: number = 0; + @Prop prop_num202: number = 0; + @Prop prop_num203: number = 0; + @Prop prop_num204: number = 0; + @Prop prop_num205: number = 0; + @Prop prop_num206: number = 0; + @Prop prop_num207: number = 0; + @Prop prop_num208: number = 0; + @Prop prop_num209: number = 0; + @Prop prop_num210: number = 0; + @Prop prop_num211: number = 0; + @Prop prop_num212: number = 0; + @Prop prop_num213: number = 0; + @Prop prop_num214: number = 0; + @Prop prop_num215: number = 0; + @Prop prop_num216: number = 0; + @Prop prop_num217: number = 0; + @Prop prop_num218: number = 0; + @Prop prop_num219: number = 0; + @Prop prop_num220: number = 0; + @Prop prop_num221: number = 0; + @Prop prop_num222: number = 0; + @Prop prop_num223: number = 0; + @Prop prop_num224: number = 0; + @Prop prop_num225: number = 0; + @Prop prop_num226: number = 0; + @Prop prop_num227: number = 0; + @Prop prop_num228: number = 0; + @Prop prop_num229: number = 0; + @Prop prop_num230: number = 0; + @Prop prop_num231: number = 0; + @Prop prop_num232: number = 0; + @Prop prop_num233: number = 0; + @Prop prop_num234: number = 0; + @Prop prop_num235: number = 0; + @Prop prop_num236: number = 0; + @Prop prop_num237: number = 0; + @Prop prop_num238: number = 0; + @Prop prop_num239: number = 0; + @Prop prop_num240: number = 0; + @Prop prop_num241: number = 0; + @Prop prop_num242: number = 0; + @Prop prop_num243: number = 0; + @Prop prop_num244: number = 0; + @Prop prop_num245: number = 0; + @Prop prop_num246: number = 0; + @Prop prop_num247: number = 0; + @Prop prop_num248: number = 0; + @Prop prop_num249: number = 0; + @Prop prop_num250: number = 0; + @Prop prop_num251: number = 0; + @Prop prop_num252: number = 0; + @Prop prop_num253: number = 0; + @Prop prop_num254: number = 0; + @Prop prop_num255: number = 0; + @Prop prop_num256: number = 0; + @Prop prop_num257: number = 0; + @Prop prop_num258: number = 0; + @Prop prop_num259: number = 0; + @Prop prop_num260: number = 0; + @Prop prop_num261: number = 0; + @Prop prop_num262: number = 0; + @Prop prop_num263: number = 0; + @Prop prop_num264: number = 0; + @Prop prop_num265: number = 0; + @Prop prop_num266: number = 0; + @Prop prop_num267: number = 0; + @Prop prop_num268: number = 0; + @Prop prop_num269: number = 0; + @Prop prop_num270: number = 0; + @Prop prop_num271: number = 0; + @Prop prop_num272: number = 0; + @Prop prop_num273: number = 0; + @Prop prop_num274: number = 0; + @Prop prop_num275: number = 0; + @Prop prop_num276: number = 0; + @Prop prop_num277: number = 0; + @Prop prop_num278: number = 0; + @Prop prop_num279: number = 0; + @Prop prop_num280: number = 0; + @Prop prop_num281: number = 0; + @Prop prop_num282: number = 0; + @Prop prop_num283: number = 0; + @Prop prop_num284: number = 0; + @Prop prop_num285: number = 0; + @Prop prop_num286: number = 0; + @Prop prop_num287: number = 0; + @Prop prop_num288: number = 0; + @Prop prop_num289: number = 0; + @Prop prop_num290: number = 0; + @Prop prop_num291: number = 0; + @Prop prop_num292: number = 0; + @Prop prop_num293: number = 0; + @Prop prop_num294: number = 0; + @Prop prop_num295: number = 0; + @Prop prop_num296: number = 0; + @Prop prop_num297: number = 0; + @Prop prop_num298: number = 0; + @Prop prop_num299: number = 0; + @Prop prop_num300: number = 0; + @Prop prop_num301: number = 0; + @Prop prop_num302: number = 0; + @Prop prop_num303: number = 0; + @Prop prop_num304: number = 0; + @Prop prop_num305: number = 0; + @Prop prop_num306: number = 0; + @Prop prop_num307: number = 0; + @Prop prop_num308: number = 0; + @Prop prop_num309: number = 0; + @Prop prop_num310: number = 0; + @Prop prop_num311: number = 0; + @Prop prop_num312: number = 0; + @Prop prop_num313: number = 0; + @Prop prop_num314: number = 0; + @Prop prop_num315: number = 0; + @Prop prop_num316: number = 0; + @Prop prop_num317: number = 0; + @Prop prop_num318: number = 0; + @Prop prop_num319: number = 0; + @Prop prop_num320: number = 0; + @Prop prop_num321: number = 0; + @Prop prop_num322: number = 0; + @Prop prop_num323: number = 0; + @Prop prop_num324: number = 0; + @Prop prop_num325: number = 0; + @Prop prop_num326: number = 0; + @Prop prop_num327: number = 0; + @Prop prop_num328: number = 0; + @Prop prop_num329: number = 0; + @Prop prop_num330: number = 0; + @Prop prop_num331: number = 0; + @Prop prop_num332: number = 0; + + + build() { + Column() { + Button('Click Me') + .onClick((e: ClickEvent) => { + this.prop_num0++; + this.prop_num1++; + this.prop_num2++; + this.prop_num3++; + this.prop_num4++; + this.prop_num5++; + this.prop_num6++; + this.prop_num7++; + this.prop_num8++; + this.prop_num9++; + this.prop_num10++; + this.prop_num11++; + this.prop_num12++; + this.prop_num13++; + this.prop_num14++; + this.prop_num15++; + this.prop_num16++; + this.prop_num17++; + this.prop_num18++; + this.prop_num19++; + this.prop_num20++; + this.prop_num21++; + this.prop_num22++; + this.prop_num23++; + this.prop_num24++; + this.prop_num25++; + this.prop_num26++; + this.prop_num27++; + this.prop_num28++; + this.prop_num29++; + this.prop_num30++; + this.prop_num31++; + this.prop_num32++; + this.prop_num33++; + this.prop_num34++; + this.prop_num35++; + this.prop_num36++; + this.prop_num37++; + this.prop_num38++; + this.prop_num39++; + this.prop_num40++; + this.prop_num41++; + this.prop_num42++; + this.prop_num43++; + this.prop_num44++; + this.prop_num45++; + this.prop_num46++; + this.prop_num47++; + this.prop_num48++; + this.prop_num49++; + this.prop_num50++; + this.prop_num51++; + this.prop_num52++; + this.prop_num53++; + this.prop_num54++; + this.prop_num55++; + this.prop_num56++; + this.prop_num57++; + this.prop_num58++; + this.prop_num59++; + this.prop_num60++; + this.prop_num61++; + this.prop_num62++; + this.prop_num63++; + this.prop_num64++; + this.prop_num65++; + this.prop_num66++; + this.prop_num67++; + this.prop_num68++; + this.prop_num69++; + this.prop_num70++; + this.prop_num71++; + this.prop_num72++; + this.prop_num73++; + this.prop_num74++; + this.prop_num75++; + this.prop_num76++; + this.prop_num77++; + this.prop_num78++; + this.prop_num79++; + this.prop_num80++; + this.prop_num81++; + this.prop_num82++; + this.prop_num83++; + this.prop_num84++; + this.prop_num85++; + this.prop_num86++; + this.prop_num87++; + this.prop_num88++; + this.prop_num89++; + this.prop_num90++; + this.prop_num91++; + this.prop_num92++; + this.prop_num93++; + this.prop_num94++; + this.prop_num95++; + this.prop_num96++; + this.prop_num97++; + this.prop_num98++; + this.prop_num99++; + this.prop_num100++; + this.prop_num101++; + this.prop_num102++; + this.prop_num103++; + this.prop_num104++; + this.prop_num105++; + this.prop_num106++; + this.prop_num107++; + this.prop_num108++; + this.prop_num109++; + this.prop_num110++; + this.prop_num111++; + this.prop_num112++; + this.prop_num113++; + this.prop_num114++; + this.prop_num115++; + this.prop_num116++; + this.prop_num117++; + this.prop_num118++; + this.prop_num119++; + this.prop_num120++; + this.prop_num121++; + this.prop_num122++; + this.prop_num123++; + this.prop_num124++; + this.prop_num125++; + this.prop_num126++; + this.prop_num127++; + this.prop_num128++; + this.prop_num129++; + this.prop_num130++; + this.prop_num131++; + this.prop_num132++; + this.prop_num133++; + this.prop_num134++; + this.prop_num135++; + this.prop_num136++; + this.prop_num137++; + this.prop_num138++; + this.prop_num139++; + this.prop_num140++; + this.prop_num141++; + this.prop_num142++; + this.prop_num143++; + this.prop_num144++; + this.prop_num145++; + this.prop_num146++; + this.prop_num147++; + this.prop_num148++; + this.prop_num149++; + this.prop_num150++; + this.prop_num151++; + this.prop_num152++; + this.prop_num153++; + this.prop_num154++; + this.prop_num155++; + this.prop_num156++; + this.prop_num157++; + this.prop_num158++; + this.prop_num159++; + this.prop_num160++; + this.prop_num161++; + this.prop_num162++; + this.prop_num163++; + this.prop_num164++; + this.prop_num165++; + this.prop_num166++; + this.prop_num167++; + this.prop_num168++; + this.prop_num169++; + this.prop_num170++; + this.prop_num171++; + this.prop_num172++; + this.prop_num173++; + this.prop_num174++; + this.prop_num175++; + this.prop_num176++; + this.prop_num177++; + this.prop_num178++; + this.prop_num179++; + this.prop_num180++; + this.prop_num181++; + this.prop_num182++; + this.prop_num183++; + this.prop_num184++; + this.prop_num185++; + this.prop_num186++; + this.prop_num187++; + this.prop_num188++; + this.prop_num189++; + this.prop_num190++; + this.prop_num191++; + this.prop_num192++; + this.prop_num193++; + this.prop_num194++; + this.prop_num195++; + this.prop_num196++; + this.prop_num197++; + this.prop_num198++; + this.prop_num199++; + this.prop_num200++; + this.prop_num201++; + this.prop_num202++; + this.prop_num203++; + this.prop_num204++; + this.prop_num205++; + this.prop_num206++; + this.prop_num207++; + this.prop_num208++; + this.prop_num209++; + this.prop_num210++; + this.prop_num211++; + this.prop_num212++; + this.prop_num213++; + this.prop_num214++; + this.prop_num215++; + this.prop_num216++; + this.prop_num217++; + this.prop_num218++; + this.prop_num219++; + this.prop_num220++; + this.prop_num221++; + this.prop_num222++; + this.prop_num223++; + this.prop_num224++; + this.prop_num225++; + this.prop_num226++; + this.prop_num227++; + this.prop_num228++; + this.prop_num229++; + this.prop_num230++; + this.prop_num231++; + this.prop_num232++; + this.prop_num233++; + this.prop_num234++; + this.prop_num235++; + this.prop_num236++; + this.prop_num237++; + this.prop_num238++; + this.prop_num239++; + this.prop_num240++; + this.prop_num241++; + this.prop_num242++; + this.prop_num243++; + this.prop_num244++; + this.prop_num245++; + this.prop_num246++; + this.prop_num247++; + this.prop_num248++; + this.prop_num249++; + this.prop_num250++; + this.prop_num251++; + this.prop_num252++; + this.prop_num253++; + this.prop_num254++; + this.prop_num255++; + this.prop_num256++; + this.prop_num257++; + this.prop_num258++; + this.prop_num259++; + this.prop_num260++; + this.prop_num261++; + this.prop_num262++; + this.prop_num263++; + this.prop_num264++; + this.prop_num265++; + this.prop_num266++; + this.prop_num267++; + this.prop_num268++; + this.prop_num269++; + this.prop_num270++; + this.prop_num271++; + this.prop_num272++; + this.prop_num273++; + this.prop_num274++; + this.prop_num275++; + this.prop_num276++; + this.prop_num277++; + this.prop_num278++; + this.prop_num279++; + this.prop_num280++; + this.prop_num281++; + this.prop_num282++; + this.prop_num283++; + this.prop_num284++; + this.prop_num285++; + this.prop_num286++; + this.prop_num287++; + this.prop_num288++; + this.prop_num289++; + this.prop_num290++; + this.prop_num291++; + this.prop_num292++; + this.prop_num293++; + this.prop_num294++; + this.prop_num295++; + this.prop_num296++; + this.prop_num297++; + this.prop_num298++; + this.prop_num299++; + this.prop_num300++; + this.prop_num301++; + this.prop_num302++; + this.prop_num303++; + this.prop_num304++; + this.prop_num305++; + this.prop_num306++; + this.prop_num307++; + this.prop_num308++; + this.prop_num309++; + this.prop_num310++; + this.prop_num311++; + this.prop_num312++; + this.prop_num313++; + this.prop_num314++; + this.prop_num315++; + this.prop_num316++; + this.prop_num317++; + this.prop_num318++; + this.prop_num319++; + this.prop_num320++; + this.prop_num321++; + this.prop_num322++; + this.prop_num323++; + this.prop_num324++; + this.prop_num325++; + this.prop_num326++; + this.prop_num327++; + this.prop_num328++; + this.prop_num329++; + this.prop_num330++; + this.prop_num331++; + this.prop_num332++; + + }) + } + } +} + +@Component +struct LinkVariables { + @Link link_num0: number; + @Link link_num1: number; + @Link link_num2: number; + @Link link_num3: number; + @Link link_num4: number; + @Link link_num5: number; + @Link link_num6: number; + @Link link_num7: number; + @Link link_num8: number; + @Link link_num9: number; + @Link link_num10: number; + @Link link_num11: number; + @Link link_num12: number; + @Link link_num13: number; + @Link link_num14: number; + @Link link_num15: number; + @Link link_num16: number; + @Link link_num17: number; + @Link link_num18: number; + @Link link_num19: number; + @Link link_num20: number; + @Link link_num21: number; + @Link link_num22: number; + @Link link_num23: number; + @Link link_num24: number; + @Link link_num25: number; + @Link link_num26: number; + @Link link_num27: number; + @Link link_num28: number; + @Link link_num29: number; + @Link link_num30: number; + @Link link_num31: number; + @Link link_num32: number; + @Link link_num33: number; + @Link link_num34: number; + @Link link_num35: number; + @Link link_num36: number; + @Link link_num37: number; + @Link link_num38: number; + @Link link_num39: number; + @Link link_num40: number; + @Link link_num41: number; + @Link link_num42: number; + @Link link_num43: number; + @Link link_num44: number; + @Link link_num45: number; + @Link link_num46: number; + @Link link_num47: number; + @Link link_num48: number; + @Link link_num49: number; + @Link link_num50: number; + @Link link_num51: number; + @Link link_num52: number; + @Link link_num53: number; + @Link link_num54: number; + @Link link_num55: number; + @Link link_num56: number; + @Link link_num57: number; + @Link link_num58: number; + @Link link_num59: number; + @Link link_num60: number; + @Link link_num61: number; + @Link link_num62: number; + @Link link_num63: number; + @Link link_num64: number; + @Link link_num65: number; + @Link link_num66: number; + @Link link_num67: number; + @Link link_num68: number; + @Link link_num69: number; + @Link link_num70: number; + @Link link_num71: number; + @Link link_num72: number; + @Link link_num73: number; + @Link link_num74: number; + @Link link_num75: number; + @Link link_num76: number; + @Link link_num77: number; + @Link link_num78: number; + @Link link_num79: number; + @Link link_num80: number; + @Link link_num81: number; + @Link link_num82: number; + @Link link_num83: number; + @Link link_num84: number; + @Link link_num85: number; + @Link link_num86: number; + @Link link_num87: number; + @Link link_num88: number; + @Link link_num89: number; + @Link link_num90: number; + @Link link_num91: number; + @Link link_num92: number; + @Link link_num93: number; + @Link link_num94: number; + @Link link_num95: number; + @Link link_num96: number; + @Link link_num97: number; + @Link link_num98: number; + @Link link_num99: number; + @Link link_num100: number; + @Link link_num101: number; + @Link link_num102: number; + @Link link_num103: number; + @Link link_num104: number; + @Link link_num105: number; + @Link link_num106: number; + @Link link_num107: number; + @Link link_num108: number; + @Link link_num109: number; + @Link link_num110: number; + @Link link_num111: number; + @Link link_num112: number; + @Link link_num113: number; + @Link link_num114: number; + @Link link_num115: number; + @Link link_num116: number; + @Link link_num117: number; + @Link link_num118: number; + @Link link_num119: number; + @Link link_num120: number; + @Link link_num121: number; + @Link link_num122: number; + @Link link_num123: number; + @Link link_num124: number; + @Link link_num125: number; + @Link link_num126: number; + @Link link_num127: number; + @Link link_num128: number; + @Link link_num129: number; + @Link link_num130: number; + @Link link_num131: number; + @Link link_num132: number; + @Link link_num133: number; + @Link link_num134: number; + @Link link_num135: number; + @Link link_num136: number; + @Link link_num137: number; + @Link link_num138: number; + @Link link_num139: number; + @Link link_num140: number; + @Link link_num141: number; + @Link link_num142: number; + @Link link_num143: number; + @Link link_num144: number; + @Link link_num145: number; + @Link link_num146: number; + @Link link_num147: number; + @Link link_num148: number; + @Link link_num149: number; + @Link link_num150: number; + @Link link_num151: number; + @Link link_num152: number; + @Link link_num153: number; + @Link link_num154: number; + @Link link_num155: number; + @Link link_num156: number; + @Link link_num157: number; + @Link link_num158: number; + @Link link_num159: number; + @Link link_num160: number; + @Link link_num161: number; + @Link link_num162: number; + @Link link_num163: number; + @Link link_num164: number; + @Link link_num165: number; + @Link link_num166: number; + @Link link_num167: number; + @Link link_num168: number; + @Link link_num169: number; + @Link link_num170: number; + @Link link_num171: number; + @Link link_num172: number; + @Link link_num173: number; + @Link link_num174: number; + @Link link_num175: number; + @Link link_num176: number; + @Link link_num177: number; + @Link link_num178: number; + @Link link_num179: number; + @Link link_num180: number; + @Link link_num181: number; + @Link link_num182: number; + @Link link_num183: number; + @Link link_num184: number; + @Link link_num185: number; + @Link link_num186: number; + @Link link_num187: number; + @Link link_num188: number; + @Link link_num189: number; + @Link link_num190: number; + @Link link_num191: number; + @Link link_num192: number; + @Link link_num193: number; + @Link link_num194: number; + @Link link_num195: number; + @Link link_num196: number; + @Link link_num197: number; + @Link link_num198: number; + @Link link_num199: number; + @Link link_num200: number; + @Link link_num201: number; + @Link link_num202: number; + @Link link_num203: number; + @Link link_num204: number; + @Link link_num205: number; + @Link link_num206: number; + @Link link_num207: number; + @Link link_num208: number; + @Link link_num209: number; + @Link link_num210: number; + @Link link_num211: number; + @Link link_num212: number; + @Link link_num213: number; + @Link link_num214: number; + @Link link_num215: number; + @Link link_num216: number; + @Link link_num217: number; + @Link link_num218: number; + @Link link_num219: number; + @Link link_num220: number; + @Link link_num221: number; + @Link link_num222: number; + @Link link_num223: number; + @Link link_num224: number; + @Link link_num225: number; + @Link link_num226: number; + @Link link_num227: number; + @Link link_num228: number; + @Link link_num229: number; + @Link link_num230: number; + @Link link_num231: number; + @Link link_num232: number; + @Link link_num233: number; + @Link link_num234: number; + @Link link_num235: number; + @Link link_num236: number; + @Link link_num237: number; + @Link link_num238: number; + @Link link_num239: number; + @Link link_num240: number; + @Link link_num241: number; + @Link link_num242: number; + @Link link_num243: number; + @Link link_num244: number; + @Link link_num245: number; + @Link link_num246: number; + @Link link_num247: number; + @Link link_num248: number; + @Link link_num249: number; + @Link link_num250: number; + @Link link_num251: number; + @Link link_num252: number; + @Link link_num253: number; + @Link link_num254: number; + @Link link_num255: number; + @Link link_num256: number; + @Link link_num257: number; + @Link link_num258: number; + @Link link_num259: number; + @Link link_num260: number; + @Link link_num261: number; + @Link link_num262: number; + @Link link_num263: number; + @Link link_num264: number; + @Link link_num265: number; + @Link link_num266: number; + @Link link_num267: number; + @Link link_num268: number; + @Link link_num269: number; + @Link link_num270: number; + @Link link_num271: number; + @Link link_num272: number; + @Link link_num273: number; + @Link link_num274: number; + @Link link_num275: number; + @Link link_num276: number; + @Link link_num277: number; + @Link link_num278: number; + @Link link_num279: number; + @Link link_num280: number; + @Link link_num281: number; + @Link link_num282: number; + @Link link_num283: number; + @Link link_num284: number; + @Link link_num285: number; + @Link link_num286: number; + @Link link_num287: number; + @Link link_num288: number; + @Link link_num289: number; + @Link link_num290: number; + @Link link_num291: number; + @Link link_num292: number; + @Link link_num293: number; + @Link link_num294: number; + @Link link_num295: number; + @Link link_num296: number; + @Link link_num297: number; + @Link link_num298: number; + @Link link_num299: number; + @Link link_num300: number; + @Link link_num301: number; + @Link link_num302: number; + @Link link_num303: number; + @Link link_num304: number; + @Link link_num305: number; + @Link link_num306: number; + @Link link_num307: number; + @Link link_num308: number; + @Link link_num309: number; + @Link link_num310: number; + @Link link_num311: number; + @Link link_num312: number; + @Link link_num313: number; + @Link link_num314: number; + @Link link_num315: number; + @Link link_num316: number; + @Link link_num317: number; + @Link link_num318: number; + @Link link_num319: number; + @Link link_num320: number; + @Link link_num321: number; + @Link link_num322: number; + @Link link_num323: number; + @Link link_num324: number; + @Link link_num325: number; + @Link link_num326: number; + @Link link_num327: number; + @Link link_num328: number; + @Link link_num329: number; + @Link link_num330: number; + @Link link_num331: number; + @Link link_num332: number; + + + //============================================================================= + + build() { + Column() { + Button('Click Me') + .onClick((e: ClickEvent) => { + this.link_num0++; + this.link_num1++; + this.link_num2++; + this.link_num3++; + this.link_num4++; + this.link_num5++; + this.link_num6++; + this.link_num7++; + this.link_num8++; + this.link_num9++; + this.link_num10++; + this.link_num11++; + this.link_num12++; + this.link_num13++; + this.link_num14++; + this.link_num15++; + this.link_num16++; + this.link_num17++; + this.link_num18++; + this.link_num19++; + this.link_num20++; + this.link_num21++; + this.link_num22++; + this.link_num23++; + this.link_num24++; + this.link_num25++; + this.link_num26++; + this.link_num27++; + this.link_num28++; + this.link_num29++; + this.link_num30++; + this.link_num31++; + this.link_num32++; + this.link_num33++; + this.link_num34++; + this.link_num35++; + this.link_num36++; + this.link_num37++; + this.link_num38++; + this.link_num39++; + this.link_num40++; + this.link_num41++; + this.link_num42++; + this.link_num43++; + this.link_num44++; + this.link_num45++; + this.link_num46++; + this.link_num47++; + this.link_num48++; + this.link_num49++; + this.link_num50++; + this.link_num51++; + this.link_num52++; + this.link_num53++; + this.link_num54++; + this.link_num55++; + this.link_num56++; + this.link_num57++; + this.link_num58++; + this.link_num59++; + this.link_num60++; + this.link_num61++; + this.link_num62++; + this.link_num63++; + this.link_num64++; + this.link_num65++; + this.link_num66++; + this.link_num67++; + this.link_num68++; + this.link_num69++; + this.link_num70++; + this.link_num71++; + this.link_num72++; + this.link_num73++; + this.link_num74++; + this.link_num75++; + this.link_num76++; + this.link_num77++; + this.link_num78++; + this.link_num79++; + this.link_num80++; + this.link_num81++; + this.link_num82++; + this.link_num83++; + this.link_num84++; + this.link_num85++; + this.link_num86++; + this.link_num87++; + this.link_num88++; + this.link_num89++; + this.link_num90++; + this.link_num91++; + this.link_num92++; + this.link_num93++; + this.link_num94++; + this.link_num95++; + this.link_num96++; + this.link_num97++; + this.link_num98++; + this.link_num99++; + this.link_num100++; + this.link_num101++; + this.link_num102++; + this.link_num103++; + this.link_num104++; + this.link_num105++; + this.link_num106++; + this.link_num107++; + this.link_num108++; + this.link_num109++; + this.link_num110++; + this.link_num111++; + this.link_num112++; + this.link_num113++; + this.link_num114++; + this.link_num115++; + this.link_num116++; + this.link_num117++; + this.link_num118++; + this.link_num119++; + this.link_num120++; + this.link_num121++; + this.link_num122++; + this.link_num123++; + this.link_num124++; + this.link_num125++; + this.link_num126++; + this.link_num127++; + this.link_num128++; + this.link_num129++; + this.link_num130++; + this.link_num131++; + this.link_num132++; + this.link_num133++; + this.link_num134++; + this.link_num135++; + this.link_num136++; + this.link_num137++; + this.link_num138++; + this.link_num139++; + this.link_num140++; + this.link_num141++; + this.link_num142++; + this.link_num143++; + this.link_num144++; + this.link_num145++; + this.link_num146++; + this.link_num147++; + this.link_num148++; + this.link_num149++; + this.link_num150++; + this.link_num151++; + this.link_num152++; + this.link_num153++; + this.link_num154++; + this.link_num155++; + this.link_num156++; + this.link_num157++; + this.link_num158++; + this.link_num159++; + this.link_num160++; + this.link_num161++; + this.link_num162++; + this.link_num163++; + this.link_num164++; + this.link_num165++; + this.link_num166++; + this.link_num167++; + this.link_num168++; + this.link_num169++; + this.link_num170++; + this.link_num171++; + this.link_num172++; + this.link_num173++; + this.link_num174++; + this.link_num175++; + this.link_num176++; + this.link_num177++; + this.link_num178++; + this.link_num179++; + this.link_num180++; + this.link_num181++; + this.link_num182++; + this.link_num183++; + this.link_num184++; + this.link_num185++; + this.link_num186++; + this.link_num187++; + this.link_num188++; + this.link_num189++; + this.link_num190++; + this.link_num191++; + this.link_num192++; + this.link_num193++; + this.link_num194++; + this.link_num195++; + this.link_num196++; + this.link_num197++; + this.link_num198++; + this.link_num199++; + this.link_num200++; + this.link_num201++; + this.link_num202++; + this.link_num203++; + this.link_num204++; + this.link_num205++; + this.link_num206++; + this.link_num207++; + this.link_num208++; + this.link_num209++; + this.link_num210++; + this.link_num211++; + this.link_num212++; + this.link_num213++; + this.link_num214++; + this.link_num215++; + this.link_num216++; + this.link_num217++; + this.link_num218++; + this.link_num219++; + this.link_num220++; + this.link_num221++; + this.link_num222++; + this.link_num223++; + this.link_num224++; + this.link_num225++; + this.link_num226++; + this.link_num227++; + this.link_num228++; + this.link_num229++; + this.link_num230++; + this.link_num231++; + this.link_num232++; + this.link_num233++; + this.link_num234++; + this.link_num235++; + this.link_num236++; + this.link_num237++; + this.link_num238++; + this.link_num239++; + this.link_num240++; + this.link_num241++; + this.link_num242++; + this.link_num243++; + this.link_num244++; + this.link_num245++; + this.link_num246++; + this.link_num247++; + this.link_num248++; + this.link_num249++; + this.link_num250++; + this.link_num251++; + this.link_num252++; + this.link_num253++; + this.link_num254++; + this.link_num255++; + this.link_num256++; + this.link_num257++; + this.link_num258++; + this.link_num259++; + this.link_num260++; + this.link_num261++; + this.link_num262++; + this.link_num263++; + this.link_num264++; + this.link_num265++; + this.link_num266++; + this.link_num267++; + this.link_num268++; + this.link_num269++; + this.link_num270++; + this.link_num271++; + this.link_num272++; + this.link_num273++; + this.link_num274++; + this.link_num275++; + this.link_num276++; + this.link_num277++; + this.link_num278++; + this.link_num279++; + this.link_num280++; + this.link_num281++; + this.link_num282++; + this.link_num283++; + this.link_num284++; + this.link_num285++; + this.link_num286++; + this.link_num287++; + this.link_num288++; + this.link_num289++; + this.link_num290++; + this.link_num291++; + this.link_num292++; + this.link_num293++; + this.link_num294++; + this.link_num295++; + this.link_num296++; + this.link_num297++; + this.link_num298++; + this.link_num299++; + this.link_num300++; + this.link_num301++; + this.link_num302++; + this.link_num303++; + this.link_num304++; + this.link_num305++; + this.link_num306++; + this.link_num307++; + this.link_num308++; + this.link_num309++; + this.link_num310++; + this.link_num311++; + this.link_num312++; + this.link_num313++; + this.link_num314++; + this.link_num315++; + this.link_num316++; + this.link_num317++; + this.link_num318++; + this.link_num319++; + this.link_num320++; + this.link_num321++; + this.link_num322++; + this.link_num323++; + this.link_num324++; + this.link_num325++; + this.link_num326++; + this.link_num327++; + this.link_num328++; + this.link_num329++; + this.link_num330++; + this.link_num331++; + this.link_num332++; + + }) + } + } +} + +@Component +struct ConsumeVariables { + @Consume consume_num0: number; + @Consume consume_num1: number; + @Consume consume_num2: number; + @Consume consume_num3: number; + @Consume consume_num4: number; + @Consume consume_num5: number; + @Consume consume_num6: number; + @Consume consume_num7: number; + @Consume consume_num8: number; + @Consume consume_num9: number; + @Consume consume_num10: number; + @Consume consume_num11: number; + @Consume consume_num12: number; + @Consume consume_num13: number; + @Consume consume_num14: number; + @Consume consume_num15: number; + @Consume consume_num16: number; + @Consume consume_num17: number; + @Consume consume_num18: number; + @Consume consume_num19: number; + @Consume consume_num20: number; + @Consume consume_num21: number; + @Consume consume_num22: number; + @Consume consume_num23: number; + @Consume consume_num24: number; + @Consume consume_num25: number; + @Consume consume_num26: number; + @Consume consume_num27: number; + @Consume consume_num28: number; + @Consume consume_num29: number; + @Consume consume_num30: number; + @Consume consume_num31: number; + @Consume consume_num32: number; + @Consume consume_num33: number; + @Consume consume_num34: number; + @Consume consume_num35: number; + @Consume consume_num36: number; + @Consume consume_num37: number; + @Consume consume_num38: number; + @Consume consume_num39: number; + @Consume consume_num40: number; + @Consume consume_num41: number; + @Consume consume_num42: number; + @Consume consume_num43: number; + @Consume consume_num44: number; + @Consume consume_num45: number; + @Consume consume_num46: number; + @Consume consume_num47: number; + @Consume consume_num48: number; + @Consume consume_num49: number; + @Consume consume_num50: number; + @Consume consume_num51: number; + @Consume consume_num52: number; + @Consume consume_num53: number; + @Consume consume_num54: number; + @Consume consume_num55: number; + @Consume consume_num56: number; + @Consume consume_num57: number; + @Consume consume_num58: number; + @Consume consume_num59: number; + @Consume consume_num60: number; + @Consume consume_num61: number; + @Consume consume_num62: number; + @Consume consume_num63: number; + @Consume consume_num64: number; + @Consume consume_num65: number; + @Consume consume_num66: number; + @Consume consume_num67: number; + @Consume consume_num68: number; + @Consume consume_num69: number; + @Consume consume_num70: number; + @Consume consume_num71: number; + @Consume consume_num72: number; + @Consume consume_num73: number; + @Consume consume_num74: number; + @Consume consume_num75: number; + @Consume consume_num76: number; + @Consume consume_num77: number; + @Consume consume_num78: number; + @Consume consume_num79: number; + @Consume consume_num80: number; + @Consume consume_num81: number; + @Consume consume_num82: number; + @Consume consume_num83: number; + @Consume consume_num84: number; + @Consume consume_num85: number; + @Consume consume_num86: number; + @Consume consume_num87: number; + @Consume consume_num88: number; + @Consume consume_num89: number; + @Consume consume_num90: number; + @Consume consume_num91: number; + @Consume consume_num92: number; + @Consume consume_num93: number; + @Consume consume_num94: number; + @Consume consume_num95: number; + @Consume consume_num96: number; + @Consume consume_num97: number; + @Consume consume_num98: number; + @Consume consume_num99: number; + @Consume consume_num100: number; + @Consume consume_num101: number; + @Consume consume_num102: number; + @Consume consume_num103: number; + @Consume consume_num104: number; + @Consume consume_num105: number; + @Consume consume_num106: number; + @Consume consume_num107: number; + @Consume consume_num108: number; + @Consume consume_num109: number; + @Consume consume_num110: number; + @Consume consume_num111: number; + @Consume consume_num112: number; + @Consume consume_num113: number; + @Consume consume_num114: number; + @Consume consume_num115: number; + @Consume consume_num116: number; + @Consume consume_num117: number; + @Consume consume_num118: number; + @Consume consume_num119: number; + @Consume consume_num120: number; + @Consume consume_num121: number; + @Consume consume_num122: number; + @Consume consume_num123: number; + @Consume consume_num124: number; + @Consume consume_num125: number; + @Consume consume_num126: number; + @Consume consume_num127: number; + @Consume consume_num128: number; + @Consume consume_num129: number; + @Consume consume_num130: number; + @Consume consume_num131: number; + @Consume consume_num132: number; + @Consume consume_num133: number; + @Consume consume_num134: number; + @Consume consume_num135: number; + @Consume consume_num136: number; + @Consume consume_num137: number; + @Consume consume_num138: number; + @Consume consume_num139: number; + @Consume consume_num140: number; + @Consume consume_num141: number; + @Consume consume_num142: number; + @Consume consume_num143: number; + @Consume consume_num144: number; + @Consume consume_num145: number; + @Consume consume_num146: number; + @Consume consume_num147: number; + @Consume consume_num148: number; + @Consume consume_num149: number; + @Consume consume_num150: number; + @Consume consume_num151: number; + @Consume consume_num152: number; + @Consume consume_num153: number; + @Consume consume_num154: number; + @Consume consume_num155: number; + @Consume consume_num156: number; + @Consume consume_num157: number; + @Consume consume_num158: number; + @Consume consume_num159: number; + @Consume consume_num160: number; + @Consume consume_num161: number; + @Consume consume_num162: number; + @Consume consume_num163: number; + @Consume consume_num164: number; + @Consume consume_num165: number; + @Consume consume_num166: number; + @Consume consume_num167: number; + @Consume consume_num168: number; + @Consume consume_num169: number; + @Consume consume_num170: number; + @Consume consume_num171: number; + @Consume consume_num172: number; + @Consume consume_num173: number; + @Consume consume_num174: number; + @Consume consume_num175: number; + @Consume consume_num176: number; + @Consume consume_num177: number; + @Consume consume_num178: number; + @Consume consume_num179: number; + @Consume consume_num180: number; + @Consume consume_num181: number; + @Consume consume_num182: number; + @Consume consume_num183: number; + @Consume consume_num184: number; + @Consume consume_num185: number; + @Consume consume_num186: number; + @Consume consume_num187: number; + @Consume consume_num188: number; + @Consume consume_num189: number; + @Consume consume_num190: number; + @Consume consume_num191: number; + @Consume consume_num192: number; + @Consume consume_num193: number; + @Consume consume_num194: number; + @Consume consume_num195: number; + @Consume consume_num196: number; + @Consume consume_num197: number; + @Consume consume_num198: number; + @Consume consume_num199: number; + @Consume consume_num200: number; + @Consume consume_num201: number; + @Consume consume_num202: number; + @Consume consume_num203: number; + @Consume consume_num204: number; + @Consume consume_num205: number; + @Consume consume_num206: number; + @Consume consume_num207: number; + @Consume consume_num208: number; + @Consume consume_num209: number; + @Consume consume_num210: number; + @Consume consume_num211: number; + @Consume consume_num212: number; + @Consume consume_num213: number; + @Consume consume_num214: number; + @Consume consume_num215: number; + @Consume consume_num216: number; + @Consume consume_num217: number; + @Consume consume_num218: number; + @Consume consume_num219: number; + @Consume consume_num220: number; + @Consume consume_num221: number; + @Consume consume_num222: number; + @Consume consume_num223: number; + @Consume consume_num224: number; + @Consume consume_num225: number; + @Consume consume_num226: number; + @Consume consume_num227: number; + @Consume consume_num228: number; + @Consume consume_num229: number; + @Consume consume_num230: number; + @Consume consume_num231: number; + @Consume consume_num232: number; + @Consume consume_num233: number; + @Consume consume_num234: number; + @Consume consume_num235: number; + @Consume consume_num236: number; + @Consume consume_num237: number; + @Consume consume_num238: number; + @Consume consume_num239: number; + @Consume consume_num240: number; + @Consume consume_num241: number; + @Consume consume_num242: number; + @Consume consume_num243: number; + @Consume consume_num244: number; + @Consume consume_num245: number; + @Consume consume_num246: number; + @Consume consume_num247: number; + @Consume consume_num248: number; + @Consume consume_num249: number; + @Consume consume_num250: number; + @Consume consume_num251: number; + @Consume consume_num252: number; + @Consume consume_num253: number; + @Consume consume_num254: number; + @Consume consume_num255: number; + @Consume consume_num256: number; + @Consume consume_num257: number; + @Consume consume_num258: number; + @Consume consume_num259: number; + @Consume consume_num260: number; + @Consume consume_num261: number; + @Consume consume_num262: number; + @Consume consume_num263: number; + @Consume consume_num264: number; + @Consume consume_num265: number; + @Consume consume_num266: number; + @Consume consume_num267: number; + @Consume consume_num268: number; + @Consume consume_num269: number; + @Consume consume_num270: number; + @Consume consume_num271: number; + @Consume consume_num272: number; + @Consume consume_num273: number; + @Consume consume_num274: number; + @Consume consume_num275: number; + @Consume consume_num276: number; + @Consume consume_num277: number; + @Consume consume_num278: number; + @Consume consume_num279: number; + @Consume consume_num280: number; + @Consume consume_num281: number; + @Consume consume_num282: number; + @Consume consume_num283: number; + @Consume consume_num284: number; + @Consume consume_num285: number; + @Consume consume_num286: number; + @Consume consume_num287: number; + @Consume consume_num288: number; + @Consume consume_num289: number; + @Consume consume_num290: number; + @Consume consume_num291: number; + @Consume consume_num292: number; + @Consume consume_num293: number; + @Consume consume_num294: number; + @Consume consume_num295: number; + @Consume consume_num296: number; + @Consume consume_num297: number; + @Consume consume_num298: number; + @Consume consume_num299: number; + @Consume consume_num300: number; + @Consume consume_num301: number; + @Consume consume_num302: number; + @Consume consume_num303: number; + @Consume consume_num304: number; + @Consume consume_num305: number; + @Consume consume_num306: number; + @Consume consume_num307: number; + @Consume consume_num308: number; + @Consume consume_num309: number; + @Consume consume_num310: number; + @Consume consume_num311: number; + @Consume consume_num312: number; + @Consume consume_num313: number; + @Consume consume_num314: number; + @Consume consume_num315: number; + @Consume consume_num316: number; + @Consume consume_num317: number; + @Consume consume_num318: number; + @Consume consume_num319: number; + @Consume consume_num320: number; + @Consume consume_num321: number; + @Consume consume_num322: number; + @Consume consume_num323: number; + @Consume consume_num324: number; + @Consume consume_num325: number; + @Consume consume_num326: number; + @Consume consume_num327: number; + @Consume consume_num328: number; + @Consume consume_num329: number; + @Consume consume_num330: number; + @Consume consume_num331: number; + @Consume consume_num332: number; + + + //============================================================================= + + build() { + Column() { + Button('Click Me') + .onClick((e: ClickEvent) => { + this.consume_num0++; + this.consume_num1++; + this.consume_num2++; + this.consume_num3++; + this.consume_num4++; + this.consume_num5++; + this.consume_num6++; + this.consume_num7++; + this.consume_num8++; + this.consume_num9++; + this.consume_num10++; + this.consume_num11++; + this.consume_num12++; + this.consume_num13++; + this.consume_num14++; + this.consume_num15++; + this.consume_num16++; + this.consume_num17++; + this.consume_num18++; + this.consume_num19++; + this.consume_num20++; + this.consume_num21++; + this.consume_num22++; + this.consume_num23++; + this.consume_num24++; + this.consume_num25++; + this.consume_num26++; + this.consume_num27++; + this.consume_num28++; + this.consume_num29++; + this.consume_num30++; + this.consume_num31++; + this.consume_num32++; + this.consume_num33++; + this.consume_num34++; + this.consume_num35++; + this.consume_num36++; + this.consume_num37++; + this.consume_num38++; + this.consume_num39++; + this.consume_num40++; + this.consume_num41++; + this.consume_num42++; + this.consume_num43++; + this.consume_num44++; + this.consume_num45++; + this.consume_num46++; + this.consume_num47++; + this.consume_num48++; + this.consume_num49++; + this.consume_num50++; + this.consume_num51++; + this.consume_num52++; + this.consume_num53++; + this.consume_num54++; + this.consume_num55++; + this.consume_num56++; + this.consume_num57++; + this.consume_num58++; + this.consume_num59++; + this.consume_num60++; + this.consume_num61++; + this.consume_num62++; + this.consume_num63++; + this.consume_num64++; + this.consume_num65++; + this.consume_num66++; + this.consume_num67++; + this.consume_num68++; + this.consume_num69++; + this.consume_num70++; + this.consume_num71++; + this.consume_num72++; + this.consume_num73++; + this.consume_num74++; + this.consume_num75++; + this.consume_num76++; + this.consume_num77++; + this.consume_num78++; + this.consume_num79++; + this.consume_num80++; + this.consume_num81++; + this.consume_num82++; + this.consume_num83++; + this.consume_num84++; + this.consume_num85++; + this.consume_num86++; + this.consume_num87++; + this.consume_num88++; + this.consume_num89++; + this.consume_num90++; + this.consume_num91++; + this.consume_num92++; + this.consume_num93++; + this.consume_num94++; + this.consume_num95++; + this.consume_num96++; + this.consume_num97++; + this.consume_num98++; + this.consume_num99++; + this.consume_num100++; + this.consume_num101++; + this.consume_num102++; + this.consume_num103++; + this.consume_num104++; + this.consume_num105++; + this.consume_num106++; + this.consume_num107++; + this.consume_num108++; + this.consume_num109++; + this.consume_num110++; + this.consume_num111++; + this.consume_num112++; + this.consume_num113++; + this.consume_num114++; + this.consume_num115++; + this.consume_num116++; + this.consume_num117++; + this.consume_num118++; + this.consume_num119++; + this.consume_num120++; + this.consume_num121++; + this.consume_num122++; + this.consume_num123++; + this.consume_num124++; + this.consume_num125++; + this.consume_num126++; + this.consume_num127++; + this.consume_num128++; + this.consume_num129++; + this.consume_num130++; + this.consume_num131++; + this.consume_num132++; + this.consume_num133++; + this.consume_num134++; + this.consume_num135++; + this.consume_num136++; + this.consume_num137++; + this.consume_num138++; + this.consume_num139++; + this.consume_num140++; + this.consume_num141++; + this.consume_num142++; + this.consume_num143++; + this.consume_num144++; + this.consume_num145++; + this.consume_num146++; + this.consume_num147++; + this.consume_num148++; + this.consume_num149++; + this.consume_num150++; + this.consume_num151++; + this.consume_num152++; + this.consume_num153++; + this.consume_num154++; + this.consume_num155++; + this.consume_num156++; + this.consume_num157++; + this.consume_num158++; + this.consume_num159++; + this.consume_num160++; + this.consume_num161++; + this.consume_num162++; + this.consume_num163++; + this.consume_num164++; + this.consume_num165++; + this.consume_num166++; + this.consume_num167++; + this.consume_num168++; + this.consume_num169++; + this.consume_num170++; + this.consume_num171++; + this.consume_num172++; + this.consume_num173++; + this.consume_num174++; + this.consume_num175++; + this.consume_num176++; + this.consume_num177++; + this.consume_num178++; + this.consume_num179++; + this.consume_num180++; + this.consume_num181++; + this.consume_num182++; + this.consume_num183++; + this.consume_num184++; + this.consume_num185++; + this.consume_num186++; + this.consume_num187++; + this.consume_num188++; + this.consume_num189++; + this.consume_num190++; + this.consume_num191++; + this.consume_num192++; + this.consume_num193++; + this.consume_num194++; + this.consume_num195++; + this.consume_num196++; + this.consume_num197++; + this.consume_num198++; + this.consume_num199++; + this.consume_num200++; + this.consume_num201++; + this.consume_num202++; + this.consume_num203++; + this.consume_num204++; + this.consume_num205++; + this.consume_num206++; + this.consume_num207++; + this.consume_num208++; + this.consume_num209++; + this.consume_num210++; + this.consume_num211++; + this.consume_num212++; + this.consume_num213++; + this.consume_num214++; + this.consume_num215++; + this.consume_num216++; + this.consume_num217++; + this.consume_num218++; + this.consume_num219++; + this.consume_num220++; + this.consume_num221++; + this.consume_num222++; + this.consume_num223++; + this.consume_num224++; + this.consume_num225++; + this.consume_num226++; + this.consume_num227++; + this.consume_num228++; + this.consume_num229++; + this.consume_num230++; + this.consume_num231++; + this.consume_num232++; + this.consume_num233++; + this.consume_num234++; + this.consume_num235++; + this.consume_num236++; + this.consume_num237++; + this.consume_num238++; + this.consume_num239++; + this.consume_num240++; + this.consume_num241++; + this.consume_num242++; + this.consume_num243++; + this.consume_num244++; + this.consume_num245++; + this.consume_num246++; + this.consume_num247++; + this.consume_num248++; + this.consume_num249++; + this.consume_num250++; + this.consume_num251++; + this.consume_num252++; + this.consume_num253++; + this.consume_num254++; + this.consume_num255++; + this.consume_num256++; + this.consume_num257++; + this.consume_num258++; + this.consume_num259++; + this.consume_num260++; + this.consume_num261++; + this.consume_num262++; + this.consume_num263++; + this.consume_num264++; + this.consume_num265++; + this.consume_num266++; + this.consume_num267++; + this.consume_num268++; + this.consume_num269++; + this.consume_num270++; + this.consume_num271++; + this.consume_num272++; + this.consume_num273++; + this.consume_num274++; + this.consume_num275++; + this.consume_num276++; + this.consume_num277++; + this.consume_num278++; + this.consume_num279++; + this.consume_num280++; + this.consume_num281++; + this.consume_num282++; + this.consume_num283++; + this.consume_num284++; + this.consume_num285++; + this.consume_num286++; + this.consume_num287++; + this.consume_num288++; + this.consume_num289++; + this.consume_num290++; + this.consume_num291++; + this.consume_num292++; + this.consume_num293++; + this.consume_num294++; + this.consume_num295++; + this.consume_num296++; + this.consume_num297++; + this.consume_num298++; + this.consume_num299++; + this.consume_num300++; + this.consume_num301++; + this.consume_num302++; + this.consume_num303++; + this.consume_num304++; + this.consume_num305++; + this.consume_num306++; + this.consume_num307++; + this.consume_num308++; + this.consume_num309++; + this.consume_num310++; + this.consume_num311++; + this.consume_num312++; + this.consume_num313++; + this.consume_num314++; + this.consume_num315++; + this.consume_num316++; + this.consume_num317++; + this.consume_num318++; + this.consume_num319++; + this.consume_num320++; + this.consume_num321++; + this.consume_num322++; + this.consume_num323++; + this.consume_num324++; + this.consume_num325++; + this.consume_num326++; + this.consume_num327++; + this.consume_num328++; + this.consume_num329++; + this.consume_num330++; + this.consume_num331++; + this.consume_num332++; + + }) + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/builtinComponents.ets b/koala_tools/ui2abc/perf-tests/src/builtinComponents.ets new file mode 100644 index 0000000000000000000000000000000000000000..273556265a4496e0c5b0336b03a3ec41f6efbc19 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/builtinComponents.ets @@ -0,0 +1,22660 @@ + +/** + * 内置组件 builtinComponents.ets + */ + +import { memo } from "@ohos.arkui" + +import { Text, TextAttribute, Column, Component, Button, ButtonAttribute, ClickEvent, + UserView, Image, Slider, Toggle, DatePicker, Progress, TextInput, Row, List, Tabs, + FontWeight, ButtonType, SliderStyle, ToggleType, Color, $r, BarPosition, TabContent, + ProgressType, Checkbox, ForEach, SliderChangeMode, ListItem, TextAlign, EnterKeyType, + SubmitEvent, EditableTextOnChangeCallback, Callback, FontStyle, OnCheckboxChangeCallback, + ImageFit, ImageSourceSize } from "@ohos.arkui" + +import { State } from "@ohos.arkui" + +@Component +struct BuiltinComponents { + @State message: string = 'Hello ArkTS' + @State sliderValue: number = 50 + @State toggleValue: boolean = false + @State pickerValue: string = 'Option1' + @State dateValue: Date = new Date() + @State progressValue: number = 0.3 + @State textValue: string = '' + @State radioValue: string = 'Radio1' + @State checkboxValues: boolean[] = [false, false, false] + @State indexValue: number = 0 + + build() { + Column() { + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + // 1. 文本组件 + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .fontColor(Color.Blue) + .fontStyle(FontStyle.NORMAL) + .draggable(true) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + + // 2. 按钮组件 + Button('Click Me') + .width(200) + .height(50) + .type(ButtonType.Capsule) + .onClick((e:ClickEvent) => { + this.message = 'Button clicked!' + }) + + // 3. 图片组件 + Image($r('app.media.startIcon')) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + .objectFit(ImageFit.Contain) + .borderRadius(50) + + // 4. 滑动条组件 + Slider({ + value: this.sliderValue, + min: 0, + max: 100, + step: 1, + style: SliderStyle.OutSet + }) + .width('90%') + .onChange((value: Double, mode: SliderChangeMode) => { + this.sliderValue = value + }) + + // 5. 开关组件 + Toggle({ type: ToggleType.Switch, isOn: this.toggleValue }) + .width(100) + .height(40) + .padding(15) + .selectedColor(Color.Green) + .onChange((isOn: boolean) => { + this.toggleValue = isOn + }) + + // 6. 日期选择器 + DatePicker({ + start: new Date('1970-1-1'), + end: new Date('2030-12-31'), + selected: this.dateValue + }) + .width('90%') + .onDateChange((value: Date) => { + this.dateValue = value + } as Callback) + + // 7. 进度条 + Progress({ + value: this.progressValue, + total: 1.0, + type: ProgressType.Linear + }) + .width('90%') + .height(100) + + // 8. 输入框 + TextInput({ placeholder: 'Enter text' }) + .width('90%') + .height(50) + .onChange((value: string) => { + this.textValue = value + } as EditableTextOnChangeCallback) + + // 9. 复选框 + Row() { + Checkbox() + .select(this.checkboxValues[0]) + .onChange((value: boolean) => { + this.checkboxValues[0] = value + } as OnCheckboxChangeCallback) + Checkbox() + .select(this.checkboxValues[1]) + .onChange((value: boolean) => { + this.checkboxValues[1] = value + } as OnCheckboxChangeCallback) + } + + // 10. 列表组件 + List({}) { + ForEach([1, 2, 3, 4, 5], (item: Int) => { + ListItem() { + Text(`Item ${item}`) + .width('100%') + .textAlign(TextAlign.Center) + } + .width('100%') + .height(60) + .backgroundColor('#f0f0f0') + }) + } + .width('100%') + .height(200) + + // 11. 页签组件 + Tabs({ barPosition: BarPosition.Start }) { + TabContent() { + Text('Tab1 Content').fontSize(20) + }.tabBar('Tab1') + + TabContent() { + Text('Tab2 Content') + .fontSize(20) + }.tabBar('Tab2') + } + .width('100%') + .height(150) + + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/customComponents.ets b/koala_tools/ui2abc/perf-tests/src/customComponents.ets new file mode 100644 index 0000000000000000000000000000000000000000..e6a7a898fc0d9cf2a2c401b5fc3528202681503f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/customComponents.ets @@ -0,0 +1,36016 @@ + +/** + * 自定义组件 customComponents.ets + */ + +import { State } from "@ohos.arkui.components" +import { Component, Column, ClickEvent, FontWeight, Text } from "@ohos.arkui.components" + +@Component +struct CustomComponentsMain { + build() { + Component0() + Component1() + Component2() + Component3() + Component4() + Component5() + Component6() + Component7() + Component8() + Component9() + Component10() + Component11() + Component12() + Component13() + Component14() + Component15() + Component16() + Component17() + Component18() + Component19() + Component20() + Component21() + Component22() + Component23() + Component24() + Component25() + Component26() + Component27() + Component28() + Component29() + Component30() + Component31() + Component32() + Component33() + Component34() + Component35() + Component36() + Component37() + Component38() + Component39() + Component40() + Component41() + Component42() + Component43() + Component44() + Component45() + Component46() + Component47() + Component48() + Component49() + Component50() + Component51() + Component52() + Component53() + Component54() + Component55() + Component56() + Component57() + Component58() + Component59() + Component60() + Component61() + Component62() + Component63() + Component64() + Component65() + Component66() + Component67() + Component68() + Component69() + Component70() + Component71() + Component72() + Component73() + Component74() + Component75() + Component76() + Component77() + Component78() + Component79() + Component80() + Component81() + Component82() + Component83() + Component84() + Component85() + Component86() + Component87() + Component88() + Component89() + Component90() + Component91() + Component92() + Component93() + Component94() + Component95() + Component96() + Component97() + Component98() + Component99() + Component100() + Component101() + Component102() + Component103() + Component104() + Component105() + Component106() + Component107() + Component108() + Component109() + Component110() + Component111() + Component112() + Component113() + Component114() + Component115() + Component116() + Component117() + Component118() + Component119() + Component120() + Component121() + Component122() + Component123() + Component124() + Component125() + Component126() + Component127() + Component128() + Component129() + Component130() + Component131() + Component132() + Component133() + Component134() + Component135() + Component136() + Component137() + Component138() + Component139() + Component140() + Component141() + Component142() + Component143() + Component144() + Component145() + Component146() + Component147() + Component148() + Component149() + Component150() + Component151() + Component152() + Component153() + Component154() + Component155() + Component156() + Component157() + Component158() + Component159() + Component160() + Component161() + Component162() + Component163() + Component164() + Component165() + Component166() + Component167() + Component168() + Component169() + Component170() + Component171() + Component172() + Component173() + Component174() + Component175() + Component176() + Component177() + Component178() + Component179() + Component180() + Component181() + Component182() + Component183() + Component184() + Component185() + Component186() + Component187() + Component188() + Component189() + Component190() + Component191() + Component192() + Component193() + Component194() + Component195() + Component196() + Component197() + Component198() + Component199() + Component200() + Component201() + Component202() + Component203() + Component204() + Component205() + Component206() + Component207() + Component208() + Component209() + Component210() + Component211() + Component212() + Component213() + Component214() + Component215() + Component216() + Component217() + Component218() + Component219() + Component220() + Component221() + Component222() + Component223() + Component224() + Component225() + Component226() + Component227() + Component228() + Component229() + Component230() + Component231() + Component232() + Component233() + Component234() + Component235() + Component236() + Component237() + Component238() + Component239() + Component240() + Component241() + Component242() + Component243() + Component244() + Component245() + Component246() + Component247() + Component248() + Component249() + Component250() + Component251() + Component252() + Component253() + Component254() + Component255() + Component256() + Component257() + Component258() + Component259() + Component260() + Component261() + Component262() + Component263() + Component264() + Component265() + Component266() + Component267() + Component268() + Component269() + Component270() + Component271() + Component272() + Component273() + Component274() + Component275() + Component276() + Component277() + Component278() + Component279() + Component280() + Component281() + Component282() + Component283() + Component284() + Component285() + Component286() + Component287() + Component288() + Component289() + Component290() + Component291() + Component292() + Component293() + Component294() + Component295() + Component296() + Component297() + Component298() + Component299() + Component300() + Component301() + Component302() + Component303() + Component304() + Component305() + Component306() + Component307() + Component308() + Component309() + Component310() + Component311() + Component312() + Component313() + Component314() + Component315() + Component316() + Component317() + Component318() + Component319() + Component320() + Component321() + Component322() + Component323() + Component324() + Component325() + Component326() + Component327() + Component328() + Component329() + Component330() + Component331() + Component332() + Component333() + Component334() + Component335() + Component336() + Component337() + Component338() + Component339() + Component340() + Component341() + Component342() + Component343() + Component344() + Component345() + Component346() + Component347() + Component348() + Component349() + Component350() + Component351() + Component352() + Component353() + Component354() + Component355() + Component356() + Component357() + Component358() + Component359() + Component360() + Component361() + Component362() + Component363() + Component364() + Component365() + Component366() + Component367() + Component368() + Component369() + Component370() + Component371() + Component372() + Component373() + Component374() + Component375() + Component376() + Component377() + Component378() + Component379() + Component380() + Component381() + Component382() + Component383() + Component384() + Component385() + Component386() + Component387() + Component388() + Component389() + Component390() + Component391() + Component392() + Component393() + Component394() + Component395() + Component396() + Component397() + Component398() + Component399() + Component400() + Component401() + Component402() + Component403() + Component404() + Component405() + Component406() + Component407() + Component408() + Component409() + Component410() + Component411() + Component412() + Component413() + Component414() + Component415() + Component416() + Component417() + Component418() + Component419() + Component420() + Component421() + Component422() + Component423() + Component424() + Component425() + Component426() + Component427() + Component428() + Component429() + Component430() + Component431() + Component432() + Component433() + Component434() + Component435() + Component436() + Component437() + Component438() + Component439() + Component440() + Component441() + Component442() + Component443() + Component444() + Component445() + Component446() + Component447() + Component448() + Component449() + Component450() + Component451() + Component452() + Component453() + Component454() + Component455() + Component456() + Component457() + Component458() + Component459() + Component460() + Component461() + Component462() + Component463() + Component464() + Component465() + Component466() + Component467() + Component468() + Component469() + Component470() + Component471() + Component472() + Component473() + Component474() + Component475() + Component476() + Component477() + Component478() + Component479() + Component480() + Component481() + Component482() + Component483() + Component484() + Component485() + Component486() + Component487() + Component488() + Component489() + Component490() + Component491() + Component492() + Component493() + Component494() + Component495() + Component496() + Component497() + Component498() + Component499() + Component500() + Component501() + Component502() + Component503() + Component504() + Component505() + Component506() + Component507() + Component508() + Component509() + Component510() + Component511() + Component512() + Component513() + Component514() + Component515() + Component516() + Component517() + Component518() + Component519() + Component520() + Component521() + Component522() + Component523() + Component524() + Component525() + Component526() + Component527() + Component528() + Component529() + Component530() + Component531() + Component532() + Component533() + Component534() + Component535() + Component536() + Component537() + Component538() + Component539() + Component540() + Component541() + Component542() + Component543() + Component544() + Component545() + Component546() + Component547() + Component548() + Component549() + Component550() + Component551() + Component552() + Component553() + Component554() + Component555() + Component556() + Component557() + Component558() + Component559() + Component560() + Component561() + Component562() + Component563() + Component564() + Component565() + Component566() + Component567() + Component568() + Component569() + Component570() + Component571() + Component572() + Component573() + Component574() + Component575() + Component576() + Component577() + Component578() + Component579() + Component580() + Component581() + Component582() + Component583() + Component584() + Component585() + Component586() + Component587() + Component588() + Component589() + Component590() + Component591() + Component592() + Component593() + Component594() + Component595() + Component596() + Component597() + Component598() + Component599() + Component600() + Component601() + Component602() + Component603() + Component604() + Component605() + Component606() + Component607() + Component608() + Component609() + Component610() + Component611() + Component612() + Component613() + Component614() + Component615() + Component616() + Component617() + Component618() + Component619() + Component620() + Component621() + Component622() + Component623() + Component624() + Component625() + Component626() + Component627() + Component628() + Component629() + Component630() + Component631() + Component632() + Component633() + Component634() + Component635() + Component636() + Component637() + Component638() + Component639() + Component640() + Component641() + Component642() + Component643() + Component644() + Component645() + Component646() + Component647() + Component648() + Component649() + Component650() + Component651() + Component652() + Component653() + Component654() + Component655() + Component656() + Component657() + Component658() + Component659() + Component660() + Component661() + Component662() + Component663() + Component664() + Component665() + Component666() + Component667() + Component668() + Component669() + Component670() + Component671() + Component672() + Component673() + Component674() + Component675() + Component676() + Component677() + Component678() + Component679() + Component680() + Component681() + Component682() + Component683() + Component684() + Component685() + Component686() + Component687() + Component688() + Component689() + Component690() + Component691() + Component692() + Component693() + Component694() + Component695() + Component696() + Component697() + Component698() + Component699() + Component700() + Component701() + Component702() + Component703() + Component704() + Component705() + Component706() + Component707() + Component708() + Component709() + Component710() + Component711() + Component712() + Component713() + Component714() + Component715() + Component716() + Component717() + Component718() + Component719() + Component720() + Component721() + Component722() + Component723() + Component724() + Component725() + Component726() + Component727() + Component728() + Component729() + Component730() + Component731() + Component732() + Component733() + Component734() + Component735() + Component736() + Component737() + Component738() + Component739() + Component740() + Component741() + Component742() + Component743() + Component744() + Component745() + Component746() + Component747() + Component748() + Component749() + Component750() + Component751() + Component752() + Component753() + Component754() + Component755() + Component756() + Component757() + Component758() + Component759() + Component760() + Component761() + Component762() + Component763() + Component764() + Component765() + Component766() + Component767() + Component768() + Component769() + Component770() + Component771() + Component772() + Component773() + Component774() + Component775() + Component776() + Component777() + Component778() + Component779() + Component780() + Component781() + Component782() + Component783() + Component784() + Component785() + Component786() + Component787() + Component788() + Component789() + Component790() + Component791() + Component792() + Component793() + Component794() + Component795() + Component796() + Component797() + Component798() + Component799() + Component800() + Component801() + Component802() + Component803() + Component804() + Component805() + Component806() + Component807() + Component808() + Component809() + Component810() + Component811() + Component812() + Component813() + Component814() + Component815() + Component816() + Component817() + Component818() + Component819() + Component820() + Component821() + Component822() + Component823() + Component824() + Component825() + Component826() + Component827() + Component828() + Component829() + Component830() + Component831() + Component832() + Component833() + Component834() + Component835() + Component836() + Component837() + Component838() + Component839() + Component840() + Component841() + Component842() + Component843() + Component844() + Component845() + Component846() + Component847() + Component848() + Component849() + Component850() + Component851() + Component852() + Component853() + Component854() + Component855() + Component856() + Component857() + Component858() + Component859() + Component860() + Component861() + Component862() + Component863() + Component864() + Component865() + Component866() + Component867() + Component868() + Component869() + Component870() + Component871() + Component872() + Component873() + Component874() + Component875() + Component876() + Component877() + Component878() + Component879() + Component880() + Component881() + Component882() + Component883() + Component884() + Component885() + Component886() + Component887() + Component888() + Component889() + Component890() + Component891() + Component892() + Component893() + Component894() + Component895() + Component896() + Component897() + Component898() + Component899() + Component900() + Component901() + Component902() + Component903() + Component904() + Component905() + Component906() + Component907() + Component908() + Component909() + Component910() + Component911() + Component912() + Component913() + Component914() + Component915() + Component916() + Component917() + Component918() + Component919() + Component920() + Component921() + Component922() + Component923() + Component924() + Component925() + Component926() + Component927() + Component928() + Component929() + Component930() + Component931() + Component932() + Component933() + Component934() + Component935() + Component936() + Component937() + Component938() + Component939() + Component940() + Component941() + Component942() + Component943() + Component944() + Component945() + Component946() + Component947() + Component948() + Component949() + Component950() + Component951() + Component952() + Component953() + Component954() + Component955() + Component956() + Component957() + Component958() + Component959() + Component960() + Component961() + Component962() + Component963() + Component964() + Component965() + Component966() + Component967() + Component968() + Component969() + Component970() + Component971() + Component972() + Component973() + Component974() + Component975() + Component976() + Component977() + Component978() + Component979() + Component980() + Component981() + Component982() + Component983() + Component984() + Component985() + Component986() + Component987() + Component988() + Component989() + Component990() + Component991() + Component992() + Component993() + Component994() + Component995() + Component996() + Component997() + Component998() + Component999() + Component1000() + Component1001() + Component1002() + Component1003() + Component1004() + Component1005() + Component1006() + Component1007() + Component1008() + Component1009() + Component1010() + Component1011() + Component1012() + Component1013() + Component1014() + Component1015() + Component1016() + Component1017() + Component1018() + Component1019() + Component1020() + Component1021() + Component1022() + Component1023() + Component1024() + Component1025() + Component1026() + Component1027() + Component1028() + Component1029() + Component1030() + Component1031() + Component1032() + Component1033() + Component1034() + Component1035() + Component1036() + Component1037() + Component1038() + Component1039() + Component1040() + Component1041() + Component1042() + Component1043() + Component1044() + Component1045() + Component1046() + Component1047() + Component1048() + Component1049() + Component1050() + Component1051() + Component1052() + Component1053() + Component1054() + Component1055() + Component1056() + Component1057() + Component1058() + Component1059() + Component1060() + Component1061() + Component1062() + Component1063() + Component1064() + Component1065() + Component1066() + Component1067() + Component1068() + Component1069() + Component1070() + Component1071() + Component1072() + Component1073() + Component1074() + Component1075() + Component1076() + Component1077() + Component1078() + Component1079() + Component1080() + Component1081() + Component1082() + Component1083() + Component1084() + Component1085() + Component1086() + Component1087() + Component1088() + Component1089() + Component1090() + Component1091() + Component1092() + Component1093() + Component1094() + Component1095() + Component1096() + Component1097() + Component1098() + Component1099() + Component1100() + Component1101() + Component1102() + Component1103() + Component1104() + Component1105() + Component1106() + Component1107() + Component1108() + Component1109() + Component1110() + Component1111() + Component1112() + Component1113() + Component1114() + Component1115() + Component1116() + Component1117() + Component1118() + Component1119() + Component1120() + Component1121() + Component1122() + Component1123() + Component1124() + Component1125() + Component1126() + Component1127() + Component1128() + Component1129() + Component1130() + Component1131() + Component1132() + Component1133() + Component1134() + Component1135() + Component1136() + Component1137() + Component1138() + Component1139() + Component1140() + Component1141() + Component1142() + Component1143() + Component1144() + Component1145() + Component1146() + Component1147() + Component1148() + Component1149() + Component1150() + Component1151() + Component1152() + Component1153() + Component1154() + Component1155() + Component1156() + Component1157() + Component1158() + Component1159() + Component1160() + Component1161() + Component1162() + Component1163() + Component1164() + Component1165() + Component1166() + Component1167() + Component1168() + Component1169() + Component1170() + Component1171() + Component1172() + Component1173() + Component1174() + Component1175() + Component1176() + Component1177() + Component1178() + Component1179() + Component1180() + Component1181() + Component1182() + Component1183() + Component1184() + Component1185() + Component1186() + Component1187() + Component1188() + Component1189() + Component1190() + Component1191() + Component1192() + Component1193() + Component1194() + Component1195() + Component1196() + Component1197() + Component1198() + Component1199() + Component1200() + Component1201() + Component1202() + Component1203() + Component1204() + Component1205() + Component1206() + Component1207() + Component1208() + Component1209() + Component1210() + Component1211() + Component1212() + Component1213() + Component1214() + Component1215() + Component1216() + Component1217() + Component1218() + Component1219() + Component1220() + Component1221() + Component1222() + Component1223() + Component1224() + Component1225() + Component1226() + Component1227() + Component1228() + Component1229() + Component1230() + Component1231() + Component1232() + Component1233() + Component1234() + Component1235() + Component1236() + Component1237() + Component1238() + Component1239() + Component1240() + Component1241() + Component1242() + Component1243() + Component1244() + Component1245() + Component1246() + Component1247() + Component1248() + Component1249() + Component1250() + Component1251() + Component1252() + Component1253() + Component1254() + Component1255() + Component1256() + Component1257() + Component1258() + Component1259() + Component1260() + Component1261() + Component1262() + Component1263() + Component1264() + Component1265() + Component1266() + Component1267() + Component1268() + Component1269() + Component1270() + Component1271() + Component1272() + Component1273() + Component1274() + Component1275() + Component1276() + Component1277() + Component1278() + Component1279() + Component1280() + Component1281() + Component1282() + Component1283() + Component1284() + Component1285() + Component1286() + Component1287() + Component1288() + Component1289() + Component1290() + Component1291() + Component1292() + Component1293() + Component1294() + Component1295() + Component1296() + Component1297() + Component1298() + Component1299() + Component1300() + Component1301() + Component1302() + Component1303() + Component1304() + Component1305() + Component1306() + Component1307() + Component1308() + Component1309() + Component1310() + Component1311() + Component1312() + Component1313() + Component1314() + Component1315() + Component1316() + Component1317() + Component1318() + Component1319() + Component1320() + Component1321() + Component1322() + Component1323() + Component1324() + Component1325() + Component1326() + Component1327() + Component1328() + Component1329() + Component1330() + Component1331() + Component1332() + Component1333() + Component1334() + Component1335() + Component1336() + Component1337() + Component1338() + Component1339() + Component1340() + Component1341() + Component1342() + Component1343() + Component1344() + Component1345() + Component1346() + Component1347() + Component1348() + Component1349() + Component1350() + Component1351() + Component1352() + Component1353() + Component1354() + Component1355() + Component1356() + Component1357() + Component1358() + Component1359() + Component1360() + Component1361() + Component1362() + Component1363() + Component1364() + Component1365() + Component1366() + Component1367() + Component1368() + Component1369() + Component1370() + Component1371() + Component1372() + Component1373() + Component1374() + Component1375() + Component1376() + Component1377() + Component1378() + Component1379() + Component1380() + Component1381() + Component1382() + Component1383() + Component1384() + Component1385() + Component1386() + Component1387() + Component1388() + Component1389() + Component1390() + Component1391() + Component1392() + Component1393() + Component1394() + Component1395() + Component1396() + Component1397() + Component1398() + Component1399() + Component1400() + Component1401() + Component1402() + Component1403() + Component1404() + Component1405() + Component1406() + Component1407() + Component1408() + Component1409() + Component1410() + Component1411() + Component1412() + Component1413() + Component1414() + Component1415() + Component1416() + Component1417() + Component1418() + Component1419() + Component1420() + Component1421() + Component1422() + Component1423() + Component1424() + Component1425() + Component1426() + Component1427() + Component1428() + Component1429() + Component1430() + Component1431() + Component1432() + Component1433() + Component1434() + Component1435() + Component1436() + Component1437() + Component1438() + Component1439() + Component1440() + Component1441() + Component1442() + Component1443() + Component1444() + Component1445() + Component1446() + Component1447() + Component1448() + Component1449() + Component1450() + Component1451() + Component1452() + Component1453() + Component1454() + Component1455() + Component1456() + Component1457() + Component1458() + Component1459() + Component1460() + Component1461() + Component1462() + Component1463() + Component1464() + Component1465() + Component1466() + Component1467() + Component1468() + Component1469() + Component1470() + Component1471() + Component1472() + Component1473() + Component1474() + Component1475() + Component1476() + Component1477() + Component1478() + Component1479() + Component1480() + Component1481() + Component1482() + Component1483() + Component1484() + Component1485() + Component1486() + Component1487() + Component1488() + Component1489() + Component1490() + Component1491() + Component1492() + Component1493() + Component1494() + Component1495() + Component1496() + Component1497() + Component1498() + Component1499() + Component1500() + Component1501() + Component1502() + Component1503() + Component1504() + Component1505() + Component1506() + Component1507() + Component1508() + Component1509() + Component1510() + Component1511() + Component1512() + Component1513() + Component1514() + Component1515() + Component1516() + Component1517() + Component1518() + Component1519() + Component1520() + Component1521() + Component1522() + Component1523() + Component1524() + Component1525() + Component1526() + Component1527() + Component1528() + Component1529() + Component1530() + Component1531() + Component1532() + Component1533() + Component1534() + Component1535() + Component1536() + Component1537() + Component1538() + Component1539() + Component1540() + Component1541() + Component1542() + Component1543() + Component1544() + Component1545() + Component1546() + Component1547() + Component1548() + Component1549() + Component1550() + Component1551() + Component1552() + Component1553() + Component1554() + Component1555() + Component1556() + Component1557() + Component1558() + Component1559() + Component1560() + Component1561() + Component1562() + Component1563() + Component1564() + Component1565() + Component1566() + Component1567() + Component1568() + Component1569() + Component1570() + Component1571() + Component1572() + Component1573() + Component1574() + Component1575() + Component1576() + Component1577() + Component1578() + Component1579() + Component1580() + Component1581() + Component1582() + Component1583() + Component1584() + Component1585() + Component1586() + Component1587() + Component1588() + Component1589() + Component1590() + Component1591() + Component1592() + Component1593() + Component1594() + Component1595() + Component1596() + Component1597() + Component1598() + Component1599() + Component1600() + Component1601() + Component1602() + Component1603() + Component1604() + Component1605() + Component1606() + Component1607() + Component1608() + Component1609() + Component1610() + Component1611() + Component1612() + Component1613() + Component1614() + Component1615() + Component1616() + Component1617() + Component1618() + Component1619() + Component1620() + Component1621() + Component1622() + Component1623() + Component1624() + Component1625() + Component1626() + Component1627() + Component1628() + Component1629() + Component1630() + Component1631() + Component1632() + Component1633() + Component1634() + Component1635() + Component1636() + Component1637() + Component1638() + Component1639() + Component1640() + Component1641() + Component1642() + Component1643() + Component1644() + Component1645() + Component1646() + Component1647() + Component1648() + Component1649() + Component1650() + Component1651() + Component1652() + Component1653() + Component1654() + Component1655() + Component1656() + Component1657() + Component1658() + Component1659() + Component1660() + Component1661() + Component1662() + Component1663() + Component1664() + Component1665() + Component1666() + Component1667() + Component1668() + Component1669() + Component1670() + Component1671() + Component1672() + Component1673() + Component1674() + Component1675() + Component1676() + Component1677() + Component1678() + Component1679() + Component1680() + Component1681() + Component1682() + Component1683() + Component1684() + Component1685() + Component1686() + Component1687() + Component1688() + Component1689() + Component1690() + Component1691() + Component1692() + Component1693() + Component1694() + Component1695() + Component1696() + Component1697() + Component1698() + Component1699() + Component1700() + Component1701() + Component1702() + Component1703() + Component1704() + Component1705() + Component1706() + Component1707() + Component1708() + Component1709() + Component1710() + Component1711() + Component1712() + Component1713() + Component1714() + Component1715() + Component1716() + Component1717() + Component1718() + Component1719() + Component1720() + Component1721() + Component1722() + Component1723() + Component1724() + Component1725() + Component1726() + Component1727() + Component1728() + Component1729() + Component1730() + Component1731() + Component1732() + Component1733() + Component1734() + Component1735() + Component1736() + Component1737() + Component1738() + Component1739() + Component1740() + Component1741() + Component1742() + Component1743() + Component1744() + Component1745() + Component1746() + Component1747() + Component1748() + Component1749() + Component1750() + Component1751() + Component1752() + Component1753() + Component1754() + Component1755() + Component1756() + Component1757() + Component1758() + Component1759() + Component1760() + Component1761() + Component1762() + Component1763() + Component1764() + Component1765() + Component1766() + Component1767() + Component1768() + Component1769() + Component1770() + Component1771() + Component1772() + Component1773() + Component1774() + Component1775() + Component1776() + Component1777() + Component1778() + Component1779() + Component1780() + Component1781() + Component1782() + Component1783() + Component1784() + Component1785() + Component1786() + Component1787() + Component1788() + Component1789() + Component1790() + Component1791() + Component1792() + Component1793() + Component1794() + Component1795() + Component1796() + Component1797() + Component1798() + Component1799() + Component1800() + Component1801() + Component1802() + Component1803() + Component1804() + Component1805() + Component1806() + Component1807() + Component1808() + Component1809() + Component1810() + Component1811() + Component1812() + Component1813() + Component1814() + Component1815() + Component1816() + Component1817() + Component1818() + Component1819() + Component1820() + Component1821() + Component1822() + Component1823() + Component1824() + Component1825() + Component1826() + Component1827() + Component1828() + Component1829() + Component1830() + Component1831() + Component1832() + Component1833() + Component1834() + Component1835() + Component1836() + Component1837() + Component1838() + Component1839() + Component1840() + Component1841() + Component1842() + Component1843() + Component1844() + Component1845() + Component1846() + Component1847() + Component1848() + Component1849() + Component1850() + Component1851() + Component1852() + Component1853() + Component1854() + Component1855() + Component1856() + Component1857() + Component1858() + Component1859() + Component1860() + Component1861() + Component1862() + Component1863() + Component1864() + Component1865() + Component1866() + Component1867() + Component1868() + Component1869() + Component1870() + Component1871() + Component1872() + Component1873() + Component1874() + Component1875() + Component1876() + Component1877() + Component1878() + Component1879() + Component1880() + Component1881() + Component1882() + Component1883() + Component1884() + Component1885() + Component1886() + Component1887() + Component1888() + Component1889() + Component1890() + Component1891() + Component1892() + Component1893() + Component1894() + Component1895() + Component1896() + Component1897() + Component1898() + Component1899() + Component1900() + Component1901() + Component1902() + Component1903() + Component1904() + Component1905() + Component1906() + Component1907() + Component1908() + Component1909() + Component1910() + Component1911() + Component1912() + Component1913() + Component1914() + Component1915() + Component1916() + Component1917() + Component1918() + Component1919() + Component1920() + Component1921() + Component1922() + Component1923() + Component1924() + Component1925() + Component1926() + Component1927() + Component1928() + Component1929() + Component1930() + Component1931() + Component1932() + Component1933() + Component1934() + Component1935() + Component1936() + Component1937() + Component1938() + Component1939() + Component1940() + Component1941() + Component1942() + Component1943() + Component1944() + Component1945() + Component1946() + Component1947() + Component1948() + Component1949() + Component1950() + Component1951() + Component1952() + Component1953() + Component1954() + Component1955() + Component1956() + Component1957() + Component1958() + Component1959() + Component1960() + Component1961() + Component1962() + Component1963() + Component1964() + Component1965() + Component1966() + Component1967() + Component1968() + Component1969() + Component1970() + Component1971() + Component1972() + Component1973() + Component1974() + Component1975() + Component1976() + Component1977() + Component1978() + Component1979() + Component1980() + Component1981() + Component1982() + Component1983() + Component1984() + Component1985() + Component1986() + Component1987() + Component1988() + Component1989() + Component1990() + Component1991() + Component1992() + Component1993() + Component1994() + Component1995() + Component1996() + Component1997() + Component1998() + Component1999() + + } +} + + +@Component +struct Component0 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component2 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component3 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component4 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component5 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component6 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component7 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component8 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component9 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component10 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component11 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component12 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component13 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component14 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component15 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component16 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component17 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component18 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component19 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component20 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component21 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component22 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component23 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component24 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component25 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component26 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component27 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component28 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component29 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component30 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component31 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component32 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component33 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component34 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component35 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component36 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component37 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component38 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component39 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component40 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component41 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component42 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component43 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component44 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component45 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component46 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component47 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component48 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component49 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component50 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component51 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component52 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component53 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component54 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component55 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component56 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component57 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component58 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component59 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component60 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component61 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component62 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component63 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component64 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component65 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component66 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component67 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component68 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component69 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component70 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component71 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component72 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component73 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component74 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component75 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component76 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component77 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component78 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component79 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component80 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component81 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component82 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component83 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component84 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component85 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component86 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component87 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component88 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component89 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component90 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component91 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component92 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component93 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component94 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component95 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component96 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component97 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component98 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component99 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component100 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component101 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component102 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component103 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component104 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component105 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component106 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component107 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component108 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component109 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component110 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component111 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component112 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component113 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component114 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component115 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component116 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component117 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component118 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component119 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component120 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component121 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component122 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component123 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component124 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component125 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component126 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component127 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component128 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component129 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component130 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component131 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component132 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component133 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component134 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component135 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component136 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component137 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component138 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component139 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component140 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component141 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component142 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component143 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component144 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component145 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component146 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component147 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component148 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component149 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component150 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component151 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component152 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component153 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component154 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component155 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component156 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component157 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component158 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component159 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component160 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component161 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component162 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component163 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component164 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component165 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component166 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component167 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component168 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component169 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component170 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component171 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component172 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component173 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component174 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component175 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component176 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component177 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component178 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component179 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component180 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component181 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component182 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component183 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component184 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component185 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component186 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component187 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component188 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component189 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component190 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component191 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component192 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component193 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component194 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component195 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component196 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component197 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component198 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component199 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component200 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component201 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component202 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component203 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component204 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component205 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component206 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component207 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component208 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component209 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component210 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component211 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component212 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component213 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component214 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component215 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component216 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component217 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component218 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component219 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component220 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component221 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component222 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component223 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component224 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component225 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component226 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component227 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component228 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component229 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component230 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component231 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component232 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component233 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component234 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component235 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component236 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component237 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component238 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component239 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component240 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component241 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component242 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component243 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component244 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component245 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component246 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component247 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component248 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component249 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component250 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component251 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component252 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component253 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component254 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component255 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component256 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component257 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component258 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component259 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component260 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component261 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component262 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component263 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component264 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component265 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component266 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component267 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component268 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component269 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component270 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component271 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component272 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component273 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component274 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component275 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component276 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component277 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component278 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component279 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component280 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component281 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component282 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component283 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component284 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component285 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component286 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component287 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component288 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component289 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component290 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component291 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component292 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component293 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component294 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component295 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component296 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component297 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component298 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component299 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component300 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component301 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component302 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component303 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component304 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component305 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component306 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component307 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component308 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component309 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component310 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component311 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component312 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component313 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component314 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component315 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component316 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component317 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component318 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component319 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component320 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component321 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component322 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component323 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component324 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component325 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component326 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component327 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component328 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component329 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component330 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component331 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component332 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component333 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component334 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component335 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component336 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component337 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component338 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component339 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component340 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component341 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component342 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component343 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component344 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component345 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component346 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component347 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component348 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component349 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component350 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component351 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component352 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component353 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component354 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component355 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component356 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component357 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component358 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component359 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component360 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component361 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component362 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component363 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component364 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component365 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component366 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component367 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component368 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component369 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component370 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component371 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component372 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component373 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component374 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component375 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component376 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component377 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component378 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component379 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component380 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component381 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component382 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component383 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component384 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component385 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component386 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component387 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component388 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component389 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component390 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component391 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component392 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component393 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component394 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component395 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component396 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component397 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component398 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component399 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component400 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component401 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component402 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component403 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component404 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component405 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component406 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component407 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component408 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component409 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component410 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component411 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component412 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component413 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component414 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component415 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component416 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component417 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component418 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component419 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component420 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component421 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component422 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component423 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component424 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component425 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component426 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component427 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component428 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component429 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component430 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component431 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component432 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component433 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component434 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component435 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component436 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component437 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component438 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component439 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component440 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component441 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component442 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component443 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component444 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component445 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component446 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component447 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component448 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component449 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component450 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component451 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component452 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component453 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component454 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component455 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component456 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component457 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component458 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component459 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component460 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component461 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component462 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component463 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component464 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component465 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component466 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component467 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component468 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component469 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component470 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component471 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component472 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component473 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component474 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component475 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component476 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component477 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component478 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component479 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component480 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component481 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component482 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component483 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component484 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component485 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component486 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component487 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component488 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component489 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component490 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component491 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component492 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component493 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component494 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component495 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component496 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component497 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component498 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component499 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component500 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component501 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component502 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component503 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component504 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component505 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component506 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component507 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component508 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component509 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component510 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component511 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component512 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component513 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component514 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component515 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component516 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component517 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component518 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component519 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component520 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component521 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component522 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component523 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component524 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component525 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component526 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component527 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component528 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component529 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component530 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component531 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component532 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component533 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component534 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component535 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component536 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component537 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component538 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component539 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component540 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component541 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component542 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component543 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component544 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component545 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component546 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component547 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component548 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component549 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component550 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component551 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component552 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component553 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component554 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component555 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component556 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component557 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component558 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component559 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component560 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component561 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component562 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component563 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component564 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component565 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component566 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component567 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component568 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component569 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component570 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component571 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component572 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component573 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component574 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component575 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component576 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component577 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component578 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component579 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component580 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component581 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component582 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component583 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component584 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component585 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component586 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component587 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component588 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component589 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component590 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component591 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component592 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component593 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component594 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component595 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component596 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component597 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component598 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component599 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component600 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component601 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component602 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component603 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component604 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component605 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component606 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component607 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component608 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component609 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component610 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component611 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component612 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component613 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component614 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component615 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component616 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component617 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component618 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component619 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component620 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component621 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component622 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component623 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component624 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component625 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component626 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component627 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component628 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component629 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component630 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component631 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component632 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component633 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component634 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component635 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component636 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component637 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component638 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component639 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component640 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component641 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component642 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component643 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component644 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component645 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component646 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component647 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component648 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component649 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component650 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component651 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component652 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component653 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component654 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component655 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component656 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component657 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component658 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component659 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component660 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component661 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component662 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component663 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component664 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component665 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component666 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component667 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component668 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component669 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component670 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component671 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component672 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component673 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component674 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component675 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component676 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component677 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component678 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component679 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component680 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component681 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component682 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component683 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component684 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component685 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component686 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component687 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component688 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component689 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component690 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component691 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component692 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component693 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component694 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component695 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component696 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component697 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component698 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component699 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component700 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component701 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component702 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component703 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component704 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component705 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component706 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component707 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component708 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component709 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component710 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component711 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component712 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component713 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component714 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component715 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component716 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component717 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component718 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component719 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component720 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component721 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component722 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component723 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component724 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component725 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component726 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component727 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component728 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component729 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component730 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component731 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component732 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component733 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component734 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component735 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component736 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component737 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component738 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component739 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component740 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component741 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component742 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component743 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component744 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component745 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component746 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component747 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component748 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component749 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component750 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component751 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component752 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component753 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component754 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component755 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component756 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component757 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component758 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component759 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component760 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component761 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component762 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component763 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component764 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component765 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component766 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component767 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component768 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component769 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component770 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component771 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component772 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component773 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component774 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component775 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component776 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component777 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component778 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component779 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component780 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component781 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component782 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component783 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component784 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component785 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component786 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component787 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component788 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component789 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component790 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component791 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component792 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component793 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component794 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component795 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component796 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component797 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component798 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component799 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component800 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component801 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component802 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component803 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component804 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component805 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component806 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component807 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component808 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component809 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component810 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component811 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component812 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component813 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component814 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component815 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component816 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component817 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component818 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component819 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component820 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component821 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component822 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component823 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component824 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component825 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component826 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component827 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component828 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component829 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component830 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component831 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component832 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component833 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component834 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component835 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component836 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component837 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component838 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component839 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component840 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component841 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component842 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component843 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component844 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component845 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component846 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component847 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component848 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component849 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component850 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component851 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component852 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component853 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component854 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component855 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component856 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component857 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component858 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component859 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component860 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component861 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component862 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component863 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component864 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component865 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component866 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component867 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component868 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component869 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component870 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component871 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component872 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component873 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component874 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component875 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component876 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component877 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component878 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component879 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component880 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component881 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component882 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component883 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component884 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component885 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component886 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component887 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component888 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component889 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component890 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component891 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component892 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component893 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component894 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component895 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component896 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component897 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component898 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component899 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component900 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component901 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component902 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component903 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component904 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component905 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component906 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component907 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component908 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component909 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component910 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component911 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component912 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component913 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component914 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component915 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component916 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component917 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component918 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component919 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component920 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component921 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component922 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component923 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component924 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component925 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component926 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component927 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component928 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component929 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component930 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component931 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component932 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component933 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component934 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component935 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component936 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component937 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component938 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component939 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component940 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component941 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component942 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component943 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component944 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component945 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component946 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component947 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component948 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component949 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component950 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component951 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component952 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component953 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component954 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component955 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component956 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component957 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component958 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component959 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component960 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component961 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component962 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component963 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component964 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component965 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component966 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component967 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component968 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component969 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component970 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component971 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component972 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component973 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component974 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component975 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component976 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component977 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component978 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component979 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component980 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component981 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component982 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component983 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component984 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component985 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component986 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component987 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component988 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component989 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component990 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component991 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component992 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component993 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component994 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component995 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component996 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component997 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component998 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component999 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1000 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1001 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1002 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1003 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1004 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1005 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1006 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1007 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1008 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1009 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1010 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1011 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1012 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1013 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1014 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1015 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1016 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1017 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1018 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1019 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1020 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1021 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1022 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1023 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1024 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1025 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1026 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1027 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1028 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1029 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1030 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1031 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1032 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1033 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1034 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1035 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1036 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1037 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1038 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1039 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1040 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1041 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1042 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1043 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1044 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1045 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1046 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1047 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1048 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1049 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1050 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1051 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1052 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1053 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1054 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1055 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1056 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1057 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1058 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1059 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1060 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1061 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1062 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1063 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1064 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1065 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1066 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1067 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1068 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1069 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1070 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1071 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1072 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1073 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1074 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1075 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1076 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1077 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1078 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1079 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1080 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1081 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1082 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1083 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1084 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1085 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1086 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1087 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1088 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1089 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1090 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1091 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1092 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1093 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1094 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1095 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1096 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1097 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1098 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1099 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1100 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1101 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1102 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1103 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1104 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1105 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1106 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1107 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1108 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1109 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1110 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1111 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1112 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1113 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1114 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1115 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1116 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1117 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1118 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1119 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1120 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1121 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1122 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1123 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1124 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1125 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1126 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1127 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1128 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1129 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1130 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1131 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1132 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1133 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1134 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1135 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1136 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1137 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1138 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1139 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1140 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1141 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1142 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1143 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1144 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1145 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1146 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1147 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1148 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1149 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1150 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1151 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1152 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1153 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1154 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1155 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1156 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1157 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1158 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1159 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1160 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1161 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1162 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1163 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1164 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1165 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1166 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1167 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1168 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1169 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1170 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1171 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1172 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1173 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1174 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1175 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1176 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1177 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1178 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1179 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1180 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1181 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1182 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1183 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1184 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1185 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1186 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1187 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1188 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1189 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1190 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1191 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1192 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1193 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1194 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1195 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1196 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1197 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1198 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1199 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1200 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1201 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1202 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1203 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1204 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1205 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1206 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1207 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1208 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1209 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1210 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1211 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1212 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1213 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1214 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1215 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1216 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1217 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1218 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1219 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1220 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1221 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1222 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1223 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1224 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1225 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1226 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1227 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1228 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1229 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1230 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1231 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1232 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1233 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1234 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1235 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1236 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1237 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1238 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1239 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1240 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1241 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1242 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1243 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1244 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1245 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1246 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1247 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1248 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1249 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1250 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1251 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1252 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1253 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1254 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1255 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1256 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1257 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1258 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1259 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1260 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1261 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1262 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1263 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1264 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1265 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1266 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1267 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1268 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1269 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1270 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1271 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1272 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1273 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1274 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1275 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1276 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1277 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1278 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1279 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1280 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1281 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1282 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1283 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1284 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1285 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1286 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1287 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1288 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1289 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1290 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1291 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1292 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1293 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1294 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1295 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1296 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1297 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1298 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1299 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1300 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1301 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1302 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1303 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1304 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1305 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1306 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1307 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1308 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1309 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1310 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1311 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1312 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1313 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1314 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1315 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1316 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1317 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1318 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1319 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1320 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1321 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1322 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1323 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1324 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1325 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1326 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1327 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1328 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1329 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1330 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1331 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1332 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1333 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1334 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1335 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1336 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1337 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1338 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1339 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1340 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1341 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1342 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1343 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1344 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1345 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1346 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1347 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1348 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1349 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1350 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1351 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1352 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1353 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1354 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1355 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1356 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1357 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1358 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1359 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1360 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1361 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1362 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1363 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1364 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1365 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1366 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1367 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1368 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1369 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1370 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1371 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1372 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1373 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1374 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1375 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1376 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1377 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1378 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1379 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1380 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1381 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1382 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1383 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1384 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1385 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1386 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1387 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1388 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1389 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1390 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1391 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1392 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1393 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1394 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1395 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1396 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1397 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1398 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1399 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1400 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1401 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1402 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1403 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1404 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1405 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1406 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1407 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1408 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1409 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1410 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1411 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1412 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1413 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1414 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1415 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1416 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1417 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1418 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1419 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1420 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1421 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1422 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1423 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1424 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1425 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1426 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1427 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1428 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1429 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1430 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1431 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1432 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1433 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1434 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1435 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1436 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1437 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1438 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1439 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1440 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1441 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1442 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1443 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1444 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1445 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1446 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1447 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1448 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1449 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1450 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1451 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1452 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1453 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1454 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1455 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1456 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1457 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1458 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1459 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1460 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1461 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1462 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1463 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1464 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1465 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1466 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1467 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1468 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1469 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1470 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1471 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1472 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1473 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1474 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1475 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1476 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1477 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1478 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1479 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1480 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1481 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1482 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1483 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1484 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1485 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1486 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1487 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1488 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1489 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1490 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1491 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1492 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1493 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1494 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1495 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1496 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1497 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1498 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1499 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1500 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1501 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1502 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1503 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1504 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1505 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1506 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1507 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1508 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1509 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1510 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1511 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1512 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1513 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1514 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1515 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1516 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1517 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1518 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1519 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1520 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1521 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1522 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1523 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1524 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1525 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1526 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1527 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1528 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1529 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1530 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1531 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1532 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1533 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1534 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1535 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1536 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1537 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1538 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1539 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1540 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1541 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1542 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1543 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1544 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1545 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1546 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1547 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1548 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1549 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1550 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1551 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1552 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1553 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1554 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1555 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1556 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1557 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1558 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1559 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1560 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1561 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1562 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1563 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1564 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1565 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1566 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1567 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1568 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1569 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1570 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1571 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1572 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1573 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1574 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1575 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1576 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1577 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1578 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1579 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1580 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1581 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1582 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1583 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1584 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1585 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1586 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1587 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1588 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1589 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1590 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1591 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1592 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1593 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1594 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1595 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1596 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1597 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1598 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1599 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1600 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1601 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1602 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1603 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1604 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1605 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1606 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1607 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1608 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1609 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1610 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1611 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1612 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1613 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1614 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1615 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1616 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1617 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1618 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1619 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1620 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1621 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1622 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1623 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1624 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1625 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1626 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1627 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1628 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1629 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1630 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1631 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1632 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1633 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1634 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1635 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1636 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1637 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1638 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1639 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1640 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1641 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1642 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1643 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1644 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1645 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1646 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1647 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1648 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1649 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1650 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1651 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1652 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1653 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1654 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1655 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1656 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1657 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1658 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1659 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1660 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1661 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1662 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1663 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1664 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1665 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1666 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1667 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1668 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1669 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1670 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1671 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1672 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1673 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1674 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1675 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1676 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1677 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1678 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1679 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1680 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1681 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1682 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1683 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1684 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1685 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1686 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1687 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1688 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1689 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1690 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1691 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1692 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1693 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1694 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1695 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1696 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1697 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1698 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1699 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1700 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1701 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1702 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1703 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1704 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1705 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1706 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1707 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1708 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1709 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1710 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1711 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1712 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1713 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1714 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1715 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1716 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1717 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1718 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1719 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1720 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1721 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1722 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1723 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1724 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1725 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1726 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1727 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1728 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1729 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1730 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1731 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1732 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1733 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1734 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1735 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1736 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1737 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1738 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1739 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1740 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1741 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1742 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1743 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1744 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1745 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1746 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1747 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1748 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1749 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1750 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1751 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1752 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1753 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1754 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1755 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1756 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1757 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1758 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1759 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1760 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1761 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1762 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1763 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1764 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1765 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1766 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1767 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1768 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1769 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1770 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1771 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1772 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1773 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1774 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1775 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1776 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1777 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1778 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1779 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1780 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1781 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1782 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1783 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1784 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1785 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1786 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1787 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1788 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1789 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1790 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1791 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1792 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1793 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1794 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1795 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1796 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1797 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1798 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1799 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1800 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1801 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1802 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1803 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1804 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1805 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1806 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1807 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1808 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1809 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1810 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1811 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1812 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1813 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1814 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1815 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1816 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1817 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1818 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1819 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1820 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1821 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1822 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1823 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1824 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1825 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1826 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1827 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1828 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1829 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1830 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1831 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1832 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1833 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1834 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1835 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1836 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1837 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1838 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1839 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1840 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1841 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1842 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1843 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1844 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1845 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1846 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1847 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1848 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1849 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1850 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1851 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1852 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1853 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1854 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1855 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1856 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1857 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1858 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1859 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1860 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1861 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1862 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1863 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1864 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1865 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1866 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1867 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1868 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1869 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1870 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1871 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1872 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1873 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1874 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1875 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1876 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1877 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1878 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1879 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1880 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1881 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1882 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1883 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1884 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1885 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1886 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1887 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1888 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1889 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1890 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1891 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1892 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1893 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1894 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1895 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1896 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1897 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1898 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1899 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1900 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1901 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1902 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1903 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1904 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1905 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1906 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1907 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1908 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1909 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1910 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1911 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1912 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1913 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1914 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1915 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1916 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1917 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1918 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1919 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1920 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1921 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1922 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1923 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1924 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1925 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1926 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1927 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1928 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1929 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1930 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1931 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1932 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1933 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1934 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1935 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1936 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1937 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1938 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1939 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1940 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1941 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1942 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1943 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1944 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1945 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1946 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1947 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1948 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1949 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1950 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1951 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1952 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1953 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1954 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1955 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1956 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1957 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1958 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1959 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1960 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1961 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1962 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1963 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1964 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1965 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1966 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1967 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1968 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1969 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1970 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1971 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1972 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1973 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1974 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1975 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1976 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1977 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1978 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1979 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1980 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1981 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1982 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1983 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1984 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1985 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1986 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1987 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1988 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1989 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1990 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1991 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1992 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1993 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1994 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1995 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1996 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1997 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1998 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + +@Component +struct Component1999 { + @State message: string = "hello world" + + build() { + Column({}) { + Text(this.message) + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.message = 'Text clicked!' + }) + } + } +} + + diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile1.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile1.ets new file mode 100644 index 0000000000000000000000000000000000000000..fcea1a149da62bcdb52b85c674bd02ced222c07a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile1.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent2 } from "./manyImportFile2" +import { ManyImportComponent3 } from "./manyImportFile3" + + +@Component +export struct ManyImportComponent1 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent2() + ManyImportComponent3() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile10.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile10.ets new file mode 100644 index 0000000000000000000000000000000000000000..b8f57d9de1da166ac6516fe05ea367c1c83ff937 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile10.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent20 } from "./manyImportFile20" +import { ManyImportComponent21 } from "./manyImportFile21" + + +@Component +export struct ManyImportComponent10 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent20() + ManyImportComponent21() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile100.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile100.ets new file mode 100644 index 0000000000000000000000000000000000000000..7e75b60696764f4c34cb09a694f7cfb3b2f5ea2a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile100.ets @@ -0,0 +1,18 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent200 } from "./manyImportFile200" + + +@Component +export struct ManyImportComponent100 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent200() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile101.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile101.ets new file mode 100644 index 0000000000000000000000000000000000000000..f6bf966c89d65b374965becc221be7ca842bd926 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile101.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent101 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile102.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile102.ets new file mode 100644 index 0000000000000000000000000000000000000000..567418dd941f4a52a1bb9267a638d9fe9c398686 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile102.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent102 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile103.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile103.ets new file mode 100644 index 0000000000000000000000000000000000000000..3cecf34d65d5a64ac023b1a2f6825260265a2939 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile103.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent103 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile104.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile104.ets new file mode 100644 index 0000000000000000000000000000000000000000..9812323538ff62488316b628847fe90ecca74241 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile104.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent104 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile105.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile105.ets new file mode 100644 index 0000000000000000000000000000000000000000..661716c55886ed2dc8ec02753c0a8531f6c94417 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile105.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent105 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile106.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile106.ets new file mode 100644 index 0000000000000000000000000000000000000000..460fe866f385da95580d87d5964de81cab53a3ac --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile106.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent106 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile107.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile107.ets new file mode 100644 index 0000000000000000000000000000000000000000..b039e610f43717160a8912d9a7647bb5212a264b --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile107.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent107 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile108.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile108.ets new file mode 100644 index 0000000000000000000000000000000000000000..d0908852442cd2696f9cd9722ce4e903e4e98977 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile108.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent108 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile109.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile109.ets new file mode 100644 index 0000000000000000000000000000000000000000..fff7ed1ff3e7c1f491007f1bf25e4df3aef9e5d1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile109.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent109 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile11.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile11.ets new file mode 100644 index 0000000000000000000000000000000000000000..d6a2679057d6b263d22ac8e03a7dcb094a5fc531 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile11.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent22 } from "./manyImportFile22" +import { ManyImportComponent23 } from "./manyImportFile23" + + +@Component +export struct ManyImportComponent11 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent22() + ManyImportComponent23() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile110.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile110.ets new file mode 100644 index 0000000000000000000000000000000000000000..be4a7095cdfe589f30afea6b371b351ab8e97c91 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile110.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent110 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile111.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile111.ets new file mode 100644 index 0000000000000000000000000000000000000000..ef66065ae3391c89f2a1d7efb739d3b3eb4a5e2a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile111.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent111 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile112.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile112.ets new file mode 100644 index 0000000000000000000000000000000000000000..c44c6dc334e0a3101d0310cb2530dfe127487aff --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile112.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent112 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile113.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile113.ets new file mode 100644 index 0000000000000000000000000000000000000000..0185e0ab4f4e51472f6a5c131240f8f0b0ef6738 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile113.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent113 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile114.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile114.ets new file mode 100644 index 0000000000000000000000000000000000000000..cf7d11bb4c8c18033778832139870fc9f08f61c2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile114.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent114 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile115.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile115.ets new file mode 100644 index 0000000000000000000000000000000000000000..a7e3f47da624e8088538505425cdc1801a634396 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile115.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent115 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile116.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile116.ets new file mode 100644 index 0000000000000000000000000000000000000000..c7e46ac7deadfbc4c19b24d598feba11da1f0b88 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile116.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent116 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile117.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile117.ets new file mode 100644 index 0000000000000000000000000000000000000000..31758bd93e8ef824e64df214ca2ce41519ea64ab --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile117.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent117 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile118.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile118.ets new file mode 100644 index 0000000000000000000000000000000000000000..1ecd3c3973c5f25b59b5d4e3650a07b0224c4f74 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile118.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent118 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile119.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile119.ets new file mode 100644 index 0000000000000000000000000000000000000000..02dbc973820c2f8bd050b086d8881608fc208a8e --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile119.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent119 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile12.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile12.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ee47543bd97d81ed9aa991e594fc0a49dc3d290 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile12.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent24 } from "./manyImportFile24" +import { ManyImportComponent25 } from "./manyImportFile25" + + +@Component +export struct ManyImportComponent12 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent24() + ManyImportComponent25() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile120.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile120.ets new file mode 100644 index 0000000000000000000000000000000000000000..9d1d6768a61fa1cdb57e8192297938dde50fc976 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile120.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent120 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile121.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile121.ets new file mode 100644 index 0000000000000000000000000000000000000000..e59413b91be45384ac8dee6addeb4800f2b89f90 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile121.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent121 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile122.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile122.ets new file mode 100644 index 0000000000000000000000000000000000000000..7dff4c143d82ae38bb9ce9eb6e8eea588a1a7d2d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile122.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent122 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile123.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile123.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a295495a83a619655ff3f67f90990601f7b2036 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile123.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent123 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile124.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile124.ets new file mode 100644 index 0000000000000000000000000000000000000000..5030c898dc63c62f01575228c089a893063c1ad2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile124.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent124 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile125.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile125.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9d190e7efccded4479c920a94d3690b0315c744 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile125.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent125 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile126.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile126.ets new file mode 100644 index 0000000000000000000000000000000000000000..4c550e3e27e98378e285eb9f15ed2f4d1ed7ce5f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile126.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent126 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile127.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile127.ets new file mode 100644 index 0000000000000000000000000000000000000000..942cf19491cc188d88248df7ae19253817c9c7fa --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile127.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent127 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile128.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile128.ets new file mode 100644 index 0000000000000000000000000000000000000000..5580e45ab618f3e99fe31685dd971652da24efc8 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile128.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent128 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile129.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile129.ets new file mode 100644 index 0000000000000000000000000000000000000000..5e9e6e77807488ccbfa8a3ce57ee2ec0e03e5553 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile129.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent129 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile13.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile13.ets new file mode 100644 index 0000000000000000000000000000000000000000..73bbed3ddb4b6cae137c1ef168ba2f957c5753d5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile13.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent26 } from "./manyImportFile26" +import { ManyImportComponent27 } from "./manyImportFile27" + + +@Component +export struct ManyImportComponent13 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent26() + ManyImportComponent27() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile130.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile130.ets new file mode 100644 index 0000000000000000000000000000000000000000..819e6a3aeb706847a250f2c71e234c9d3439f30a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile130.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent130 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile131.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile131.ets new file mode 100644 index 0000000000000000000000000000000000000000..16dc31aa69500affac2e7048207168be0387eaa7 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile131.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent131 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile132.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile132.ets new file mode 100644 index 0000000000000000000000000000000000000000..2a438107a5ed29cf496b712c7ad768464f84b7dc --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile132.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent132 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile133.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile133.ets new file mode 100644 index 0000000000000000000000000000000000000000..db251fafd11156ce6866030b18223f15517bd224 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile133.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent133 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile134.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile134.ets new file mode 100644 index 0000000000000000000000000000000000000000..9039c705947278ac51003d2d4d20249b0f0798d0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile134.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent134 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile135.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile135.ets new file mode 100644 index 0000000000000000000000000000000000000000..b60b3ccdb5cbceeecf4cf48bfef0612023dd458e --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile135.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent135 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile136.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile136.ets new file mode 100644 index 0000000000000000000000000000000000000000..8b2ba5f6ce4c9fbd77b0212399f5765d62a9cae4 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile136.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent136 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile137.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile137.ets new file mode 100644 index 0000000000000000000000000000000000000000..b513ed14923a6d00e504743544711fbb76dd0fa4 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile137.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent137 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile138.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile138.ets new file mode 100644 index 0000000000000000000000000000000000000000..6c29ea038126bacaab823041e88aa035ac4ac576 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile138.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent138 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile139.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile139.ets new file mode 100644 index 0000000000000000000000000000000000000000..80fcd3ac3968732518a6b9d5af5f021a60072de2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile139.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent139 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile14.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile14.ets new file mode 100644 index 0000000000000000000000000000000000000000..7df0637e5b6846060ec294f0f07d91bf48962478 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile14.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent28 } from "./manyImportFile28" +import { ManyImportComponent29 } from "./manyImportFile29" + + +@Component +export struct ManyImportComponent14 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent28() + ManyImportComponent29() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile140.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile140.ets new file mode 100644 index 0000000000000000000000000000000000000000..42293b0b27f2e6a38339151841c9fd62af6b46b3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile140.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent140 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile141.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile141.ets new file mode 100644 index 0000000000000000000000000000000000000000..61569f9b549c9818c2a254acb736fb2063fdce68 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile141.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent141 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile142.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile142.ets new file mode 100644 index 0000000000000000000000000000000000000000..843cc3e6ce5e15aabc5d760f845b0e024df644fa --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile142.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent142 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile143.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile143.ets new file mode 100644 index 0000000000000000000000000000000000000000..569c02838fe578953344474e718d7d36fdd92e69 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile143.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent143 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile144.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile144.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e16e48d707e4780bcb174eda87492fab87d043f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile144.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent144 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile145.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile145.ets new file mode 100644 index 0000000000000000000000000000000000000000..ec6955b9e89aaca225e9dbc9d52b1bce05e442e2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile145.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent145 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile146.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile146.ets new file mode 100644 index 0000000000000000000000000000000000000000..a071360ed68a9d0f274e29f808e4535afa5d042d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile146.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent146 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile147.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile147.ets new file mode 100644 index 0000000000000000000000000000000000000000..aa850367dd4f6210037e2dc6f11c71accd4a1cc7 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile147.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent147 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile148.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile148.ets new file mode 100644 index 0000000000000000000000000000000000000000..c0618f7e331f6a27ea465e51e2719e7d51aa658f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile148.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent148 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile149.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile149.ets new file mode 100644 index 0000000000000000000000000000000000000000..91418d2cf5159bded42da913691c90fa9a35925b --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile149.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent149 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile15.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile15.ets new file mode 100644 index 0000000000000000000000000000000000000000..7db952ad72d9ff49f4e356c6af791b9e423d8203 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile15.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent30 } from "./manyImportFile30" +import { ManyImportComponent31 } from "./manyImportFile31" + + +@Component +export struct ManyImportComponent15 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent30() + ManyImportComponent31() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile150.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile150.ets new file mode 100644 index 0000000000000000000000000000000000000000..1bdca4698a19d9cfbe4da454012b7cf21d1f247a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile150.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent150 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile151.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile151.ets new file mode 100644 index 0000000000000000000000000000000000000000..0186e2a589e94d16da53f2f812da9dfd5212589f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile151.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent151 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile152.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile152.ets new file mode 100644 index 0000000000000000000000000000000000000000..b068a4988989104755ff09d8a7eae93b65eea6c6 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile152.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent152 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile153.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile153.ets new file mode 100644 index 0000000000000000000000000000000000000000..0330f18330b8ec4432945c31ed718df7f81fdd43 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile153.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent153 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile154.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile154.ets new file mode 100644 index 0000000000000000000000000000000000000000..070e9eee3a0ed7079fb4d5eaed2897f700de2fd2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile154.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent154 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile155.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile155.ets new file mode 100644 index 0000000000000000000000000000000000000000..41790a0d703571e6f866e21b6c070120f2173de7 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile155.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent155 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile156.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile156.ets new file mode 100644 index 0000000000000000000000000000000000000000..577bd81cf90ad227cbdd7aae623ebac4965f6605 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile156.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent156 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile157.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile157.ets new file mode 100644 index 0000000000000000000000000000000000000000..d972b955ade8a3992995123c4a21d61edfa990d9 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile157.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent157 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile158.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile158.ets new file mode 100644 index 0000000000000000000000000000000000000000..513154355dfc79df6cb724bbf5841d2f6f2320b1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile158.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent158 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile159.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile159.ets new file mode 100644 index 0000000000000000000000000000000000000000..ecce9a3f1cc6f32b1671fb1a6cf250cb5b511037 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile159.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent159 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile16.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile16.ets new file mode 100644 index 0000000000000000000000000000000000000000..777f7f660c279eb291a2d1f81dc94fc5fda7c4ec --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile16.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent32 } from "./manyImportFile32" +import { ManyImportComponent33 } from "./manyImportFile33" + + +@Component +export struct ManyImportComponent16 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent32() + ManyImportComponent33() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile160.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile160.ets new file mode 100644 index 0000000000000000000000000000000000000000..61eeabc78b7d8710dbc907e23356fc831033ebc6 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile160.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent160 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile161.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile161.ets new file mode 100644 index 0000000000000000000000000000000000000000..f28d22304d665cf65e5c24481dbcb25758ee0588 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile161.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent161 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile162.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile162.ets new file mode 100644 index 0000000000000000000000000000000000000000..6b70d6535ab3e9c7a0136fbd01adb58ba094c486 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile162.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent162 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile163.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile163.ets new file mode 100644 index 0000000000000000000000000000000000000000..6fbf2712e907c43134b4ee9023a4ab2f535ef14e --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile163.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent163 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile164.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile164.ets new file mode 100644 index 0000000000000000000000000000000000000000..e72369b84386f077979b836b92cdfae9246369dc --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile164.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent164 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile165.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile165.ets new file mode 100644 index 0000000000000000000000000000000000000000..1eab4c077a5d576a5be6d3f8be2a925df53d021c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile165.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent165 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile166.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile166.ets new file mode 100644 index 0000000000000000000000000000000000000000..14083d6674e9ba9f3dda423dfb45f2d98cb02808 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile166.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent166 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile167.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile167.ets new file mode 100644 index 0000000000000000000000000000000000000000..0c40f60a569c575c4524e8be0e7afa2ae4e69f18 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile167.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent167 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile168.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile168.ets new file mode 100644 index 0000000000000000000000000000000000000000..9dd2b1f70bb6312cc5fac029506022414bdda253 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile168.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent168 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile169.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile169.ets new file mode 100644 index 0000000000000000000000000000000000000000..939287eb9356d332d4cd93ab98140fda370d407a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile169.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent169 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile17.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile17.ets new file mode 100644 index 0000000000000000000000000000000000000000..7a8130da7634435420066ffee84c7770d8baa5e4 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile17.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent34 } from "./manyImportFile34" +import { ManyImportComponent35 } from "./manyImportFile35" + + +@Component +export struct ManyImportComponent17 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent34() + ManyImportComponent35() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile170.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile170.ets new file mode 100644 index 0000000000000000000000000000000000000000..3db0de8732f4c7727a090596200ffb3855343727 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile170.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent170 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile171.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile171.ets new file mode 100644 index 0000000000000000000000000000000000000000..f47588dc0838e3e62ce6c963d1442134011949db --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile171.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent171 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile172.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile172.ets new file mode 100644 index 0000000000000000000000000000000000000000..8ca0b19848b3135e9fca665c5b80bc4c6e9e6424 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile172.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent172 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile173.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile173.ets new file mode 100644 index 0000000000000000000000000000000000000000..bcd62649bc37b1ab2984f526adf9b3709495e46b --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile173.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent173 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile174.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile174.ets new file mode 100644 index 0000000000000000000000000000000000000000..0a84ae6e1e0f15668ddbc570566283ccac2ca95d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile174.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent174 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile175.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile175.ets new file mode 100644 index 0000000000000000000000000000000000000000..2c072cb89e96660c64e827cfca34b934da4994bb --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile175.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent175 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile176.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile176.ets new file mode 100644 index 0000000000000000000000000000000000000000..0929d3f652fb579640ba2734754589bef765bbde --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile176.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent176 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile177.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile177.ets new file mode 100644 index 0000000000000000000000000000000000000000..2b9d387bab806f73ca6aea3c27135fe2d0802af0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile177.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent177 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile178.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile178.ets new file mode 100644 index 0000000000000000000000000000000000000000..c813c877d0a85ce8634c53e9d1408881eecac507 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile178.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent178 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile179.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile179.ets new file mode 100644 index 0000000000000000000000000000000000000000..bff339061d8a17d52161d92988a1412b8b1aeb13 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile179.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent179 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile18.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile18.ets new file mode 100644 index 0000000000000000000000000000000000000000..1a15258928c0a481a0ff92d2d7ec53ea68b31595 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile18.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent36 } from "./manyImportFile36" +import { ManyImportComponent37 } from "./manyImportFile37" + + +@Component +export struct ManyImportComponent18 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent36() + ManyImportComponent37() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile180.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile180.ets new file mode 100644 index 0000000000000000000000000000000000000000..7594a099f9501696525e2ba2282f95dc6351bba7 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile180.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent180 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile181.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile181.ets new file mode 100644 index 0000000000000000000000000000000000000000..06b8c8367d50389e363b83cfdc2c5c0ea94307cb --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile181.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent181 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile182.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile182.ets new file mode 100644 index 0000000000000000000000000000000000000000..e0948042b74fc08e898abcf7ca8f1da6122ed9f5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile182.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent182 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile183.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile183.ets new file mode 100644 index 0000000000000000000000000000000000000000..ea0180b3c46fa980586cf8f519f6696ea939ac37 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile183.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent183 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile184.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile184.ets new file mode 100644 index 0000000000000000000000000000000000000000..72533111e298a2ace64bf068c86a9f171ae38317 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile184.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent184 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile185.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile185.ets new file mode 100644 index 0000000000000000000000000000000000000000..1799469014c192654671c146bcc1e5975d9d1d14 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile185.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent185 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile186.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile186.ets new file mode 100644 index 0000000000000000000000000000000000000000..1d5238796ab4a17e740286ccee37836f1a7aa56a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile186.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent186 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile187.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile187.ets new file mode 100644 index 0000000000000000000000000000000000000000..853c833b31dca3ea08c1c73b2bad3518cedfeb59 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile187.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent187 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile188.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile188.ets new file mode 100644 index 0000000000000000000000000000000000000000..c4ee5c94c8b197ead8371f882908fbc9d18531c2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile188.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent188 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile189.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile189.ets new file mode 100644 index 0000000000000000000000000000000000000000..e8a69a1427174b14cd52399003258c9ac6e54415 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile189.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent189 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile19.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile19.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7c08337e72d30dee668e8b9c66bdb25a71afc66 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile19.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent38 } from "./manyImportFile38" +import { ManyImportComponent39 } from "./manyImportFile39" + + +@Component +export struct ManyImportComponent19 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent38() + ManyImportComponent39() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile190.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile190.ets new file mode 100644 index 0000000000000000000000000000000000000000..505aa5a6a3322c12c2f10a5fe7a0dc47053f5957 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile190.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent190 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile191.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile191.ets new file mode 100644 index 0000000000000000000000000000000000000000..f6a2fc460f3e7c09067c007be0e503596cde78ab --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile191.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent191 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile192.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile192.ets new file mode 100644 index 0000000000000000000000000000000000000000..22f02494464f420655cdd7d873f18dd1e66c1078 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile192.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent192 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile193.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile193.ets new file mode 100644 index 0000000000000000000000000000000000000000..bf8905ef84bf08c61f6ea8faedd90c93833cb263 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile193.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent193 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile194.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile194.ets new file mode 100644 index 0000000000000000000000000000000000000000..55d51de09bcd5bee337b027922ba14b7f7f532e8 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile194.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent194 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile195.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile195.ets new file mode 100644 index 0000000000000000000000000000000000000000..49e9694c30d9bda0669918d8603265a87762b9d3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile195.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent195 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile196.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile196.ets new file mode 100644 index 0000000000000000000000000000000000000000..cb2d336be8d2dc8b06c65657d4949566f31bd62d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile196.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent196 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile197.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile197.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e9074cedf7f76b39d632149c716d6075375fd20 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile197.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent197 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile198.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile198.ets new file mode 100644 index 0000000000000000000000000000000000000000..1f1497d69fcb8862af237619f7957f0cf7640ae0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile198.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent198 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile199.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile199.ets new file mode 100644 index 0000000000000000000000000000000000000000..1b5774e0f4d25a601c93423ef7da36afa223bcb9 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile199.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent199 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile2.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile2.ets new file mode 100644 index 0000000000000000000000000000000000000000..92eeec4a3301be03038c0f1cb593d336e4742dc2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile2.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent4 } from "./manyImportFile4" +import { ManyImportComponent5 } from "./manyImportFile5" + + +@Component +export struct ManyImportComponent2 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent4() + ManyImportComponent5() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile20.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile20.ets new file mode 100644 index 0000000000000000000000000000000000000000..b93add500788126cd2cc8e8ef91c2e0002edf6c2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile20.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent40 } from "./manyImportFile40" +import { ManyImportComponent41 } from "./manyImportFile41" + + +@Component +export struct ManyImportComponent20 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent40() + ManyImportComponent41() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile200.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile200.ets new file mode 100644 index 0000000000000000000000000000000000000000..08ac7ed85a17bb8f3434b27db6f22228bb1fb5ff --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile200.ets @@ -0,0 +1,16 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" + + +@Component +export struct ManyImportComponent200 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile21.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile21.ets new file mode 100644 index 0000000000000000000000000000000000000000..03851952bb9f614bc2417353e2bb194df812a35b --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile21.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent42 } from "./manyImportFile42" +import { ManyImportComponent43 } from "./manyImportFile43" + + +@Component +export struct ManyImportComponent21 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent42() + ManyImportComponent43() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile22.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile22.ets new file mode 100644 index 0000000000000000000000000000000000000000..c4438d9a4c89732fdeb11743725e69ce288e642b --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile22.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent44 } from "./manyImportFile44" +import { ManyImportComponent45 } from "./manyImportFile45" + + +@Component +export struct ManyImportComponent22 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent44() + ManyImportComponent45() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile23.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile23.ets new file mode 100644 index 0000000000000000000000000000000000000000..e0720fa07f125484040959258a550cae5c4b2154 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile23.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent46 } from "./manyImportFile46" +import { ManyImportComponent47 } from "./manyImportFile47" + + +@Component +export struct ManyImportComponent23 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent46() + ManyImportComponent47() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile24.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile24.ets new file mode 100644 index 0000000000000000000000000000000000000000..097076b23204729823afedb93d86c07fe91b423d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile24.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent48 } from "./manyImportFile48" +import { ManyImportComponent49 } from "./manyImportFile49" + + +@Component +export struct ManyImportComponent24 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent48() + ManyImportComponent49() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile25.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile25.ets new file mode 100644 index 0000000000000000000000000000000000000000..803a744b353de64c7d7e6d9b45254d59f502e2b1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile25.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent50 } from "./manyImportFile50" +import { ManyImportComponent51 } from "./manyImportFile51" + + +@Component +export struct ManyImportComponent25 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent50() + ManyImportComponent51() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile26.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile26.ets new file mode 100644 index 0000000000000000000000000000000000000000..3676f88ab7edf4313bed4bab5ee70246f8b358ba --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile26.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent52 } from "./manyImportFile52" +import { ManyImportComponent53 } from "./manyImportFile53" + + +@Component +export struct ManyImportComponent26 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent52() + ManyImportComponent53() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile27.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile27.ets new file mode 100644 index 0000000000000000000000000000000000000000..3455b872fc84216ee05920c928890710434c2795 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile27.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent54 } from "./manyImportFile54" +import { ManyImportComponent55 } from "./manyImportFile55" + + +@Component +export struct ManyImportComponent27 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent54() + ManyImportComponent55() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile28.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile28.ets new file mode 100644 index 0000000000000000000000000000000000000000..5cdf63b4015f77a42d98f5e98a53584c8fb8a29a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile28.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent56 } from "./manyImportFile56" +import { ManyImportComponent57 } from "./manyImportFile57" + + +@Component +export struct ManyImportComponent28 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent56() + ManyImportComponent57() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile29.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile29.ets new file mode 100644 index 0000000000000000000000000000000000000000..4da01737be074bfe7c0e778497eb55031d193409 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile29.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent58 } from "./manyImportFile58" +import { ManyImportComponent59 } from "./manyImportFile59" + + +@Component +export struct ManyImportComponent29 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent58() + ManyImportComponent59() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile3.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile3.ets new file mode 100644 index 0000000000000000000000000000000000000000..19c45bc8e786ec4557487c0f9779809293d772ea --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile3.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent6 } from "./manyImportFile6" +import { ManyImportComponent7 } from "./manyImportFile7" + + +@Component +export struct ManyImportComponent3 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent6() + ManyImportComponent7() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile30.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile30.ets new file mode 100644 index 0000000000000000000000000000000000000000..d3bdacae8e97025d01363cd4914ffa361fd32bdf --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile30.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent60 } from "./manyImportFile60" +import { ManyImportComponent61 } from "./manyImportFile61" + + +@Component +export struct ManyImportComponent30 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent60() + ManyImportComponent61() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile31.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile31.ets new file mode 100644 index 0000000000000000000000000000000000000000..37fca9b2561f4f67267a2344fa92f7d7a6ee79c0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile31.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent62 } from "./manyImportFile62" +import { ManyImportComponent63 } from "./manyImportFile63" + + +@Component +export struct ManyImportComponent31 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent62() + ManyImportComponent63() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile32.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile32.ets new file mode 100644 index 0000000000000000000000000000000000000000..7a9818b110b035e7f79c317759f2007a8c278892 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile32.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent64 } from "./manyImportFile64" +import { ManyImportComponent65 } from "./manyImportFile65" + + +@Component +export struct ManyImportComponent32 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent64() + ManyImportComponent65() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile33.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile33.ets new file mode 100644 index 0000000000000000000000000000000000000000..776406b9bbd31eea21fc29edebfe26b0908df687 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile33.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent66 } from "./manyImportFile66" +import { ManyImportComponent67 } from "./manyImportFile67" + + +@Component +export struct ManyImportComponent33 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent66() + ManyImportComponent67() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile34.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile34.ets new file mode 100644 index 0000000000000000000000000000000000000000..bdc00351c95f01fbcf12ddb035ae6533fd628dc9 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile34.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent68 } from "./manyImportFile68" +import { ManyImportComponent69 } from "./manyImportFile69" + + +@Component +export struct ManyImportComponent34 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent68() + ManyImportComponent69() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile35.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile35.ets new file mode 100644 index 0000000000000000000000000000000000000000..f36f81d4585541297c4a9f208550f79ce53afef6 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile35.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent70 } from "./manyImportFile70" +import { ManyImportComponent71 } from "./manyImportFile71" + + +@Component +export struct ManyImportComponent35 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent70() + ManyImportComponent71() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile36.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile36.ets new file mode 100644 index 0000000000000000000000000000000000000000..75d4da0b244d358e31f94c136a4b90680d6f3355 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile36.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent72 } from "./manyImportFile72" +import { ManyImportComponent73 } from "./manyImportFile73" + + +@Component +export struct ManyImportComponent36 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent72() + ManyImportComponent73() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile37.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile37.ets new file mode 100644 index 0000000000000000000000000000000000000000..4aec57489f31fb3bf9c7cee55dcc5ac2e0663142 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile37.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent74 } from "./manyImportFile74" +import { ManyImportComponent75 } from "./manyImportFile75" + + +@Component +export struct ManyImportComponent37 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent74() + ManyImportComponent75() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile38.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile38.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7a6bc09a4614d3a1cd12505abeaf27864b72fea --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile38.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent76 } from "./manyImportFile76" +import { ManyImportComponent77 } from "./manyImportFile77" + + +@Component +export struct ManyImportComponent38 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent76() + ManyImportComponent77() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile39.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile39.ets new file mode 100644 index 0000000000000000000000000000000000000000..afe235dae62f8c4898096703593eb5e6b8547a2e --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile39.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent78 } from "./manyImportFile78" +import { ManyImportComponent79 } from "./manyImportFile79" + + +@Component +export struct ManyImportComponent39 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent78() + ManyImportComponent79() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile4.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile4.ets new file mode 100644 index 0000000000000000000000000000000000000000..2e02a2756b06957e9d05c56e624a1bd1ad5eec9e --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile4.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent8 } from "./manyImportFile8" +import { ManyImportComponent9 } from "./manyImportFile9" + + +@Component +export struct ManyImportComponent4 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent8() + ManyImportComponent9() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile40.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile40.ets new file mode 100644 index 0000000000000000000000000000000000000000..49d052ce2b3bbcb49717f02a2ddbc8bd1bd9b8c7 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile40.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent80 } from "./manyImportFile80" +import { ManyImportComponent81 } from "./manyImportFile81" + + +@Component +export struct ManyImportComponent40 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent80() + ManyImportComponent81() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile41.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile41.ets new file mode 100644 index 0000000000000000000000000000000000000000..6193e67964be3eea3ce3d3d30680815d1e35a50c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile41.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent82 } from "./manyImportFile82" +import { ManyImportComponent83 } from "./manyImportFile83" + + +@Component +export struct ManyImportComponent41 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent82() + ManyImportComponent83() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile42.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile42.ets new file mode 100644 index 0000000000000000000000000000000000000000..6adc775b7b53a17bd9a4a0225f03a8b78082aadd --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile42.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent84 } from "./manyImportFile84" +import { ManyImportComponent85 } from "./manyImportFile85" + + +@Component +export struct ManyImportComponent42 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent84() + ManyImportComponent85() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile43.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile43.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ddebdec27c41cd8d23f6f0e13cf7fcb6d7c23cf --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile43.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent86 } from "./manyImportFile86" +import { ManyImportComponent87 } from "./manyImportFile87" + + +@Component +export struct ManyImportComponent43 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent86() + ManyImportComponent87() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile44.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile44.ets new file mode 100644 index 0000000000000000000000000000000000000000..53c82bcb00da99bb035d883c9e7cc48fb2eafea4 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile44.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent88 } from "./manyImportFile88" +import { ManyImportComponent89 } from "./manyImportFile89" + + +@Component +export struct ManyImportComponent44 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent88() + ManyImportComponent89() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile45.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile45.ets new file mode 100644 index 0000000000000000000000000000000000000000..3989124d340b525fdce7a953bb2bfbd6e01cbc38 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile45.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent90 } from "./manyImportFile90" +import { ManyImportComponent91 } from "./manyImportFile91" + + +@Component +export struct ManyImportComponent45 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent90() + ManyImportComponent91() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile46.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile46.ets new file mode 100644 index 0000000000000000000000000000000000000000..2f544ae80b13158735f8d3cd680bdf4347b1471c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile46.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent92 } from "./manyImportFile92" +import { ManyImportComponent93 } from "./manyImportFile93" + + +@Component +export struct ManyImportComponent46 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent92() + ManyImportComponent93() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile47.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile47.ets new file mode 100644 index 0000000000000000000000000000000000000000..221c8c1a20594ee7dd4c4839dc708bf17c9fca10 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile47.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent94 } from "./manyImportFile94" +import { ManyImportComponent95 } from "./manyImportFile95" + + +@Component +export struct ManyImportComponent47 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent94() + ManyImportComponent95() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile48.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile48.ets new file mode 100644 index 0000000000000000000000000000000000000000..c3744d9518b560786b6ce5b895698e5da8ea21a9 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile48.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent96 } from "./manyImportFile96" +import { ManyImportComponent97 } from "./manyImportFile97" + + +@Component +export struct ManyImportComponent48 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent96() + ManyImportComponent97() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile49.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile49.ets new file mode 100644 index 0000000000000000000000000000000000000000..151e9c98d77dd81fdaad59aca198330aedda6f9b --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile49.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent98 } from "./manyImportFile98" +import { ManyImportComponent99 } from "./manyImportFile99" + + +@Component +export struct ManyImportComponent49 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent98() + ManyImportComponent99() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile5.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile5.ets new file mode 100644 index 0000000000000000000000000000000000000000..848efea9c2142a14fdfcc08fa534efc33703e6a4 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile5.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent10 } from "./manyImportFile10" +import { ManyImportComponent11 } from "./manyImportFile11" + + +@Component +export struct ManyImportComponent5 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent10() + ManyImportComponent11() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile50.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile50.ets new file mode 100644 index 0000000000000000000000000000000000000000..a221b767b45d2ddc6540f00d5a82f57ea38cdc15 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile50.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent100 } from "./manyImportFile100" +import { ManyImportComponent101 } from "./manyImportFile101" + + +@Component +export struct ManyImportComponent50 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent100() + ManyImportComponent101() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile51.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile51.ets new file mode 100644 index 0000000000000000000000000000000000000000..ae407860022286fa7c97bd049436b2a038a58589 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile51.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent102 } from "./manyImportFile102" +import { ManyImportComponent103 } from "./manyImportFile103" + + +@Component +export struct ManyImportComponent51 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent102() + ManyImportComponent103() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile52.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile52.ets new file mode 100644 index 0000000000000000000000000000000000000000..03faa4b8d2954a99328ac56ad8cadcdb304904a6 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile52.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent104 } from "./manyImportFile104" +import { ManyImportComponent105 } from "./manyImportFile105" + + +@Component +export struct ManyImportComponent52 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent104() + ManyImportComponent105() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile53.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile53.ets new file mode 100644 index 0000000000000000000000000000000000000000..1d316205bb243a448ce2bb75b77fe9c91613f3b4 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile53.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent106 } from "./manyImportFile106" +import { ManyImportComponent107 } from "./manyImportFile107" + + +@Component +export struct ManyImportComponent53 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent106() + ManyImportComponent107() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile54.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile54.ets new file mode 100644 index 0000000000000000000000000000000000000000..4d4069513eebeeb19fe7a93a9565ba00e8ecaa00 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile54.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent108 } from "./manyImportFile108" +import { ManyImportComponent109 } from "./manyImportFile109" + + +@Component +export struct ManyImportComponent54 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent108() + ManyImportComponent109() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile55.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile55.ets new file mode 100644 index 0000000000000000000000000000000000000000..8eee9fbc45c95fc427d871d24396d2e2ca6836ad --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile55.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent110 } from "./manyImportFile110" +import { ManyImportComponent111 } from "./manyImportFile111" + + +@Component +export struct ManyImportComponent55 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent110() + ManyImportComponent111() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile56.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile56.ets new file mode 100644 index 0000000000000000000000000000000000000000..76b540e2985b9ce36c9b2d5a5338cbbf16388e78 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile56.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent112 } from "./manyImportFile112" +import { ManyImportComponent113 } from "./manyImportFile113" + + +@Component +export struct ManyImportComponent56 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent112() + ManyImportComponent113() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile57.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile57.ets new file mode 100644 index 0000000000000000000000000000000000000000..2062de07115386c578fddc52bbd5b418a4f638e5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile57.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent114 } from "./manyImportFile114" +import { ManyImportComponent115 } from "./manyImportFile115" + + +@Component +export struct ManyImportComponent57 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent114() + ManyImportComponent115() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile58.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile58.ets new file mode 100644 index 0000000000000000000000000000000000000000..30a47f3a9001f01f1c718e57b7ac9f923f89195c --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile58.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent116 } from "./manyImportFile116" +import { ManyImportComponent117 } from "./manyImportFile117" + + +@Component +export struct ManyImportComponent58 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent116() + ManyImportComponent117() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile59.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile59.ets new file mode 100644 index 0000000000000000000000000000000000000000..b7ecab2cbdf354cca95cf0bd044d4b01f5cceb63 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile59.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent118 } from "./manyImportFile118" +import { ManyImportComponent119 } from "./manyImportFile119" + + +@Component +export struct ManyImportComponent59 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent118() + ManyImportComponent119() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile6.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile6.ets new file mode 100644 index 0000000000000000000000000000000000000000..0c9ad6f70fc6d1cea548707a12f0d5780f31ff5b --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile6.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent12 } from "./manyImportFile12" +import { ManyImportComponent13 } from "./manyImportFile13" + + +@Component +export struct ManyImportComponent6 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent12() + ManyImportComponent13() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile60.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile60.ets new file mode 100644 index 0000000000000000000000000000000000000000..e20e5ba99cde954bde931e42af80900074dcea40 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile60.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent120 } from "./manyImportFile120" +import { ManyImportComponent121 } from "./manyImportFile121" + + +@Component +export struct ManyImportComponent60 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent120() + ManyImportComponent121() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile61.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile61.ets new file mode 100644 index 0000000000000000000000000000000000000000..373f6f64d3db5ac0e9e98e1824df394a93d184b3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile61.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent122 } from "./manyImportFile122" +import { ManyImportComponent123 } from "./manyImportFile123" + + +@Component +export struct ManyImportComponent61 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent122() + ManyImportComponent123() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile62.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile62.ets new file mode 100644 index 0000000000000000000000000000000000000000..499f5380de6a0b238c5fe467cd4274f12b6e7045 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile62.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent124 } from "./manyImportFile124" +import { ManyImportComponent125 } from "./manyImportFile125" + + +@Component +export struct ManyImportComponent62 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent124() + ManyImportComponent125() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile63.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile63.ets new file mode 100644 index 0000000000000000000000000000000000000000..149bea57d275db4cbb132e935f65301f0e73f6fe --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile63.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent126 } from "./manyImportFile126" +import { ManyImportComponent127 } from "./manyImportFile127" + + +@Component +export struct ManyImportComponent63 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent126() + ManyImportComponent127() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile64.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile64.ets new file mode 100644 index 0000000000000000000000000000000000000000..0df6b9c64c8c6093b2895b045ac062ae6d2d3f36 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile64.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent128 } from "./manyImportFile128" +import { ManyImportComponent129 } from "./manyImportFile129" + + +@Component +export struct ManyImportComponent64 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent128() + ManyImportComponent129() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile65.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile65.ets new file mode 100644 index 0000000000000000000000000000000000000000..385ca3c5c5eabd0822da80cac7d42524088b9f01 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile65.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent130 } from "./manyImportFile130" +import { ManyImportComponent131 } from "./manyImportFile131" + + +@Component +export struct ManyImportComponent65 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent130() + ManyImportComponent131() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile66.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile66.ets new file mode 100644 index 0000000000000000000000000000000000000000..82f9626500ae841f47e871a95975fc044e701eb1 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile66.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent132 } from "./manyImportFile132" +import { ManyImportComponent133 } from "./manyImportFile133" + + +@Component +export struct ManyImportComponent66 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent132() + ManyImportComponent133() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile67.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile67.ets new file mode 100644 index 0000000000000000000000000000000000000000..028bf13aa32e5637885b3aa9c8670696cb9f101f --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile67.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent134 } from "./manyImportFile134" +import { ManyImportComponent135 } from "./manyImportFile135" + + +@Component +export struct ManyImportComponent67 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent134() + ManyImportComponent135() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile68.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile68.ets new file mode 100644 index 0000000000000000000000000000000000000000..b5690b3f6b7b0c1d8dbed74faa448d49b75576b2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile68.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent136 } from "./manyImportFile136" +import { ManyImportComponent137 } from "./manyImportFile137" + + +@Component +export struct ManyImportComponent68 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent136() + ManyImportComponent137() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile69.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile69.ets new file mode 100644 index 0000000000000000000000000000000000000000..1be1feb61fc9bd3df115ba22a373cc9f120a4e75 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile69.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent138 } from "./manyImportFile138" +import { ManyImportComponent139 } from "./manyImportFile139" + + +@Component +export struct ManyImportComponent69 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent138() + ManyImportComponent139() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile7.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile7.ets new file mode 100644 index 0000000000000000000000000000000000000000..ed0e9d497f1a15a5b5c75583f6412b32ea963986 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile7.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent14 } from "./manyImportFile14" +import { ManyImportComponent15 } from "./manyImportFile15" + + +@Component +export struct ManyImportComponent7 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent14() + ManyImportComponent15() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile70.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile70.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ddde9aa60003a28930dce7351f5b97023df15d0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile70.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent140 } from "./manyImportFile140" +import { ManyImportComponent141 } from "./manyImportFile141" + + +@Component +export struct ManyImportComponent70 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent140() + ManyImportComponent141() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile71.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile71.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd5f6019ed051aca000444fad04d7ba504188f9e --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile71.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent142 } from "./manyImportFile142" +import { ManyImportComponent143 } from "./manyImportFile143" + + +@Component +export struct ManyImportComponent71 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent142() + ManyImportComponent143() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile72.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile72.ets new file mode 100644 index 0000000000000000000000000000000000000000..5d0aed5ffbe3e0000b5bbbb6fd8f40511f9fc4fc --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile72.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent144 } from "./manyImportFile144" +import { ManyImportComponent145 } from "./manyImportFile145" + + +@Component +export struct ManyImportComponent72 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent144() + ManyImportComponent145() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile73.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile73.ets new file mode 100644 index 0000000000000000000000000000000000000000..cdb3fbdae28efab96024f26f1c7c54076ce93bc8 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile73.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent146 } from "./manyImportFile146" +import { ManyImportComponent147 } from "./manyImportFile147" + + +@Component +export struct ManyImportComponent73 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent146() + ManyImportComponent147() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile74.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile74.ets new file mode 100644 index 0000000000000000000000000000000000000000..66ee3c114eac2f6ea6e6313265931edf368998eb --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile74.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent148 } from "./manyImportFile148" +import { ManyImportComponent149 } from "./manyImportFile149" + + +@Component +export struct ManyImportComponent74 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent148() + ManyImportComponent149() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile75.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile75.ets new file mode 100644 index 0000000000000000000000000000000000000000..e4e11b58ef2f8ad5dd7b25c9f78984a7c84531bf --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile75.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent150 } from "./manyImportFile150" +import { ManyImportComponent151 } from "./manyImportFile151" + + +@Component +export struct ManyImportComponent75 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent150() + ManyImportComponent151() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile76.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile76.ets new file mode 100644 index 0000000000000000000000000000000000000000..44f6dfbed3ed4ef685bfab461850432a7cb3fcb5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile76.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent152 } from "./manyImportFile152" +import { ManyImportComponent153 } from "./manyImportFile153" + + +@Component +export struct ManyImportComponent76 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent152() + ManyImportComponent153() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile77.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile77.ets new file mode 100644 index 0000000000000000000000000000000000000000..7037c2c822a3346295500a9a5ad22be97ec637c0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile77.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent154 } from "./manyImportFile154" +import { ManyImportComponent155 } from "./manyImportFile155" + + +@Component +export struct ManyImportComponent77 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent154() + ManyImportComponent155() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile78.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile78.ets new file mode 100644 index 0000000000000000000000000000000000000000..a24a9097070cc130532b58c320ce0d7c87430fb8 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile78.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent156 } from "./manyImportFile156" +import { ManyImportComponent157 } from "./manyImportFile157" + + +@Component +export struct ManyImportComponent78 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent156() + ManyImportComponent157() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile79.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile79.ets new file mode 100644 index 0000000000000000000000000000000000000000..c6ca97f1124dd1975f40d5defa407ffe64b06824 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile79.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent158 } from "./manyImportFile158" +import { ManyImportComponent159 } from "./manyImportFile159" + + +@Component +export struct ManyImportComponent79 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent158() + ManyImportComponent159() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile8.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile8.ets new file mode 100644 index 0000000000000000000000000000000000000000..0650dabbd8ad40a7de31277041a327deb5480bf5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile8.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent16 } from "./manyImportFile16" +import { ManyImportComponent17 } from "./manyImportFile17" + + +@Component +export struct ManyImportComponent8 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent16() + ManyImportComponent17() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile80.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile80.ets new file mode 100644 index 0000000000000000000000000000000000000000..b246365df4fed4aac937160953a46dd4a94724f3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile80.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent160 } from "./manyImportFile160" +import { ManyImportComponent161 } from "./manyImportFile161" + + +@Component +export struct ManyImportComponent80 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent160() + ManyImportComponent161() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile81.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile81.ets new file mode 100644 index 0000000000000000000000000000000000000000..c63cf34fb83640b32bcea589b706ab818a031d17 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile81.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent162 } from "./manyImportFile162" +import { ManyImportComponent163 } from "./manyImportFile163" + + +@Component +export struct ManyImportComponent81 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent162() + ManyImportComponent163() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile82.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile82.ets new file mode 100644 index 0000000000000000000000000000000000000000..1b357f5575e0f366f880764f409a554f2fbd8574 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile82.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent164 } from "./manyImportFile164" +import { ManyImportComponent165 } from "./manyImportFile165" + + +@Component +export struct ManyImportComponent82 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent164() + ManyImportComponent165() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile83.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile83.ets new file mode 100644 index 0000000000000000000000000000000000000000..de5fba1975838d029b1027985d86a90a6a8bc8bc --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile83.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent166 } from "./manyImportFile166" +import { ManyImportComponent167 } from "./manyImportFile167" + + +@Component +export struct ManyImportComponent83 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent166() + ManyImportComponent167() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile84.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile84.ets new file mode 100644 index 0000000000000000000000000000000000000000..4ee52e33357a4bc146e4b838d384d03d8344593a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile84.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent168 } from "./manyImportFile168" +import { ManyImportComponent169 } from "./manyImportFile169" + + +@Component +export struct ManyImportComponent84 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent168() + ManyImportComponent169() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile85.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile85.ets new file mode 100644 index 0000000000000000000000000000000000000000..e98cc16014adf6109c8098043d3ab813eced517e --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile85.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent170 } from "./manyImportFile170" +import { ManyImportComponent171 } from "./manyImportFile171" + + +@Component +export struct ManyImportComponent85 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent170() + ManyImportComponent171() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile86.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile86.ets new file mode 100644 index 0000000000000000000000000000000000000000..7fe2a4cf9d8de28453d91ae73adc8980a787eb9d --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile86.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent172 } from "./manyImportFile172" +import { ManyImportComponent173 } from "./manyImportFile173" + + +@Component +export struct ManyImportComponent86 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent172() + ManyImportComponent173() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile87.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile87.ets new file mode 100644 index 0000000000000000000000000000000000000000..8157e2f4472eb685cfc059183093d4d013f0bb62 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile87.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent174 } from "./manyImportFile174" +import { ManyImportComponent175 } from "./manyImportFile175" + + +@Component +export struct ManyImportComponent87 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent174() + ManyImportComponent175() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile88.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile88.ets new file mode 100644 index 0000000000000000000000000000000000000000..9f1b2966531d59b56fa54eeb6ff1ace952822b20 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile88.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent176 } from "./manyImportFile176" +import { ManyImportComponent177 } from "./manyImportFile177" + + +@Component +export struct ManyImportComponent88 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent176() + ManyImportComponent177() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile89.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile89.ets new file mode 100644 index 0000000000000000000000000000000000000000..1353ee5e45288e8d836f2878dd9409d35e0da1f5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile89.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent178 } from "./manyImportFile178" +import { ManyImportComponent179 } from "./manyImportFile179" + + +@Component +export struct ManyImportComponent89 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent178() + ManyImportComponent179() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile9.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile9.ets new file mode 100644 index 0000000000000000000000000000000000000000..062730d4da95e2c11b80a13b3a3182e77a4a4f60 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile9.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent18 } from "./manyImportFile18" +import { ManyImportComponent19 } from "./manyImportFile19" + + +@Component +export struct ManyImportComponent9 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent18() + ManyImportComponent19() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile90.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile90.ets new file mode 100644 index 0000000000000000000000000000000000000000..2dbfdfba60c380212aaacc92aeb839010dd90b1a --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile90.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent180 } from "./manyImportFile180" +import { ManyImportComponent181 } from "./manyImportFile181" + + +@Component +export struct ManyImportComponent90 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent180() + ManyImportComponent181() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile91.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile91.ets new file mode 100644 index 0000000000000000000000000000000000000000..3a4a4517466d5c2114ebcddb4977c95003f30c4b --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile91.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent182 } from "./manyImportFile182" +import { ManyImportComponent183 } from "./manyImportFile183" + + +@Component +export struct ManyImportComponent91 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent182() + ManyImportComponent183() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile92.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile92.ets new file mode 100644 index 0000000000000000000000000000000000000000..b85d58c07ccbc5e3175e8fee2379780da25692c0 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile92.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent184 } from "./manyImportFile184" +import { ManyImportComponent185 } from "./manyImportFile185" + + +@Component +export struct ManyImportComponent92 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent184() + ManyImportComponent185() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile93.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile93.ets new file mode 100644 index 0000000000000000000000000000000000000000..39631ded6f17fd4ec3cb927dc413a5bc39b03da3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile93.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent186 } from "./manyImportFile186" +import { ManyImportComponent187 } from "./manyImportFile187" + + +@Component +export struct ManyImportComponent93 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent186() + ManyImportComponent187() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile94.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile94.ets new file mode 100644 index 0000000000000000000000000000000000000000..e855773601331cbf17d6822555424d6d3ce7d9b5 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile94.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent188 } from "./manyImportFile188" +import { ManyImportComponent189 } from "./manyImportFile189" + + +@Component +export struct ManyImportComponent94 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent188() + ManyImportComponent189() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile95.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile95.ets new file mode 100644 index 0000000000000000000000000000000000000000..c869cf6406fd41a7a4a37e4af66de83065e89566 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile95.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent190 } from "./manyImportFile190" +import { ManyImportComponent191 } from "./manyImportFile191" + + +@Component +export struct ManyImportComponent95 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent190() + ManyImportComponent191() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile96.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile96.ets new file mode 100644 index 0000000000000000000000000000000000000000..fdb74353f1f2e17f804e0256d26d870f185367cb --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile96.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent192 } from "./manyImportFile192" +import { ManyImportComponent193 } from "./manyImportFile193" + + +@Component +export struct ManyImportComponent96 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent192() + ManyImportComponent193() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile97.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile97.ets new file mode 100644 index 0000000000000000000000000000000000000000..b0224809e3120b87a65400b9ed95aeee13941fb3 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile97.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent194 } from "./manyImportFile194" +import { ManyImportComponent195 } from "./manyImportFile195" + + +@Component +export struct ManyImportComponent97 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent194() + ManyImportComponent195() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile98.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile98.ets new file mode 100644 index 0000000000000000000000000000000000000000..f9e528e6933c4cc1109c213104b09169403483e2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile98.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent196 } from "./manyImportFile196" +import { ManyImportComponent197 } from "./manyImportFile197" + + +@Component +export struct ManyImportComponent98 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent196() + ManyImportComponent197() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile99.ets b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile99.ets new file mode 100644 index 0000000000000000000000000000000000000000..9bca5ed2f519976d010272a1e9c64e781653181e --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportFiles/manyImportFile99.ets @@ -0,0 +1,20 @@ + +import { Component, Column, Text } from "@ohos.arkui" +import { State } from "@ohos.arkui" +import { ManyImportComponent198 } from "./manyImportFile198" +import { ManyImportComponent199 } from "./manyImportFile199" + + +@Component +export struct ManyImportComponent99 { + @State message: string = 'Hello ArkTS' + + build() { + Column() { + Text(this.message) + ManyImportComponent198() + ManyImportComponent199() + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/manyImportMain.ets b/koala_tools/ui2abc/perf-tests/src/manyImportMain.ets new file mode 100644 index 0000000000000000000000000000000000000000..aeaddd8f5efc8d210f7493f33a437d66da63fcb2 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/manyImportMain.ets @@ -0,0 +1,16 @@ + +/** + * 多级import manyImportMain.ets + */ + +import { Component, Column } from "@ohos.arkui" +import { ManyImportComponent1 } from "./manyImportFiles/manyImportFile1" + +@Component +struct ManyImportMain { + build() { + Column() { + ManyImportComponent1() + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/positionalMemoization.ets b/koala_tools/ui2abc/perf-tests/src/positionalMemoization.ets new file mode 100644 index 0000000000000000000000000000000000000000..1a2d01bef53cb4c3e3fdf0757ee5f92b5f7fc5a8 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/positionalMemoization.ets @@ -0,0 +1,12025 @@ + +/** + * memo positionalMemoization.ets + */ + +import { Component, Column, Text, ClickEvent, Button, FontWeight } from "@ohos.arkui" +import { State, memo } from "@ohos.arkui" + +@Component +struct PositionalMemoizationMain { + @State num: number = 0; + + + @memo + add0(a: number, b: number): number { + return a + b; + } + + @memo + add1(a: number, b: number): number { + return a + b; + } + + @memo + add2(a: number, b: number): number { + return a + b; + } + + @memo + add3(a: number, b: number): number { + return a + b; + } + + @memo + add4(a: number, b: number): number { + return a + b; + } + + @memo + add5(a: number, b: number): number { + return a + b; + } + + @memo + add6(a: number, b: number): number { + return a + b; + } + + @memo + add7(a: number, b: number): number { + return a + b; + } + + @memo + add8(a: number, b: number): number { + return a + b; + } + + @memo + add9(a: number, b: number): number { + return a + b; + } + + @memo + add10(a: number, b: number): number { + return a + b; + } + + @memo + add11(a: number, b: number): number { + return a + b; + } + + @memo + add12(a: number, b: number): number { + return a + b; + } + + @memo + add13(a: number, b: number): number { + return a + b; + } + + @memo + add14(a: number, b: number): number { + return a + b; + } + + @memo + add15(a: number, b: number): number { + return a + b; + } + + @memo + add16(a: number, b: number): number { + return a + b; + } + + @memo + add17(a: number, b: number): number { + return a + b; + } + + @memo + add18(a: number, b: number): number { + return a + b; + } + + @memo + add19(a: number, b: number): number { + return a + b; + } + + @memo + add20(a: number, b: number): number { + return a + b; + } + + @memo + add21(a: number, b: number): number { + return a + b; + } + + @memo + add22(a: number, b: number): number { + return a + b; + } + + @memo + add23(a: number, b: number): number { + return a + b; + } + + @memo + add24(a: number, b: number): number { + return a + b; + } + + @memo + add25(a: number, b: number): number { + return a + b; + } + + @memo + add26(a: number, b: number): number { + return a + b; + } + + @memo + add27(a: number, b: number): number { + return a + b; + } + + @memo + add28(a: number, b: number): number { + return a + b; + } + + @memo + add29(a: number, b: number): number { + return a + b; + } + + @memo + add30(a: number, b: number): number { + return a + b; + } + + @memo + add31(a: number, b: number): number { + return a + b; + } + + @memo + add32(a: number, b: number): number { + return a + b; + } + + @memo + add33(a: number, b: number): number { + return a + b; + } + + @memo + add34(a: number, b: number): number { + return a + b; + } + + @memo + add35(a: number, b: number): number { + return a + b; + } + + @memo + add36(a: number, b: number): number { + return a + b; + } + + @memo + add37(a: number, b: number): number { + return a + b; + } + + @memo + add38(a: number, b: number): number { + return a + b; + } + + @memo + add39(a: number, b: number): number { + return a + b; + } + + @memo + add40(a: number, b: number): number { + return a + b; + } + + @memo + add41(a: number, b: number): number { + return a + b; + } + + @memo + add42(a: number, b: number): number { + return a + b; + } + + @memo + add43(a: number, b: number): number { + return a + b; + } + + @memo + add44(a: number, b: number): number { + return a + b; + } + + @memo + add45(a: number, b: number): number { + return a + b; + } + + @memo + add46(a: number, b: number): number { + return a + b; + } + + @memo + add47(a: number, b: number): number { + return a + b; + } + + @memo + add48(a: number, b: number): number { + return a + b; + } + + @memo + add49(a: number, b: number): number { + return a + b; + } + + @memo + add50(a: number, b: number): number { + return a + b; + } + + @memo + add51(a: number, b: number): number { + return a + b; + } + + @memo + add52(a: number, b: number): number { + return a + b; + } + + @memo + add53(a: number, b: number): number { + return a + b; + } + + @memo + add54(a: number, b: number): number { + return a + b; + } + + @memo + add55(a: number, b: number): number { + return a + b; + } + + @memo + add56(a: number, b: number): number { + return a + b; + } + + @memo + add57(a: number, b: number): number { + return a + b; + } + + @memo + add58(a: number, b: number): number { + return a + b; + } + + @memo + add59(a: number, b: number): number { + return a + b; + } + + @memo + add60(a: number, b: number): number { + return a + b; + } + + @memo + add61(a: number, b: number): number { + return a + b; + } + + @memo + add62(a: number, b: number): number { + return a + b; + } + + @memo + add63(a: number, b: number): number { + return a + b; + } + + @memo + add64(a: number, b: number): number { + return a + b; + } + + @memo + add65(a: number, b: number): number { + return a + b; + } + + @memo + add66(a: number, b: number): number { + return a + b; + } + + @memo + add67(a: number, b: number): number { + return a + b; + } + + @memo + add68(a: number, b: number): number { + return a + b; + } + + @memo + add69(a: number, b: number): number { + return a + b; + } + + @memo + add70(a: number, b: number): number { + return a + b; + } + + @memo + add71(a: number, b: number): number { + return a + b; + } + + @memo + add72(a: number, b: number): number { + return a + b; + } + + @memo + add73(a: number, b: number): number { + return a + b; + } + + @memo + add74(a: number, b: number): number { + return a + b; + } + + @memo + add75(a: number, b: number): number { + return a + b; + } + + @memo + add76(a: number, b: number): number { + return a + b; + } + + @memo + add77(a: number, b: number): number { + return a + b; + } + + @memo + add78(a: number, b: number): number { + return a + b; + } + + @memo + add79(a: number, b: number): number { + return a + b; + } + + @memo + add80(a: number, b: number): number { + return a + b; + } + + @memo + add81(a: number, b: number): number { + return a + b; + } + + @memo + add82(a: number, b: number): number { + return a + b; + } + + @memo + add83(a: number, b: number): number { + return a + b; + } + + @memo + add84(a: number, b: number): number { + return a + b; + } + + @memo + add85(a: number, b: number): number { + return a + b; + } + + @memo + add86(a: number, b: number): number { + return a + b; + } + + @memo + add87(a: number, b: number): number { + return a + b; + } + + @memo + add88(a: number, b: number): number { + return a + b; + } + + @memo + add89(a: number, b: number): number { + return a + b; + } + + @memo + add90(a: number, b: number): number { + return a + b; + } + + @memo + add91(a: number, b: number): number { + return a + b; + } + + @memo + add92(a: number, b: number): number { + return a + b; + } + + @memo + add93(a: number, b: number): number { + return a + b; + } + + @memo + add94(a: number, b: number): number { + return a + b; + } + + @memo + add95(a: number, b: number): number { + return a + b; + } + + @memo + add96(a: number, b: number): number { + return a + b; + } + + @memo + add97(a: number, b: number): number { + return a + b; + } + + @memo + add98(a: number, b: number): number { + return a + b; + } + + @memo + add99(a: number, b: number): number { + return a + b; + } + + @memo + add100(a: number, b: number): number { + return a + b; + } + + @memo + add101(a: number, b: number): number { + return a + b; + } + + @memo + add102(a: number, b: number): number { + return a + b; + } + + @memo + add103(a: number, b: number): number { + return a + b; + } + + @memo + add104(a: number, b: number): number { + return a + b; + } + + @memo + add105(a: number, b: number): number { + return a + b; + } + + @memo + add106(a: number, b: number): number { + return a + b; + } + + @memo + add107(a: number, b: number): number { + return a + b; + } + + @memo + add108(a: number, b: number): number { + return a + b; + } + + @memo + add109(a: number, b: number): number { + return a + b; + } + + @memo + add110(a: number, b: number): number { + return a + b; + } + + @memo + add111(a: number, b: number): number { + return a + b; + } + + @memo + add112(a: number, b: number): number { + return a + b; + } + + @memo + add113(a: number, b: number): number { + return a + b; + } + + @memo + add114(a: number, b: number): number { + return a + b; + } + + @memo + add115(a: number, b: number): number { + return a + b; + } + + @memo + add116(a: number, b: number): number { + return a + b; + } + + @memo + add117(a: number, b: number): number { + return a + b; + } + + @memo + add118(a: number, b: number): number { + return a + b; + } + + @memo + add119(a: number, b: number): number { + return a + b; + } + + @memo + add120(a: number, b: number): number { + return a + b; + } + + @memo + add121(a: number, b: number): number { + return a + b; + } + + @memo + add122(a: number, b: number): number { + return a + b; + } + + @memo + add123(a: number, b: number): number { + return a + b; + } + + @memo + add124(a: number, b: number): number { + return a + b; + } + + @memo + add125(a: number, b: number): number { + return a + b; + } + + @memo + add126(a: number, b: number): number { + return a + b; + } + + @memo + add127(a: number, b: number): number { + return a + b; + } + + @memo + add128(a: number, b: number): number { + return a + b; + } + + @memo + add129(a: number, b: number): number { + return a + b; + } + + @memo + add130(a: number, b: number): number { + return a + b; + } + + @memo + add131(a: number, b: number): number { + return a + b; + } + + @memo + add132(a: number, b: number): number { + return a + b; + } + + @memo + add133(a: number, b: number): number { + return a + b; + } + + @memo + add134(a: number, b: number): number { + return a + b; + } + + @memo + add135(a: number, b: number): number { + return a + b; + } + + @memo + add136(a: number, b: number): number { + return a + b; + } + + @memo + add137(a: number, b: number): number { + return a + b; + } + + @memo + add138(a: number, b: number): number { + return a + b; + } + + @memo + add139(a: number, b: number): number { + return a + b; + } + + @memo + add140(a: number, b: number): number { + return a + b; + } + + @memo + add141(a: number, b: number): number { + return a + b; + } + + @memo + add142(a: number, b: number): number { + return a + b; + } + + @memo + add143(a: number, b: number): number { + return a + b; + } + + @memo + add144(a: number, b: number): number { + return a + b; + } + + @memo + add145(a: number, b: number): number { + return a + b; + } + + @memo + add146(a: number, b: number): number { + return a + b; + } + + @memo + add147(a: number, b: number): number { + return a + b; + } + + @memo + add148(a: number, b: number): number { + return a + b; + } + + @memo + add149(a: number, b: number): number { + return a + b; + } + + @memo + add150(a: number, b: number): number { + return a + b; + } + + @memo + add151(a: number, b: number): number { + return a + b; + } + + @memo + add152(a: number, b: number): number { + return a + b; + } + + @memo + add153(a: number, b: number): number { + return a + b; + } + + @memo + add154(a: number, b: number): number { + return a + b; + } + + @memo + add155(a: number, b: number): number { + return a + b; + } + + @memo + add156(a: number, b: number): number { + return a + b; + } + + @memo + add157(a: number, b: number): number { + return a + b; + } + + @memo + add158(a: number, b: number): number { + return a + b; + } + + @memo + add159(a: number, b: number): number { + return a + b; + } + + @memo + add160(a: number, b: number): number { + return a + b; + } + + @memo + add161(a: number, b: number): number { + return a + b; + } + + @memo + add162(a: number, b: number): number { + return a + b; + } + + @memo + add163(a: number, b: number): number { + return a + b; + } + + @memo + add164(a: number, b: number): number { + return a + b; + } + + @memo + add165(a: number, b: number): number { + return a + b; + } + + @memo + add166(a: number, b: number): number { + return a + b; + } + + @memo + add167(a: number, b: number): number { + return a + b; + } + + @memo + add168(a: number, b: number): number { + return a + b; + } + + @memo + add169(a: number, b: number): number { + return a + b; + } + + @memo + add170(a: number, b: number): number { + return a + b; + } + + @memo + add171(a: number, b: number): number { + return a + b; + } + + @memo + add172(a: number, b: number): number { + return a + b; + } + + @memo + add173(a: number, b: number): number { + return a + b; + } + + @memo + add174(a: number, b: number): number { + return a + b; + } + + @memo + add175(a: number, b: number): number { + return a + b; + } + + @memo + add176(a: number, b: number): number { + return a + b; + } + + @memo + add177(a: number, b: number): number { + return a + b; + } + + @memo + add178(a: number, b: number): number { + return a + b; + } + + @memo + add179(a: number, b: number): number { + return a + b; + } + + @memo + add180(a: number, b: number): number { + return a + b; + } + + @memo + add181(a: number, b: number): number { + return a + b; + } + + @memo + add182(a: number, b: number): number { + return a + b; + } + + @memo + add183(a: number, b: number): number { + return a + b; + } + + @memo + add184(a: number, b: number): number { + return a + b; + } + + @memo + add185(a: number, b: number): number { + return a + b; + } + + @memo + add186(a: number, b: number): number { + return a + b; + } + + @memo + add187(a: number, b: number): number { + return a + b; + } + + @memo + add188(a: number, b: number): number { + return a + b; + } + + @memo + add189(a: number, b: number): number { + return a + b; + } + + @memo + add190(a: number, b: number): number { + return a + b; + } + + @memo + add191(a: number, b: number): number { + return a + b; + } + + @memo + add192(a: number, b: number): number { + return a + b; + } + + @memo + add193(a: number, b: number): number { + return a + b; + } + + @memo + add194(a: number, b: number): number { + return a + b; + } + + @memo + add195(a: number, b: number): number { + return a + b; + } + + @memo + add196(a: number, b: number): number { + return a + b; + } + + @memo + add197(a: number, b: number): number { + return a + b; + } + + @memo + add198(a: number, b: number): number { + return a + b; + } + + @memo + add199(a: number, b: number): number { + return a + b; + } + + @memo + add200(a: number, b: number): number { + return a + b; + } + + @memo + add201(a: number, b: number): number { + return a + b; + } + + @memo + add202(a: number, b: number): number { + return a + b; + } + + @memo + add203(a: number, b: number): number { + return a + b; + } + + @memo + add204(a: number, b: number): number { + return a + b; + } + + @memo + add205(a: number, b: number): number { + return a + b; + } + + @memo + add206(a: number, b: number): number { + return a + b; + } + + @memo + add207(a: number, b: number): number { + return a + b; + } + + @memo + add208(a: number, b: number): number { + return a + b; + } + + @memo + add209(a: number, b: number): number { + return a + b; + } + + @memo + add210(a: number, b: number): number { + return a + b; + } + + @memo + add211(a: number, b: number): number { + return a + b; + } + + @memo + add212(a: number, b: number): number { + return a + b; + } + + @memo + add213(a: number, b: number): number { + return a + b; + } + + @memo + add214(a: number, b: number): number { + return a + b; + } + + @memo + add215(a: number, b: number): number { + return a + b; + } + + @memo + add216(a: number, b: number): number { + return a + b; + } + + @memo + add217(a: number, b: number): number { + return a + b; + } + + @memo + add218(a: number, b: number): number { + return a + b; + } + + @memo + add219(a: number, b: number): number { + return a + b; + } + + @memo + add220(a: number, b: number): number { + return a + b; + } + + @memo + add221(a: number, b: number): number { + return a + b; + } + + @memo + add222(a: number, b: number): number { + return a + b; + } + + @memo + add223(a: number, b: number): number { + return a + b; + } + + @memo + add224(a: number, b: number): number { + return a + b; + } + + @memo + add225(a: number, b: number): number { + return a + b; + } + + @memo + add226(a: number, b: number): number { + return a + b; + } + + @memo + add227(a: number, b: number): number { + return a + b; + } + + @memo + add228(a: number, b: number): number { + return a + b; + } + + @memo + add229(a: number, b: number): number { + return a + b; + } + + @memo + add230(a: number, b: number): number { + return a + b; + } + + @memo + add231(a: number, b: number): number { + return a + b; + } + + @memo + add232(a: number, b: number): number { + return a + b; + } + + @memo + add233(a: number, b: number): number { + return a + b; + } + + @memo + add234(a: number, b: number): number { + return a + b; + } + + @memo + add235(a: number, b: number): number { + return a + b; + } + + @memo + add236(a: number, b: number): number { + return a + b; + } + + @memo + add237(a: number, b: number): number { + return a + b; + } + + @memo + add238(a: number, b: number): number { + return a + b; + } + + @memo + add239(a: number, b: number): number { + return a + b; + } + + @memo + add240(a: number, b: number): number { + return a + b; + } + + @memo + add241(a: number, b: number): number { + return a + b; + } + + @memo + add242(a: number, b: number): number { + return a + b; + } + + @memo + add243(a: number, b: number): number { + return a + b; + } + + @memo + add244(a: number, b: number): number { + return a + b; + } + + @memo + add245(a: number, b: number): number { + return a + b; + } + + @memo + add246(a: number, b: number): number { + return a + b; + } + + @memo + add247(a: number, b: number): number { + return a + b; + } + + @memo + add248(a: number, b: number): number { + return a + b; + } + + @memo + add249(a: number, b: number): number { + return a + b; + } + + @memo + add250(a: number, b: number): number { + return a + b; + } + + @memo + add251(a: number, b: number): number { + return a + b; + } + + @memo + add252(a: number, b: number): number { + return a + b; + } + + @memo + add253(a: number, b: number): number { + return a + b; + } + + @memo + add254(a: number, b: number): number { + return a + b; + } + + @memo + add255(a: number, b: number): number { + return a + b; + } + + @memo + add256(a: number, b: number): number { + return a + b; + } + + @memo + add257(a: number, b: number): number { + return a + b; + } + + @memo + add258(a: number, b: number): number { + return a + b; + } + + @memo + add259(a: number, b: number): number { + return a + b; + } + + @memo + add260(a: number, b: number): number { + return a + b; + } + + @memo + add261(a: number, b: number): number { + return a + b; + } + + @memo + add262(a: number, b: number): number { + return a + b; + } + + @memo + add263(a: number, b: number): number { + return a + b; + } + + @memo + add264(a: number, b: number): number { + return a + b; + } + + @memo + add265(a: number, b: number): number { + return a + b; + } + + @memo + add266(a: number, b: number): number { + return a + b; + } + + @memo + add267(a: number, b: number): number { + return a + b; + } + + @memo + add268(a: number, b: number): number { + return a + b; + } + + @memo + add269(a: number, b: number): number { + return a + b; + } + + @memo + add270(a: number, b: number): number { + return a + b; + } + + @memo + add271(a: number, b: number): number { + return a + b; + } + + @memo + add272(a: number, b: number): number { + return a + b; + } + + @memo + add273(a: number, b: number): number { + return a + b; + } + + @memo + add274(a: number, b: number): number { + return a + b; + } + + @memo + add275(a: number, b: number): number { + return a + b; + } + + @memo + add276(a: number, b: number): number { + return a + b; + } + + @memo + add277(a: number, b: number): number { + return a + b; + } + + @memo + add278(a: number, b: number): number { + return a + b; + } + + @memo + add279(a: number, b: number): number { + return a + b; + } + + @memo + add280(a: number, b: number): number { + return a + b; + } + + @memo + add281(a: number, b: number): number { + return a + b; + } + + @memo + add282(a: number, b: number): number { + return a + b; + } + + @memo + add283(a: number, b: number): number { + return a + b; + } + + @memo + add284(a: number, b: number): number { + return a + b; + } + + @memo + add285(a: number, b: number): number { + return a + b; + } + + @memo + add286(a: number, b: number): number { + return a + b; + } + + @memo + add287(a: number, b: number): number { + return a + b; + } + + @memo + add288(a: number, b: number): number { + return a + b; + } + + @memo + add289(a: number, b: number): number { + return a + b; + } + + @memo + add290(a: number, b: number): number { + return a + b; + } + + @memo + add291(a: number, b: number): number { + return a + b; + } + + @memo + add292(a: number, b: number): number { + return a + b; + } + + @memo + add293(a: number, b: number): number { + return a + b; + } + + @memo + add294(a: number, b: number): number { + return a + b; + } + + @memo + add295(a: number, b: number): number { + return a + b; + } + + @memo + add296(a: number, b: number): number { + return a + b; + } + + @memo + add297(a: number, b: number): number { + return a + b; + } + + @memo + add298(a: number, b: number): number { + return a + b; + } + + @memo + add299(a: number, b: number): number { + return a + b; + } + + @memo + add300(a: number, b: number): number { + return a + b; + } + + @memo + add301(a: number, b: number): number { + return a + b; + } + + @memo + add302(a: number, b: number): number { + return a + b; + } + + @memo + add303(a: number, b: number): number { + return a + b; + } + + @memo + add304(a: number, b: number): number { + return a + b; + } + + @memo + add305(a: number, b: number): number { + return a + b; + } + + @memo + add306(a: number, b: number): number { + return a + b; + } + + @memo + add307(a: number, b: number): number { + return a + b; + } + + @memo + add308(a: number, b: number): number { + return a + b; + } + + @memo + add309(a: number, b: number): number { + return a + b; + } + + @memo + add310(a: number, b: number): number { + return a + b; + } + + @memo + add311(a: number, b: number): number { + return a + b; + } + + @memo + add312(a: number, b: number): number { + return a + b; + } + + @memo + add313(a: number, b: number): number { + return a + b; + } + + @memo + add314(a: number, b: number): number { + return a + b; + } + + @memo + add315(a: number, b: number): number { + return a + b; + } + + @memo + add316(a: number, b: number): number { + return a + b; + } + + @memo + add317(a: number, b: number): number { + return a + b; + } + + @memo + add318(a: number, b: number): number { + return a + b; + } + + @memo + add319(a: number, b: number): number { + return a + b; + } + + @memo + add320(a: number, b: number): number { + return a + b; + } + + @memo + add321(a: number, b: number): number { + return a + b; + } + + @memo + add322(a: number, b: number): number { + return a + b; + } + + @memo + add323(a: number, b: number): number { + return a + b; + } + + @memo + add324(a: number, b: number): number { + return a + b; + } + + @memo + add325(a: number, b: number): number { + return a + b; + } + + @memo + add326(a: number, b: number): number { + return a + b; + } + + @memo + add327(a: number, b: number): number { + return a + b; + } + + @memo + add328(a: number, b: number): number { + return a + b; + } + + @memo + add329(a: number, b: number): number { + return a + b; + } + + @memo + add330(a: number, b: number): number { + return a + b; + } + + @memo + add331(a: number, b: number): number { + return a + b; + } + + @memo + add332(a: number, b: number): number { + return a + b; + } + + @memo + add333(a: number, b: number): number { + return a + b; + } + + @memo + add334(a: number, b: number): number { + return a + b; + } + + @memo + add335(a: number, b: number): number { + return a + b; + } + + @memo + add336(a: number, b: number): number { + return a + b; + } + + @memo + add337(a: number, b: number): number { + return a + b; + } + + @memo + add338(a: number, b: number): number { + return a + b; + } + + @memo + add339(a: number, b: number): number { + return a + b; + } + + @memo + add340(a: number, b: number): number { + return a + b; + } + + @memo + add341(a: number, b: number): number { + return a + b; + } + + @memo + add342(a: number, b: number): number { + return a + b; + } + + @memo + add343(a: number, b: number): number { + return a + b; + } + + @memo + add344(a: number, b: number): number { + return a + b; + } + + @memo + add345(a: number, b: number): number { + return a + b; + } + + @memo + add346(a: number, b: number): number { + return a + b; + } + + @memo + add347(a: number, b: number): number { + return a + b; + } + + @memo + add348(a: number, b: number): number { + return a + b; + } + + @memo + add349(a: number, b: number): number { + return a + b; + } + + @memo + add350(a: number, b: number): number { + return a + b; + } + + @memo + add351(a: number, b: number): number { + return a + b; + } + + @memo + add352(a: number, b: number): number { + return a + b; + } + + @memo + add353(a: number, b: number): number { + return a + b; + } + + @memo + add354(a: number, b: number): number { + return a + b; + } + + @memo + add355(a: number, b: number): number { + return a + b; + } + + @memo + add356(a: number, b: number): number { + return a + b; + } + + @memo + add357(a: number, b: number): number { + return a + b; + } + + @memo + add358(a: number, b: number): number { + return a + b; + } + + @memo + add359(a: number, b: number): number { + return a + b; + } + + @memo + add360(a: number, b: number): number { + return a + b; + } + + @memo + add361(a: number, b: number): number { + return a + b; + } + + @memo + add362(a: number, b: number): number { + return a + b; + } + + @memo + add363(a: number, b: number): number { + return a + b; + } + + @memo + add364(a: number, b: number): number { + return a + b; + } + + @memo + add365(a: number, b: number): number { + return a + b; + } + + @memo + add366(a: number, b: number): number { + return a + b; + } + + @memo + add367(a: number, b: number): number { + return a + b; + } + + @memo + add368(a: number, b: number): number { + return a + b; + } + + @memo + add369(a: number, b: number): number { + return a + b; + } + + @memo + add370(a: number, b: number): number { + return a + b; + } + + @memo + add371(a: number, b: number): number { + return a + b; + } + + @memo + add372(a: number, b: number): number { + return a + b; + } + + @memo + add373(a: number, b: number): number { + return a + b; + } + + @memo + add374(a: number, b: number): number { + return a + b; + } + + @memo + add375(a: number, b: number): number { + return a + b; + } + + @memo + add376(a: number, b: number): number { + return a + b; + } + + @memo + add377(a: number, b: number): number { + return a + b; + } + + @memo + add378(a: number, b: number): number { + return a + b; + } + + @memo + add379(a: number, b: number): number { + return a + b; + } + + @memo + add380(a: number, b: number): number { + return a + b; + } + + @memo + add381(a: number, b: number): number { + return a + b; + } + + @memo + add382(a: number, b: number): number { + return a + b; + } + + @memo + add383(a: number, b: number): number { + return a + b; + } + + @memo + add384(a: number, b: number): number { + return a + b; + } + + @memo + add385(a: number, b: number): number { + return a + b; + } + + @memo + add386(a: number, b: number): number { + return a + b; + } + + @memo + add387(a: number, b: number): number { + return a + b; + } + + @memo + add388(a: number, b: number): number { + return a + b; + } + + @memo + add389(a: number, b: number): number { + return a + b; + } + + @memo + add390(a: number, b: number): number { + return a + b; + } + + @memo + add391(a: number, b: number): number { + return a + b; + } + + @memo + add392(a: number, b: number): number { + return a + b; + } + + @memo + add393(a: number, b: number): number { + return a + b; + } + + @memo + add394(a: number, b: number): number { + return a + b; + } + + @memo + add395(a: number, b: number): number { + return a + b; + } + + @memo + add396(a: number, b: number): number { + return a + b; + } + + @memo + add397(a: number, b: number): number { + return a + b; + } + + @memo + add398(a: number, b: number): number { + return a + b; + } + + @memo + add399(a: number, b: number): number { + return a + b; + } + + @memo + add400(a: number, b: number): number { + return a + b; + } + + @memo + add401(a: number, b: number): number { + return a + b; + } + + @memo + add402(a: number, b: number): number { + return a + b; + } + + @memo + add403(a: number, b: number): number { + return a + b; + } + + @memo + add404(a: number, b: number): number { + return a + b; + } + + @memo + add405(a: number, b: number): number { + return a + b; + } + + @memo + add406(a: number, b: number): number { + return a + b; + } + + @memo + add407(a: number, b: number): number { + return a + b; + } + + @memo + add408(a: number, b: number): number { + return a + b; + } + + @memo + add409(a: number, b: number): number { + return a + b; + } + + @memo + add410(a: number, b: number): number { + return a + b; + } + + @memo + add411(a: number, b: number): number { + return a + b; + } + + @memo + add412(a: number, b: number): number { + return a + b; + } + + @memo + add413(a: number, b: number): number { + return a + b; + } + + @memo + add414(a: number, b: number): number { + return a + b; + } + + @memo + add415(a: number, b: number): number { + return a + b; + } + + @memo + add416(a: number, b: number): number { + return a + b; + } + + @memo + add417(a: number, b: number): number { + return a + b; + } + + @memo + add418(a: number, b: number): number { + return a + b; + } + + @memo + add419(a: number, b: number): number { + return a + b; + } + + @memo + add420(a: number, b: number): number { + return a + b; + } + + @memo + add421(a: number, b: number): number { + return a + b; + } + + @memo + add422(a: number, b: number): number { + return a + b; + } + + @memo + add423(a: number, b: number): number { + return a + b; + } + + @memo + add424(a: number, b: number): number { + return a + b; + } + + @memo + add425(a: number, b: number): number { + return a + b; + } + + @memo + add426(a: number, b: number): number { + return a + b; + } + + @memo + add427(a: number, b: number): number { + return a + b; + } + + @memo + add428(a: number, b: number): number { + return a + b; + } + + @memo + add429(a: number, b: number): number { + return a + b; + } + + @memo + add430(a: number, b: number): number { + return a + b; + } + + @memo + add431(a: number, b: number): number { + return a + b; + } + + @memo + add432(a: number, b: number): number { + return a + b; + } + + @memo + add433(a: number, b: number): number { + return a + b; + } + + @memo + add434(a: number, b: number): number { + return a + b; + } + + @memo + add435(a: number, b: number): number { + return a + b; + } + + @memo + add436(a: number, b: number): number { + return a + b; + } + + @memo + add437(a: number, b: number): number { + return a + b; + } + + @memo + add438(a: number, b: number): number { + return a + b; + } + + @memo + add439(a: number, b: number): number { + return a + b; + } + + @memo + add440(a: number, b: number): number { + return a + b; + } + + @memo + add441(a: number, b: number): number { + return a + b; + } + + @memo + add442(a: number, b: number): number { + return a + b; + } + + @memo + add443(a: number, b: number): number { + return a + b; + } + + @memo + add444(a: number, b: number): number { + return a + b; + } + + @memo + add445(a: number, b: number): number { + return a + b; + } + + @memo + add446(a: number, b: number): number { + return a + b; + } + + @memo + add447(a: number, b: number): number { + return a + b; + } + + @memo + add448(a: number, b: number): number { + return a + b; + } + + @memo + add449(a: number, b: number): number { + return a + b; + } + + @memo + add450(a: number, b: number): number { + return a + b; + } + + @memo + add451(a: number, b: number): number { + return a + b; + } + + @memo + add452(a: number, b: number): number { + return a + b; + } + + @memo + add453(a: number, b: number): number { + return a + b; + } + + @memo + add454(a: number, b: number): number { + return a + b; + } + + @memo + add455(a: number, b: number): number { + return a + b; + } + + @memo + add456(a: number, b: number): number { + return a + b; + } + + @memo + add457(a: number, b: number): number { + return a + b; + } + + @memo + add458(a: number, b: number): number { + return a + b; + } + + @memo + add459(a: number, b: number): number { + return a + b; + } + + @memo + add460(a: number, b: number): number { + return a + b; + } + + @memo + add461(a: number, b: number): number { + return a + b; + } + + @memo + add462(a: number, b: number): number { + return a + b; + } + + @memo + add463(a: number, b: number): number { + return a + b; + } + + @memo + add464(a: number, b: number): number { + return a + b; + } + + @memo + add465(a: number, b: number): number { + return a + b; + } + + @memo + add466(a: number, b: number): number { + return a + b; + } + + @memo + add467(a: number, b: number): number { + return a + b; + } + + @memo + add468(a: number, b: number): number { + return a + b; + } + + @memo + add469(a: number, b: number): number { + return a + b; + } + + @memo + add470(a: number, b: number): number { + return a + b; + } + + @memo + add471(a: number, b: number): number { + return a + b; + } + + @memo + add472(a: number, b: number): number { + return a + b; + } + + @memo + add473(a: number, b: number): number { + return a + b; + } + + @memo + add474(a: number, b: number): number { + return a + b; + } + + @memo + add475(a: number, b: number): number { + return a + b; + } + + @memo + add476(a: number, b: number): number { + return a + b; + } + + @memo + add477(a: number, b: number): number { + return a + b; + } + + @memo + add478(a: number, b: number): number { + return a + b; + } + + @memo + add479(a: number, b: number): number { + return a + b; + } + + @memo + add480(a: number, b: number): number { + return a + b; + } + + @memo + add481(a: number, b: number): number { + return a + b; + } + + @memo + add482(a: number, b: number): number { + return a + b; + } + + @memo + add483(a: number, b: number): number { + return a + b; + } + + @memo + add484(a: number, b: number): number { + return a + b; + } + + @memo + add485(a: number, b: number): number { + return a + b; + } + + @memo + add486(a: number, b: number): number { + return a + b; + } + + @memo + add487(a: number, b: number): number { + return a + b; + } + + @memo + add488(a: number, b: number): number { + return a + b; + } + + @memo + add489(a: number, b: number): number { + return a + b; + } + + @memo + add490(a: number, b: number): number { + return a + b; + } + + @memo + add491(a: number, b: number): number { + return a + b; + } + + @memo + add492(a: number, b: number): number { + return a + b; + } + + @memo + add493(a: number, b: number): number { + return a + b; + } + + @memo + add494(a: number, b: number): number { + return a + b; + } + + @memo + add495(a: number, b: number): number { + return a + b; + } + + @memo + add496(a: number, b: number): number { + return a + b; + } + + @memo + add497(a: number, b: number): number { + return a + b; + } + + @memo + add498(a: number, b: number): number { + return a + b; + } + + @memo + add499(a: number, b: number): number { + return a + b; + } + + @memo + add500(a: number, b: number): number { + return a + b; + } + + @memo + add501(a: number, b: number): number { + return a + b; + } + + @memo + add502(a: number, b: number): number { + return a + b; + } + + @memo + add503(a: number, b: number): number { + return a + b; + } + + @memo + add504(a: number, b: number): number { + return a + b; + } + + @memo + add505(a: number, b: number): number { + return a + b; + } + + @memo + add506(a: number, b: number): number { + return a + b; + } + + @memo + add507(a: number, b: number): number { + return a + b; + } + + @memo + add508(a: number, b: number): number { + return a + b; + } + + @memo + add509(a: number, b: number): number { + return a + b; + } + + @memo + add510(a: number, b: number): number { + return a + b; + } + + @memo + add511(a: number, b: number): number { + return a + b; + } + + @memo + add512(a: number, b: number): number { + return a + b; + } + + @memo + add513(a: number, b: number): number { + return a + b; + } + + @memo + add514(a: number, b: number): number { + return a + b; + } + + @memo + add515(a: number, b: number): number { + return a + b; + } + + @memo + add516(a: number, b: number): number { + return a + b; + } + + @memo + add517(a: number, b: number): number { + return a + b; + } + + @memo + add518(a: number, b: number): number { + return a + b; + } + + @memo + add519(a: number, b: number): number { + return a + b; + } + + @memo + add520(a: number, b: number): number { + return a + b; + } + + @memo + add521(a: number, b: number): number { + return a + b; + } + + @memo + add522(a: number, b: number): number { + return a + b; + } + + @memo + add523(a: number, b: number): number { + return a + b; + } + + @memo + add524(a: number, b: number): number { + return a + b; + } + + @memo + add525(a: number, b: number): number { + return a + b; + } + + @memo + add526(a: number, b: number): number { + return a + b; + } + + @memo + add527(a: number, b: number): number { + return a + b; + } + + @memo + add528(a: number, b: number): number { + return a + b; + } + + @memo + add529(a: number, b: number): number { + return a + b; + } + + @memo + add530(a: number, b: number): number { + return a + b; + } + + @memo + add531(a: number, b: number): number { + return a + b; + } + + @memo + add532(a: number, b: number): number { + return a + b; + } + + @memo + add533(a: number, b: number): number { + return a + b; + } + + @memo + add534(a: number, b: number): number { + return a + b; + } + + @memo + add535(a: number, b: number): number { + return a + b; + } + + @memo + add536(a: number, b: number): number { + return a + b; + } + + @memo + add537(a: number, b: number): number { + return a + b; + } + + @memo + add538(a: number, b: number): number { + return a + b; + } + + @memo + add539(a: number, b: number): number { + return a + b; + } + + @memo + add540(a: number, b: number): number { + return a + b; + } + + @memo + add541(a: number, b: number): number { + return a + b; + } + + @memo + add542(a: number, b: number): number { + return a + b; + } + + @memo + add543(a: number, b: number): number { + return a + b; + } + + @memo + add544(a: number, b: number): number { + return a + b; + } + + @memo + add545(a: number, b: number): number { + return a + b; + } + + @memo + add546(a: number, b: number): number { + return a + b; + } + + @memo + add547(a: number, b: number): number { + return a + b; + } + + @memo + add548(a: number, b: number): number { + return a + b; + } + + @memo + add549(a: number, b: number): number { + return a + b; + } + + @memo + add550(a: number, b: number): number { + return a + b; + } + + @memo + add551(a: number, b: number): number { + return a + b; + } + + @memo + add552(a: number, b: number): number { + return a + b; + } + + @memo + add553(a: number, b: number): number { + return a + b; + } + + @memo + add554(a: number, b: number): number { + return a + b; + } + + @memo + add555(a: number, b: number): number { + return a + b; + } + + @memo + add556(a: number, b: number): number { + return a + b; + } + + @memo + add557(a: number, b: number): number { + return a + b; + } + + @memo + add558(a: number, b: number): number { + return a + b; + } + + @memo + add559(a: number, b: number): number { + return a + b; + } + + @memo + add560(a: number, b: number): number { + return a + b; + } + + @memo + add561(a: number, b: number): number { + return a + b; + } + + @memo + add562(a: number, b: number): number { + return a + b; + } + + @memo + add563(a: number, b: number): number { + return a + b; + } + + @memo + add564(a: number, b: number): number { + return a + b; + } + + @memo + add565(a: number, b: number): number { + return a + b; + } + + @memo + add566(a: number, b: number): number { + return a + b; + } + + @memo + add567(a: number, b: number): number { + return a + b; + } + + @memo + add568(a: number, b: number): number { + return a + b; + } + + @memo + add569(a: number, b: number): number { + return a + b; + } + + @memo + add570(a: number, b: number): number { + return a + b; + } + + @memo + add571(a: number, b: number): number { + return a + b; + } + + @memo + add572(a: number, b: number): number { + return a + b; + } + + @memo + add573(a: number, b: number): number { + return a + b; + } + + @memo + add574(a: number, b: number): number { + return a + b; + } + + @memo + add575(a: number, b: number): number { + return a + b; + } + + @memo + add576(a: number, b: number): number { + return a + b; + } + + @memo + add577(a: number, b: number): number { + return a + b; + } + + @memo + add578(a: number, b: number): number { + return a + b; + } + + @memo + add579(a: number, b: number): number { + return a + b; + } + + @memo + add580(a: number, b: number): number { + return a + b; + } + + @memo + add581(a: number, b: number): number { + return a + b; + } + + @memo + add582(a: number, b: number): number { + return a + b; + } + + @memo + add583(a: number, b: number): number { + return a + b; + } + + @memo + add584(a: number, b: number): number { + return a + b; + } + + @memo + add585(a: number, b: number): number { + return a + b; + } + + @memo + add586(a: number, b: number): number { + return a + b; + } + + @memo + add587(a: number, b: number): number { + return a + b; + } + + @memo + add588(a: number, b: number): number { + return a + b; + } + + @memo + add589(a: number, b: number): number { + return a + b; + } + + @memo + add590(a: number, b: number): number { + return a + b; + } + + @memo + add591(a: number, b: number): number { + return a + b; + } + + @memo + add592(a: number, b: number): number { + return a + b; + } + + @memo + add593(a: number, b: number): number { + return a + b; + } + + @memo + add594(a: number, b: number): number { + return a + b; + } + + @memo + add595(a: number, b: number): number { + return a + b; + } + + @memo + add596(a: number, b: number): number { + return a + b; + } + + @memo + add597(a: number, b: number): number { + return a + b; + } + + @memo + add598(a: number, b: number): number { + return a + b; + } + + @memo + add599(a: number, b: number): number { + return a + b; + } + + @memo + add600(a: number, b: number): number { + return a + b; + } + + @memo + add601(a: number, b: number): number { + return a + b; + } + + @memo + add602(a: number, b: number): number { + return a + b; + } + + @memo + add603(a: number, b: number): number { + return a + b; + } + + @memo + add604(a: number, b: number): number { + return a + b; + } + + @memo + add605(a: number, b: number): number { + return a + b; + } + + @memo + add606(a: number, b: number): number { + return a + b; + } + + @memo + add607(a: number, b: number): number { + return a + b; + } + + @memo + add608(a: number, b: number): number { + return a + b; + } + + @memo + add609(a: number, b: number): number { + return a + b; + } + + @memo + add610(a: number, b: number): number { + return a + b; + } + + @memo + add611(a: number, b: number): number { + return a + b; + } + + @memo + add612(a: number, b: number): number { + return a + b; + } + + @memo + add613(a: number, b: number): number { + return a + b; + } + + @memo + add614(a: number, b: number): number { + return a + b; + } + + @memo + add615(a: number, b: number): number { + return a + b; + } + + @memo + add616(a: number, b: number): number { + return a + b; + } + + @memo + add617(a: number, b: number): number { + return a + b; + } + + @memo + add618(a: number, b: number): number { + return a + b; + } + + @memo + add619(a: number, b: number): number { + return a + b; + } + + @memo + add620(a: number, b: number): number { + return a + b; + } + + @memo + add621(a: number, b: number): number { + return a + b; + } + + @memo + add622(a: number, b: number): number { + return a + b; + } + + @memo + add623(a: number, b: number): number { + return a + b; + } + + @memo + add624(a: number, b: number): number { + return a + b; + } + + @memo + add625(a: number, b: number): number { + return a + b; + } + + @memo + add626(a: number, b: number): number { + return a + b; + } + + @memo + add627(a: number, b: number): number { + return a + b; + } + + @memo + add628(a: number, b: number): number { + return a + b; + } + + @memo + add629(a: number, b: number): number { + return a + b; + } + + @memo + add630(a: number, b: number): number { + return a + b; + } + + @memo + add631(a: number, b: number): number { + return a + b; + } + + @memo + add632(a: number, b: number): number { + return a + b; + } + + @memo + add633(a: number, b: number): number { + return a + b; + } + + @memo + add634(a: number, b: number): number { + return a + b; + } + + @memo + add635(a: number, b: number): number { + return a + b; + } + + @memo + add636(a: number, b: number): number { + return a + b; + } + + @memo + add637(a: number, b: number): number { + return a + b; + } + + @memo + add638(a: number, b: number): number { + return a + b; + } + + @memo + add639(a: number, b: number): number { + return a + b; + } + + @memo + add640(a: number, b: number): number { + return a + b; + } + + @memo + add641(a: number, b: number): number { + return a + b; + } + + @memo + add642(a: number, b: number): number { + return a + b; + } + + @memo + add643(a: number, b: number): number { + return a + b; + } + + @memo + add644(a: number, b: number): number { + return a + b; + } + + @memo + add645(a: number, b: number): number { + return a + b; + } + + @memo + add646(a: number, b: number): number { + return a + b; + } + + @memo + add647(a: number, b: number): number { + return a + b; + } + + @memo + add648(a: number, b: number): number { + return a + b; + } + + @memo + add649(a: number, b: number): number { + return a + b; + } + + @memo + add650(a: number, b: number): number { + return a + b; + } + + @memo + add651(a: number, b: number): number { + return a + b; + } + + @memo + add652(a: number, b: number): number { + return a + b; + } + + @memo + add653(a: number, b: number): number { + return a + b; + } + + @memo + add654(a: number, b: number): number { + return a + b; + } + + @memo + add655(a: number, b: number): number { + return a + b; + } + + @memo + add656(a: number, b: number): number { + return a + b; + } + + @memo + add657(a: number, b: number): number { + return a + b; + } + + @memo + add658(a: number, b: number): number { + return a + b; + } + + @memo + add659(a: number, b: number): number { + return a + b; + } + + @memo + add660(a: number, b: number): number { + return a + b; + } + + @memo + add661(a: number, b: number): number { + return a + b; + } + + @memo + add662(a: number, b: number): number { + return a + b; + } + + @memo + add663(a: number, b: number): number { + return a + b; + } + + @memo + add664(a: number, b: number): number { + return a + b; + } + + @memo + add665(a: number, b: number): number { + return a + b; + } + + @memo + add666(a: number, b: number): number { + return a + b; + } + + @memo + add667(a: number, b: number): number { + return a + b; + } + + @memo + add668(a: number, b: number): number { + return a + b; + } + + @memo + add669(a: number, b: number): number { + return a + b; + } + + @memo + add670(a: number, b: number): number { + return a + b; + } + + @memo + add671(a: number, b: number): number { + return a + b; + } + + @memo + add672(a: number, b: number): number { + return a + b; + } + + @memo + add673(a: number, b: number): number { + return a + b; + } + + @memo + add674(a: number, b: number): number { + return a + b; + } + + @memo + add675(a: number, b: number): number { + return a + b; + } + + @memo + add676(a: number, b: number): number { + return a + b; + } + + @memo + add677(a: number, b: number): number { + return a + b; + } + + @memo + add678(a: number, b: number): number { + return a + b; + } + + @memo + add679(a: number, b: number): number { + return a + b; + } + + @memo + add680(a: number, b: number): number { + return a + b; + } + + @memo + add681(a: number, b: number): number { + return a + b; + } + + @memo + add682(a: number, b: number): number { + return a + b; + } + + @memo + add683(a: number, b: number): number { + return a + b; + } + + @memo + add684(a: number, b: number): number { + return a + b; + } + + @memo + add685(a: number, b: number): number { + return a + b; + } + + @memo + add686(a: number, b: number): number { + return a + b; + } + + @memo + add687(a: number, b: number): number { + return a + b; + } + + @memo + add688(a: number, b: number): number { + return a + b; + } + + @memo + add689(a: number, b: number): number { + return a + b; + } + + @memo + add690(a: number, b: number): number { + return a + b; + } + + @memo + add691(a: number, b: number): number { + return a + b; + } + + @memo + add692(a: number, b: number): number { + return a + b; + } + + @memo + add693(a: number, b: number): number { + return a + b; + } + + @memo + add694(a: number, b: number): number { + return a + b; + } + + @memo + add695(a: number, b: number): number { + return a + b; + } + + @memo + add696(a: number, b: number): number { + return a + b; + } + + @memo + add697(a: number, b: number): number { + return a + b; + } + + @memo + add698(a: number, b: number): number { + return a + b; + } + + @memo + add699(a: number, b: number): number { + return a + b; + } + + @memo + add700(a: number, b: number): number { + return a + b; + } + + @memo + add701(a: number, b: number): number { + return a + b; + } + + @memo + add702(a: number, b: number): number { + return a + b; + } + + @memo + add703(a: number, b: number): number { + return a + b; + } + + @memo + add704(a: number, b: number): number { + return a + b; + } + + @memo + add705(a: number, b: number): number { + return a + b; + } + + @memo + add706(a: number, b: number): number { + return a + b; + } + + @memo + add707(a: number, b: number): number { + return a + b; + } + + @memo + add708(a: number, b: number): number { + return a + b; + } + + @memo + add709(a: number, b: number): number { + return a + b; + } + + @memo + add710(a: number, b: number): number { + return a + b; + } + + @memo + add711(a: number, b: number): number { + return a + b; + } + + @memo + add712(a: number, b: number): number { + return a + b; + } + + @memo + add713(a: number, b: number): number { + return a + b; + } + + @memo + add714(a: number, b: number): number { + return a + b; + } + + @memo + add715(a: number, b: number): number { + return a + b; + } + + @memo + add716(a: number, b: number): number { + return a + b; + } + + @memo + add717(a: number, b: number): number { + return a + b; + } + + @memo + add718(a: number, b: number): number { + return a + b; + } + + @memo + add719(a: number, b: number): number { + return a + b; + } + + @memo + add720(a: number, b: number): number { + return a + b; + } + + @memo + add721(a: number, b: number): number { + return a + b; + } + + @memo + add722(a: number, b: number): number { + return a + b; + } + + @memo + add723(a: number, b: number): number { + return a + b; + } + + @memo + add724(a: number, b: number): number { + return a + b; + } + + @memo + add725(a: number, b: number): number { + return a + b; + } + + @memo + add726(a: number, b: number): number { + return a + b; + } + + @memo + add727(a: number, b: number): number { + return a + b; + } + + @memo + add728(a: number, b: number): number { + return a + b; + } + + @memo + add729(a: number, b: number): number { + return a + b; + } + + @memo + add730(a: number, b: number): number { + return a + b; + } + + @memo + add731(a: number, b: number): number { + return a + b; + } + + @memo + add732(a: number, b: number): number { + return a + b; + } + + @memo + add733(a: number, b: number): number { + return a + b; + } + + @memo + add734(a: number, b: number): number { + return a + b; + } + + @memo + add735(a: number, b: number): number { + return a + b; + } + + @memo + add736(a: number, b: number): number { + return a + b; + } + + @memo + add737(a: number, b: number): number { + return a + b; + } + + @memo + add738(a: number, b: number): number { + return a + b; + } + + @memo + add739(a: number, b: number): number { + return a + b; + } + + @memo + add740(a: number, b: number): number { + return a + b; + } + + @memo + add741(a: number, b: number): number { + return a + b; + } + + @memo + add742(a: number, b: number): number { + return a + b; + } + + @memo + add743(a: number, b: number): number { + return a + b; + } + + @memo + add744(a: number, b: number): number { + return a + b; + } + + @memo + add745(a: number, b: number): number { + return a + b; + } + + @memo + add746(a: number, b: number): number { + return a + b; + } + + @memo + add747(a: number, b: number): number { + return a + b; + } + + @memo + add748(a: number, b: number): number { + return a + b; + } + + @memo + add749(a: number, b: number): number { + return a + b; + } + + @memo + add750(a: number, b: number): number { + return a + b; + } + + @memo + add751(a: number, b: number): number { + return a + b; + } + + @memo + add752(a: number, b: number): number { + return a + b; + } + + @memo + add753(a: number, b: number): number { + return a + b; + } + + @memo + add754(a: number, b: number): number { + return a + b; + } + + @memo + add755(a: number, b: number): number { + return a + b; + } + + @memo + add756(a: number, b: number): number { + return a + b; + } + + @memo + add757(a: number, b: number): number { + return a + b; + } + + @memo + add758(a: number, b: number): number { + return a + b; + } + + @memo + add759(a: number, b: number): number { + return a + b; + } + + @memo + add760(a: number, b: number): number { + return a + b; + } + + @memo + add761(a: number, b: number): number { + return a + b; + } + + @memo + add762(a: number, b: number): number { + return a + b; + } + + @memo + add763(a: number, b: number): number { + return a + b; + } + + @memo + add764(a: number, b: number): number { + return a + b; + } + + @memo + add765(a: number, b: number): number { + return a + b; + } + + @memo + add766(a: number, b: number): number { + return a + b; + } + + @memo + add767(a: number, b: number): number { + return a + b; + } + + @memo + add768(a: number, b: number): number { + return a + b; + } + + @memo + add769(a: number, b: number): number { + return a + b; + } + + @memo + add770(a: number, b: number): number { + return a + b; + } + + @memo + add771(a: number, b: number): number { + return a + b; + } + + @memo + add772(a: number, b: number): number { + return a + b; + } + + @memo + add773(a: number, b: number): number { + return a + b; + } + + @memo + add774(a: number, b: number): number { + return a + b; + } + + @memo + add775(a: number, b: number): number { + return a + b; + } + + @memo + add776(a: number, b: number): number { + return a + b; + } + + @memo + add777(a: number, b: number): number { + return a + b; + } + + @memo + add778(a: number, b: number): number { + return a + b; + } + + @memo + add779(a: number, b: number): number { + return a + b; + } + + @memo + add780(a: number, b: number): number { + return a + b; + } + + @memo + add781(a: number, b: number): number { + return a + b; + } + + @memo + add782(a: number, b: number): number { + return a + b; + } + + @memo + add783(a: number, b: number): number { + return a + b; + } + + @memo + add784(a: number, b: number): number { + return a + b; + } + + @memo + add785(a: number, b: number): number { + return a + b; + } + + @memo + add786(a: number, b: number): number { + return a + b; + } + + @memo + add787(a: number, b: number): number { + return a + b; + } + + @memo + add788(a: number, b: number): number { + return a + b; + } + + @memo + add789(a: number, b: number): number { + return a + b; + } + + @memo + add790(a: number, b: number): number { + return a + b; + } + + @memo + add791(a: number, b: number): number { + return a + b; + } + + @memo + add792(a: number, b: number): number { + return a + b; + } + + @memo + add793(a: number, b: number): number { + return a + b; + } + + @memo + add794(a: number, b: number): number { + return a + b; + } + + @memo + add795(a: number, b: number): number { + return a + b; + } + + @memo + add796(a: number, b: number): number { + return a + b; + } + + @memo + add797(a: number, b: number): number { + return a + b; + } + + @memo + add798(a: number, b: number): number { + return a + b; + } + + @memo + add799(a: number, b: number): number { + return a + b; + } + + @memo + add800(a: number, b: number): number { + return a + b; + } + + @memo + add801(a: number, b: number): number { + return a + b; + } + + @memo + add802(a: number, b: number): number { + return a + b; + } + + @memo + add803(a: number, b: number): number { + return a + b; + } + + @memo + add804(a: number, b: number): number { + return a + b; + } + + @memo + add805(a: number, b: number): number { + return a + b; + } + + @memo + add806(a: number, b: number): number { + return a + b; + } + + @memo + add807(a: number, b: number): number { + return a + b; + } + + @memo + add808(a: number, b: number): number { + return a + b; + } + + @memo + add809(a: number, b: number): number { + return a + b; + } + + @memo + add810(a: number, b: number): number { + return a + b; + } + + @memo + add811(a: number, b: number): number { + return a + b; + } + + @memo + add812(a: number, b: number): number { + return a + b; + } + + @memo + add813(a: number, b: number): number { + return a + b; + } + + @memo + add814(a: number, b: number): number { + return a + b; + } + + @memo + add815(a: number, b: number): number { + return a + b; + } + + @memo + add816(a: number, b: number): number { + return a + b; + } + + @memo + add817(a: number, b: number): number { + return a + b; + } + + @memo + add818(a: number, b: number): number { + return a + b; + } + + @memo + add819(a: number, b: number): number { + return a + b; + } + + @memo + add820(a: number, b: number): number { + return a + b; + } + + @memo + add821(a: number, b: number): number { + return a + b; + } + + @memo + add822(a: number, b: number): number { + return a + b; + } + + @memo + add823(a: number, b: number): number { + return a + b; + } + + @memo + add824(a: number, b: number): number { + return a + b; + } + + @memo + add825(a: number, b: number): number { + return a + b; + } + + @memo + add826(a: number, b: number): number { + return a + b; + } + + @memo + add827(a: number, b: number): number { + return a + b; + } + + @memo + add828(a: number, b: number): number { + return a + b; + } + + @memo + add829(a: number, b: number): number { + return a + b; + } + + @memo + add830(a: number, b: number): number { + return a + b; + } + + @memo + add831(a: number, b: number): number { + return a + b; + } + + @memo + add832(a: number, b: number): number { + return a + b; + } + + @memo + add833(a: number, b: number): number { + return a + b; + } + + @memo + add834(a: number, b: number): number { + return a + b; + } + + @memo + add835(a: number, b: number): number { + return a + b; + } + + @memo + add836(a: number, b: number): number { + return a + b; + } + + @memo + add837(a: number, b: number): number { + return a + b; + } + + @memo + add838(a: number, b: number): number { + return a + b; + } + + @memo + add839(a: number, b: number): number { + return a + b; + } + + @memo + add840(a: number, b: number): number { + return a + b; + } + + @memo + add841(a: number, b: number): number { + return a + b; + } + + @memo + add842(a: number, b: number): number { + return a + b; + } + + @memo + add843(a: number, b: number): number { + return a + b; + } + + @memo + add844(a: number, b: number): number { + return a + b; + } + + @memo + add845(a: number, b: number): number { + return a + b; + } + + @memo + add846(a: number, b: number): number { + return a + b; + } + + @memo + add847(a: number, b: number): number { + return a + b; + } + + @memo + add848(a: number, b: number): number { + return a + b; + } + + @memo + add849(a: number, b: number): number { + return a + b; + } + + @memo + add850(a: number, b: number): number { + return a + b; + } + + @memo + add851(a: number, b: number): number { + return a + b; + } + + @memo + add852(a: number, b: number): number { + return a + b; + } + + @memo + add853(a: number, b: number): number { + return a + b; + } + + @memo + add854(a: number, b: number): number { + return a + b; + } + + @memo + add855(a: number, b: number): number { + return a + b; + } + + @memo + add856(a: number, b: number): number { + return a + b; + } + + @memo + add857(a: number, b: number): number { + return a + b; + } + + @memo + add858(a: number, b: number): number { + return a + b; + } + + @memo + add859(a: number, b: number): number { + return a + b; + } + + @memo + add860(a: number, b: number): number { + return a + b; + } + + @memo + add861(a: number, b: number): number { + return a + b; + } + + @memo + add862(a: number, b: number): number { + return a + b; + } + + @memo + add863(a: number, b: number): number { + return a + b; + } + + @memo + add864(a: number, b: number): number { + return a + b; + } + + @memo + add865(a: number, b: number): number { + return a + b; + } + + @memo + add866(a: number, b: number): number { + return a + b; + } + + @memo + add867(a: number, b: number): number { + return a + b; + } + + @memo + add868(a: number, b: number): number { + return a + b; + } + + @memo + add869(a: number, b: number): number { + return a + b; + } + + @memo + add870(a: number, b: number): number { + return a + b; + } + + @memo + add871(a: number, b: number): number { + return a + b; + } + + @memo + add872(a: number, b: number): number { + return a + b; + } + + @memo + add873(a: number, b: number): number { + return a + b; + } + + @memo + add874(a: number, b: number): number { + return a + b; + } + + @memo + add875(a: number, b: number): number { + return a + b; + } + + @memo + add876(a: number, b: number): number { + return a + b; + } + + @memo + add877(a: number, b: number): number { + return a + b; + } + + @memo + add878(a: number, b: number): number { + return a + b; + } + + @memo + add879(a: number, b: number): number { + return a + b; + } + + @memo + add880(a: number, b: number): number { + return a + b; + } + + @memo + add881(a: number, b: number): number { + return a + b; + } + + @memo + add882(a: number, b: number): number { + return a + b; + } + + @memo + add883(a: number, b: number): number { + return a + b; + } + + @memo + add884(a: number, b: number): number { + return a + b; + } + + @memo + add885(a: number, b: number): number { + return a + b; + } + + @memo + add886(a: number, b: number): number { + return a + b; + } + + @memo + add887(a: number, b: number): number { + return a + b; + } + + @memo + add888(a: number, b: number): number { + return a + b; + } + + @memo + add889(a: number, b: number): number { + return a + b; + } + + @memo + add890(a: number, b: number): number { + return a + b; + } + + @memo + add891(a: number, b: number): number { + return a + b; + } + + @memo + add892(a: number, b: number): number { + return a + b; + } + + @memo + add893(a: number, b: number): number { + return a + b; + } + + @memo + add894(a: number, b: number): number { + return a + b; + } + + @memo + add895(a: number, b: number): number { + return a + b; + } + + @memo + add896(a: number, b: number): number { + return a + b; + } + + @memo + add897(a: number, b: number): number { + return a + b; + } + + @memo + add898(a: number, b: number): number { + return a + b; + } + + @memo + add899(a: number, b: number): number { + return a + b; + } + + @memo + add900(a: number, b: number): number { + return a + b; + } + + @memo + add901(a: number, b: number): number { + return a + b; + } + + @memo + add902(a: number, b: number): number { + return a + b; + } + + @memo + add903(a: number, b: number): number { + return a + b; + } + + @memo + add904(a: number, b: number): number { + return a + b; + } + + @memo + add905(a: number, b: number): number { + return a + b; + } + + @memo + add906(a: number, b: number): number { + return a + b; + } + + @memo + add907(a: number, b: number): number { + return a + b; + } + + @memo + add908(a: number, b: number): number { + return a + b; + } + + @memo + add909(a: number, b: number): number { + return a + b; + } + + @memo + add910(a: number, b: number): number { + return a + b; + } + + @memo + add911(a: number, b: number): number { + return a + b; + } + + @memo + add912(a: number, b: number): number { + return a + b; + } + + @memo + add913(a: number, b: number): number { + return a + b; + } + + @memo + add914(a: number, b: number): number { + return a + b; + } + + @memo + add915(a: number, b: number): number { + return a + b; + } + + @memo + add916(a: number, b: number): number { + return a + b; + } + + @memo + add917(a: number, b: number): number { + return a + b; + } + + @memo + add918(a: number, b: number): number { + return a + b; + } + + @memo + add919(a: number, b: number): number { + return a + b; + } + + @memo + add920(a: number, b: number): number { + return a + b; + } + + @memo + add921(a: number, b: number): number { + return a + b; + } + + @memo + add922(a: number, b: number): number { + return a + b; + } + + @memo + add923(a: number, b: number): number { + return a + b; + } + + @memo + add924(a: number, b: number): number { + return a + b; + } + + @memo + add925(a: number, b: number): number { + return a + b; + } + + @memo + add926(a: number, b: number): number { + return a + b; + } + + @memo + add927(a: number, b: number): number { + return a + b; + } + + @memo + add928(a: number, b: number): number { + return a + b; + } + + @memo + add929(a: number, b: number): number { + return a + b; + } + + @memo + add930(a: number, b: number): number { + return a + b; + } + + @memo + add931(a: number, b: number): number { + return a + b; + } + + @memo + add932(a: number, b: number): number { + return a + b; + } + + @memo + add933(a: number, b: number): number { + return a + b; + } + + @memo + add934(a: number, b: number): number { + return a + b; + } + + @memo + add935(a: number, b: number): number { + return a + b; + } + + @memo + add936(a: number, b: number): number { + return a + b; + } + + @memo + add937(a: number, b: number): number { + return a + b; + } + + @memo + add938(a: number, b: number): number { + return a + b; + } + + @memo + add939(a: number, b: number): number { + return a + b; + } + + @memo + add940(a: number, b: number): number { + return a + b; + } + + @memo + add941(a: number, b: number): number { + return a + b; + } + + @memo + add942(a: number, b: number): number { + return a + b; + } + + @memo + add943(a: number, b: number): number { + return a + b; + } + + @memo + add944(a: number, b: number): number { + return a + b; + } + + @memo + add945(a: number, b: number): number { + return a + b; + } + + @memo + add946(a: number, b: number): number { + return a + b; + } + + @memo + add947(a: number, b: number): number { + return a + b; + } + + @memo + add948(a: number, b: number): number { + return a + b; + } + + @memo + add949(a: number, b: number): number { + return a + b; + } + + @memo + add950(a: number, b: number): number { + return a + b; + } + + @memo + add951(a: number, b: number): number { + return a + b; + } + + @memo + add952(a: number, b: number): number { + return a + b; + } + + @memo + add953(a: number, b: number): number { + return a + b; + } + + @memo + add954(a: number, b: number): number { + return a + b; + } + + @memo + add955(a: number, b: number): number { + return a + b; + } + + @memo + add956(a: number, b: number): number { + return a + b; + } + + @memo + add957(a: number, b: number): number { + return a + b; + } + + @memo + add958(a: number, b: number): number { + return a + b; + } + + @memo + add959(a: number, b: number): number { + return a + b; + } + + @memo + add960(a: number, b: number): number { + return a + b; + } + + @memo + add961(a: number, b: number): number { + return a + b; + } + + @memo + add962(a: number, b: number): number { + return a + b; + } + + @memo + add963(a: number, b: number): number { + return a + b; + } + + @memo + add964(a: number, b: number): number { + return a + b; + } + + @memo + add965(a: number, b: number): number { + return a + b; + } + + @memo + add966(a: number, b: number): number { + return a + b; + } + + @memo + add967(a: number, b: number): number { + return a + b; + } + + @memo + add968(a: number, b: number): number { + return a + b; + } + + @memo + add969(a: number, b: number): number { + return a + b; + } + + @memo + add970(a: number, b: number): number { + return a + b; + } + + @memo + add971(a: number, b: number): number { + return a + b; + } + + @memo + add972(a: number, b: number): number { + return a + b; + } + + @memo + add973(a: number, b: number): number { + return a + b; + } + + @memo + add974(a: number, b: number): number { + return a + b; + } + + @memo + add975(a: number, b: number): number { + return a + b; + } + + @memo + add976(a: number, b: number): number { + return a + b; + } + + @memo + add977(a: number, b: number): number { + return a + b; + } + + @memo + add978(a: number, b: number): number { + return a + b; + } + + @memo + add979(a: number, b: number): number { + return a + b; + } + + @memo + add980(a: number, b: number): number { + return a + b; + } + + @memo + add981(a: number, b: number): number { + return a + b; + } + + @memo + add982(a: number, b: number): number { + return a + b; + } + + @memo + add983(a: number, b: number): number { + return a + b; + } + + @memo + add984(a: number, b: number): number { + return a + b; + } + + @memo + add985(a: number, b: number): number { + return a + b; + } + + @memo + add986(a: number, b: number): number { + return a + b; + } + + @memo + add987(a: number, b: number): number { + return a + b; + } + + @memo + add988(a: number, b: number): number { + return a + b; + } + + @memo + add989(a: number, b: number): number { + return a + b; + } + + @memo + add990(a: number, b: number): number { + return a + b; + } + + @memo + add991(a: number, b: number): number { + return a + b; + } + + @memo + add992(a: number, b: number): number { + return a + b; + } + + @memo + add993(a: number, b: number): number { + return a + b; + } + + @memo + add994(a: number, b: number): number { + return a + b; + } + + @memo + add995(a: number, b: number): number { + return a + b; + } + + @memo + add996(a: number, b: number): number { + return a + b; + } + + @memo + add997(a: number, b: number): number { + return a + b; + } + + @memo + add998(a: number, b: number): number { + return a + b; + } + + @memo + add999(a: number, b: number): number { + return a + b; + } + + @memo + add1000(a: number, b: number): number { + return a + b; + } + + @memo + add1001(a: number, b: number): number { + return a + b; + } + + @memo + add1002(a: number, b: number): number { + return a + b; + } + + @memo + add1003(a: number, b: number): number { + return a + b; + } + + @memo + add1004(a: number, b: number): number { + return a + b; + } + + @memo + add1005(a: number, b: number): number { + return a + b; + } + + @memo + add1006(a: number, b: number): number { + return a + b; + } + + @memo + add1007(a: number, b: number): number { + return a + b; + } + + @memo + add1008(a: number, b: number): number { + return a + b; + } + + @memo + add1009(a: number, b: number): number { + return a + b; + } + + @memo + add1010(a: number, b: number): number { + return a + b; + } + + @memo + add1011(a: number, b: number): number { + return a + b; + } + + @memo + add1012(a: number, b: number): number { + return a + b; + } + + @memo + add1013(a: number, b: number): number { + return a + b; + } + + @memo + add1014(a: number, b: number): number { + return a + b; + } + + @memo + add1015(a: number, b: number): number { + return a + b; + } + + @memo + add1016(a: number, b: number): number { + return a + b; + } + + @memo + add1017(a: number, b: number): number { + return a + b; + } + + @memo + add1018(a: number, b: number): number { + return a + b; + } + + @memo + add1019(a: number, b: number): number { + return a + b; + } + + @memo + add1020(a: number, b: number): number { + return a + b; + } + + @memo + add1021(a: number, b: number): number { + return a + b; + } + + @memo + add1022(a: number, b: number): number { + return a + b; + } + + @memo + add1023(a: number, b: number): number { + return a + b; + } + + @memo + add1024(a: number, b: number): number { + return a + b; + } + + @memo + add1025(a: number, b: number): number { + return a + b; + } + + @memo + add1026(a: number, b: number): number { + return a + b; + } + + @memo + add1027(a: number, b: number): number { + return a + b; + } + + @memo + add1028(a: number, b: number): number { + return a + b; + } + + @memo + add1029(a: number, b: number): number { + return a + b; + } + + @memo + add1030(a: number, b: number): number { + return a + b; + } + + @memo + add1031(a: number, b: number): number { + return a + b; + } + + @memo + add1032(a: number, b: number): number { + return a + b; + } + + @memo + add1033(a: number, b: number): number { + return a + b; + } + + @memo + add1034(a: number, b: number): number { + return a + b; + } + + @memo + add1035(a: number, b: number): number { + return a + b; + } + + @memo + add1036(a: number, b: number): number { + return a + b; + } + + @memo + add1037(a: number, b: number): number { + return a + b; + } + + @memo + add1038(a: number, b: number): number { + return a + b; + } + + @memo + add1039(a: number, b: number): number { + return a + b; + } + + @memo + add1040(a: number, b: number): number { + return a + b; + } + + @memo + add1041(a: number, b: number): number { + return a + b; + } + + @memo + add1042(a: number, b: number): number { + return a + b; + } + + @memo + add1043(a: number, b: number): number { + return a + b; + } + + @memo + add1044(a: number, b: number): number { + return a + b; + } + + @memo + add1045(a: number, b: number): number { + return a + b; + } + + @memo + add1046(a: number, b: number): number { + return a + b; + } + + @memo + add1047(a: number, b: number): number { + return a + b; + } + + @memo + add1048(a: number, b: number): number { + return a + b; + } + + @memo + add1049(a: number, b: number): number { + return a + b; + } + + @memo + add1050(a: number, b: number): number { + return a + b; + } + + @memo + add1051(a: number, b: number): number { + return a + b; + } + + @memo + add1052(a: number, b: number): number { + return a + b; + } + + @memo + add1053(a: number, b: number): number { + return a + b; + } + + @memo + add1054(a: number, b: number): number { + return a + b; + } + + @memo + add1055(a: number, b: number): number { + return a + b; + } + + @memo + add1056(a: number, b: number): number { + return a + b; + } + + @memo + add1057(a: number, b: number): number { + return a + b; + } + + @memo + add1058(a: number, b: number): number { + return a + b; + } + + @memo + add1059(a: number, b: number): number { + return a + b; + } + + @memo + add1060(a: number, b: number): number { + return a + b; + } + + @memo + add1061(a: number, b: number): number { + return a + b; + } + + @memo + add1062(a: number, b: number): number { + return a + b; + } + + @memo + add1063(a: number, b: number): number { + return a + b; + } + + @memo + add1064(a: number, b: number): number { + return a + b; + } + + @memo + add1065(a: number, b: number): number { + return a + b; + } + + @memo + add1066(a: number, b: number): number { + return a + b; + } + + @memo + add1067(a: number, b: number): number { + return a + b; + } + + @memo + add1068(a: number, b: number): number { + return a + b; + } + + @memo + add1069(a: number, b: number): number { + return a + b; + } + + @memo + add1070(a: number, b: number): number { + return a + b; + } + + @memo + add1071(a: number, b: number): number { + return a + b; + } + + @memo + add1072(a: number, b: number): number { + return a + b; + } + + @memo + add1073(a: number, b: number): number { + return a + b; + } + + @memo + add1074(a: number, b: number): number { + return a + b; + } + + @memo + add1075(a: number, b: number): number { + return a + b; + } + + @memo + add1076(a: number, b: number): number { + return a + b; + } + + @memo + add1077(a: number, b: number): number { + return a + b; + } + + @memo + add1078(a: number, b: number): number { + return a + b; + } + + @memo + add1079(a: number, b: number): number { + return a + b; + } + + @memo + add1080(a: number, b: number): number { + return a + b; + } + + @memo + add1081(a: number, b: number): number { + return a + b; + } + + @memo + add1082(a: number, b: number): number { + return a + b; + } + + @memo + add1083(a: number, b: number): number { + return a + b; + } + + @memo + add1084(a: number, b: number): number { + return a + b; + } + + @memo + add1085(a: number, b: number): number { + return a + b; + } + + @memo + add1086(a: number, b: number): number { + return a + b; + } + + @memo + add1087(a: number, b: number): number { + return a + b; + } + + @memo + add1088(a: number, b: number): number { + return a + b; + } + + @memo + add1089(a: number, b: number): number { + return a + b; + } + + @memo + add1090(a: number, b: number): number { + return a + b; + } + + @memo + add1091(a: number, b: number): number { + return a + b; + } + + @memo + add1092(a: number, b: number): number { + return a + b; + } + + @memo + add1093(a: number, b: number): number { + return a + b; + } + + @memo + add1094(a: number, b: number): number { + return a + b; + } + + @memo + add1095(a: number, b: number): number { + return a + b; + } + + @memo + add1096(a: number, b: number): number { + return a + b; + } + + @memo + add1097(a: number, b: number): number { + return a + b; + } + + @memo + add1098(a: number, b: number): number { + return a + b; + } + + @memo + add1099(a: number, b: number): number { + return a + b; + } + + @memo + add1100(a: number, b: number): number { + return a + b; + } + + @memo + add1101(a: number, b: number): number { + return a + b; + } + + @memo + add1102(a: number, b: number): number { + return a + b; + } + + @memo + add1103(a: number, b: number): number { + return a + b; + } + + @memo + add1104(a: number, b: number): number { + return a + b; + } + + @memo + add1105(a: number, b: number): number { + return a + b; + } + + @memo + add1106(a: number, b: number): number { + return a + b; + } + + @memo + add1107(a: number, b: number): number { + return a + b; + } + + @memo + add1108(a: number, b: number): number { + return a + b; + } + + @memo + add1109(a: number, b: number): number { + return a + b; + } + + @memo + add1110(a: number, b: number): number { + return a + b; + } + + @memo + add1111(a: number, b: number): number { + return a + b; + } + + @memo + add1112(a: number, b: number): number { + return a + b; + } + + @memo + add1113(a: number, b: number): number { + return a + b; + } + + @memo + add1114(a: number, b: number): number { + return a + b; + } + + @memo + add1115(a: number, b: number): number { + return a + b; + } + + @memo + add1116(a: number, b: number): number { + return a + b; + } + + @memo + add1117(a: number, b: number): number { + return a + b; + } + + @memo + add1118(a: number, b: number): number { + return a + b; + } + + @memo + add1119(a: number, b: number): number { + return a + b; + } + + @memo + add1120(a: number, b: number): number { + return a + b; + } + + @memo + add1121(a: number, b: number): number { + return a + b; + } + + @memo + add1122(a: number, b: number): number { + return a + b; + } + + @memo + add1123(a: number, b: number): number { + return a + b; + } + + @memo + add1124(a: number, b: number): number { + return a + b; + } + + @memo + add1125(a: number, b: number): number { + return a + b; + } + + @memo + add1126(a: number, b: number): number { + return a + b; + } + + @memo + add1127(a: number, b: number): number { + return a + b; + } + + @memo + add1128(a: number, b: number): number { + return a + b; + } + + @memo + add1129(a: number, b: number): number { + return a + b; + } + + @memo + add1130(a: number, b: number): number { + return a + b; + } + + @memo + add1131(a: number, b: number): number { + return a + b; + } + + @memo + add1132(a: number, b: number): number { + return a + b; + } + + @memo + add1133(a: number, b: number): number { + return a + b; + } + + @memo + add1134(a: number, b: number): number { + return a + b; + } + + @memo + add1135(a: number, b: number): number { + return a + b; + } + + @memo + add1136(a: number, b: number): number { + return a + b; + } + + @memo + add1137(a: number, b: number): number { + return a + b; + } + + @memo + add1138(a: number, b: number): number { + return a + b; + } + + @memo + add1139(a: number, b: number): number { + return a + b; + } + + @memo + add1140(a: number, b: number): number { + return a + b; + } + + @memo + add1141(a: number, b: number): number { + return a + b; + } + + @memo + add1142(a: number, b: number): number { + return a + b; + } + + @memo + add1143(a: number, b: number): number { + return a + b; + } + + @memo + add1144(a: number, b: number): number { + return a + b; + } + + @memo + add1145(a: number, b: number): number { + return a + b; + } + + @memo + add1146(a: number, b: number): number { + return a + b; + } + + @memo + add1147(a: number, b: number): number { + return a + b; + } + + @memo + add1148(a: number, b: number): number { + return a + b; + } + + @memo + add1149(a: number, b: number): number { + return a + b; + } + + @memo + add1150(a: number, b: number): number { + return a + b; + } + + @memo + add1151(a: number, b: number): number { + return a + b; + } + + @memo + add1152(a: number, b: number): number { + return a + b; + } + + @memo + add1153(a: number, b: number): number { + return a + b; + } + + @memo + add1154(a: number, b: number): number { + return a + b; + } + + @memo + add1155(a: number, b: number): number { + return a + b; + } + + @memo + add1156(a: number, b: number): number { + return a + b; + } + + @memo + add1157(a: number, b: number): number { + return a + b; + } + + @memo + add1158(a: number, b: number): number { + return a + b; + } + + @memo + add1159(a: number, b: number): number { + return a + b; + } + + @memo + add1160(a: number, b: number): number { + return a + b; + } + + @memo + add1161(a: number, b: number): number { + return a + b; + } + + @memo + add1162(a: number, b: number): number { + return a + b; + } + + @memo + add1163(a: number, b: number): number { + return a + b; + } + + @memo + add1164(a: number, b: number): number { + return a + b; + } + + @memo + add1165(a: number, b: number): number { + return a + b; + } + + @memo + add1166(a: number, b: number): number { + return a + b; + } + + @memo + add1167(a: number, b: number): number { + return a + b; + } + + @memo + add1168(a: number, b: number): number { + return a + b; + } + + @memo + add1169(a: number, b: number): number { + return a + b; + } + + @memo + add1170(a: number, b: number): number { + return a + b; + } + + @memo + add1171(a: number, b: number): number { + return a + b; + } + + @memo + add1172(a: number, b: number): number { + return a + b; + } + + @memo + add1173(a: number, b: number): number { + return a + b; + } + + @memo + add1174(a: number, b: number): number { + return a + b; + } + + @memo + add1175(a: number, b: number): number { + return a + b; + } + + @memo + add1176(a: number, b: number): number { + return a + b; + } + + @memo + add1177(a: number, b: number): number { + return a + b; + } + + @memo + add1178(a: number, b: number): number { + return a + b; + } + + @memo + add1179(a: number, b: number): number { + return a + b; + } + + @memo + add1180(a: number, b: number): number { + return a + b; + } + + @memo + add1181(a: number, b: number): number { + return a + b; + } + + @memo + add1182(a: number, b: number): number { + return a + b; + } + + @memo + add1183(a: number, b: number): number { + return a + b; + } + + @memo + add1184(a: number, b: number): number { + return a + b; + } + + @memo + add1185(a: number, b: number): number { + return a + b; + } + + @memo + add1186(a: number, b: number): number { + return a + b; + } + + @memo + add1187(a: number, b: number): number { + return a + b; + } + + @memo + add1188(a: number, b: number): number { + return a + b; + } + + @memo + add1189(a: number, b: number): number { + return a + b; + } + + @memo + add1190(a: number, b: number): number { + return a + b; + } + + @memo + add1191(a: number, b: number): number { + return a + b; + } + + @memo + add1192(a: number, b: number): number { + return a + b; + } + + @memo + add1193(a: number, b: number): number { + return a + b; + } + + @memo + add1194(a: number, b: number): number { + return a + b; + } + + @memo + add1195(a: number, b: number): number { + return a + b; + } + + @memo + add1196(a: number, b: number): number { + return a + b; + } + + @memo + add1197(a: number, b: number): number { + return a + b; + } + + @memo + add1198(a: number, b: number): number { + return a + b; + } + + @memo + add1199(a: number, b: number): number { + return a + b; + } + + @memo + add1200(a: number, b: number): number { + return a + b; + } + + @memo + add1201(a: number, b: number): number { + return a + b; + } + + @memo + add1202(a: number, b: number): number { + return a + b; + } + + @memo + add1203(a: number, b: number): number { + return a + b; + } + + @memo + add1204(a: number, b: number): number { + return a + b; + } + + @memo + add1205(a: number, b: number): number { + return a + b; + } + + @memo + add1206(a: number, b: number): number { + return a + b; + } + + @memo + add1207(a: number, b: number): number { + return a + b; + } + + @memo + add1208(a: number, b: number): number { + return a + b; + } + + @memo + add1209(a: number, b: number): number { + return a + b; + } + + @memo + add1210(a: number, b: number): number { + return a + b; + } + + @memo + add1211(a: number, b: number): number { + return a + b; + } + + @memo + add1212(a: number, b: number): number { + return a + b; + } + + @memo + add1213(a: number, b: number): number { + return a + b; + } + + @memo + add1214(a: number, b: number): number { + return a + b; + } + + @memo + add1215(a: number, b: number): number { + return a + b; + } + + @memo + add1216(a: number, b: number): number { + return a + b; + } + + @memo + add1217(a: number, b: number): number { + return a + b; + } + + @memo + add1218(a: number, b: number): number { + return a + b; + } + + @memo + add1219(a: number, b: number): number { + return a + b; + } + + @memo + add1220(a: number, b: number): number { + return a + b; + } + + @memo + add1221(a: number, b: number): number { + return a + b; + } + + @memo + add1222(a: number, b: number): number { + return a + b; + } + + @memo + add1223(a: number, b: number): number { + return a + b; + } + + @memo + add1224(a: number, b: number): number { + return a + b; + } + + @memo + add1225(a: number, b: number): number { + return a + b; + } + + @memo + add1226(a: number, b: number): number { + return a + b; + } + + @memo + add1227(a: number, b: number): number { + return a + b; + } + + @memo + add1228(a: number, b: number): number { + return a + b; + } + + @memo + add1229(a: number, b: number): number { + return a + b; + } + + @memo + add1230(a: number, b: number): number { + return a + b; + } + + @memo + add1231(a: number, b: number): number { + return a + b; + } + + @memo + add1232(a: number, b: number): number { + return a + b; + } + + @memo + add1233(a: number, b: number): number { + return a + b; + } + + @memo + add1234(a: number, b: number): number { + return a + b; + } + + @memo + add1235(a: number, b: number): number { + return a + b; + } + + @memo + add1236(a: number, b: number): number { + return a + b; + } + + @memo + add1237(a: number, b: number): number { + return a + b; + } + + @memo + add1238(a: number, b: number): number { + return a + b; + } + + @memo + add1239(a: number, b: number): number { + return a + b; + } + + @memo + add1240(a: number, b: number): number { + return a + b; + } + + @memo + add1241(a: number, b: number): number { + return a + b; + } + + @memo + add1242(a: number, b: number): number { + return a + b; + } + + @memo + add1243(a: number, b: number): number { + return a + b; + } + + @memo + add1244(a: number, b: number): number { + return a + b; + } + + @memo + add1245(a: number, b: number): number { + return a + b; + } + + @memo + add1246(a: number, b: number): number { + return a + b; + } + + @memo + add1247(a: number, b: number): number { + return a + b; + } + + @memo + add1248(a: number, b: number): number { + return a + b; + } + + @memo + add1249(a: number, b: number): number { + return a + b; + } + + @memo + add1250(a: number, b: number): number { + return a + b; + } + + @memo + add1251(a: number, b: number): number { + return a + b; + } + + @memo + add1252(a: number, b: number): number { + return a + b; + } + + @memo + add1253(a: number, b: number): number { + return a + b; + } + + @memo + add1254(a: number, b: number): number { + return a + b; + } + + @memo + add1255(a: number, b: number): number { + return a + b; + } + + @memo + add1256(a: number, b: number): number { + return a + b; + } + + @memo + add1257(a: number, b: number): number { + return a + b; + } + + @memo + add1258(a: number, b: number): number { + return a + b; + } + + @memo + add1259(a: number, b: number): number { + return a + b; + } + + @memo + add1260(a: number, b: number): number { + return a + b; + } + + @memo + add1261(a: number, b: number): number { + return a + b; + } + + @memo + add1262(a: number, b: number): number { + return a + b; + } + + @memo + add1263(a: number, b: number): number { + return a + b; + } + + @memo + add1264(a: number, b: number): number { + return a + b; + } + + @memo + add1265(a: number, b: number): number { + return a + b; + } + + @memo + add1266(a: number, b: number): number { + return a + b; + } + + @memo + add1267(a: number, b: number): number { + return a + b; + } + + @memo + add1268(a: number, b: number): number { + return a + b; + } + + @memo + add1269(a: number, b: number): number { + return a + b; + } + + @memo + add1270(a: number, b: number): number { + return a + b; + } + + @memo + add1271(a: number, b: number): number { + return a + b; + } + + @memo + add1272(a: number, b: number): number { + return a + b; + } + + @memo + add1273(a: number, b: number): number { + return a + b; + } + + @memo + add1274(a: number, b: number): number { + return a + b; + } + + @memo + add1275(a: number, b: number): number { + return a + b; + } + + @memo + add1276(a: number, b: number): number { + return a + b; + } + + @memo + add1277(a: number, b: number): number { + return a + b; + } + + @memo + add1278(a: number, b: number): number { + return a + b; + } + + @memo + add1279(a: number, b: number): number { + return a + b; + } + + @memo + add1280(a: number, b: number): number { + return a + b; + } + + @memo + add1281(a: number, b: number): number { + return a + b; + } + + @memo + add1282(a: number, b: number): number { + return a + b; + } + + @memo + add1283(a: number, b: number): number { + return a + b; + } + + @memo + add1284(a: number, b: number): number { + return a + b; + } + + @memo + add1285(a: number, b: number): number { + return a + b; + } + + @memo + add1286(a: number, b: number): number { + return a + b; + } + + @memo + add1287(a: number, b: number): number { + return a + b; + } + + @memo + add1288(a: number, b: number): number { + return a + b; + } + + @memo + add1289(a: number, b: number): number { + return a + b; + } + + @memo + add1290(a: number, b: number): number { + return a + b; + } + + @memo + add1291(a: number, b: number): number { + return a + b; + } + + @memo + add1292(a: number, b: number): number { + return a + b; + } + + @memo + add1293(a: number, b: number): number { + return a + b; + } + + @memo + add1294(a: number, b: number): number { + return a + b; + } + + @memo + add1295(a: number, b: number): number { + return a + b; + } + + @memo + add1296(a: number, b: number): number { + return a + b; + } + + @memo + add1297(a: number, b: number): number { + return a + b; + } + + @memo + add1298(a: number, b: number): number { + return a + b; + } + + @memo + add1299(a: number, b: number): number { + return a + b; + } + + @memo + add1300(a: number, b: number): number { + return a + b; + } + + @memo + add1301(a: number, b: number): number { + return a + b; + } + + @memo + add1302(a: number, b: number): number { + return a + b; + } + + @memo + add1303(a: number, b: number): number { + return a + b; + } + + @memo + add1304(a: number, b: number): number { + return a + b; + } + + @memo + add1305(a: number, b: number): number { + return a + b; + } + + @memo + add1306(a: number, b: number): number { + return a + b; + } + + @memo + add1307(a: number, b: number): number { + return a + b; + } + + @memo + add1308(a: number, b: number): number { + return a + b; + } + + @memo + add1309(a: number, b: number): number { + return a + b; + } + + @memo + add1310(a: number, b: number): number { + return a + b; + } + + @memo + add1311(a: number, b: number): number { + return a + b; + } + + @memo + add1312(a: number, b: number): number { + return a + b; + } + + @memo + add1313(a: number, b: number): number { + return a + b; + } + + @memo + add1314(a: number, b: number): number { + return a + b; + } + + @memo + add1315(a: number, b: number): number { + return a + b; + } + + @memo + add1316(a: number, b: number): number { + return a + b; + } + + @memo + add1317(a: number, b: number): number { + return a + b; + } + + @memo + add1318(a: number, b: number): number { + return a + b; + } + + @memo + add1319(a: number, b: number): number { + return a + b; + } + + @memo + add1320(a: number, b: number): number { + return a + b; + } + + @memo + add1321(a: number, b: number): number { + return a + b; + } + + @memo + add1322(a: number, b: number): number { + return a + b; + } + + @memo + add1323(a: number, b: number): number { + return a + b; + } + + @memo + add1324(a: number, b: number): number { + return a + b; + } + + @memo + add1325(a: number, b: number): number { + return a + b; + } + + @memo + add1326(a: number, b: number): number { + return a + b; + } + + @memo + add1327(a: number, b: number): number { + return a + b; + } + + @memo + add1328(a: number, b: number): number { + return a + b; + } + + @memo + add1329(a: number, b: number): number { + return a + b; + } + + @memo + add1330(a: number, b: number): number { + return a + b; + } + + @memo + add1331(a: number, b: number): number { + return a + b; + } + + @memo + add1332(a: number, b: number): number { + return a + b; + } + + @memo + add1333(a: number, b: number): number { + return a + b; + } + + @memo + add1334(a: number, b: number): number { + return a + b; + } + + @memo + add1335(a: number, b: number): number { + return a + b; + } + + @memo + add1336(a: number, b: number): number { + return a + b; + } + + @memo + add1337(a: number, b: number): number { + return a + b; + } + + @memo + add1338(a: number, b: number): number { + return a + b; + } + + @memo + add1339(a: number, b: number): number { + return a + b; + } + + @memo + add1340(a: number, b: number): number { + return a + b; + } + + @memo + add1341(a: number, b: number): number { + return a + b; + } + + @memo + add1342(a: number, b: number): number { + return a + b; + } + + @memo + add1343(a: number, b: number): number { + return a + b; + } + + @memo + add1344(a: number, b: number): number { + return a + b; + } + + @memo + add1345(a: number, b: number): number { + return a + b; + } + + @memo + add1346(a: number, b: number): number { + return a + b; + } + + @memo + add1347(a: number, b: number): number { + return a + b; + } + + @memo + add1348(a: number, b: number): number { + return a + b; + } + + @memo + add1349(a: number, b: number): number { + return a + b; + } + + @memo + add1350(a: number, b: number): number { + return a + b; + } + + @memo + add1351(a: number, b: number): number { + return a + b; + } + + @memo + add1352(a: number, b: number): number { + return a + b; + } + + @memo + add1353(a: number, b: number): number { + return a + b; + } + + @memo + add1354(a: number, b: number): number { + return a + b; + } + + @memo + add1355(a: number, b: number): number { + return a + b; + } + + @memo + add1356(a: number, b: number): number { + return a + b; + } + + @memo + add1357(a: number, b: number): number { + return a + b; + } + + @memo + add1358(a: number, b: number): number { + return a + b; + } + + @memo + add1359(a: number, b: number): number { + return a + b; + } + + @memo + add1360(a: number, b: number): number { + return a + b; + } + + @memo + add1361(a: number, b: number): number { + return a + b; + } + + @memo + add1362(a: number, b: number): number { + return a + b; + } + + @memo + add1363(a: number, b: number): number { + return a + b; + } + + @memo + add1364(a: number, b: number): number { + return a + b; + } + + @memo + add1365(a: number, b: number): number { + return a + b; + } + + @memo + add1366(a: number, b: number): number { + return a + b; + } + + @memo + add1367(a: number, b: number): number { + return a + b; + } + + @memo + add1368(a: number, b: number): number { + return a + b; + } + + @memo + add1369(a: number, b: number): number { + return a + b; + } + + @memo + add1370(a: number, b: number): number { + return a + b; + } + + @memo + add1371(a: number, b: number): number { + return a + b; + } + + @memo + add1372(a: number, b: number): number { + return a + b; + } + + @memo + add1373(a: number, b: number): number { + return a + b; + } + + @memo + add1374(a: number, b: number): number { + return a + b; + } + + @memo + add1375(a: number, b: number): number { + return a + b; + } + + @memo + add1376(a: number, b: number): number { + return a + b; + } + + @memo + add1377(a: number, b: number): number { + return a + b; + } + + @memo + add1378(a: number, b: number): number { + return a + b; + } + + @memo + add1379(a: number, b: number): number { + return a + b; + } + + @memo + add1380(a: number, b: number): number { + return a + b; + } + + @memo + add1381(a: number, b: number): number { + return a + b; + } + + @memo + add1382(a: number, b: number): number { + return a + b; + } + + @memo + add1383(a: number, b: number): number { + return a + b; + } + + @memo + add1384(a: number, b: number): number { + return a + b; + } + + @memo + add1385(a: number, b: number): number { + return a + b; + } + + @memo + add1386(a: number, b: number): number { + return a + b; + } + + @memo + add1387(a: number, b: number): number { + return a + b; + } + + @memo + add1388(a: number, b: number): number { + return a + b; + } + + @memo + add1389(a: number, b: number): number { + return a + b; + } + + @memo + add1390(a: number, b: number): number { + return a + b; + } + + @memo + add1391(a: number, b: number): number { + return a + b; + } + + @memo + add1392(a: number, b: number): number { + return a + b; + } + + @memo + add1393(a: number, b: number): number { + return a + b; + } + + @memo + add1394(a: number, b: number): number { + return a + b; + } + + @memo + add1395(a: number, b: number): number { + return a + b; + } + + @memo + add1396(a: number, b: number): number { + return a + b; + } + + @memo + add1397(a: number, b: number): number { + return a + b; + } + + @memo + add1398(a: number, b: number): number { + return a + b; + } + + @memo + add1399(a: number, b: number): number { + return a + b; + } + + @memo + add1400(a: number, b: number): number { + return a + b; + } + + @memo + add1401(a: number, b: number): number { + return a + b; + } + + @memo + add1402(a: number, b: number): number { + return a + b; + } + + @memo + add1403(a: number, b: number): number { + return a + b; + } + + @memo + add1404(a: number, b: number): number { + return a + b; + } + + @memo + add1405(a: number, b: number): number { + return a + b; + } + + @memo + add1406(a: number, b: number): number { + return a + b; + } + + @memo + add1407(a: number, b: number): number { + return a + b; + } + + @memo + add1408(a: number, b: number): number { + return a + b; + } + + @memo + add1409(a: number, b: number): number { + return a + b; + } + + @memo + add1410(a: number, b: number): number { + return a + b; + } + + @memo + add1411(a: number, b: number): number { + return a + b; + } + + @memo + add1412(a: number, b: number): number { + return a + b; + } + + @memo + add1413(a: number, b: number): number { + return a + b; + } + + @memo + add1414(a: number, b: number): number { + return a + b; + } + + @memo + add1415(a: number, b: number): number { + return a + b; + } + + @memo + add1416(a: number, b: number): number { + return a + b; + } + + @memo + add1417(a: number, b: number): number { + return a + b; + } + + @memo + add1418(a: number, b: number): number { + return a + b; + } + + @memo + add1419(a: number, b: number): number { + return a + b; + } + + @memo + add1420(a: number, b: number): number { + return a + b; + } + + @memo + add1421(a: number, b: number): number { + return a + b; + } + + @memo + add1422(a: number, b: number): number { + return a + b; + } + + @memo + add1423(a: number, b: number): number { + return a + b; + } + + @memo + add1424(a: number, b: number): number { + return a + b; + } + + @memo + add1425(a: number, b: number): number { + return a + b; + } + + @memo + add1426(a: number, b: number): number { + return a + b; + } + + @memo + add1427(a: number, b: number): number { + return a + b; + } + + @memo + add1428(a: number, b: number): number { + return a + b; + } + + @memo + add1429(a: number, b: number): number { + return a + b; + } + + @memo + add1430(a: number, b: number): number { + return a + b; + } + + @memo + add1431(a: number, b: number): number { + return a + b; + } + + @memo + add1432(a: number, b: number): number { + return a + b; + } + + @memo + add1433(a: number, b: number): number { + return a + b; + } + + @memo + add1434(a: number, b: number): number { + return a + b; + } + + @memo + add1435(a: number, b: number): number { + return a + b; + } + + @memo + add1436(a: number, b: number): number { + return a + b; + } + + @memo + add1437(a: number, b: number): number { + return a + b; + } + + @memo + add1438(a: number, b: number): number { + return a + b; + } + + @memo + add1439(a: number, b: number): number { + return a + b; + } + + @memo + add1440(a: number, b: number): number { + return a + b; + } + + @memo + add1441(a: number, b: number): number { + return a + b; + } + + @memo + add1442(a: number, b: number): number { + return a + b; + } + + @memo + add1443(a: number, b: number): number { + return a + b; + } + + @memo + add1444(a: number, b: number): number { + return a + b; + } + + @memo + add1445(a: number, b: number): number { + return a + b; + } + + @memo + add1446(a: number, b: number): number { + return a + b; + } + + @memo + add1447(a: number, b: number): number { + return a + b; + } + + @memo + add1448(a: number, b: number): number { + return a + b; + } + + @memo + add1449(a: number, b: number): number { + return a + b; + } + + @memo + add1450(a: number, b: number): number { + return a + b; + } + + @memo + add1451(a: number, b: number): number { + return a + b; + } + + @memo + add1452(a: number, b: number): number { + return a + b; + } + + @memo + add1453(a: number, b: number): number { + return a + b; + } + + @memo + add1454(a: number, b: number): number { + return a + b; + } + + @memo + add1455(a: number, b: number): number { + return a + b; + } + + @memo + add1456(a: number, b: number): number { + return a + b; + } + + @memo + add1457(a: number, b: number): number { + return a + b; + } + + @memo + add1458(a: number, b: number): number { + return a + b; + } + + @memo + add1459(a: number, b: number): number { + return a + b; + } + + @memo + add1460(a: number, b: number): number { + return a + b; + } + + @memo + add1461(a: number, b: number): number { + return a + b; + } + + @memo + add1462(a: number, b: number): number { + return a + b; + } + + @memo + add1463(a: number, b: number): number { + return a + b; + } + + @memo + add1464(a: number, b: number): number { + return a + b; + } + + @memo + add1465(a: number, b: number): number { + return a + b; + } + + @memo + add1466(a: number, b: number): number { + return a + b; + } + + @memo + add1467(a: number, b: number): number { + return a + b; + } + + @memo + add1468(a: number, b: number): number { + return a + b; + } + + @memo + add1469(a: number, b: number): number { + return a + b; + } + + @memo + add1470(a: number, b: number): number { + return a + b; + } + + @memo + add1471(a: number, b: number): number { + return a + b; + } + + @memo + add1472(a: number, b: number): number { + return a + b; + } + + @memo + add1473(a: number, b: number): number { + return a + b; + } + + @memo + add1474(a: number, b: number): number { + return a + b; + } + + @memo + add1475(a: number, b: number): number { + return a + b; + } + + @memo + add1476(a: number, b: number): number { + return a + b; + } + + @memo + add1477(a: number, b: number): number { + return a + b; + } + + @memo + add1478(a: number, b: number): number { + return a + b; + } + + @memo + add1479(a: number, b: number): number { + return a + b; + } + + @memo + add1480(a: number, b: number): number { + return a + b; + } + + @memo + add1481(a: number, b: number): number { + return a + b; + } + + @memo + add1482(a: number, b: number): number { + return a + b; + } + + @memo + add1483(a: number, b: number): number { + return a + b; + } + + @memo + add1484(a: number, b: number): number { + return a + b; + } + + @memo + add1485(a: number, b: number): number { + return a + b; + } + + @memo + add1486(a: number, b: number): number { + return a + b; + } + + @memo + add1487(a: number, b: number): number { + return a + b; + } + + @memo + add1488(a: number, b: number): number { + return a + b; + } + + @memo + add1489(a: number, b: number): number { + return a + b; + } + + @memo + add1490(a: number, b: number): number { + return a + b; + } + + @memo + add1491(a: number, b: number): number { + return a + b; + } + + @memo + add1492(a: number, b: number): number { + return a + b; + } + + @memo + add1493(a: number, b: number): number { + return a + b; + } + + @memo + add1494(a: number, b: number): number { + return a + b; + } + + @memo + add1495(a: number, b: number): number { + return a + b; + } + + @memo + add1496(a: number, b: number): number { + return a + b; + } + + @memo + add1497(a: number, b: number): number { + return a + b; + } + + @memo + add1498(a: number, b: number): number { + return a + b; + } + + @memo + add1499(a: number, b: number): number { + return a + b; + } + + @memo + add1500(a: number, b: number): number { + return a + b; + } + + @memo + add1501(a: number, b: number): number { + return a + b; + } + + @memo + add1502(a: number, b: number): number { + return a + b; + } + + @memo + add1503(a: number, b: number): number { + return a + b; + } + + @memo + add1504(a: number, b: number): number { + return a + b; + } + + @memo + add1505(a: number, b: number): number { + return a + b; + } + + @memo + add1506(a: number, b: number): number { + return a + b; + } + + @memo + add1507(a: number, b: number): number { + return a + b; + } + + @memo + add1508(a: number, b: number): number { + return a + b; + } + + @memo + add1509(a: number, b: number): number { + return a + b; + } + + @memo + add1510(a: number, b: number): number { + return a + b; + } + + @memo + add1511(a: number, b: number): number { + return a + b; + } + + @memo + add1512(a: number, b: number): number { + return a + b; + } + + @memo + add1513(a: number, b: number): number { + return a + b; + } + + @memo + add1514(a: number, b: number): number { + return a + b; + } + + @memo + add1515(a: number, b: number): number { + return a + b; + } + + @memo + add1516(a: number, b: number): number { + return a + b; + } + + @memo + add1517(a: number, b: number): number { + return a + b; + } + + @memo + add1518(a: number, b: number): number { + return a + b; + } + + @memo + add1519(a: number, b: number): number { + return a + b; + } + + @memo + add1520(a: number, b: number): number { + return a + b; + } + + @memo + add1521(a: number, b: number): number { + return a + b; + } + + @memo + add1522(a: number, b: number): number { + return a + b; + } + + @memo + add1523(a: number, b: number): number { + return a + b; + } + + @memo + add1524(a: number, b: number): number { + return a + b; + } + + @memo + add1525(a: number, b: number): number { + return a + b; + } + + @memo + add1526(a: number, b: number): number { + return a + b; + } + + @memo + add1527(a: number, b: number): number { + return a + b; + } + + @memo + add1528(a: number, b: number): number { + return a + b; + } + + @memo + add1529(a: number, b: number): number { + return a + b; + } + + @memo + add1530(a: number, b: number): number { + return a + b; + } + + @memo + add1531(a: number, b: number): number { + return a + b; + } + + @memo + add1532(a: number, b: number): number { + return a + b; + } + + @memo + add1533(a: number, b: number): number { + return a + b; + } + + @memo + add1534(a: number, b: number): number { + return a + b; + } + + @memo + add1535(a: number, b: number): number { + return a + b; + } + + @memo + add1536(a: number, b: number): number { + return a + b; + } + + @memo + add1537(a: number, b: number): number { + return a + b; + } + + @memo + add1538(a: number, b: number): number { + return a + b; + } + + @memo + add1539(a: number, b: number): number { + return a + b; + } + + @memo + add1540(a: number, b: number): number { + return a + b; + } + + @memo + add1541(a: number, b: number): number { + return a + b; + } + + @memo + add1542(a: number, b: number): number { + return a + b; + } + + @memo + add1543(a: number, b: number): number { + return a + b; + } + + @memo + add1544(a: number, b: number): number { + return a + b; + } + + @memo + add1545(a: number, b: number): number { + return a + b; + } + + @memo + add1546(a: number, b: number): number { + return a + b; + } + + @memo + add1547(a: number, b: number): number { + return a + b; + } + + @memo + add1548(a: number, b: number): number { + return a + b; + } + + @memo + add1549(a: number, b: number): number { + return a + b; + } + + @memo + add1550(a: number, b: number): number { + return a + b; + } + + @memo + add1551(a: number, b: number): number { + return a + b; + } + + @memo + add1552(a: number, b: number): number { + return a + b; + } + + @memo + add1553(a: number, b: number): number { + return a + b; + } + + @memo + add1554(a: number, b: number): number { + return a + b; + } + + @memo + add1555(a: number, b: number): number { + return a + b; + } + + @memo + add1556(a: number, b: number): number { + return a + b; + } + + @memo + add1557(a: number, b: number): number { + return a + b; + } + + @memo + add1558(a: number, b: number): number { + return a + b; + } + + @memo + add1559(a: number, b: number): number { + return a + b; + } + + @memo + add1560(a: number, b: number): number { + return a + b; + } + + @memo + add1561(a: number, b: number): number { + return a + b; + } + + @memo + add1562(a: number, b: number): number { + return a + b; + } + + @memo + add1563(a: number, b: number): number { + return a + b; + } + + @memo + add1564(a: number, b: number): number { + return a + b; + } + + @memo + add1565(a: number, b: number): number { + return a + b; + } + + @memo + add1566(a: number, b: number): number { + return a + b; + } + + @memo + add1567(a: number, b: number): number { + return a + b; + } + + @memo + add1568(a: number, b: number): number { + return a + b; + } + + @memo + add1569(a: number, b: number): number { + return a + b; + } + + @memo + add1570(a: number, b: number): number { + return a + b; + } + + @memo + add1571(a: number, b: number): number { + return a + b; + } + + @memo + add1572(a: number, b: number): number { + return a + b; + } + + @memo + add1573(a: number, b: number): number { + return a + b; + } + + @memo + add1574(a: number, b: number): number { + return a + b; + } + + @memo + add1575(a: number, b: number): number { + return a + b; + } + + @memo + add1576(a: number, b: number): number { + return a + b; + } + + @memo + add1577(a: number, b: number): number { + return a + b; + } + + @memo + add1578(a: number, b: number): number { + return a + b; + } + + @memo + add1579(a: number, b: number): number { + return a + b; + } + + @memo + add1580(a: number, b: number): number { + return a + b; + } + + @memo + add1581(a: number, b: number): number { + return a + b; + } + + @memo + add1582(a: number, b: number): number { + return a + b; + } + + @memo + add1583(a: number, b: number): number { + return a + b; + } + + @memo + add1584(a: number, b: number): number { + return a + b; + } + + @memo + add1585(a: number, b: number): number { + return a + b; + } + + @memo + add1586(a: number, b: number): number { + return a + b; + } + + @memo + add1587(a: number, b: number): number { + return a + b; + } + + @memo + add1588(a: number, b: number): number { + return a + b; + } + + @memo + add1589(a: number, b: number): number { + return a + b; + } + + @memo + add1590(a: number, b: number): number { + return a + b; + } + + @memo + add1591(a: number, b: number): number { + return a + b; + } + + @memo + add1592(a: number, b: number): number { + return a + b; + } + + @memo + add1593(a: number, b: number): number { + return a + b; + } + + @memo + add1594(a: number, b: number): number { + return a + b; + } + + @memo + add1595(a: number, b: number): number { + return a + b; + } + + @memo + add1596(a: number, b: number): number { + return a + b; + } + + @memo + add1597(a: number, b: number): number { + return a + b; + } + + @memo + add1598(a: number, b: number): number { + return a + b; + } + + @memo + add1599(a: number, b: number): number { + return a + b; + } + + @memo + add1600(a: number, b: number): number { + return a + b; + } + + @memo + add1601(a: number, b: number): number { + return a + b; + } + + @memo + add1602(a: number, b: number): number { + return a + b; + } + + @memo + add1603(a: number, b: number): number { + return a + b; + } + + @memo + add1604(a: number, b: number): number { + return a + b; + } + + @memo + add1605(a: number, b: number): number { + return a + b; + } + + @memo + add1606(a: number, b: number): number { + return a + b; + } + + @memo + add1607(a: number, b: number): number { + return a + b; + } + + @memo + add1608(a: number, b: number): number { + return a + b; + } + + @memo + add1609(a: number, b: number): number { + return a + b; + } + + @memo + add1610(a: number, b: number): number { + return a + b; + } + + @memo + add1611(a: number, b: number): number { + return a + b; + } + + @memo + add1612(a: number, b: number): number { + return a + b; + } + + @memo + add1613(a: number, b: number): number { + return a + b; + } + + @memo + add1614(a: number, b: number): number { + return a + b; + } + + @memo + add1615(a: number, b: number): number { + return a + b; + } + + @memo + add1616(a: number, b: number): number { + return a + b; + } + + @memo + add1617(a: number, b: number): number { + return a + b; + } + + @memo + add1618(a: number, b: number): number { + return a + b; + } + + @memo + add1619(a: number, b: number): number { + return a + b; + } + + @memo + add1620(a: number, b: number): number { + return a + b; + } + + @memo + add1621(a: number, b: number): number { + return a + b; + } + + @memo + add1622(a: number, b: number): number { + return a + b; + } + + @memo + add1623(a: number, b: number): number { + return a + b; + } + + @memo + add1624(a: number, b: number): number { + return a + b; + } + + @memo + add1625(a: number, b: number): number { + return a + b; + } + + @memo + add1626(a: number, b: number): number { + return a + b; + } + + @memo + add1627(a: number, b: number): number { + return a + b; + } + + @memo + add1628(a: number, b: number): number { + return a + b; + } + + @memo + add1629(a: number, b: number): number { + return a + b; + } + + @memo + add1630(a: number, b: number): number { + return a + b; + } + + @memo + add1631(a: number, b: number): number { + return a + b; + } + + @memo + add1632(a: number, b: number): number { + return a + b; + } + + @memo + add1633(a: number, b: number): number { + return a + b; + } + + @memo + add1634(a: number, b: number): number { + return a + b; + } + + @memo + add1635(a: number, b: number): number { + return a + b; + } + + @memo + add1636(a: number, b: number): number { + return a + b; + } + + @memo + add1637(a: number, b: number): number { + return a + b; + } + + @memo + add1638(a: number, b: number): number { + return a + b; + } + + @memo + add1639(a: number, b: number): number { + return a + b; + } + + @memo + add1640(a: number, b: number): number { + return a + b; + } + + @memo + add1641(a: number, b: number): number { + return a + b; + } + + @memo + add1642(a: number, b: number): number { + return a + b; + } + + @memo + add1643(a: number, b: number): number { + return a + b; + } + + @memo + add1644(a: number, b: number): number { + return a + b; + } + + @memo + add1645(a: number, b: number): number { + return a + b; + } + + @memo + add1646(a: number, b: number): number { + return a + b; + } + + @memo + add1647(a: number, b: number): number { + return a + b; + } + + @memo + add1648(a: number, b: number): number { + return a + b; + } + + @memo + add1649(a: number, b: number): number { + return a + b; + } + + @memo + add1650(a: number, b: number): number { + return a + b; + } + + @memo + add1651(a: number, b: number): number { + return a + b; + } + + @memo + add1652(a: number, b: number): number { + return a + b; + } + + @memo + add1653(a: number, b: number): number { + return a + b; + } + + @memo + add1654(a: number, b: number): number { + return a + b; + } + + @memo + add1655(a: number, b: number): number { + return a + b; + } + + @memo + add1656(a: number, b: number): number { + return a + b; + } + + @memo + add1657(a: number, b: number): number { + return a + b; + } + + @memo + add1658(a: number, b: number): number { + return a + b; + } + + @memo + add1659(a: number, b: number): number { + return a + b; + } + + @memo + add1660(a: number, b: number): number { + return a + b; + } + + @memo + add1661(a: number, b: number): number { + return a + b; + } + + @memo + add1662(a: number, b: number): number { + return a + b; + } + + @memo + add1663(a: number, b: number): number { + return a + b; + } + + @memo + add1664(a: number, b: number): number { + return a + b; + } + + @memo + add1665(a: number, b: number): number { + return a + b; + } + + @memo + add1666(a: number, b: number): number { + return a + b; + } + + @memo + add1667(a: number, b: number): number { + return a + b; + } + + @memo + add1668(a: number, b: number): number { + return a + b; + } + + @memo + add1669(a: number, b: number): number { + return a + b; + } + + @memo + add1670(a: number, b: number): number { + return a + b; + } + + @memo + add1671(a: number, b: number): number { + return a + b; + } + + @memo + add1672(a: number, b: number): number { + return a + b; + } + + @memo + add1673(a: number, b: number): number { + return a + b; + } + + @memo + add1674(a: number, b: number): number { + return a + b; + } + + @memo + add1675(a: number, b: number): number { + return a + b; + } + + @memo + add1676(a: number, b: number): number { + return a + b; + } + + @memo + add1677(a: number, b: number): number { + return a + b; + } + + @memo + add1678(a: number, b: number): number { + return a + b; + } + + @memo + add1679(a: number, b: number): number { + return a + b; + } + + @memo + add1680(a: number, b: number): number { + return a + b; + } + + @memo + add1681(a: number, b: number): number { + return a + b; + } + + @memo + add1682(a: number, b: number): number { + return a + b; + } + + @memo + add1683(a: number, b: number): number { + return a + b; + } + + @memo + add1684(a: number, b: number): number { + return a + b; + } + + @memo + add1685(a: number, b: number): number { + return a + b; + } + + @memo + add1686(a: number, b: number): number { + return a + b; + } + + @memo + add1687(a: number, b: number): number { + return a + b; + } + + @memo + add1688(a: number, b: number): number { + return a + b; + } + + @memo + add1689(a: number, b: number): number { + return a + b; + } + + @memo + add1690(a: number, b: number): number { + return a + b; + } + + @memo + add1691(a: number, b: number): number { + return a + b; + } + + @memo + add1692(a: number, b: number): number { + return a + b; + } + + @memo + add1693(a: number, b: number): number { + return a + b; + } + + @memo + add1694(a: number, b: number): number { + return a + b; + } + + @memo + add1695(a: number, b: number): number { + return a + b; + } + + @memo + add1696(a: number, b: number): number { + return a + b; + } + + @memo + add1697(a: number, b: number): number { + return a + b; + } + + @memo + add1698(a: number, b: number): number { + return a + b; + } + + @memo + add1699(a: number, b: number): number { + return a + b; + } + + @memo + add1700(a: number, b: number): number { + return a + b; + } + + @memo + add1701(a: number, b: number): number { + return a + b; + } + + @memo + add1702(a: number, b: number): number { + return a + b; + } + + @memo + add1703(a: number, b: number): number { + return a + b; + } + + @memo + add1704(a: number, b: number): number { + return a + b; + } + + @memo + add1705(a: number, b: number): number { + return a + b; + } + + @memo + add1706(a: number, b: number): number { + return a + b; + } + + @memo + add1707(a: number, b: number): number { + return a + b; + } + + @memo + add1708(a: number, b: number): number { + return a + b; + } + + @memo + add1709(a: number, b: number): number { + return a + b; + } + + @memo + add1710(a: number, b: number): number { + return a + b; + } + + @memo + add1711(a: number, b: number): number { + return a + b; + } + + @memo + add1712(a: number, b: number): number { + return a + b; + } + + @memo + add1713(a: number, b: number): number { + return a + b; + } + + @memo + add1714(a: number, b: number): number { + return a + b; + } + + @memo + add1715(a: number, b: number): number { + return a + b; + } + + @memo + add1716(a: number, b: number): number { + return a + b; + } + + @memo + add1717(a: number, b: number): number { + return a + b; + } + + @memo + add1718(a: number, b: number): number { + return a + b; + } + + @memo + add1719(a: number, b: number): number { + return a + b; + } + + @memo + add1720(a: number, b: number): number { + return a + b; + } + + @memo + add1721(a: number, b: number): number { + return a + b; + } + + @memo + add1722(a: number, b: number): number { + return a + b; + } + + @memo + add1723(a: number, b: number): number { + return a + b; + } + + @memo + add1724(a: number, b: number): number { + return a + b; + } + + @memo + add1725(a: number, b: number): number { + return a + b; + } + + @memo + add1726(a: number, b: number): number { + return a + b; + } + + @memo + add1727(a: number, b: number): number { + return a + b; + } + + @memo + add1728(a: number, b: number): number { + return a + b; + } + + @memo + add1729(a: number, b: number): number { + return a + b; + } + + @memo + add1730(a: number, b: number): number { + return a + b; + } + + @memo + add1731(a: number, b: number): number { + return a + b; + } + + @memo + add1732(a: number, b: number): number { + return a + b; + } + + @memo + add1733(a: number, b: number): number { + return a + b; + } + + @memo + add1734(a: number, b: number): number { + return a + b; + } + + @memo + add1735(a: number, b: number): number { + return a + b; + } + + @memo + add1736(a: number, b: number): number { + return a + b; + } + + @memo + add1737(a: number, b: number): number { + return a + b; + } + + @memo + add1738(a: number, b: number): number { + return a + b; + } + + @memo + add1739(a: number, b: number): number { + return a + b; + } + + @memo + add1740(a: number, b: number): number { + return a + b; + } + + @memo + add1741(a: number, b: number): number { + return a + b; + } + + @memo + add1742(a: number, b: number): number { + return a + b; + } + + @memo + add1743(a: number, b: number): number { + return a + b; + } + + @memo + add1744(a: number, b: number): number { + return a + b; + } + + @memo + add1745(a: number, b: number): number { + return a + b; + } + + @memo + add1746(a: number, b: number): number { + return a + b; + } + + @memo + add1747(a: number, b: number): number { + return a + b; + } + + @memo + add1748(a: number, b: number): number { + return a + b; + } + + @memo + add1749(a: number, b: number): number { + return a + b; + } + + @memo + add1750(a: number, b: number): number { + return a + b; + } + + @memo + add1751(a: number, b: number): number { + return a + b; + } + + @memo + add1752(a: number, b: number): number { + return a + b; + } + + @memo + add1753(a: number, b: number): number { + return a + b; + } + + @memo + add1754(a: number, b: number): number { + return a + b; + } + + @memo + add1755(a: number, b: number): number { + return a + b; + } + + @memo + add1756(a: number, b: number): number { + return a + b; + } + + @memo + add1757(a: number, b: number): number { + return a + b; + } + + @memo + add1758(a: number, b: number): number { + return a + b; + } + + @memo + add1759(a: number, b: number): number { + return a + b; + } + + @memo + add1760(a: number, b: number): number { + return a + b; + } + + @memo + add1761(a: number, b: number): number { + return a + b; + } + + @memo + add1762(a: number, b: number): number { + return a + b; + } + + @memo + add1763(a: number, b: number): number { + return a + b; + } + + @memo + add1764(a: number, b: number): number { + return a + b; + } + + @memo + add1765(a: number, b: number): number { + return a + b; + } + + @memo + add1766(a: number, b: number): number { + return a + b; + } + + @memo + add1767(a: number, b: number): number { + return a + b; + } + + @memo + add1768(a: number, b: number): number { + return a + b; + } + + @memo + add1769(a: number, b: number): number { + return a + b; + } + + @memo + add1770(a: number, b: number): number { + return a + b; + } + + @memo + add1771(a: number, b: number): number { + return a + b; + } + + @memo + add1772(a: number, b: number): number { + return a + b; + } + + @memo + add1773(a: number, b: number): number { + return a + b; + } + + @memo + add1774(a: number, b: number): number { + return a + b; + } + + @memo + add1775(a: number, b: number): number { + return a + b; + } + + @memo + add1776(a: number, b: number): number { + return a + b; + } + + @memo + add1777(a: number, b: number): number { + return a + b; + } + + @memo + add1778(a: number, b: number): number { + return a + b; + } + + @memo + add1779(a: number, b: number): number { + return a + b; + } + + @memo + add1780(a: number, b: number): number { + return a + b; + } + + @memo + add1781(a: number, b: number): number { + return a + b; + } + + @memo + add1782(a: number, b: number): number { + return a + b; + } + + @memo + add1783(a: number, b: number): number { + return a + b; + } + + @memo + add1784(a: number, b: number): number { + return a + b; + } + + @memo + add1785(a: number, b: number): number { + return a + b; + } + + @memo + add1786(a: number, b: number): number { + return a + b; + } + + @memo + add1787(a: number, b: number): number { + return a + b; + } + + @memo + add1788(a: number, b: number): number { + return a + b; + } + + @memo + add1789(a: number, b: number): number { + return a + b; + } + + @memo + add1790(a: number, b: number): number { + return a + b; + } + + @memo + add1791(a: number, b: number): number { + return a + b; + } + + @memo + add1792(a: number, b: number): number { + return a + b; + } + + @memo + add1793(a: number, b: number): number { + return a + b; + } + + @memo + add1794(a: number, b: number): number { + return a + b; + } + + @memo + add1795(a: number, b: number): number { + return a + b; + } + + @memo + add1796(a: number, b: number): number { + return a + b; + } + + @memo + add1797(a: number, b: number): number { + return a + b; + } + + @memo + add1798(a: number, b: number): number { + return a + b; + } + + @memo + add1799(a: number, b: number): number { + return a + b; + } + + @memo + add1800(a: number, b: number): number { + return a + b; + } + + @memo + add1801(a: number, b: number): number { + return a + b; + } + + @memo + add1802(a: number, b: number): number { + return a + b; + } + + @memo + add1803(a: number, b: number): number { + return a + b; + } + + @memo + add1804(a: number, b: number): number { + return a + b; + } + + @memo + add1805(a: number, b: number): number { + return a + b; + } + + @memo + add1806(a: number, b: number): number { + return a + b; + } + + @memo + add1807(a: number, b: number): number { + return a + b; + } + + @memo + add1808(a: number, b: number): number { + return a + b; + } + + @memo + add1809(a: number, b: number): number { + return a + b; + } + + @memo + add1810(a: number, b: number): number { + return a + b; + } + + @memo + add1811(a: number, b: number): number { + return a + b; + } + + @memo + add1812(a: number, b: number): number { + return a + b; + } + + @memo + add1813(a: number, b: number): number { + return a + b; + } + + @memo + add1814(a: number, b: number): number { + return a + b; + } + + @memo + add1815(a: number, b: number): number { + return a + b; + } + + @memo + add1816(a: number, b: number): number { + return a + b; + } + + @memo + add1817(a: number, b: number): number { + return a + b; + } + + @memo + add1818(a: number, b: number): number { + return a + b; + } + + @memo + add1819(a: number, b: number): number { + return a + b; + } + + @memo + add1820(a: number, b: number): number { + return a + b; + } + + @memo + add1821(a: number, b: number): number { + return a + b; + } + + @memo + add1822(a: number, b: number): number { + return a + b; + } + + @memo + add1823(a: number, b: number): number { + return a + b; + } + + @memo + add1824(a: number, b: number): number { + return a + b; + } + + @memo + add1825(a: number, b: number): number { + return a + b; + } + + @memo + add1826(a: number, b: number): number { + return a + b; + } + + @memo + add1827(a: number, b: number): number { + return a + b; + } + + @memo + add1828(a: number, b: number): number { + return a + b; + } + + @memo + add1829(a: number, b: number): number { + return a + b; + } + + @memo + add1830(a: number, b: number): number { + return a + b; + } + + @memo + add1831(a: number, b: number): number { + return a + b; + } + + @memo + add1832(a: number, b: number): number { + return a + b; + } + + @memo + add1833(a: number, b: number): number { + return a + b; + } + + @memo + add1834(a: number, b: number): number { + return a + b; + } + + @memo + add1835(a: number, b: number): number { + return a + b; + } + + @memo + add1836(a: number, b: number): number { + return a + b; + } + + @memo + add1837(a: number, b: number): number { + return a + b; + } + + @memo + add1838(a: number, b: number): number { + return a + b; + } + + @memo + add1839(a: number, b: number): number { + return a + b; + } + + @memo + add1840(a: number, b: number): number { + return a + b; + } + + @memo + add1841(a: number, b: number): number { + return a + b; + } + + @memo + add1842(a: number, b: number): number { + return a + b; + } + + @memo + add1843(a: number, b: number): number { + return a + b; + } + + @memo + add1844(a: number, b: number): number { + return a + b; + } + + @memo + add1845(a: number, b: number): number { + return a + b; + } + + @memo + add1846(a: number, b: number): number { + return a + b; + } + + @memo + add1847(a: number, b: number): number { + return a + b; + } + + @memo + add1848(a: number, b: number): number { + return a + b; + } + + @memo + add1849(a: number, b: number): number { + return a + b; + } + + @memo + add1850(a: number, b: number): number { + return a + b; + } + + @memo + add1851(a: number, b: number): number { + return a + b; + } + + @memo + add1852(a: number, b: number): number { + return a + b; + } + + @memo + add1853(a: number, b: number): number { + return a + b; + } + + @memo + add1854(a: number, b: number): number { + return a + b; + } + + @memo + add1855(a: number, b: number): number { + return a + b; + } + + @memo + add1856(a: number, b: number): number { + return a + b; + } + + @memo + add1857(a: number, b: number): number { + return a + b; + } + + @memo + add1858(a: number, b: number): number { + return a + b; + } + + @memo + add1859(a: number, b: number): number { + return a + b; + } + + @memo + add1860(a: number, b: number): number { + return a + b; + } + + @memo + add1861(a: number, b: number): number { + return a + b; + } + + @memo + add1862(a: number, b: number): number { + return a + b; + } + + @memo + add1863(a: number, b: number): number { + return a + b; + } + + @memo + add1864(a: number, b: number): number { + return a + b; + } + + @memo + add1865(a: number, b: number): number { + return a + b; + } + + @memo + add1866(a: number, b: number): number { + return a + b; + } + + @memo + add1867(a: number, b: number): number { + return a + b; + } + + @memo + add1868(a: number, b: number): number { + return a + b; + } + + @memo + add1869(a: number, b: number): number { + return a + b; + } + + @memo + add1870(a: number, b: number): number { + return a + b; + } + + @memo + add1871(a: number, b: number): number { + return a + b; + } + + @memo + add1872(a: number, b: number): number { + return a + b; + } + + @memo + add1873(a: number, b: number): number { + return a + b; + } + + @memo + add1874(a: number, b: number): number { + return a + b; + } + + @memo + add1875(a: number, b: number): number { + return a + b; + } + + @memo + add1876(a: number, b: number): number { + return a + b; + } + + @memo + add1877(a: number, b: number): number { + return a + b; + } + + @memo + add1878(a: number, b: number): number { + return a + b; + } + + @memo + add1879(a: number, b: number): number { + return a + b; + } + + @memo + add1880(a: number, b: number): number { + return a + b; + } + + @memo + add1881(a: number, b: number): number { + return a + b; + } + + @memo + add1882(a: number, b: number): number { + return a + b; + } + + @memo + add1883(a: number, b: number): number { + return a + b; + } + + @memo + add1884(a: number, b: number): number { + return a + b; + } + + @memo + add1885(a: number, b: number): number { + return a + b; + } + + @memo + add1886(a: number, b: number): number { + return a + b; + } + + @memo + add1887(a: number, b: number): number { + return a + b; + } + + @memo + add1888(a: number, b: number): number { + return a + b; + } + + @memo + add1889(a: number, b: number): number { + return a + b; + } + + @memo + add1890(a: number, b: number): number { + return a + b; + } + + @memo + add1891(a: number, b: number): number { + return a + b; + } + + @memo + add1892(a: number, b: number): number { + return a + b; + } + + @memo + add1893(a: number, b: number): number { + return a + b; + } + + @memo + add1894(a: number, b: number): number { + return a + b; + } + + @memo + add1895(a: number, b: number): number { + return a + b; + } + + @memo + add1896(a: number, b: number): number { + return a + b; + } + + @memo + add1897(a: number, b: number): number { + return a + b; + } + + @memo + add1898(a: number, b: number): number { + return a + b; + } + + @memo + add1899(a: number, b: number): number { + return a + b; + } + + @memo + add1900(a: number, b: number): number { + return a + b; + } + + @memo + add1901(a: number, b: number): number { + return a + b; + } + + @memo + add1902(a: number, b: number): number { + return a + b; + } + + @memo + add1903(a: number, b: number): number { + return a + b; + } + + @memo + add1904(a: number, b: number): number { + return a + b; + } + + @memo + add1905(a: number, b: number): number { + return a + b; + } + + @memo + add1906(a: number, b: number): number { + return a + b; + } + + @memo + add1907(a: number, b: number): number { + return a + b; + } + + @memo + add1908(a: number, b: number): number { + return a + b; + } + + @memo + add1909(a: number, b: number): number { + return a + b; + } + + @memo + add1910(a: number, b: number): number { + return a + b; + } + + @memo + add1911(a: number, b: number): number { + return a + b; + } + + @memo + add1912(a: number, b: number): number { + return a + b; + } + + @memo + add1913(a: number, b: number): number { + return a + b; + } + + @memo + add1914(a: number, b: number): number { + return a + b; + } + + @memo + add1915(a: number, b: number): number { + return a + b; + } + + @memo + add1916(a: number, b: number): number { + return a + b; + } + + @memo + add1917(a: number, b: number): number { + return a + b; + } + + @memo + add1918(a: number, b: number): number { + return a + b; + } + + @memo + add1919(a: number, b: number): number { + return a + b; + } + + @memo + add1920(a: number, b: number): number { + return a + b; + } + + @memo + add1921(a: number, b: number): number { + return a + b; + } + + @memo + add1922(a: number, b: number): number { + return a + b; + } + + @memo + add1923(a: number, b: number): number { + return a + b; + } + + @memo + add1924(a: number, b: number): number { + return a + b; + } + + @memo + add1925(a: number, b: number): number { + return a + b; + } + + @memo + add1926(a: number, b: number): number { + return a + b; + } + + @memo + add1927(a: number, b: number): number { + return a + b; + } + + @memo + add1928(a: number, b: number): number { + return a + b; + } + + @memo + add1929(a: number, b: number): number { + return a + b; + } + + @memo + add1930(a: number, b: number): number { + return a + b; + } + + @memo + add1931(a: number, b: number): number { + return a + b; + } + + @memo + add1932(a: number, b: number): number { + return a + b; + } + + @memo + add1933(a: number, b: number): number { + return a + b; + } + + @memo + add1934(a: number, b: number): number { + return a + b; + } + + @memo + add1935(a: number, b: number): number { + return a + b; + } + + @memo + add1936(a: number, b: number): number { + return a + b; + } + + @memo + add1937(a: number, b: number): number { + return a + b; + } + + @memo + add1938(a: number, b: number): number { + return a + b; + } + + @memo + add1939(a: number, b: number): number { + return a + b; + } + + @memo + add1940(a: number, b: number): number { + return a + b; + } + + @memo + add1941(a: number, b: number): number { + return a + b; + } + + @memo + add1942(a: number, b: number): number { + return a + b; + } + + @memo + add1943(a: number, b: number): number { + return a + b; + } + + @memo + add1944(a: number, b: number): number { + return a + b; + } + + @memo + add1945(a: number, b: number): number { + return a + b; + } + + @memo + add1946(a: number, b: number): number { + return a + b; + } + + @memo + add1947(a: number, b: number): number { + return a + b; + } + + @memo + add1948(a: number, b: number): number { + return a + b; + } + + @memo + add1949(a: number, b: number): number { + return a + b; + } + + @memo + add1950(a: number, b: number): number { + return a + b; + } + + @memo + add1951(a: number, b: number): number { + return a + b; + } + + @memo + add1952(a: number, b: number): number { + return a + b; + } + + @memo + add1953(a: number, b: number): number { + return a + b; + } + + @memo + add1954(a: number, b: number): number { + return a + b; + } + + @memo + add1955(a: number, b: number): number { + return a + b; + } + + @memo + add1956(a: number, b: number): number { + return a + b; + } + + @memo + add1957(a: number, b: number): number { + return a + b; + } + + @memo + add1958(a: number, b: number): number { + return a + b; + } + + @memo + add1959(a: number, b: number): number { + return a + b; + } + + @memo + add1960(a: number, b: number): number { + return a + b; + } + + @memo + add1961(a: number, b: number): number { + return a + b; + } + + @memo + add1962(a: number, b: number): number { + return a + b; + } + + @memo + add1963(a: number, b: number): number { + return a + b; + } + + @memo + add1964(a: number, b: number): number { + return a + b; + } + + @memo + add1965(a: number, b: number): number { + return a + b; + } + + @memo + add1966(a: number, b: number): number { + return a + b; + } + + @memo + add1967(a: number, b: number): number { + return a + b; + } + + @memo + add1968(a: number, b: number): number { + return a + b; + } + + @memo + add1969(a: number, b: number): number { + return a + b; + } + + @memo + add1970(a: number, b: number): number { + return a + b; + } + + @memo + add1971(a: number, b: number): number { + return a + b; + } + + @memo + add1972(a: number, b: number): number { + return a + b; + } + + @memo + add1973(a: number, b: number): number { + return a + b; + } + + @memo + add1974(a: number, b: number): number { + return a + b; + } + + @memo + add1975(a: number, b: number): number { + return a + b; + } + + @memo + add1976(a: number, b: number): number { + return a + b; + } + + @memo + add1977(a: number, b: number): number { + return a + b; + } + + @memo + add1978(a: number, b: number): number { + return a + b; + } + + @memo + add1979(a: number, b: number): number { + return a + b; + } + + @memo + add1980(a: number, b: number): number { + return a + b; + } + + @memo + add1981(a: number, b: number): number { + return a + b; + } + + @memo + add1982(a: number, b: number): number { + return a + b; + } + + @memo + add1983(a: number, b: number): number { + return a + b; + } + + @memo + add1984(a: number, b: number): number { + return a + b; + } + + @memo + add1985(a: number, b: number): number { + return a + b; + } + + @memo + add1986(a: number, b: number): number { + return a + b; + } + + @memo + add1987(a: number, b: number): number { + return a + b; + } + + @memo + add1988(a: number, b: number): number { + return a + b; + } + + @memo + add1989(a: number, b: number): number { + return a + b; + } + + @memo + add1990(a: number, b: number): number { + return a + b; + } + + @memo + add1991(a: number, b: number): number { + return a + b; + } + + @memo + add1992(a: number, b: number): number { + return a + b; + } + + @memo + add1993(a: number, b: number): number { + return a + b; + } + + @memo + add1994(a: number, b: number): number { + return a + b; + } + + @memo + add1995(a: number, b: number): number { + return a + b; + } + + @memo + add1996(a: number, b: number): number { + return a + b; + } + + @memo + add1997(a: number, b: number): number { + return a + b; + } + + @memo + add1998(a: number, b: number): number { + return a + b; + } + + @memo + add1999(a: number, b: number): number { + return a + b; + } + + + build() { + Column() { + Button('Click me!') + .fontSize(30) + .fontWeight(FontWeight.Bold) + .onClick((e:ClickEvent) => { + this.num = this.add0(this.num, this.num); + this.num = this.add1(this.num, this.num); + this.num = this.add2(this.num, this.num); + this.num = this.add3(this.num, this.num); + this.num = this.add4(this.num, this.num); + this.num = this.add5(this.num, this.num); + this.num = this.add6(this.num, this.num); + this.num = this.add7(this.num, this.num); + this.num = this.add8(this.num, this.num); + this.num = this.add9(this.num, this.num); + this.num = this.add10(this.num, this.num); + this.num = this.add11(this.num, this.num); + this.num = this.add12(this.num, this.num); + this.num = this.add13(this.num, this.num); + this.num = this.add14(this.num, this.num); + this.num = this.add15(this.num, this.num); + this.num = this.add16(this.num, this.num); + this.num = this.add17(this.num, this.num); + this.num = this.add18(this.num, this.num); + this.num = this.add19(this.num, this.num); + this.num = this.add20(this.num, this.num); + this.num = this.add21(this.num, this.num); + this.num = this.add22(this.num, this.num); + this.num = this.add23(this.num, this.num); + this.num = this.add24(this.num, this.num); + this.num = this.add25(this.num, this.num); + this.num = this.add26(this.num, this.num); + this.num = this.add27(this.num, this.num); + this.num = this.add28(this.num, this.num); + this.num = this.add29(this.num, this.num); + this.num = this.add30(this.num, this.num); + this.num = this.add31(this.num, this.num); + this.num = this.add32(this.num, this.num); + this.num = this.add33(this.num, this.num); + this.num = this.add34(this.num, this.num); + this.num = this.add35(this.num, this.num); + this.num = this.add36(this.num, this.num); + this.num = this.add37(this.num, this.num); + this.num = this.add38(this.num, this.num); + this.num = this.add39(this.num, this.num); + this.num = this.add40(this.num, this.num); + this.num = this.add41(this.num, this.num); + this.num = this.add42(this.num, this.num); + this.num = this.add43(this.num, this.num); + this.num = this.add44(this.num, this.num); + this.num = this.add45(this.num, this.num); + this.num = this.add46(this.num, this.num); + this.num = this.add47(this.num, this.num); + this.num = this.add48(this.num, this.num); + this.num = this.add49(this.num, this.num); + this.num = this.add50(this.num, this.num); + this.num = this.add51(this.num, this.num); + this.num = this.add52(this.num, this.num); + this.num = this.add53(this.num, this.num); + this.num = this.add54(this.num, this.num); + this.num = this.add55(this.num, this.num); + this.num = this.add56(this.num, this.num); + this.num = this.add57(this.num, this.num); + this.num = this.add58(this.num, this.num); + this.num = this.add59(this.num, this.num); + this.num = this.add60(this.num, this.num); + this.num = this.add61(this.num, this.num); + this.num = this.add62(this.num, this.num); + this.num = this.add63(this.num, this.num); + this.num = this.add64(this.num, this.num); + this.num = this.add65(this.num, this.num); + this.num = this.add66(this.num, this.num); + this.num = this.add67(this.num, this.num); + this.num = this.add68(this.num, this.num); + this.num = this.add69(this.num, this.num); + this.num = this.add70(this.num, this.num); + this.num = this.add71(this.num, this.num); + this.num = this.add72(this.num, this.num); + this.num = this.add73(this.num, this.num); + this.num = this.add74(this.num, this.num); + this.num = this.add75(this.num, this.num); + this.num = this.add76(this.num, this.num); + this.num = this.add77(this.num, this.num); + this.num = this.add78(this.num, this.num); + this.num = this.add79(this.num, this.num); + this.num = this.add80(this.num, this.num); + this.num = this.add81(this.num, this.num); + this.num = this.add82(this.num, this.num); + this.num = this.add83(this.num, this.num); + this.num = this.add84(this.num, this.num); + this.num = this.add85(this.num, this.num); + this.num = this.add86(this.num, this.num); + this.num = this.add87(this.num, this.num); + this.num = this.add88(this.num, this.num); + this.num = this.add89(this.num, this.num); + this.num = this.add90(this.num, this.num); + this.num = this.add91(this.num, this.num); + this.num = this.add92(this.num, this.num); + this.num = this.add93(this.num, this.num); + this.num = this.add94(this.num, this.num); + this.num = this.add95(this.num, this.num); + this.num = this.add96(this.num, this.num); + this.num = this.add97(this.num, this.num); + this.num = this.add98(this.num, this.num); + this.num = this.add99(this.num, this.num); + this.num = this.add100(this.num, this.num); + this.num = this.add101(this.num, this.num); + this.num = this.add102(this.num, this.num); + this.num = this.add103(this.num, this.num); + this.num = this.add104(this.num, this.num); + this.num = this.add105(this.num, this.num); + this.num = this.add106(this.num, this.num); + this.num = this.add107(this.num, this.num); + this.num = this.add108(this.num, this.num); + this.num = this.add109(this.num, this.num); + this.num = this.add110(this.num, this.num); + this.num = this.add111(this.num, this.num); + this.num = this.add112(this.num, this.num); + this.num = this.add113(this.num, this.num); + this.num = this.add114(this.num, this.num); + this.num = this.add115(this.num, this.num); + this.num = this.add116(this.num, this.num); + this.num = this.add117(this.num, this.num); + this.num = this.add118(this.num, this.num); + this.num = this.add119(this.num, this.num); + this.num = this.add120(this.num, this.num); + this.num = this.add121(this.num, this.num); + this.num = this.add122(this.num, this.num); + this.num = this.add123(this.num, this.num); + this.num = this.add124(this.num, this.num); + this.num = this.add125(this.num, this.num); + this.num = this.add126(this.num, this.num); + this.num = this.add127(this.num, this.num); + this.num = this.add128(this.num, this.num); + this.num = this.add129(this.num, this.num); + this.num = this.add130(this.num, this.num); + this.num = this.add131(this.num, this.num); + this.num = this.add132(this.num, this.num); + this.num = this.add133(this.num, this.num); + this.num = this.add134(this.num, this.num); + this.num = this.add135(this.num, this.num); + this.num = this.add136(this.num, this.num); + this.num = this.add137(this.num, this.num); + this.num = this.add138(this.num, this.num); + this.num = this.add139(this.num, this.num); + this.num = this.add140(this.num, this.num); + this.num = this.add141(this.num, this.num); + this.num = this.add142(this.num, this.num); + this.num = this.add143(this.num, this.num); + this.num = this.add144(this.num, this.num); + this.num = this.add145(this.num, this.num); + this.num = this.add146(this.num, this.num); + this.num = this.add147(this.num, this.num); + this.num = this.add148(this.num, this.num); + this.num = this.add149(this.num, this.num); + this.num = this.add150(this.num, this.num); + this.num = this.add151(this.num, this.num); + this.num = this.add152(this.num, this.num); + this.num = this.add153(this.num, this.num); + this.num = this.add154(this.num, this.num); + this.num = this.add155(this.num, this.num); + this.num = this.add156(this.num, this.num); + this.num = this.add157(this.num, this.num); + this.num = this.add158(this.num, this.num); + this.num = this.add159(this.num, this.num); + this.num = this.add160(this.num, this.num); + this.num = this.add161(this.num, this.num); + this.num = this.add162(this.num, this.num); + this.num = this.add163(this.num, this.num); + this.num = this.add164(this.num, this.num); + this.num = this.add165(this.num, this.num); + this.num = this.add166(this.num, this.num); + this.num = this.add167(this.num, this.num); + this.num = this.add168(this.num, this.num); + this.num = this.add169(this.num, this.num); + this.num = this.add170(this.num, this.num); + this.num = this.add171(this.num, this.num); + this.num = this.add172(this.num, this.num); + this.num = this.add173(this.num, this.num); + this.num = this.add174(this.num, this.num); + this.num = this.add175(this.num, this.num); + this.num = this.add176(this.num, this.num); + this.num = this.add177(this.num, this.num); + this.num = this.add178(this.num, this.num); + this.num = this.add179(this.num, this.num); + this.num = this.add180(this.num, this.num); + this.num = this.add181(this.num, this.num); + this.num = this.add182(this.num, this.num); + this.num = this.add183(this.num, this.num); + this.num = this.add184(this.num, this.num); + this.num = this.add185(this.num, this.num); + this.num = this.add186(this.num, this.num); + this.num = this.add187(this.num, this.num); + this.num = this.add188(this.num, this.num); + this.num = this.add189(this.num, this.num); + this.num = this.add190(this.num, this.num); + this.num = this.add191(this.num, this.num); + this.num = this.add192(this.num, this.num); + this.num = this.add193(this.num, this.num); + this.num = this.add194(this.num, this.num); + this.num = this.add195(this.num, this.num); + this.num = this.add196(this.num, this.num); + this.num = this.add197(this.num, this.num); + this.num = this.add198(this.num, this.num); + this.num = this.add199(this.num, this.num); + this.num = this.add200(this.num, this.num); + this.num = this.add201(this.num, this.num); + this.num = this.add202(this.num, this.num); + this.num = this.add203(this.num, this.num); + this.num = this.add204(this.num, this.num); + this.num = this.add205(this.num, this.num); + this.num = this.add206(this.num, this.num); + this.num = this.add207(this.num, this.num); + this.num = this.add208(this.num, this.num); + this.num = this.add209(this.num, this.num); + this.num = this.add210(this.num, this.num); + this.num = this.add211(this.num, this.num); + this.num = this.add212(this.num, this.num); + this.num = this.add213(this.num, this.num); + this.num = this.add214(this.num, this.num); + this.num = this.add215(this.num, this.num); + this.num = this.add216(this.num, this.num); + this.num = this.add217(this.num, this.num); + this.num = this.add218(this.num, this.num); + this.num = this.add219(this.num, this.num); + this.num = this.add220(this.num, this.num); + this.num = this.add221(this.num, this.num); + this.num = this.add222(this.num, this.num); + this.num = this.add223(this.num, this.num); + this.num = this.add224(this.num, this.num); + this.num = this.add225(this.num, this.num); + this.num = this.add226(this.num, this.num); + this.num = this.add227(this.num, this.num); + this.num = this.add228(this.num, this.num); + this.num = this.add229(this.num, this.num); + this.num = this.add230(this.num, this.num); + this.num = this.add231(this.num, this.num); + this.num = this.add232(this.num, this.num); + this.num = this.add233(this.num, this.num); + this.num = this.add234(this.num, this.num); + this.num = this.add235(this.num, this.num); + this.num = this.add236(this.num, this.num); + this.num = this.add237(this.num, this.num); + this.num = this.add238(this.num, this.num); + this.num = this.add239(this.num, this.num); + this.num = this.add240(this.num, this.num); + this.num = this.add241(this.num, this.num); + this.num = this.add242(this.num, this.num); + this.num = this.add243(this.num, this.num); + this.num = this.add244(this.num, this.num); + this.num = this.add245(this.num, this.num); + this.num = this.add246(this.num, this.num); + this.num = this.add247(this.num, this.num); + this.num = this.add248(this.num, this.num); + this.num = this.add249(this.num, this.num); + this.num = this.add250(this.num, this.num); + this.num = this.add251(this.num, this.num); + this.num = this.add252(this.num, this.num); + this.num = this.add253(this.num, this.num); + this.num = this.add254(this.num, this.num); + this.num = this.add255(this.num, this.num); + this.num = this.add256(this.num, this.num); + this.num = this.add257(this.num, this.num); + this.num = this.add258(this.num, this.num); + this.num = this.add259(this.num, this.num); + this.num = this.add260(this.num, this.num); + this.num = this.add261(this.num, this.num); + this.num = this.add262(this.num, this.num); + this.num = this.add263(this.num, this.num); + this.num = this.add264(this.num, this.num); + this.num = this.add265(this.num, this.num); + this.num = this.add266(this.num, this.num); + this.num = this.add267(this.num, this.num); + this.num = this.add268(this.num, this.num); + this.num = this.add269(this.num, this.num); + this.num = this.add270(this.num, this.num); + this.num = this.add271(this.num, this.num); + this.num = this.add272(this.num, this.num); + this.num = this.add273(this.num, this.num); + this.num = this.add274(this.num, this.num); + this.num = this.add275(this.num, this.num); + this.num = this.add276(this.num, this.num); + this.num = this.add277(this.num, this.num); + this.num = this.add278(this.num, this.num); + this.num = this.add279(this.num, this.num); + this.num = this.add280(this.num, this.num); + this.num = this.add281(this.num, this.num); + this.num = this.add282(this.num, this.num); + this.num = this.add283(this.num, this.num); + this.num = this.add284(this.num, this.num); + this.num = this.add285(this.num, this.num); + this.num = this.add286(this.num, this.num); + this.num = this.add287(this.num, this.num); + this.num = this.add288(this.num, this.num); + this.num = this.add289(this.num, this.num); + this.num = this.add290(this.num, this.num); + this.num = this.add291(this.num, this.num); + this.num = this.add292(this.num, this.num); + this.num = this.add293(this.num, this.num); + this.num = this.add294(this.num, this.num); + this.num = this.add295(this.num, this.num); + this.num = this.add296(this.num, this.num); + this.num = this.add297(this.num, this.num); + this.num = this.add298(this.num, this.num); + this.num = this.add299(this.num, this.num); + this.num = this.add300(this.num, this.num); + this.num = this.add301(this.num, this.num); + this.num = this.add302(this.num, this.num); + this.num = this.add303(this.num, this.num); + this.num = this.add304(this.num, this.num); + this.num = this.add305(this.num, this.num); + this.num = this.add306(this.num, this.num); + this.num = this.add307(this.num, this.num); + this.num = this.add308(this.num, this.num); + this.num = this.add309(this.num, this.num); + this.num = this.add310(this.num, this.num); + this.num = this.add311(this.num, this.num); + this.num = this.add312(this.num, this.num); + this.num = this.add313(this.num, this.num); + this.num = this.add314(this.num, this.num); + this.num = this.add315(this.num, this.num); + this.num = this.add316(this.num, this.num); + this.num = this.add317(this.num, this.num); + this.num = this.add318(this.num, this.num); + this.num = this.add319(this.num, this.num); + this.num = this.add320(this.num, this.num); + this.num = this.add321(this.num, this.num); + this.num = this.add322(this.num, this.num); + this.num = this.add323(this.num, this.num); + this.num = this.add324(this.num, this.num); + this.num = this.add325(this.num, this.num); + this.num = this.add326(this.num, this.num); + this.num = this.add327(this.num, this.num); + this.num = this.add328(this.num, this.num); + this.num = this.add329(this.num, this.num); + this.num = this.add330(this.num, this.num); + this.num = this.add331(this.num, this.num); + this.num = this.add332(this.num, this.num); + this.num = this.add333(this.num, this.num); + this.num = this.add334(this.num, this.num); + this.num = this.add335(this.num, this.num); + this.num = this.add336(this.num, this.num); + this.num = this.add337(this.num, this.num); + this.num = this.add338(this.num, this.num); + this.num = this.add339(this.num, this.num); + this.num = this.add340(this.num, this.num); + this.num = this.add341(this.num, this.num); + this.num = this.add342(this.num, this.num); + this.num = this.add343(this.num, this.num); + this.num = this.add344(this.num, this.num); + this.num = this.add345(this.num, this.num); + this.num = this.add346(this.num, this.num); + this.num = this.add347(this.num, this.num); + this.num = this.add348(this.num, this.num); + this.num = this.add349(this.num, this.num); + this.num = this.add350(this.num, this.num); + this.num = this.add351(this.num, this.num); + this.num = this.add352(this.num, this.num); + this.num = this.add353(this.num, this.num); + this.num = this.add354(this.num, this.num); + this.num = this.add355(this.num, this.num); + this.num = this.add356(this.num, this.num); + this.num = this.add357(this.num, this.num); + this.num = this.add358(this.num, this.num); + this.num = this.add359(this.num, this.num); + this.num = this.add360(this.num, this.num); + this.num = this.add361(this.num, this.num); + this.num = this.add362(this.num, this.num); + this.num = this.add363(this.num, this.num); + this.num = this.add364(this.num, this.num); + this.num = this.add365(this.num, this.num); + this.num = this.add366(this.num, this.num); + this.num = this.add367(this.num, this.num); + this.num = this.add368(this.num, this.num); + this.num = this.add369(this.num, this.num); + this.num = this.add370(this.num, this.num); + this.num = this.add371(this.num, this.num); + this.num = this.add372(this.num, this.num); + this.num = this.add373(this.num, this.num); + this.num = this.add374(this.num, this.num); + this.num = this.add375(this.num, this.num); + this.num = this.add376(this.num, this.num); + this.num = this.add377(this.num, this.num); + this.num = this.add378(this.num, this.num); + this.num = this.add379(this.num, this.num); + this.num = this.add380(this.num, this.num); + this.num = this.add381(this.num, this.num); + this.num = this.add382(this.num, this.num); + this.num = this.add383(this.num, this.num); + this.num = this.add384(this.num, this.num); + this.num = this.add385(this.num, this.num); + this.num = this.add386(this.num, this.num); + this.num = this.add387(this.num, this.num); + this.num = this.add388(this.num, this.num); + this.num = this.add389(this.num, this.num); + this.num = this.add390(this.num, this.num); + this.num = this.add391(this.num, this.num); + this.num = this.add392(this.num, this.num); + this.num = this.add393(this.num, this.num); + this.num = this.add394(this.num, this.num); + this.num = this.add395(this.num, this.num); + this.num = this.add396(this.num, this.num); + this.num = this.add397(this.num, this.num); + this.num = this.add398(this.num, this.num); + this.num = this.add399(this.num, this.num); + this.num = this.add400(this.num, this.num); + this.num = this.add401(this.num, this.num); + this.num = this.add402(this.num, this.num); + this.num = this.add403(this.num, this.num); + this.num = this.add404(this.num, this.num); + this.num = this.add405(this.num, this.num); + this.num = this.add406(this.num, this.num); + this.num = this.add407(this.num, this.num); + this.num = this.add408(this.num, this.num); + this.num = this.add409(this.num, this.num); + this.num = this.add410(this.num, this.num); + this.num = this.add411(this.num, this.num); + this.num = this.add412(this.num, this.num); + this.num = this.add413(this.num, this.num); + this.num = this.add414(this.num, this.num); + this.num = this.add415(this.num, this.num); + this.num = this.add416(this.num, this.num); + this.num = this.add417(this.num, this.num); + this.num = this.add418(this.num, this.num); + this.num = this.add419(this.num, this.num); + this.num = this.add420(this.num, this.num); + this.num = this.add421(this.num, this.num); + this.num = this.add422(this.num, this.num); + this.num = this.add423(this.num, this.num); + this.num = this.add424(this.num, this.num); + this.num = this.add425(this.num, this.num); + this.num = this.add426(this.num, this.num); + this.num = this.add427(this.num, this.num); + this.num = this.add428(this.num, this.num); + this.num = this.add429(this.num, this.num); + this.num = this.add430(this.num, this.num); + this.num = this.add431(this.num, this.num); + this.num = this.add432(this.num, this.num); + this.num = this.add433(this.num, this.num); + this.num = this.add434(this.num, this.num); + this.num = this.add435(this.num, this.num); + this.num = this.add436(this.num, this.num); + this.num = this.add437(this.num, this.num); + this.num = this.add438(this.num, this.num); + this.num = this.add439(this.num, this.num); + this.num = this.add440(this.num, this.num); + this.num = this.add441(this.num, this.num); + this.num = this.add442(this.num, this.num); + this.num = this.add443(this.num, this.num); + this.num = this.add444(this.num, this.num); + this.num = this.add445(this.num, this.num); + this.num = this.add446(this.num, this.num); + this.num = this.add447(this.num, this.num); + this.num = this.add448(this.num, this.num); + this.num = this.add449(this.num, this.num); + this.num = this.add450(this.num, this.num); + this.num = this.add451(this.num, this.num); + this.num = this.add452(this.num, this.num); + this.num = this.add453(this.num, this.num); + this.num = this.add454(this.num, this.num); + this.num = this.add455(this.num, this.num); + this.num = this.add456(this.num, this.num); + this.num = this.add457(this.num, this.num); + this.num = this.add458(this.num, this.num); + this.num = this.add459(this.num, this.num); + this.num = this.add460(this.num, this.num); + this.num = this.add461(this.num, this.num); + this.num = this.add462(this.num, this.num); + this.num = this.add463(this.num, this.num); + this.num = this.add464(this.num, this.num); + this.num = this.add465(this.num, this.num); + this.num = this.add466(this.num, this.num); + this.num = this.add467(this.num, this.num); + this.num = this.add468(this.num, this.num); + this.num = this.add469(this.num, this.num); + this.num = this.add470(this.num, this.num); + this.num = this.add471(this.num, this.num); + this.num = this.add472(this.num, this.num); + this.num = this.add473(this.num, this.num); + this.num = this.add474(this.num, this.num); + this.num = this.add475(this.num, this.num); + this.num = this.add476(this.num, this.num); + this.num = this.add477(this.num, this.num); + this.num = this.add478(this.num, this.num); + this.num = this.add479(this.num, this.num); + this.num = this.add480(this.num, this.num); + this.num = this.add481(this.num, this.num); + this.num = this.add482(this.num, this.num); + this.num = this.add483(this.num, this.num); + this.num = this.add484(this.num, this.num); + this.num = this.add485(this.num, this.num); + this.num = this.add486(this.num, this.num); + this.num = this.add487(this.num, this.num); + this.num = this.add488(this.num, this.num); + this.num = this.add489(this.num, this.num); + this.num = this.add490(this.num, this.num); + this.num = this.add491(this.num, this.num); + this.num = this.add492(this.num, this.num); + this.num = this.add493(this.num, this.num); + this.num = this.add494(this.num, this.num); + this.num = this.add495(this.num, this.num); + this.num = this.add496(this.num, this.num); + this.num = this.add497(this.num, this.num); + this.num = this.add498(this.num, this.num); + this.num = this.add499(this.num, this.num); + this.num = this.add500(this.num, this.num); + this.num = this.add501(this.num, this.num); + this.num = this.add502(this.num, this.num); + this.num = this.add503(this.num, this.num); + this.num = this.add504(this.num, this.num); + this.num = this.add505(this.num, this.num); + this.num = this.add506(this.num, this.num); + this.num = this.add507(this.num, this.num); + this.num = this.add508(this.num, this.num); + this.num = this.add509(this.num, this.num); + this.num = this.add510(this.num, this.num); + this.num = this.add511(this.num, this.num); + this.num = this.add512(this.num, this.num); + this.num = this.add513(this.num, this.num); + this.num = this.add514(this.num, this.num); + this.num = this.add515(this.num, this.num); + this.num = this.add516(this.num, this.num); + this.num = this.add517(this.num, this.num); + this.num = this.add518(this.num, this.num); + this.num = this.add519(this.num, this.num); + this.num = this.add520(this.num, this.num); + this.num = this.add521(this.num, this.num); + this.num = this.add522(this.num, this.num); + this.num = this.add523(this.num, this.num); + this.num = this.add524(this.num, this.num); + this.num = this.add525(this.num, this.num); + this.num = this.add526(this.num, this.num); + this.num = this.add527(this.num, this.num); + this.num = this.add528(this.num, this.num); + this.num = this.add529(this.num, this.num); + this.num = this.add530(this.num, this.num); + this.num = this.add531(this.num, this.num); + this.num = this.add532(this.num, this.num); + this.num = this.add533(this.num, this.num); + this.num = this.add534(this.num, this.num); + this.num = this.add535(this.num, this.num); + this.num = this.add536(this.num, this.num); + this.num = this.add537(this.num, this.num); + this.num = this.add538(this.num, this.num); + this.num = this.add539(this.num, this.num); + this.num = this.add540(this.num, this.num); + this.num = this.add541(this.num, this.num); + this.num = this.add542(this.num, this.num); + this.num = this.add543(this.num, this.num); + this.num = this.add544(this.num, this.num); + this.num = this.add545(this.num, this.num); + this.num = this.add546(this.num, this.num); + this.num = this.add547(this.num, this.num); + this.num = this.add548(this.num, this.num); + this.num = this.add549(this.num, this.num); + this.num = this.add550(this.num, this.num); + this.num = this.add551(this.num, this.num); + this.num = this.add552(this.num, this.num); + this.num = this.add553(this.num, this.num); + this.num = this.add554(this.num, this.num); + this.num = this.add555(this.num, this.num); + this.num = this.add556(this.num, this.num); + this.num = this.add557(this.num, this.num); + this.num = this.add558(this.num, this.num); + this.num = this.add559(this.num, this.num); + this.num = this.add560(this.num, this.num); + this.num = this.add561(this.num, this.num); + this.num = this.add562(this.num, this.num); + this.num = this.add563(this.num, this.num); + this.num = this.add564(this.num, this.num); + this.num = this.add565(this.num, this.num); + this.num = this.add566(this.num, this.num); + this.num = this.add567(this.num, this.num); + this.num = this.add568(this.num, this.num); + this.num = this.add569(this.num, this.num); + this.num = this.add570(this.num, this.num); + this.num = this.add571(this.num, this.num); + this.num = this.add572(this.num, this.num); + this.num = this.add573(this.num, this.num); + this.num = this.add574(this.num, this.num); + this.num = this.add575(this.num, this.num); + this.num = this.add576(this.num, this.num); + this.num = this.add577(this.num, this.num); + this.num = this.add578(this.num, this.num); + this.num = this.add579(this.num, this.num); + this.num = this.add580(this.num, this.num); + this.num = this.add581(this.num, this.num); + this.num = this.add582(this.num, this.num); + this.num = this.add583(this.num, this.num); + this.num = this.add584(this.num, this.num); + this.num = this.add585(this.num, this.num); + this.num = this.add586(this.num, this.num); + this.num = this.add587(this.num, this.num); + this.num = this.add588(this.num, this.num); + this.num = this.add589(this.num, this.num); + this.num = this.add590(this.num, this.num); + this.num = this.add591(this.num, this.num); + this.num = this.add592(this.num, this.num); + this.num = this.add593(this.num, this.num); + this.num = this.add594(this.num, this.num); + this.num = this.add595(this.num, this.num); + this.num = this.add596(this.num, this.num); + this.num = this.add597(this.num, this.num); + this.num = this.add598(this.num, this.num); + this.num = this.add599(this.num, this.num); + this.num = this.add600(this.num, this.num); + this.num = this.add601(this.num, this.num); + this.num = this.add602(this.num, this.num); + this.num = this.add603(this.num, this.num); + this.num = this.add604(this.num, this.num); + this.num = this.add605(this.num, this.num); + this.num = this.add606(this.num, this.num); + this.num = this.add607(this.num, this.num); + this.num = this.add608(this.num, this.num); + this.num = this.add609(this.num, this.num); + this.num = this.add610(this.num, this.num); + this.num = this.add611(this.num, this.num); + this.num = this.add612(this.num, this.num); + this.num = this.add613(this.num, this.num); + this.num = this.add614(this.num, this.num); + this.num = this.add615(this.num, this.num); + this.num = this.add616(this.num, this.num); + this.num = this.add617(this.num, this.num); + this.num = this.add618(this.num, this.num); + this.num = this.add619(this.num, this.num); + this.num = this.add620(this.num, this.num); + this.num = this.add621(this.num, this.num); + this.num = this.add622(this.num, this.num); + this.num = this.add623(this.num, this.num); + this.num = this.add624(this.num, this.num); + this.num = this.add625(this.num, this.num); + this.num = this.add626(this.num, this.num); + this.num = this.add627(this.num, this.num); + this.num = this.add628(this.num, this.num); + this.num = this.add629(this.num, this.num); + this.num = this.add630(this.num, this.num); + this.num = this.add631(this.num, this.num); + this.num = this.add632(this.num, this.num); + this.num = this.add633(this.num, this.num); + this.num = this.add634(this.num, this.num); + this.num = this.add635(this.num, this.num); + this.num = this.add636(this.num, this.num); + this.num = this.add637(this.num, this.num); + this.num = this.add638(this.num, this.num); + this.num = this.add639(this.num, this.num); + this.num = this.add640(this.num, this.num); + this.num = this.add641(this.num, this.num); + this.num = this.add642(this.num, this.num); + this.num = this.add643(this.num, this.num); + this.num = this.add644(this.num, this.num); + this.num = this.add645(this.num, this.num); + this.num = this.add646(this.num, this.num); + this.num = this.add647(this.num, this.num); + this.num = this.add648(this.num, this.num); + this.num = this.add649(this.num, this.num); + this.num = this.add650(this.num, this.num); + this.num = this.add651(this.num, this.num); + this.num = this.add652(this.num, this.num); + this.num = this.add653(this.num, this.num); + this.num = this.add654(this.num, this.num); + this.num = this.add655(this.num, this.num); + this.num = this.add656(this.num, this.num); + this.num = this.add657(this.num, this.num); + this.num = this.add658(this.num, this.num); + this.num = this.add659(this.num, this.num); + this.num = this.add660(this.num, this.num); + this.num = this.add661(this.num, this.num); + this.num = this.add662(this.num, this.num); + this.num = this.add663(this.num, this.num); + this.num = this.add664(this.num, this.num); + this.num = this.add665(this.num, this.num); + this.num = this.add666(this.num, this.num); + this.num = this.add667(this.num, this.num); + this.num = this.add668(this.num, this.num); + this.num = this.add669(this.num, this.num); + this.num = this.add670(this.num, this.num); + this.num = this.add671(this.num, this.num); + this.num = this.add672(this.num, this.num); + this.num = this.add673(this.num, this.num); + this.num = this.add674(this.num, this.num); + this.num = this.add675(this.num, this.num); + this.num = this.add676(this.num, this.num); + this.num = this.add677(this.num, this.num); + this.num = this.add678(this.num, this.num); + this.num = this.add679(this.num, this.num); + this.num = this.add680(this.num, this.num); + this.num = this.add681(this.num, this.num); + this.num = this.add682(this.num, this.num); + this.num = this.add683(this.num, this.num); + this.num = this.add684(this.num, this.num); + this.num = this.add685(this.num, this.num); + this.num = this.add686(this.num, this.num); + this.num = this.add687(this.num, this.num); + this.num = this.add688(this.num, this.num); + this.num = this.add689(this.num, this.num); + this.num = this.add690(this.num, this.num); + this.num = this.add691(this.num, this.num); + this.num = this.add692(this.num, this.num); + this.num = this.add693(this.num, this.num); + this.num = this.add694(this.num, this.num); + this.num = this.add695(this.num, this.num); + this.num = this.add696(this.num, this.num); + this.num = this.add697(this.num, this.num); + this.num = this.add698(this.num, this.num); + this.num = this.add699(this.num, this.num); + this.num = this.add700(this.num, this.num); + this.num = this.add701(this.num, this.num); + this.num = this.add702(this.num, this.num); + this.num = this.add703(this.num, this.num); + this.num = this.add704(this.num, this.num); + this.num = this.add705(this.num, this.num); + this.num = this.add706(this.num, this.num); + this.num = this.add707(this.num, this.num); + this.num = this.add708(this.num, this.num); + this.num = this.add709(this.num, this.num); + this.num = this.add710(this.num, this.num); + this.num = this.add711(this.num, this.num); + this.num = this.add712(this.num, this.num); + this.num = this.add713(this.num, this.num); + this.num = this.add714(this.num, this.num); + this.num = this.add715(this.num, this.num); + this.num = this.add716(this.num, this.num); + this.num = this.add717(this.num, this.num); + this.num = this.add718(this.num, this.num); + this.num = this.add719(this.num, this.num); + this.num = this.add720(this.num, this.num); + this.num = this.add721(this.num, this.num); + this.num = this.add722(this.num, this.num); + this.num = this.add723(this.num, this.num); + this.num = this.add724(this.num, this.num); + this.num = this.add725(this.num, this.num); + this.num = this.add726(this.num, this.num); + this.num = this.add727(this.num, this.num); + this.num = this.add728(this.num, this.num); + this.num = this.add729(this.num, this.num); + this.num = this.add730(this.num, this.num); + this.num = this.add731(this.num, this.num); + this.num = this.add732(this.num, this.num); + this.num = this.add733(this.num, this.num); + this.num = this.add734(this.num, this.num); + this.num = this.add735(this.num, this.num); + this.num = this.add736(this.num, this.num); + this.num = this.add737(this.num, this.num); + this.num = this.add738(this.num, this.num); + this.num = this.add739(this.num, this.num); + this.num = this.add740(this.num, this.num); + this.num = this.add741(this.num, this.num); + this.num = this.add742(this.num, this.num); + this.num = this.add743(this.num, this.num); + this.num = this.add744(this.num, this.num); + this.num = this.add745(this.num, this.num); + this.num = this.add746(this.num, this.num); + this.num = this.add747(this.num, this.num); + this.num = this.add748(this.num, this.num); + this.num = this.add749(this.num, this.num); + this.num = this.add750(this.num, this.num); + this.num = this.add751(this.num, this.num); + this.num = this.add752(this.num, this.num); + this.num = this.add753(this.num, this.num); + this.num = this.add754(this.num, this.num); + this.num = this.add755(this.num, this.num); + this.num = this.add756(this.num, this.num); + this.num = this.add757(this.num, this.num); + this.num = this.add758(this.num, this.num); + this.num = this.add759(this.num, this.num); + this.num = this.add760(this.num, this.num); + this.num = this.add761(this.num, this.num); + this.num = this.add762(this.num, this.num); + this.num = this.add763(this.num, this.num); + this.num = this.add764(this.num, this.num); + this.num = this.add765(this.num, this.num); + this.num = this.add766(this.num, this.num); + this.num = this.add767(this.num, this.num); + this.num = this.add768(this.num, this.num); + this.num = this.add769(this.num, this.num); + this.num = this.add770(this.num, this.num); + this.num = this.add771(this.num, this.num); + this.num = this.add772(this.num, this.num); + this.num = this.add773(this.num, this.num); + this.num = this.add774(this.num, this.num); + this.num = this.add775(this.num, this.num); + this.num = this.add776(this.num, this.num); + this.num = this.add777(this.num, this.num); + this.num = this.add778(this.num, this.num); + this.num = this.add779(this.num, this.num); + this.num = this.add780(this.num, this.num); + this.num = this.add781(this.num, this.num); + this.num = this.add782(this.num, this.num); + this.num = this.add783(this.num, this.num); + this.num = this.add784(this.num, this.num); + this.num = this.add785(this.num, this.num); + this.num = this.add786(this.num, this.num); + this.num = this.add787(this.num, this.num); + this.num = this.add788(this.num, this.num); + this.num = this.add789(this.num, this.num); + this.num = this.add790(this.num, this.num); + this.num = this.add791(this.num, this.num); + this.num = this.add792(this.num, this.num); + this.num = this.add793(this.num, this.num); + this.num = this.add794(this.num, this.num); + this.num = this.add795(this.num, this.num); + this.num = this.add796(this.num, this.num); + this.num = this.add797(this.num, this.num); + this.num = this.add798(this.num, this.num); + this.num = this.add799(this.num, this.num); + this.num = this.add800(this.num, this.num); + this.num = this.add801(this.num, this.num); + this.num = this.add802(this.num, this.num); + this.num = this.add803(this.num, this.num); + this.num = this.add804(this.num, this.num); + this.num = this.add805(this.num, this.num); + this.num = this.add806(this.num, this.num); + this.num = this.add807(this.num, this.num); + this.num = this.add808(this.num, this.num); + this.num = this.add809(this.num, this.num); + this.num = this.add810(this.num, this.num); + this.num = this.add811(this.num, this.num); + this.num = this.add812(this.num, this.num); + this.num = this.add813(this.num, this.num); + this.num = this.add814(this.num, this.num); + this.num = this.add815(this.num, this.num); + this.num = this.add816(this.num, this.num); + this.num = this.add817(this.num, this.num); + this.num = this.add818(this.num, this.num); + this.num = this.add819(this.num, this.num); + this.num = this.add820(this.num, this.num); + this.num = this.add821(this.num, this.num); + this.num = this.add822(this.num, this.num); + this.num = this.add823(this.num, this.num); + this.num = this.add824(this.num, this.num); + this.num = this.add825(this.num, this.num); + this.num = this.add826(this.num, this.num); + this.num = this.add827(this.num, this.num); + this.num = this.add828(this.num, this.num); + this.num = this.add829(this.num, this.num); + this.num = this.add830(this.num, this.num); + this.num = this.add831(this.num, this.num); + this.num = this.add832(this.num, this.num); + this.num = this.add833(this.num, this.num); + this.num = this.add834(this.num, this.num); + this.num = this.add835(this.num, this.num); + this.num = this.add836(this.num, this.num); + this.num = this.add837(this.num, this.num); + this.num = this.add838(this.num, this.num); + this.num = this.add839(this.num, this.num); + this.num = this.add840(this.num, this.num); + this.num = this.add841(this.num, this.num); + this.num = this.add842(this.num, this.num); + this.num = this.add843(this.num, this.num); + this.num = this.add844(this.num, this.num); + this.num = this.add845(this.num, this.num); + this.num = this.add846(this.num, this.num); + this.num = this.add847(this.num, this.num); + this.num = this.add848(this.num, this.num); + this.num = this.add849(this.num, this.num); + this.num = this.add850(this.num, this.num); + this.num = this.add851(this.num, this.num); + this.num = this.add852(this.num, this.num); + this.num = this.add853(this.num, this.num); + this.num = this.add854(this.num, this.num); + this.num = this.add855(this.num, this.num); + this.num = this.add856(this.num, this.num); + this.num = this.add857(this.num, this.num); + this.num = this.add858(this.num, this.num); + this.num = this.add859(this.num, this.num); + this.num = this.add860(this.num, this.num); + this.num = this.add861(this.num, this.num); + this.num = this.add862(this.num, this.num); + this.num = this.add863(this.num, this.num); + this.num = this.add864(this.num, this.num); + this.num = this.add865(this.num, this.num); + this.num = this.add866(this.num, this.num); + this.num = this.add867(this.num, this.num); + this.num = this.add868(this.num, this.num); + this.num = this.add869(this.num, this.num); + this.num = this.add870(this.num, this.num); + this.num = this.add871(this.num, this.num); + this.num = this.add872(this.num, this.num); + this.num = this.add873(this.num, this.num); + this.num = this.add874(this.num, this.num); + this.num = this.add875(this.num, this.num); + this.num = this.add876(this.num, this.num); + this.num = this.add877(this.num, this.num); + this.num = this.add878(this.num, this.num); + this.num = this.add879(this.num, this.num); + this.num = this.add880(this.num, this.num); + this.num = this.add881(this.num, this.num); + this.num = this.add882(this.num, this.num); + this.num = this.add883(this.num, this.num); + this.num = this.add884(this.num, this.num); + this.num = this.add885(this.num, this.num); + this.num = this.add886(this.num, this.num); + this.num = this.add887(this.num, this.num); + this.num = this.add888(this.num, this.num); + this.num = this.add889(this.num, this.num); + this.num = this.add890(this.num, this.num); + this.num = this.add891(this.num, this.num); + this.num = this.add892(this.num, this.num); + this.num = this.add893(this.num, this.num); + this.num = this.add894(this.num, this.num); + this.num = this.add895(this.num, this.num); + this.num = this.add896(this.num, this.num); + this.num = this.add897(this.num, this.num); + this.num = this.add898(this.num, this.num); + this.num = this.add899(this.num, this.num); + this.num = this.add900(this.num, this.num); + this.num = this.add901(this.num, this.num); + this.num = this.add902(this.num, this.num); + this.num = this.add903(this.num, this.num); + this.num = this.add904(this.num, this.num); + this.num = this.add905(this.num, this.num); + this.num = this.add906(this.num, this.num); + this.num = this.add907(this.num, this.num); + this.num = this.add908(this.num, this.num); + this.num = this.add909(this.num, this.num); + this.num = this.add910(this.num, this.num); + this.num = this.add911(this.num, this.num); + this.num = this.add912(this.num, this.num); + this.num = this.add913(this.num, this.num); + this.num = this.add914(this.num, this.num); + this.num = this.add915(this.num, this.num); + this.num = this.add916(this.num, this.num); + this.num = this.add917(this.num, this.num); + this.num = this.add918(this.num, this.num); + this.num = this.add919(this.num, this.num); + this.num = this.add920(this.num, this.num); + this.num = this.add921(this.num, this.num); + this.num = this.add922(this.num, this.num); + this.num = this.add923(this.num, this.num); + this.num = this.add924(this.num, this.num); + this.num = this.add925(this.num, this.num); + this.num = this.add926(this.num, this.num); + this.num = this.add927(this.num, this.num); + this.num = this.add928(this.num, this.num); + this.num = this.add929(this.num, this.num); + this.num = this.add930(this.num, this.num); + this.num = this.add931(this.num, this.num); + this.num = this.add932(this.num, this.num); + this.num = this.add933(this.num, this.num); + this.num = this.add934(this.num, this.num); + this.num = this.add935(this.num, this.num); + this.num = this.add936(this.num, this.num); + this.num = this.add937(this.num, this.num); + this.num = this.add938(this.num, this.num); + this.num = this.add939(this.num, this.num); + this.num = this.add940(this.num, this.num); + this.num = this.add941(this.num, this.num); + this.num = this.add942(this.num, this.num); + this.num = this.add943(this.num, this.num); + this.num = this.add944(this.num, this.num); + this.num = this.add945(this.num, this.num); + this.num = this.add946(this.num, this.num); + this.num = this.add947(this.num, this.num); + this.num = this.add948(this.num, this.num); + this.num = this.add949(this.num, this.num); + this.num = this.add950(this.num, this.num); + this.num = this.add951(this.num, this.num); + this.num = this.add952(this.num, this.num); + this.num = this.add953(this.num, this.num); + this.num = this.add954(this.num, this.num); + this.num = this.add955(this.num, this.num); + this.num = this.add956(this.num, this.num); + this.num = this.add957(this.num, this.num); + this.num = this.add958(this.num, this.num); + this.num = this.add959(this.num, this.num); + this.num = this.add960(this.num, this.num); + this.num = this.add961(this.num, this.num); + this.num = this.add962(this.num, this.num); + this.num = this.add963(this.num, this.num); + this.num = this.add964(this.num, this.num); + this.num = this.add965(this.num, this.num); + this.num = this.add966(this.num, this.num); + this.num = this.add967(this.num, this.num); + this.num = this.add968(this.num, this.num); + this.num = this.add969(this.num, this.num); + this.num = this.add970(this.num, this.num); + this.num = this.add971(this.num, this.num); + this.num = this.add972(this.num, this.num); + this.num = this.add973(this.num, this.num); + this.num = this.add974(this.num, this.num); + this.num = this.add975(this.num, this.num); + this.num = this.add976(this.num, this.num); + this.num = this.add977(this.num, this.num); + this.num = this.add978(this.num, this.num); + this.num = this.add979(this.num, this.num); + this.num = this.add980(this.num, this.num); + this.num = this.add981(this.num, this.num); + this.num = this.add982(this.num, this.num); + this.num = this.add983(this.num, this.num); + this.num = this.add984(this.num, this.num); + this.num = this.add985(this.num, this.num); + this.num = this.add986(this.num, this.num); + this.num = this.add987(this.num, this.num); + this.num = this.add988(this.num, this.num); + this.num = this.add989(this.num, this.num); + this.num = this.add990(this.num, this.num); + this.num = this.add991(this.num, this.num); + this.num = this.add992(this.num, this.num); + this.num = this.add993(this.num, this.num); + this.num = this.add994(this.num, this.num); + this.num = this.add995(this.num, this.num); + this.num = this.add996(this.num, this.num); + this.num = this.add997(this.num, this.num); + this.num = this.add998(this.num, this.num); + this.num = this.add999(this.num, this.num); + this.num = this.add1000(this.num, this.num); + this.num = this.add1001(this.num, this.num); + this.num = this.add1002(this.num, this.num); + this.num = this.add1003(this.num, this.num); + this.num = this.add1004(this.num, this.num); + this.num = this.add1005(this.num, this.num); + this.num = this.add1006(this.num, this.num); + this.num = this.add1007(this.num, this.num); + this.num = this.add1008(this.num, this.num); + this.num = this.add1009(this.num, this.num); + this.num = this.add1010(this.num, this.num); + this.num = this.add1011(this.num, this.num); + this.num = this.add1012(this.num, this.num); + this.num = this.add1013(this.num, this.num); + this.num = this.add1014(this.num, this.num); + this.num = this.add1015(this.num, this.num); + this.num = this.add1016(this.num, this.num); + this.num = this.add1017(this.num, this.num); + this.num = this.add1018(this.num, this.num); + this.num = this.add1019(this.num, this.num); + this.num = this.add1020(this.num, this.num); + this.num = this.add1021(this.num, this.num); + this.num = this.add1022(this.num, this.num); + this.num = this.add1023(this.num, this.num); + this.num = this.add1024(this.num, this.num); + this.num = this.add1025(this.num, this.num); + this.num = this.add1026(this.num, this.num); + this.num = this.add1027(this.num, this.num); + this.num = this.add1028(this.num, this.num); + this.num = this.add1029(this.num, this.num); + this.num = this.add1030(this.num, this.num); + this.num = this.add1031(this.num, this.num); + this.num = this.add1032(this.num, this.num); + this.num = this.add1033(this.num, this.num); + this.num = this.add1034(this.num, this.num); + this.num = this.add1035(this.num, this.num); + this.num = this.add1036(this.num, this.num); + this.num = this.add1037(this.num, this.num); + this.num = this.add1038(this.num, this.num); + this.num = this.add1039(this.num, this.num); + this.num = this.add1040(this.num, this.num); + this.num = this.add1041(this.num, this.num); + this.num = this.add1042(this.num, this.num); + this.num = this.add1043(this.num, this.num); + this.num = this.add1044(this.num, this.num); + this.num = this.add1045(this.num, this.num); + this.num = this.add1046(this.num, this.num); + this.num = this.add1047(this.num, this.num); + this.num = this.add1048(this.num, this.num); + this.num = this.add1049(this.num, this.num); + this.num = this.add1050(this.num, this.num); + this.num = this.add1051(this.num, this.num); + this.num = this.add1052(this.num, this.num); + this.num = this.add1053(this.num, this.num); + this.num = this.add1054(this.num, this.num); + this.num = this.add1055(this.num, this.num); + this.num = this.add1056(this.num, this.num); + this.num = this.add1057(this.num, this.num); + this.num = this.add1058(this.num, this.num); + this.num = this.add1059(this.num, this.num); + this.num = this.add1060(this.num, this.num); + this.num = this.add1061(this.num, this.num); + this.num = this.add1062(this.num, this.num); + this.num = this.add1063(this.num, this.num); + this.num = this.add1064(this.num, this.num); + this.num = this.add1065(this.num, this.num); + this.num = this.add1066(this.num, this.num); + this.num = this.add1067(this.num, this.num); + this.num = this.add1068(this.num, this.num); + this.num = this.add1069(this.num, this.num); + this.num = this.add1070(this.num, this.num); + this.num = this.add1071(this.num, this.num); + this.num = this.add1072(this.num, this.num); + this.num = this.add1073(this.num, this.num); + this.num = this.add1074(this.num, this.num); + this.num = this.add1075(this.num, this.num); + this.num = this.add1076(this.num, this.num); + this.num = this.add1077(this.num, this.num); + this.num = this.add1078(this.num, this.num); + this.num = this.add1079(this.num, this.num); + this.num = this.add1080(this.num, this.num); + this.num = this.add1081(this.num, this.num); + this.num = this.add1082(this.num, this.num); + this.num = this.add1083(this.num, this.num); + this.num = this.add1084(this.num, this.num); + this.num = this.add1085(this.num, this.num); + this.num = this.add1086(this.num, this.num); + this.num = this.add1087(this.num, this.num); + this.num = this.add1088(this.num, this.num); + this.num = this.add1089(this.num, this.num); + this.num = this.add1090(this.num, this.num); + this.num = this.add1091(this.num, this.num); + this.num = this.add1092(this.num, this.num); + this.num = this.add1093(this.num, this.num); + this.num = this.add1094(this.num, this.num); + this.num = this.add1095(this.num, this.num); + this.num = this.add1096(this.num, this.num); + this.num = this.add1097(this.num, this.num); + this.num = this.add1098(this.num, this.num); + this.num = this.add1099(this.num, this.num); + this.num = this.add1100(this.num, this.num); + this.num = this.add1101(this.num, this.num); + this.num = this.add1102(this.num, this.num); + this.num = this.add1103(this.num, this.num); + this.num = this.add1104(this.num, this.num); + this.num = this.add1105(this.num, this.num); + this.num = this.add1106(this.num, this.num); + this.num = this.add1107(this.num, this.num); + this.num = this.add1108(this.num, this.num); + this.num = this.add1109(this.num, this.num); + this.num = this.add1110(this.num, this.num); + this.num = this.add1111(this.num, this.num); + this.num = this.add1112(this.num, this.num); + this.num = this.add1113(this.num, this.num); + this.num = this.add1114(this.num, this.num); + this.num = this.add1115(this.num, this.num); + this.num = this.add1116(this.num, this.num); + this.num = this.add1117(this.num, this.num); + this.num = this.add1118(this.num, this.num); + this.num = this.add1119(this.num, this.num); + this.num = this.add1120(this.num, this.num); + this.num = this.add1121(this.num, this.num); + this.num = this.add1122(this.num, this.num); + this.num = this.add1123(this.num, this.num); + this.num = this.add1124(this.num, this.num); + this.num = this.add1125(this.num, this.num); + this.num = this.add1126(this.num, this.num); + this.num = this.add1127(this.num, this.num); + this.num = this.add1128(this.num, this.num); + this.num = this.add1129(this.num, this.num); + this.num = this.add1130(this.num, this.num); + this.num = this.add1131(this.num, this.num); + this.num = this.add1132(this.num, this.num); + this.num = this.add1133(this.num, this.num); + this.num = this.add1134(this.num, this.num); + this.num = this.add1135(this.num, this.num); + this.num = this.add1136(this.num, this.num); + this.num = this.add1137(this.num, this.num); + this.num = this.add1138(this.num, this.num); + this.num = this.add1139(this.num, this.num); + this.num = this.add1140(this.num, this.num); + this.num = this.add1141(this.num, this.num); + this.num = this.add1142(this.num, this.num); + this.num = this.add1143(this.num, this.num); + this.num = this.add1144(this.num, this.num); + this.num = this.add1145(this.num, this.num); + this.num = this.add1146(this.num, this.num); + this.num = this.add1147(this.num, this.num); + this.num = this.add1148(this.num, this.num); + this.num = this.add1149(this.num, this.num); + this.num = this.add1150(this.num, this.num); + this.num = this.add1151(this.num, this.num); + this.num = this.add1152(this.num, this.num); + this.num = this.add1153(this.num, this.num); + this.num = this.add1154(this.num, this.num); + this.num = this.add1155(this.num, this.num); + this.num = this.add1156(this.num, this.num); + this.num = this.add1157(this.num, this.num); + this.num = this.add1158(this.num, this.num); + this.num = this.add1159(this.num, this.num); + this.num = this.add1160(this.num, this.num); + this.num = this.add1161(this.num, this.num); + this.num = this.add1162(this.num, this.num); + this.num = this.add1163(this.num, this.num); + this.num = this.add1164(this.num, this.num); + this.num = this.add1165(this.num, this.num); + this.num = this.add1166(this.num, this.num); + this.num = this.add1167(this.num, this.num); + this.num = this.add1168(this.num, this.num); + this.num = this.add1169(this.num, this.num); + this.num = this.add1170(this.num, this.num); + this.num = this.add1171(this.num, this.num); + this.num = this.add1172(this.num, this.num); + this.num = this.add1173(this.num, this.num); + this.num = this.add1174(this.num, this.num); + this.num = this.add1175(this.num, this.num); + this.num = this.add1176(this.num, this.num); + this.num = this.add1177(this.num, this.num); + this.num = this.add1178(this.num, this.num); + this.num = this.add1179(this.num, this.num); + this.num = this.add1180(this.num, this.num); + this.num = this.add1181(this.num, this.num); + this.num = this.add1182(this.num, this.num); + this.num = this.add1183(this.num, this.num); + this.num = this.add1184(this.num, this.num); + this.num = this.add1185(this.num, this.num); + this.num = this.add1186(this.num, this.num); + this.num = this.add1187(this.num, this.num); + this.num = this.add1188(this.num, this.num); + this.num = this.add1189(this.num, this.num); + this.num = this.add1190(this.num, this.num); + this.num = this.add1191(this.num, this.num); + this.num = this.add1192(this.num, this.num); + this.num = this.add1193(this.num, this.num); + this.num = this.add1194(this.num, this.num); + this.num = this.add1195(this.num, this.num); + this.num = this.add1196(this.num, this.num); + this.num = this.add1197(this.num, this.num); + this.num = this.add1198(this.num, this.num); + this.num = this.add1199(this.num, this.num); + this.num = this.add1200(this.num, this.num); + this.num = this.add1201(this.num, this.num); + this.num = this.add1202(this.num, this.num); + this.num = this.add1203(this.num, this.num); + this.num = this.add1204(this.num, this.num); + this.num = this.add1205(this.num, this.num); + this.num = this.add1206(this.num, this.num); + this.num = this.add1207(this.num, this.num); + this.num = this.add1208(this.num, this.num); + this.num = this.add1209(this.num, this.num); + this.num = this.add1210(this.num, this.num); + this.num = this.add1211(this.num, this.num); + this.num = this.add1212(this.num, this.num); + this.num = this.add1213(this.num, this.num); + this.num = this.add1214(this.num, this.num); + this.num = this.add1215(this.num, this.num); + this.num = this.add1216(this.num, this.num); + this.num = this.add1217(this.num, this.num); + this.num = this.add1218(this.num, this.num); + this.num = this.add1219(this.num, this.num); + this.num = this.add1220(this.num, this.num); + this.num = this.add1221(this.num, this.num); + this.num = this.add1222(this.num, this.num); + this.num = this.add1223(this.num, this.num); + this.num = this.add1224(this.num, this.num); + this.num = this.add1225(this.num, this.num); + this.num = this.add1226(this.num, this.num); + this.num = this.add1227(this.num, this.num); + this.num = this.add1228(this.num, this.num); + this.num = this.add1229(this.num, this.num); + this.num = this.add1230(this.num, this.num); + this.num = this.add1231(this.num, this.num); + this.num = this.add1232(this.num, this.num); + this.num = this.add1233(this.num, this.num); + this.num = this.add1234(this.num, this.num); + this.num = this.add1235(this.num, this.num); + this.num = this.add1236(this.num, this.num); + this.num = this.add1237(this.num, this.num); + this.num = this.add1238(this.num, this.num); + this.num = this.add1239(this.num, this.num); + this.num = this.add1240(this.num, this.num); + this.num = this.add1241(this.num, this.num); + this.num = this.add1242(this.num, this.num); + this.num = this.add1243(this.num, this.num); + this.num = this.add1244(this.num, this.num); + this.num = this.add1245(this.num, this.num); + this.num = this.add1246(this.num, this.num); + this.num = this.add1247(this.num, this.num); + this.num = this.add1248(this.num, this.num); + this.num = this.add1249(this.num, this.num); + this.num = this.add1250(this.num, this.num); + this.num = this.add1251(this.num, this.num); + this.num = this.add1252(this.num, this.num); + this.num = this.add1253(this.num, this.num); + this.num = this.add1254(this.num, this.num); + this.num = this.add1255(this.num, this.num); + this.num = this.add1256(this.num, this.num); + this.num = this.add1257(this.num, this.num); + this.num = this.add1258(this.num, this.num); + this.num = this.add1259(this.num, this.num); + this.num = this.add1260(this.num, this.num); + this.num = this.add1261(this.num, this.num); + this.num = this.add1262(this.num, this.num); + this.num = this.add1263(this.num, this.num); + this.num = this.add1264(this.num, this.num); + this.num = this.add1265(this.num, this.num); + this.num = this.add1266(this.num, this.num); + this.num = this.add1267(this.num, this.num); + this.num = this.add1268(this.num, this.num); + this.num = this.add1269(this.num, this.num); + this.num = this.add1270(this.num, this.num); + this.num = this.add1271(this.num, this.num); + this.num = this.add1272(this.num, this.num); + this.num = this.add1273(this.num, this.num); + this.num = this.add1274(this.num, this.num); + this.num = this.add1275(this.num, this.num); + this.num = this.add1276(this.num, this.num); + this.num = this.add1277(this.num, this.num); + this.num = this.add1278(this.num, this.num); + this.num = this.add1279(this.num, this.num); + this.num = this.add1280(this.num, this.num); + this.num = this.add1281(this.num, this.num); + this.num = this.add1282(this.num, this.num); + this.num = this.add1283(this.num, this.num); + this.num = this.add1284(this.num, this.num); + this.num = this.add1285(this.num, this.num); + this.num = this.add1286(this.num, this.num); + this.num = this.add1287(this.num, this.num); + this.num = this.add1288(this.num, this.num); + this.num = this.add1289(this.num, this.num); + this.num = this.add1290(this.num, this.num); + this.num = this.add1291(this.num, this.num); + this.num = this.add1292(this.num, this.num); + this.num = this.add1293(this.num, this.num); + this.num = this.add1294(this.num, this.num); + this.num = this.add1295(this.num, this.num); + this.num = this.add1296(this.num, this.num); + this.num = this.add1297(this.num, this.num); + this.num = this.add1298(this.num, this.num); + this.num = this.add1299(this.num, this.num); + this.num = this.add1300(this.num, this.num); + this.num = this.add1301(this.num, this.num); + this.num = this.add1302(this.num, this.num); + this.num = this.add1303(this.num, this.num); + this.num = this.add1304(this.num, this.num); + this.num = this.add1305(this.num, this.num); + this.num = this.add1306(this.num, this.num); + this.num = this.add1307(this.num, this.num); + this.num = this.add1308(this.num, this.num); + this.num = this.add1309(this.num, this.num); + this.num = this.add1310(this.num, this.num); + this.num = this.add1311(this.num, this.num); + this.num = this.add1312(this.num, this.num); + this.num = this.add1313(this.num, this.num); + this.num = this.add1314(this.num, this.num); + this.num = this.add1315(this.num, this.num); + this.num = this.add1316(this.num, this.num); + this.num = this.add1317(this.num, this.num); + this.num = this.add1318(this.num, this.num); + this.num = this.add1319(this.num, this.num); + this.num = this.add1320(this.num, this.num); + this.num = this.add1321(this.num, this.num); + this.num = this.add1322(this.num, this.num); + this.num = this.add1323(this.num, this.num); + this.num = this.add1324(this.num, this.num); + this.num = this.add1325(this.num, this.num); + this.num = this.add1326(this.num, this.num); + this.num = this.add1327(this.num, this.num); + this.num = this.add1328(this.num, this.num); + this.num = this.add1329(this.num, this.num); + this.num = this.add1330(this.num, this.num); + this.num = this.add1331(this.num, this.num); + this.num = this.add1332(this.num, this.num); + this.num = this.add1333(this.num, this.num); + this.num = this.add1334(this.num, this.num); + this.num = this.add1335(this.num, this.num); + this.num = this.add1336(this.num, this.num); + this.num = this.add1337(this.num, this.num); + this.num = this.add1338(this.num, this.num); + this.num = this.add1339(this.num, this.num); + this.num = this.add1340(this.num, this.num); + this.num = this.add1341(this.num, this.num); + this.num = this.add1342(this.num, this.num); + this.num = this.add1343(this.num, this.num); + this.num = this.add1344(this.num, this.num); + this.num = this.add1345(this.num, this.num); + this.num = this.add1346(this.num, this.num); + this.num = this.add1347(this.num, this.num); + this.num = this.add1348(this.num, this.num); + this.num = this.add1349(this.num, this.num); + this.num = this.add1350(this.num, this.num); + this.num = this.add1351(this.num, this.num); + this.num = this.add1352(this.num, this.num); + this.num = this.add1353(this.num, this.num); + this.num = this.add1354(this.num, this.num); + this.num = this.add1355(this.num, this.num); + this.num = this.add1356(this.num, this.num); + this.num = this.add1357(this.num, this.num); + this.num = this.add1358(this.num, this.num); + this.num = this.add1359(this.num, this.num); + this.num = this.add1360(this.num, this.num); + this.num = this.add1361(this.num, this.num); + this.num = this.add1362(this.num, this.num); + this.num = this.add1363(this.num, this.num); + this.num = this.add1364(this.num, this.num); + this.num = this.add1365(this.num, this.num); + this.num = this.add1366(this.num, this.num); + this.num = this.add1367(this.num, this.num); + this.num = this.add1368(this.num, this.num); + this.num = this.add1369(this.num, this.num); + this.num = this.add1370(this.num, this.num); + this.num = this.add1371(this.num, this.num); + this.num = this.add1372(this.num, this.num); + this.num = this.add1373(this.num, this.num); + this.num = this.add1374(this.num, this.num); + this.num = this.add1375(this.num, this.num); + this.num = this.add1376(this.num, this.num); + this.num = this.add1377(this.num, this.num); + this.num = this.add1378(this.num, this.num); + this.num = this.add1379(this.num, this.num); + this.num = this.add1380(this.num, this.num); + this.num = this.add1381(this.num, this.num); + this.num = this.add1382(this.num, this.num); + this.num = this.add1383(this.num, this.num); + this.num = this.add1384(this.num, this.num); + this.num = this.add1385(this.num, this.num); + this.num = this.add1386(this.num, this.num); + this.num = this.add1387(this.num, this.num); + this.num = this.add1388(this.num, this.num); + this.num = this.add1389(this.num, this.num); + this.num = this.add1390(this.num, this.num); + this.num = this.add1391(this.num, this.num); + this.num = this.add1392(this.num, this.num); + this.num = this.add1393(this.num, this.num); + this.num = this.add1394(this.num, this.num); + this.num = this.add1395(this.num, this.num); + this.num = this.add1396(this.num, this.num); + this.num = this.add1397(this.num, this.num); + this.num = this.add1398(this.num, this.num); + this.num = this.add1399(this.num, this.num); + this.num = this.add1400(this.num, this.num); + this.num = this.add1401(this.num, this.num); + this.num = this.add1402(this.num, this.num); + this.num = this.add1403(this.num, this.num); + this.num = this.add1404(this.num, this.num); + this.num = this.add1405(this.num, this.num); + this.num = this.add1406(this.num, this.num); + this.num = this.add1407(this.num, this.num); + this.num = this.add1408(this.num, this.num); + this.num = this.add1409(this.num, this.num); + this.num = this.add1410(this.num, this.num); + this.num = this.add1411(this.num, this.num); + this.num = this.add1412(this.num, this.num); + this.num = this.add1413(this.num, this.num); + this.num = this.add1414(this.num, this.num); + this.num = this.add1415(this.num, this.num); + this.num = this.add1416(this.num, this.num); + this.num = this.add1417(this.num, this.num); + this.num = this.add1418(this.num, this.num); + this.num = this.add1419(this.num, this.num); + this.num = this.add1420(this.num, this.num); + this.num = this.add1421(this.num, this.num); + this.num = this.add1422(this.num, this.num); + this.num = this.add1423(this.num, this.num); + this.num = this.add1424(this.num, this.num); + this.num = this.add1425(this.num, this.num); + this.num = this.add1426(this.num, this.num); + this.num = this.add1427(this.num, this.num); + this.num = this.add1428(this.num, this.num); + this.num = this.add1429(this.num, this.num); + this.num = this.add1430(this.num, this.num); + this.num = this.add1431(this.num, this.num); + this.num = this.add1432(this.num, this.num); + this.num = this.add1433(this.num, this.num); + this.num = this.add1434(this.num, this.num); + this.num = this.add1435(this.num, this.num); + this.num = this.add1436(this.num, this.num); + this.num = this.add1437(this.num, this.num); + this.num = this.add1438(this.num, this.num); + this.num = this.add1439(this.num, this.num); + this.num = this.add1440(this.num, this.num); + this.num = this.add1441(this.num, this.num); + this.num = this.add1442(this.num, this.num); + this.num = this.add1443(this.num, this.num); + this.num = this.add1444(this.num, this.num); + this.num = this.add1445(this.num, this.num); + this.num = this.add1446(this.num, this.num); + this.num = this.add1447(this.num, this.num); + this.num = this.add1448(this.num, this.num); + this.num = this.add1449(this.num, this.num); + this.num = this.add1450(this.num, this.num); + this.num = this.add1451(this.num, this.num); + this.num = this.add1452(this.num, this.num); + this.num = this.add1453(this.num, this.num); + this.num = this.add1454(this.num, this.num); + this.num = this.add1455(this.num, this.num); + this.num = this.add1456(this.num, this.num); + this.num = this.add1457(this.num, this.num); + this.num = this.add1458(this.num, this.num); + this.num = this.add1459(this.num, this.num); + this.num = this.add1460(this.num, this.num); + this.num = this.add1461(this.num, this.num); + this.num = this.add1462(this.num, this.num); + this.num = this.add1463(this.num, this.num); + this.num = this.add1464(this.num, this.num); + this.num = this.add1465(this.num, this.num); + this.num = this.add1466(this.num, this.num); + this.num = this.add1467(this.num, this.num); + this.num = this.add1468(this.num, this.num); + this.num = this.add1469(this.num, this.num); + this.num = this.add1470(this.num, this.num); + this.num = this.add1471(this.num, this.num); + this.num = this.add1472(this.num, this.num); + this.num = this.add1473(this.num, this.num); + this.num = this.add1474(this.num, this.num); + this.num = this.add1475(this.num, this.num); + this.num = this.add1476(this.num, this.num); + this.num = this.add1477(this.num, this.num); + this.num = this.add1478(this.num, this.num); + this.num = this.add1479(this.num, this.num); + this.num = this.add1480(this.num, this.num); + this.num = this.add1481(this.num, this.num); + this.num = this.add1482(this.num, this.num); + this.num = this.add1483(this.num, this.num); + this.num = this.add1484(this.num, this.num); + this.num = this.add1485(this.num, this.num); + this.num = this.add1486(this.num, this.num); + this.num = this.add1487(this.num, this.num); + this.num = this.add1488(this.num, this.num); + this.num = this.add1489(this.num, this.num); + this.num = this.add1490(this.num, this.num); + this.num = this.add1491(this.num, this.num); + this.num = this.add1492(this.num, this.num); + this.num = this.add1493(this.num, this.num); + this.num = this.add1494(this.num, this.num); + this.num = this.add1495(this.num, this.num); + this.num = this.add1496(this.num, this.num); + this.num = this.add1497(this.num, this.num); + this.num = this.add1498(this.num, this.num); + this.num = this.add1499(this.num, this.num); + this.num = this.add1500(this.num, this.num); + this.num = this.add1501(this.num, this.num); + this.num = this.add1502(this.num, this.num); + this.num = this.add1503(this.num, this.num); + this.num = this.add1504(this.num, this.num); + this.num = this.add1505(this.num, this.num); + this.num = this.add1506(this.num, this.num); + this.num = this.add1507(this.num, this.num); + this.num = this.add1508(this.num, this.num); + this.num = this.add1509(this.num, this.num); + this.num = this.add1510(this.num, this.num); + this.num = this.add1511(this.num, this.num); + this.num = this.add1512(this.num, this.num); + this.num = this.add1513(this.num, this.num); + this.num = this.add1514(this.num, this.num); + this.num = this.add1515(this.num, this.num); + this.num = this.add1516(this.num, this.num); + this.num = this.add1517(this.num, this.num); + this.num = this.add1518(this.num, this.num); + this.num = this.add1519(this.num, this.num); + this.num = this.add1520(this.num, this.num); + this.num = this.add1521(this.num, this.num); + this.num = this.add1522(this.num, this.num); + this.num = this.add1523(this.num, this.num); + this.num = this.add1524(this.num, this.num); + this.num = this.add1525(this.num, this.num); + this.num = this.add1526(this.num, this.num); + this.num = this.add1527(this.num, this.num); + this.num = this.add1528(this.num, this.num); + this.num = this.add1529(this.num, this.num); + this.num = this.add1530(this.num, this.num); + this.num = this.add1531(this.num, this.num); + this.num = this.add1532(this.num, this.num); + this.num = this.add1533(this.num, this.num); + this.num = this.add1534(this.num, this.num); + this.num = this.add1535(this.num, this.num); + this.num = this.add1536(this.num, this.num); + this.num = this.add1537(this.num, this.num); + this.num = this.add1538(this.num, this.num); + this.num = this.add1539(this.num, this.num); + this.num = this.add1540(this.num, this.num); + this.num = this.add1541(this.num, this.num); + this.num = this.add1542(this.num, this.num); + this.num = this.add1543(this.num, this.num); + this.num = this.add1544(this.num, this.num); + this.num = this.add1545(this.num, this.num); + this.num = this.add1546(this.num, this.num); + this.num = this.add1547(this.num, this.num); + this.num = this.add1548(this.num, this.num); + this.num = this.add1549(this.num, this.num); + this.num = this.add1550(this.num, this.num); + this.num = this.add1551(this.num, this.num); + this.num = this.add1552(this.num, this.num); + this.num = this.add1553(this.num, this.num); + this.num = this.add1554(this.num, this.num); + this.num = this.add1555(this.num, this.num); + this.num = this.add1556(this.num, this.num); + this.num = this.add1557(this.num, this.num); + this.num = this.add1558(this.num, this.num); + this.num = this.add1559(this.num, this.num); + this.num = this.add1560(this.num, this.num); + this.num = this.add1561(this.num, this.num); + this.num = this.add1562(this.num, this.num); + this.num = this.add1563(this.num, this.num); + this.num = this.add1564(this.num, this.num); + this.num = this.add1565(this.num, this.num); + this.num = this.add1566(this.num, this.num); + this.num = this.add1567(this.num, this.num); + this.num = this.add1568(this.num, this.num); + this.num = this.add1569(this.num, this.num); + this.num = this.add1570(this.num, this.num); + this.num = this.add1571(this.num, this.num); + this.num = this.add1572(this.num, this.num); + this.num = this.add1573(this.num, this.num); + this.num = this.add1574(this.num, this.num); + this.num = this.add1575(this.num, this.num); + this.num = this.add1576(this.num, this.num); + this.num = this.add1577(this.num, this.num); + this.num = this.add1578(this.num, this.num); + this.num = this.add1579(this.num, this.num); + this.num = this.add1580(this.num, this.num); + this.num = this.add1581(this.num, this.num); + this.num = this.add1582(this.num, this.num); + this.num = this.add1583(this.num, this.num); + this.num = this.add1584(this.num, this.num); + this.num = this.add1585(this.num, this.num); + this.num = this.add1586(this.num, this.num); + this.num = this.add1587(this.num, this.num); + this.num = this.add1588(this.num, this.num); + this.num = this.add1589(this.num, this.num); + this.num = this.add1590(this.num, this.num); + this.num = this.add1591(this.num, this.num); + this.num = this.add1592(this.num, this.num); + this.num = this.add1593(this.num, this.num); + this.num = this.add1594(this.num, this.num); + this.num = this.add1595(this.num, this.num); + this.num = this.add1596(this.num, this.num); + this.num = this.add1597(this.num, this.num); + this.num = this.add1598(this.num, this.num); + this.num = this.add1599(this.num, this.num); + this.num = this.add1600(this.num, this.num); + this.num = this.add1601(this.num, this.num); + this.num = this.add1602(this.num, this.num); + this.num = this.add1603(this.num, this.num); + this.num = this.add1604(this.num, this.num); + this.num = this.add1605(this.num, this.num); + this.num = this.add1606(this.num, this.num); + this.num = this.add1607(this.num, this.num); + this.num = this.add1608(this.num, this.num); + this.num = this.add1609(this.num, this.num); + this.num = this.add1610(this.num, this.num); + this.num = this.add1611(this.num, this.num); + this.num = this.add1612(this.num, this.num); + this.num = this.add1613(this.num, this.num); + this.num = this.add1614(this.num, this.num); + this.num = this.add1615(this.num, this.num); + this.num = this.add1616(this.num, this.num); + this.num = this.add1617(this.num, this.num); + this.num = this.add1618(this.num, this.num); + this.num = this.add1619(this.num, this.num); + this.num = this.add1620(this.num, this.num); + this.num = this.add1621(this.num, this.num); + this.num = this.add1622(this.num, this.num); + this.num = this.add1623(this.num, this.num); + this.num = this.add1624(this.num, this.num); + this.num = this.add1625(this.num, this.num); + this.num = this.add1626(this.num, this.num); + this.num = this.add1627(this.num, this.num); + this.num = this.add1628(this.num, this.num); + this.num = this.add1629(this.num, this.num); + this.num = this.add1630(this.num, this.num); + this.num = this.add1631(this.num, this.num); + this.num = this.add1632(this.num, this.num); + this.num = this.add1633(this.num, this.num); + this.num = this.add1634(this.num, this.num); + this.num = this.add1635(this.num, this.num); + this.num = this.add1636(this.num, this.num); + this.num = this.add1637(this.num, this.num); + this.num = this.add1638(this.num, this.num); + this.num = this.add1639(this.num, this.num); + this.num = this.add1640(this.num, this.num); + this.num = this.add1641(this.num, this.num); + this.num = this.add1642(this.num, this.num); + this.num = this.add1643(this.num, this.num); + this.num = this.add1644(this.num, this.num); + this.num = this.add1645(this.num, this.num); + this.num = this.add1646(this.num, this.num); + this.num = this.add1647(this.num, this.num); + this.num = this.add1648(this.num, this.num); + this.num = this.add1649(this.num, this.num); + this.num = this.add1650(this.num, this.num); + this.num = this.add1651(this.num, this.num); + this.num = this.add1652(this.num, this.num); + this.num = this.add1653(this.num, this.num); + this.num = this.add1654(this.num, this.num); + this.num = this.add1655(this.num, this.num); + this.num = this.add1656(this.num, this.num); + this.num = this.add1657(this.num, this.num); + this.num = this.add1658(this.num, this.num); + this.num = this.add1659(this.num, this.num); + this.num = this.add1660(this.num, this.num); + this.num = this.add1661(this.num, this.num); + this.num = this.add1662(this.num, this.num); + this.num = this.add1663(this.num, this.num); + this.num = this.add1664(this.num, this.num); + this.num = this.add1665(this.num, this.num); + this.num = this.add1666(this.num, this.num); + this.num = this.add1667(this.num, this.num); + this.num = this.add1668(this.num, this.num); + this.num = this.add1669(this.num, this.num); + this.num = this.add1670(this.num, this.num); + this.num = this.add1671(this.num, this.num); + this.num = this.add1672(this.num, this.num); + this.num = this.add1673(this.num, this.num); + this.num = this.add1674(this.num, this.num); + this.num = this.add1675(this.num, this.num); + this.num = this.add1676(this.num, this.num); + this.num = this.add1677(this.num, this.num); + this.num = this.add1678(this.num, this.num); + this.num = this.add1679(this.num, this.num); + this.num = this.add1680(this.num, this.num); + this.num = this.add1681(this.num, this.num); + this.num = this.add1682(this.num, this.num); + this.num = this.add1683(this.num, this.num); + this.num = this.add1684(this.num, this.num); + this.num = this.add1685(this.num, this.num); + this.num = this.add1686(this.num, this.num); + this.num = this.add1687(this.num, this.num); + this.num = this.add1688(this.num, this.num); + this.num = this.add1689(this.num, this.num); + this.num = this.add1690(this.num, this.num); + this.num = this.add1691(this.num, this.num); + this.num = this.add1692(this.num, this.num); + this.num = this.add1693(this.num, this.num); + this.num = this.add1694(this.num, this.num); + this.num = this.add1695(this.num, this.num); + this.num = this.add1696(this.num, this.num); + this.num = this.add1697(this.num, this.num); + this.num = this.add1698(this.num, this.num); + this.num = this.add1699(this.num, this.num); + this.num = this.add1700(this.num, this.num); + this.num = this.add1701(this.num, this.num); + this.num = this.add1702(this.num, this.num); + this.num = this.add1703(this.num, this.num); + this.num = this.add1704(this.num, this.num); + this.num = this.add1705(this.num, this.num); + this.num = this.add1706(this.num, this.num); + this.num = this.add1707(this.num, this.num); + this.num = this.add1708(this.num, this.num); + this.num = this.add1709(this.num, this.num); + this.num = this.add1710(this.num, this.num); + this.num = this.add1711(this.num, this.num); + this.num = this.add1712(this.num, this.num); + this.num = this.add1713(this.num, this.num); + this.num = this.add1714(this.num, this.num); + this.num = this.add1715(this.num, this.num); + this.num = this.add1716(this.num, this.num); + this.num = this.add1717(this.num, this.num); + this.num = this.add1718(this.num, this.num); + this.num = this.add1719(this.num, this.num); + this.num = this.add1720(this.num, this.num); + this.num = this.add1721(this.num, this.num); + this.num = this.add1722(this.num, this.num); + this.num = this.add1723(this.num, this.num); + this.num = this.add1724(this.num, this.num); + this.num = this.add1725(this.num, this.num); + this.num = this.add1726(this.num, this.num); + this.num = this.add1727(this.num, this.num); + this.num = this.add1728(this.num, this.num); + this.num = this.add1729(this.num, this.num); + this.num = this.add1730(this.num, this.num); + this.num = this.add1731(this.num, this.num); + this.num = this.add1732(this.num, this.num); + this.num = this.add1733(this.num, this.num); + this.num = this.add1734(this.num, this.num); + this.num = this.add1735(this.num, this.num); + this.num = this.add1736(this.num, this.num); + this.num = this.add1737(this.num, this.num); + this.num = this.add1738(this.num, this.num); + this.num = this.add1739(this.num, this.num); + this.num = this.add1740(this.num, this.num); + this.num = this.add1741(this.num, this.num); + this.num = this.add1742(this.num, this.num); + this.num = this.add1743(this.num, this.num); + this.num = this.add1744(this.num, this.num); + this.num = this.add1745(this.num, this.num); + this.num = this.add1746(this.num, this.num); + this.num = this.add1747(this.num, this.num); + this.num = this.add1748(this.num, this.num); + this.num = this.add1749(this.num, this.num); + this.num = this.add1750(this.num, this.num); + this.num = this.add1751(this.num, this.num); + this.num = this.add1752(this.num, this.num); + this.num = this.add1753(this.num, this.num); + this.num = this.add1754(this.num, this.num); + this.num = this.add1755(this.num, this.num); + this.num = this.add1756(this.num, this.num); + this.num = this.add1757(this.num, this.num); + this.num = this.add1758(this.num, this.num); + this.num = this.add1759(this.num, this.num); + this.num = this.add1760(this.num, this.num); + this.num = this.add1761(this.num, this.num); + this.num = this.add1762(this.num, this.num); + this.num = this.add1763(this.num, this.num); + this.num = this.add1764(this.num, this.num); + this.num = this.add1765(this.num, this.num); + this.num = this.add1766(this.num, this.num); + this.num = this.add1767(this.num, this.num); + this.num = this.add1768(this.num, this.num); + this.num = this.add1769(this.num, this.num); + this.num = this.add1770(this.num, this.num); + this.num = this.add1771(this.num, this.num); + this.num = this.add1772(this.num, this.num); + this.num = this.add1773(this.num, this.num); + this.num = this.add1774(this.num, this.num); + this.num = this.add1775(this.num, this.num); + this.num = this.add1776(this.num, this.num); + this.num = this.add1777(this.num, this.num); + this.num = this.add1778(this.num, this.num); + this.num = this.add1779(this.num, this.num); + this.num = this.add1780(this.num, this.num); + this.num = this.add1781(this.num, this.num); + this.num = this.add1782(this.num, this.num); + this.num = this.add1783(this.num, this.num); + this.num = this.add1784(this.num, this.num); + this.num = this.add1785(this.num, this.num); + this.num = this.add1786(this.num, this.num); + this.num = this.add1787(this.num, this.num); + this.num = this.add1788(this.num, this.num); + this.num = this.add1789(this.num, this.num); + this.num = this.add1790(this.num, this.num); + this.num = this.add1791(this.num, this.num); + this.num = this.add1792(this.num, this.num); + this.num = this.add1793(this.num, this.num); + this.num = this.add1794(this.num, this.num); + this.num = this.add1795(this.num, this.num); + this.num = this.add1796(this.num, this.num); + this.num = this.add1797(this.num, this.num); + this.num = this.add1798(this.num, this.num); + this.num = this.add1799(this.num, this.num); + this.num = this.add1800(this.num, this.num); + this.num = this.add1801(this.num, this.num); + this.num = this.add1802(this.num, this.num); + this.num = this.add1803(this.num, this.num); + this.num = this.add1804(this.num, this.num); + this.num = this.add1805(this.num, this.num); + this.num = this.add1806(this.num, this.num); + this.num = this.add1807(this.num, this.num); + this.num = this.add1808(this.num, this.num); + this.num = this.add1809(this.num, this.num); + this.num = this.add1810(this.num, this.num); + this.num = this.add1811(this.num, this.num); + this.num = this.add1812(this.num, this.num); + this.num = this.add1813(this.num, this.num); + this.num = this.add1814(this.num, this.num); + this.num = this.add1815(this.num, this.num); + this.num = this.add1816(this.num, this.num); + this.num = this.add1817(this.num, this.num); + this.num = this.add1818(this.num, this.num); + this.num = this.add1819(this.num, this.num); + this.num = this.add1820(this.num, this.num); + this.num = this.add1821(this.num, this.num); + this.num = this.add1822(this.num, this.num); + this.num = this.add1823(this.num, this.num); + this.num = this.add1824(this.num, this.num); + this.num = this.add1825(this.num, this.num); + this.num = this.add1826(this.num, this.num); + this.num = this.add1827(this.num, this.num); + this.num = this.add1828(this.num, this.num); + this.num = this.add1829(this.num, this.num); + this.num = this.add1830(this.num, this.num); + this.num = this.add1831(this.num, this.num); + this.num = this.add1832(this.num, this.num); + this.num = this.add1833(this.num, this.num); + this.num = this.add1834(this.num, this.num); + this.num = this.add1835(this.num, this.num); + this.num = this.add1836(this.num, this.num); + this.num = this.add1837(this.num, this.num); + this.num = this.add1838(this.num, this.num); + this.num = this.add1839(this.num, this.num); + this.num = this.add1840(this.num, this.num); + this.num = this.add1841(this.num, this.num); + this.num = this.add1842(this.num, this.num); + this.num = this.add1843(this.num, this.num); + this.num = this.add1844(this.num, this.num); + this.num = this.add1845(this.num, this.num); + this.num = this.add1846(this.num, this.num); + this.num = this.add1847(this.num, this.num); + this.num = this.add1848(this.num, this.num); + this.num = this.add1849(this.num, this.num); + this.num = this.add1850(this.num, this.num); + this.num = this.add1851(this.num, this.num); + this.num = this.add1852(this.num, this.num); + this.num = this.add1853(this.num, this.num); + this.num = this.add1854(this.num, this.num); + this.num = this.add1855(this.num, this.num); + this.num = this.add1856(this.num, this.num); + this.num = this.add1857(this.num, this.num); + this.num = this.add1858(this.num, this.num); + this.num = this.add1859(this.num, this.num); + this.num = this.add1860(this.num, this.num); + this.num = this.add1861(this.num, this.num); + this.num = this.add1862(this.num, this.num); + this.num = this.add1863(this.num, this.num); + this.num = this.add1864(this.num, this.num); + this.num = this.add1865(this.num, this.num); + this.num = this.add1866(this.num, this.num); + this.num = this.add1867(this.num, this.num); + this.num = this.add1868(this.num, this.num); + this.num = this.add1869(this.num, this.num); + this.num = this.add1870(this.num, this.num); + this.num = this.add1871(this.num, this.num); + this.num = this.add1872(this.num, this.num); + this.num = this.add1873(this.num, this.num); + this.num = this.add1874(this.num, this.num); + this.num = this.add1875(this.num, this.num); + this.num = this.add1876(this.num, this.num); + this.num = this.add1877(this.num, this.num); + this.num = this.add1878(this.num, this.num); + this.num = this.add1879(this.num, this.num); + this.num = this.add1880(this.num, this.num); + this.num = this.add1881(this.num, this.num); + this.num = this.add1882(this.num, this.num); + this.num = this.add1883(this.num, this.num); + this.num = this.add1884(this.num, this.num); + this.num = this.add1885(this.num, this.num); + this.num = this.add1886(this.num, this.num); + this.num = this.add1887(this.num, this.num); + this.num = this.add1888(this.num, this.num); + this.num = this.add1889(this.num, this.num); + this.num = this.add1890(this.num, this.num); + this.num = this.add1891(this.num, this.num); + this.num = this.add1892(this.num, this.num); + this.num = this.add1893(this.num, this.num); + this.num = this.add1894(this.num, this.num); + this.num = this.add1895(this.num, this.num); + this.num = this.add1896(this.num, this.num); + this.num = this.add1897(this.num, this.num); + this.num = this.add1898(this.num, this.num); + this.num = this.add1899(this.num, this.num); + this.num = this.add1900(this.num, this.num); + this.num = this.add1901(this.num, this.num); + this.num = this.add1902(this.num, this.num); + this.num = this.add1903(this.num, this.num); + this.num = this.add1904(this.num, this.num); + this.num = this.add1905(this.num, this.num); + this.num = this.add1906(this.num, this.num); + this.num = this.add1907(this.num, this.num); + this.num = this.add1908(this.num, this.num); + this.num = this.add1909(this.num, this.num); + this.num = this.add1910(this.num, this.num); + this.num = this.add1911(this.num, this.num); + this.num = this.add1912(this.num, this.num); + this.num = this.add1913(this.num, this.num); + this.num = this.add1914(this.num, this.num); + this.num = this.add1915(this.num, this.num); + this.num = this.add1916(this.num, this.num); + this.num = this.add1917(this.num, this.num); + this.num = this.add1918(this.num, this.num); + this.num = this.add1919(this.num, this.num); + this.num = this.add1920(this.num, this.num); + this.num = this.add1921(this.num, this.num); + this.num = this.add1922(this.num, this.num); + this.num = this.add1923(this.num, this.num); + this.num = this.add1924(this.num, this.num); + this.num = this.add1925(this.num, this.num); + this.num = this.add1926(this.num, this.num); + this.num = this.add1927(this.num, this.num); + this.num = this.add1928(this.num, this.num); + this.num = this.add1929(this.num, this.num); + this.num = this.add1930(this.num, this.num); + this.num = this.add1931(this.num, this.num); + this.num = this.add1932(this.num, this.num); + this.num = this.add1933(this.num, this.num); + this.num = this.add1934(this.num, this.num); + this.num = this.add1935(this.num, this.num); + this.num = this.add1936(this.num, this.num); + this.num = this.add1937(this.num, this.num); + this.num = this.add1938(this.num, this.num); + this.num = this.add1939(this.num, this.num); + this.num = this.add1940(this.num, this.num); + this.num = this.add1941(this.num, this.num); + this.num = this.add1942(this.num, this.num); + this.num = this.add1943(this.num, this.num); + this.num = this.add1944(this.num, this.num); + this.num = this.add1945(this.num, this.num); + this.num = this.add1946(this.num, this.num); + this.num = this.add1947(this.num, this.num); + this.num = this.add1948(this.num, this.num); + this.num = this.add1949(this.num, this.num); + this.num = this.add1950(this.num, this.num); + this.num = this.add1951(this.num, this.num); + this.num = this.add1952(this.num, this.num); + this.num = this.add1953(this.num, this.num); + this.num = this.add1954(this.num, this.num); + this.num = this.add1955(this.num, this.num); + this.num = this.add1956(this.num, this.num); + this.num = this.add1957(this.num, this.num); + this.num = this.add1958(this.num, this.num); + this.num = this.add1959(this.num, this.num); + this.num = this.add1960(this.num, this.num); + this.num = this.add1961(this.num, this.num); + this.num = this.add1962(this.num, this.num); + this.num = this.add1963(this.num, this.num); + this.num = this.add1964(this.num, this.num); + this.num = this.add1965(this.num, this.num); + this.num = this.add1966(this.num, this.num); + this.num = this.add1967(this.num, this.num); + this.num = this.add1968(this.num, this.num); + this.num = this.add1969(this.num, this.num); + this.num = this.add1970(this.num, this.num); + this.num = this.add1971(this.num, this.num); + this.num = this.add1972(this.num, this.num); + this.num = this.add1973(this.num, this.num); + this.num = this.add1974(this.num, this.num); + this.num = this.add1975(this.num, this.num); + this.num = this.add1976(this.num, this.num); + this.num = this.add1977(this.num, this.num); + this.num = this.add1978(this.num, this.num); + this.num = this.add1979(this.num, this.num); + this.num = this.add1980(this.num, this.num); + this.num = this.add1981(this.num, this.num); + this.num = this.add1982(this.num, this.num); + this.num = this.add1983(this.num, this.num); + this.num = this.add1984(this.num, this.num); + this.num = this.add1985(this.num, this.num); + this.num = this.add1986(this.num, this.num); + this.num = this.add1987(this.num, this.num); + this.num = this.add1988(this.num, this.num); + this.num = this.add1989(this.num, this.num); + this.num = this.add1990(this.num, this.num); + this.num = this.add1991(this.num, this.num); + this.num = this.add1992(this.num, this.num); + this.num = this.add1993(this.num, this.num); + this.num = this.add1994(this.num, this.num); + this.num = this.add1995(this.num, this.num); + this.num = this.add1996(this.num, this.num); + this.num = this.add1997(this.num, this.num); + this.num = this.add1998(this.num, this.num); + this.num = this.add1999(this.num, this.num); + + }) + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/resourceReference.ets b/koala_tools/ui2abc/perf-tests/src/resourceReference.ets new file mode 100644 index 0000000000000000000000000000000000000000..0da179a3f30221373a6ab8d4a224e38a4fd2a820 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/resourceReference.ets @@ -0,0 +1,16015 @@ + +/** + * $r resourceReference.ets + */ + +import { Component, Column, Image, ImageSourceSize, $r } from "@ohos.arkui" + +@Component +struct ResourceReferenceMain { + build() { + Column() { + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + Image($r('app.media.icon')) + .width(100) + .height(100) + .width(100) + .height(100) + .sourceSize({width:1392, height:1080}) + .borderWidth(1) + + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/src/stateVariables.ets b/koala_tools/ui2abc/perf-tests/src/stateVariables.ets new file mode 100644 index 0000000000000000000000000000000000000000..bc4bf55d28dc7524255f5ab9942ea5d8eb9eb8ce --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/src/stateVariables.ets @@ -0,0 +1,3750 @@ + +/** + * 状态变量 stateVariables.ets + */ + +import { State, Prop, Provide, Consume, Link } from "@ohos.arkui" +import { Component, Column, ClickEvent, Button } from "@ohos.arkui" + +@Component +struct StateVariablesMain { + //============================================================================= + @State prop_num0: number = 0; + @State prop_num1: number = 0; + @State prop_num2: number = 0; + @State prop_num3: number = 0; + @State prop_num4: number = 0; + @State prop_num5: number = 0; + @State prop_num6: number = 0; + @State prop_num7: number = 0; + @State prop_num8: number = 0; + @State prop_num9: number = 0; + @State prop_num10: number = 0; + @State prop_num11: number = 0; + @State prop_num12: number = 0; + @State prop_num13: number = 0; + @State prop_num14: number = 0; + @State prop_num15: number = 0; + @State prop_num16: number = 0; + @State prop_num17: number = 0; + @State prop_num18: number = 0; + @State prop_num19: number = 0; + @State prop_num20: number = 0; + @State prop_num21: number = 0; + @State prop_num22: number = 0; + @State prop_num23: number = 0; + @State prop_num24: number = 0; + @State prop_num25: number = 0; + @State prop_num26: number = 0; + @State prop_num27: number = 0; + @State prop_num28: number = 0; + @State prop_num29: number = 0; + @State prop_num30: number = 0; + @State prop_num31: number = 0; + @State prop_num32: number = 0; + @State prop_num33: number = 0; + @State prop_num34: number = 0; + @State prop_num35: number = 0; + @State prop_num36: number = 0; + @State prop_num37: number = 0; + @State prop_num38: number = 0; + @State prop_num39: number = 0; + @State prop_num40: number = 0; + @State prop_num41: number = 0; + @State prop_num42: number = 0; + @State prop_num43: number = 0; + @State prop_num44: number = 0; + @State prop_num45: number = 0; + @State prop_num46: number = 0; + @State prop_num47: number = 0; + @State prop_num48: number = 0; + @State prop_num49: number = 0; + @State prop_num50: number = 0; + @State prop_num51: number = 0; + @State prop_num52: number = 0; + @State prop_num53: number = 0; + @State prop_num54: number = 0; + @State prop_num55: number = 0; + @State prop_num56: number = 0; + @State prop_num57: number = 0; + @State prop_num58: number = 0; + @State prop_num59: number = 0; + @State prop_num60: number = 0; + @State prop_num61: number = 0; + @State prop_num62: number = 0; + @State prop_num63: number = 0; + @State prop_num64: number = 0; + @State prop_num65: number = 0; + @State prop_num66: number = 0; + @State prop_num67: number = 0; + @State prop_num68: number = 0; + @State prop_num69: number = 0; + @State prop_num70: number = 0; + @State prop_num71: number = 0; + @State prop_num72: number = 0; + @State prop_num73: number = 0; + @State prop_num74: number = 0; + @State prop_num75: number = 0; + @State prop_num76: number = 0; + @State prop_num77: number = 0; + @State prop_num78: number = 0; + @State prop_num79: number = 0; + @State prop_num80: number = 0; + @State prop_num81: number = 0; + @State prop_num82: number = 0; + @State prop_num83: number = 0; + @State prop_num84: number = 0; + @State prop_num85: number = 0; + @State prop_num86: number = 0; + @State prop_num87: number = 0; + @State prop_num88: number = 0; + @State prop_num89: number = 0; + @State prop_num90: number = 0; + @State prop_num91: number = 0; + @State prop_num92: number = 0; + @State prop_num93: number = 0; + @State prop_num94: number = 0; + @State prop_num95: number = 0; + @State prop_num96: number = 0; + @State prop_num97: number = 0; + @State prop_num98: number = 0; + @State prop_num99: number = 0; + @State prop_num100: number = 0; + @State prop_num101: number = 0; + @State prop_num102: number = 0; + @State prop_num103: number = 0; + @State prop_num104: number = 0; + @State prop_num105: number = 0; + @State prop_num106: number = 0; + @State prop_num107: number = 0; + @State prop_num108: number = 0; + @State prop_num109: number = 0; + @State prop_num110: number = 0; + @State prop_num111: number = 0; + @State prop_num112: number = 0; + @State prop_num113: number = 0; + @State prop_num114: number = 0; + @State prop_num115: number = 0; + @State prop_num116: number = 0; + @State prop_num117: number = 0; + @State prop_num118: number = 0; + @State prop_num119: number = 0; + @State prop_num120: number = 0; + @State prop_num121: number = 0; + @State prop_num122: number = 0; + @State prop_num123: number = 0; + @State prop_num124: number = 0; + @State prop_num125: number = 0; + @State prop_num126: number = 0; + @State prop_num127: number = 0; + @State prop_num128: number = 0; + @State prop_num129: number = 0; + @State prop_num130: number = 0; + @State prop_num131: number = 0; + @State prop_num132: number = 0; + @State prop_num133: number = 0; + @State prop_num134: number = 0; + @State prop_num135: number = 0; + @State prop_num136: number = 0; + @State prop_num137: number = 0; + @State prop_num138: number = 0; + @State prop_num139: number = 0; + @State prop_num140: number = 0; + @State prop_num141: number = 0; + @State prop_num142: number = 0; + @State prop_num143: number = 0; + @State prop_num144: number = 0; + @State prop_num145: number = 0; + @State prop_num146: number = 0; + @State prop_num147: number = 0; + @State prop_num148: number = 0; + @State prop_num149: number = 0; + @State prop_num150: number = 0; + @State prop_num151: number = 0; + @State prop_num152: number = 0; + @State prop_num153: number = 0; + @State prop_num154: number = 0; + @State prop_num155: number = 0; + @State prop_num156: number = 0; + @State prop_num157: number = 0; + @State prop_num158: number = 0; + @State prop_num159: number = 0; + @State prop_num160: number = 0; + @State prop_num161: number = 0; + @State prop_num162: number = 0; + @State prop_num163: number = 0; + @State prop_num164: number = 0; + @State prop_num165: number = 0; + @State prop_num166: number = 0; + @State prop_num167: number = 0; + @State prop_num168: number = 0; + @State prop_num169: number = 0; + @State prop_num170: number = 0; + @State prop_num171: number = 0; + @State prop_num172: number = 0; + @State prop_num173: number = 0; + @State prop_num174: number = 0; + @State prop_num175: number = 0; + @State prop_num176: number = 0; + @State prop_num177: number = 0; + @State prop_num178: number = 0; + @State prop_num179: number = 0; + @State prop_num180: number = 0; + @State prop_num181: number = 0; + @State prop_num182: number = 0; + @State prop_num183: number = 0; + @State prop_num184: number = 0; + @State prop_num185: number = 0; + @State prop_num186: number = 0; + @State prop_num187: number = 0; + @State prop_num188: number = 0; + @State prop_num189: number = 0; + @State prop_num190: number = 0; + @State prop_num191: number = 0; + @State prop_num192: number = 0; + @State prop_num193: number = 0; + @State prop_num194: number = 0; + @State prop_num195: number = 0; + @State prop_num196: number = 0; + @State prop_num197: number = 0; + @State prop_num198: number = 0; + @State prop_num199: number = 0; + @State prop_num200: number = 0; + @State prop_num201: number = 0; + @State prop_num202: number = 0; + @State prop_num203: number = 0; + @State prop_num204: number = 0; + @State prop_num205: number = 0; + @State prop_num206: number = 0; + @State prop_num207: number = 0; + @State prop_num208: number = 0; + @State prop_num209: number = 0; + @State prop_num210: number = 0; + @State prop_num211: number = 0; + @State prop_num212: number = 0; + @State prop_num213: number = 0; + @State prop_num214: number = 0; + @State prop_num215: number = 0; + @State prop_num216: number = 0; + @State prop_num217: number = 0; + @State prop_num218: number = 0; + @State prop_num219: number = 0; + @State prop_num220: number = 0; + @State prop_num221: number = 0; + @State prop_num222: number = 0; + @State prop_num223: number = 0; + @State prop_num224: number = 0; + @State prop_num225: number = 0; + @State prop_num226: number = 0; + @State prop_num227: number = 0; + @State prop_num228: number = 0; + @State prop_num229: number = 0; + @State prop_num230: number = 0; + @State prop_num231: number = 0; + @State prop_num232: number = 0; + @State prop_num233: number = 0; + @State prop_num234: number = 0; + @State prop_num235: number = 0; + @State prop_num236: number = 0; + @State prop_num237: number = 0; + @State prop_num238: number = 0; + @State prop_num239: number = 0; + @State prop_num240: number = 0; + @State prop_num241: number = 0; + @State prop_num242: number = 0; + @State prop_num243: number = 0; + @State prop_num244: number = 0; + @State prop_num245: number = 0; + @State prop_num246: number = 0; + @State prop_num247: number = 0; + @State prop_num248: number = 0; + @State prop_num249: number = 0; + @State prop_num250: number = 0; + @State prop_num251: number = 0; + @State prop_num252: number = 0; + @State prop_num253: number = 0; + @State prop_num254: number = 0; + @State prop_num255: number = 0; + @State prop_num256: number = 0; + @State prop_num257: number = 0; + @State prop_num258: number = 0; + @State prop_num259: number = 0; + @State prop_num260: number = 0; + @State prop_num261: number = 0; + @State prop_num262: number = 0; + @State prop_num263: number = 0; + @State prop_num264: number = 0; + @State prop_num265: number = 0; + @State prop_num266: number = 0; + @State prop_num267: number = 0; + @State prop_num268: number = 0; + @State prop_num269: number = 0; + @State prop_num270: number = 0; + @State prop_num271: number = 0; + @State prop_num272: number = 0; + @State prop_num273: number = 0; + @State prop_num274: number = 0; + @State prop_num275: number = 0; + @State prop_num276: number = 0; + @State prop_num277: number = 0; + @State prop_num278: number = 0; + @State prop_num279: number = 0; + @State prop_num280: number = 0; + @State prop_num281: number = 0; + @State prop_num282: number = 0; + @State prop_num283: number = 0; + @State prop_num284: number = 0; + @State prop_num285: number = 0; + @State prop_num286: number = 0; + @State prop_num287: number = 0; + @State prop_num288: number = 0; + @State prop_num289: number = 0; + @State prop_num290: number = 0; + @State prop_num291: number = 0; + @State prop_num292: number = 0; + @State prop_num293: number = 0; + @State prop_num294: number = 0; + @State prop_num295: number = 0; + @State prop_num296: number = 0; + @State prop_num297: number = 0; + @State prop_num298: number = 0; + @State prop_num299: number = 0; + @State prop_num300: number = 0; + @State prop_num301: number = 0; + @State prop_num302: number = 0; + @State prop_num303: number = 0; + @State prop_num304: number = 0; + @State prop_num305: number = 0; + @State prop_num306: number = 0; + @State prop_num307: number = 0; + @State prop_num308: number = 0; + @State prop_num309: number = 0; + @State prop_num310: number = 0; + @State prop_num311: number = 0; + @State prop_num312: number = 0; + @State prop_num313: number = 0; + @State prop_num314: number = 0; + @State prop_num315: number = 0; + @State prop_num316: number = 0; + @State prop_num317: number = 0; + @State prop_num318: number = 0; + @State prop_num319: number = 0; + @State prop_num320: number = 0; + @State prop_num321: number = 0; + @State prop_num322: number = 0; + @State prop_num323: number = 0; + @State prop_num324: number = 0; + @State prop_num325: number = 0; + @State prop_num326: number = 0; + @State prop_num327: number = 0; + @State prop_num328: number = 0; + @State prop_num329: number = 0; + @State prop_num330: number = 0; + @State prop_num331: number = 0; + @State prop_num332: number = 0; + + + //============================================================================= + @State link_num0: number = 0; + @State link_num1: number = 0; + @State link_num2: number = 0; + @State link_num3: number = 0; + @State link_num4: number = 0; + @State link_num5: number = 0; + @State link_num6: number = 0; + @State link_num7: number = 0; + @State link_num8: number = 0; + @State link_num9: number = 0; + @State link_num10: number = 0; + @State link_num11: number = 0; + @State link_num12: number = 0; + @State link_num13: number = 0; + @State link_num14: number = 0; + @State link_num15: number = 0; + @State link_num16: number = 0; + @State link_num17: number = 0; + @State link_num18: number = 0; + @State link_num19: number = 0; + @State link_num20: number = 0; + @State link_num21: number = 0; + @State link_num22: number = 0; + @State link_num23: number = 0; + @State link_num24: number = 0; + @State link_num25: number = 0; + @State link_num26: number = 0; + @State link_num27: number = 0; + @State link_num28: number = 0; + @State link_num29: number = 0; + @State link_num30: number = 0; + @State link_num31: number = 0; + @State link_num32: number = 0; + @State link_num33: number = 0; + @State link_num34: number = 0; + @State link_num35: number = 0; + @State link_num36: number = 0; + @State link_num37: number = 0; + @State link_num38: number = 0; + @State link_num39: number = 0; + @State link_num40: number = 0; + @State link_num41: number = 0; + @State link_num42: number = 0; + @State link_num43: number = 0; + @State link_num44: number = 0; + @State link_num45: number = 0; + @State link_num46: number = 0; + @State link_num47: number = 0; + @State link_num48: number = 0; + @State link_num49: number = 0; + @State link_num50: number = 0; + @State link_num51: number = 0; + @State link_num52: number = 0; + @State link_num53: number = 0; + @State link_num54: number = 0; + @State link_num55: number = 0; + @State link_num56: number = 0; + @State link_num57: number = 0; + @State link_num58: number = 0; + @State link_num59: number = 0; + @State link_num60: number = 0; + @State link_num61: number = 0; + @State link_num62: number = 0; + @State link_num63: number = 0; + @State link_num64: number = 0; + @State link_num65: number = 0; + @State link_num66: number = 0; + @State link_num67: number = 0; + @State link_num68: number = 0; + @State link_num69: number = 0; + @State link_num70: number = 0; + @State link_num71: number = 0; + @State link_num72: number = 0; + @State link_num73: number = 0; + @State link_num74: number = 0; + @State link_num75: number = 0; + @State link_num76: number = 0; + @State link_num77: number = 0; + @State link_num78: number = 0; + @State link_num79: number = 0; + @State link_num80: number = 0; + @State link_num81: number = 0; + @State link_num82: number = 0; + @State link_num83: number = 0; + @State link_num84: number = 0; + @State link_num85: number = 0; + @State link_num86: number = 0; + @State link_num87: number = 0; + @State link_num88: number = 0; + @State link_num89: number = 0; + @State link_num90: number = 0; + @State link_num91: number = 0; + @State link_num92: number = 0; + @State link_num93: number = 0; + @State link_num94: number = 0; + @State link_num95: number = 0; + @State link_num96: number = 0; + @State link_num97: number = 0; + @State link_num98: number = 0; + @State link_num99: number = 0; + @State link_num100: number = 0; + @State link_num101: number = 0; + @State link_num102: number = 0; + @State link_num103: number = 0; + @State link_num104: number = 0; + @State link_num105: number = 0; + @State link_num106: number = 0; + @State link_num107: number = 0; + @State link_num108: number = 0; + @State link_num109: number = 0; + @State link_num110: number = 0; + @State link_num111: number = 0; + @State link_num112: number = 0; + @State link_num113: number = 0; + @State link_num114: number = 0; + @State link_num115: number = 0; + @State link_num116: number = 0; + @State link_num117: number = 0; + @State link_num118: number = 0; + @State link_num119: number = 0; + @State link_num120: number = 0; + @State link_num121: number = 0; + @State link_num122: number = 0; + @State link_num123: number = 0; + @State link_num124: number = 0; + @State link_num125: number = 0; + @State link_num126: number = 0; + @State link_num127: number = 0; + @State link_num128: number = 0; + @State link_num129: number = 0; + @State link_num130: number = 0; + @State link_num131: number = 0; + @State link_num132: number = 0; + @State link_num133: number = 0; + @State link_num134: number = 0; + @State link_num135: number = 0; + @State link_num136: number = 0; + @State link_num137: number = 0; + @State link_num138: number = 0; + @State link_num139: number = 0; + @State link_num140: number = 0; + @State link_num141: number = 0; + @State link_num142: number = 0; + @State link_num143: number = 0; + @State link_num144: number = 0; + @State link_num145: number = 0; + @State link_num146: number = 0; + @State link_num147: number = 0; + @State link_num148: number = 0; + @State link_num149: number = 0; + @State link_num150: number = 0; + @State link_num151: number = 0; + @State link_num152: number = 0; + @State link_num153: number = 0; + @State link_num154: number = 0; + @State link_num155: number = 0; + @State link_num156: number = 0; + @State link_num157: number = 0; + @State link_num158: number = 0; + @State link_num159: number = 0; + @State link_num160: number = 0; + @State link_num161: number = 0; + @State link_num162: number = 0; + @State link_num163: number = 0; + @State link_num164: number = 0; + @State link_num165: number = 0; + @State link_num166: number = 0; + @State link_num167: number = 0; + @State link_num168: number = 0; + @State link_num169: number = 0; + @State link_num170: number = 0; + @State link_num171: number = 0; + @State link_num172: number = 0; + @State link_num173: number = 0; + @State link_num174: number = 0; + @State link_num175: number = 0; + @State link_num176: number = 0; + @State link_num177: number = 0; + @State link_num178: number = 0; + @State link_num179: number = 0; + @State link_num180: number = 0; + @State link_num181: number = 0; + @State link_num182: number = 0; + @State link_num183: number = 0; + @State link_num184: number = 0; + @State link_num185: number = 0; + @State link_num186: number = 0; + @State link_num187: number = 0; + @State link_num188: number = 0; + @State link_num189: number = 0; + @State link_num190: number = 0; + @State link_num191: number = 0; + @State link_num192: number = 0; + @State link_num193: number = 0; + @State link_num194: number = 0; + @State link_num195: number = 0; + @State link_num196: number = 0; + @State link_num197: number = 0; + @State link_num198: number = 0; + @State link_num199: number = 0; + @State link_num200: number = 0; + @State link_num201: number = 0; + @State link_num202: number = 0; + @State link_num203: number = 0; + @State link_num204: number = 0; + @State link_num205: number = 0; + @State link_num206: number = 0; + @State link_num207: number = 0; + @State link_num208: number = 0; + @State link_num209: number = 0; + @State link_num210: number = 0; + @State link_num211: number = 0; + @State link_num212: number = 0; + @State link_num213: number = 0; + @State link_num214: number = 0; + @State link_num215: number = 0; + @State link_num216: number = 0; + @State link_num217: number = 0; + @State link_num218: number = 0; + @State link_num219: number = 0; + @State link_num220: number = 0; + @State link_num221: number = 0; + @State link_num222: number = 0; + @State link_num223: number = 0; + @State link_num224: number = 0; + @State link_num225: number = 0; + @State link_num226: number = 0; + @State link_num227: number = 0; + @State link_num228: number = 0; + @State link_num229: number = 0; + @State link_num230: number = 0; + @State link_num231: number = 0; + @State link_num232: number = 0; + @State link_num233: number = 0; + @State link_num234: number = 0; + @State link_num235: number = 0; + @State link_num236: number = 0; + @State link_num237: number = 0; + @State link_num238: number = 0; + @State link_num239: number = 0; + @State link_num240: number = 0; + @State link_num241: number = 0; + @State link_num242: number = 0; + @State link_num243: number = 0; + @State link_num244: number = 0; + @State link_num245: number = 0; + @State link_num246: number = 0; + @State link_num247: number = 0; + @State link_num248: number = 0; + @State link_num249: number = 0; + @State link_num250: number = 0; + @State link_num251: number = 0; + @State link_num252: number = 0; + @State link_num253: number = 0; + @State link_num254: number = 0; + @State link_num255: number = 0; + @State link_num256: number = 0; + @State link_num257: number = 0; + @State link_num258: number = 0; + @State link_num259: number = 0; + @State link_num260: number = 0; + @State link_num261: number = 0; + @State link_num262: number = 0; + @State link_num263: number = 0; + @State link_num264: number = 0; + @State link_num265: number = 0; + @State link_num266: number = 0; + @State link_num267: number = 0; + @State link_num268: number = 0; + @State link_num269: number = 0; + @State link_num270: number = 0; + @State link_num271: number = 0; + @State link_num272: number = 0; + @State link_num273: number = 0; + @State link_num274: number = 0; + @State link_num275: number = 0; + @State link_num276: number = 0; + @State link_num277: number = 0; + @State link_num278: number = 0; + @State link_num279: number = 0; + @State link_num280: number = 0; + @State link_num281: number = 0; + @State link_num282: number = 0; + @State link_num283: number = 0; + @State link_num284: number = 0; + @State link_num285: number = 0; + @State link_num286: number = 0; + @State link_num287: number = 0; + @State link_num288: number = 0; + @State link_num289: number = 0; + @State link_num290: number = 0; + @State link_num291: number = 0; + @State link_num292: number = 0; + @State link_num293: number = 0; + @State link_num294: number = 0; + @State link_num295: number = 0; + @State link_num296: number = 0; + @State link_num297: number = 0; + @State link_num298: number = 0; + @State link_num299: number = 0; + @State link_num300: number = 0; + @State link_num301: number = 0; + @State link_num302: number = 0; + @State link_num303: number = 0; + @State link_num304: number = 0; + @State link_num305: number = 0; + @State link_num306: number = 0; + @State link_num307: number = 0; + @State link_num308: number = 0; + @State link_num309: number = 0; + @State link_num310: number = 0; + @State link_num311: number = 0; + @State link_num312: number = 0; + @State link_num313: number = 0; + @State link_num314: number = 0; + @State link_num315: number = 0; + @State link_num316: number = 0; + @State link_num317: number = 0; + @State link_num318: number = 0; + @State link_num319: number = 0; + @State link_num320: number = 0; + @State link_num321: number = 0; + @State link_num322: number = 0; + @State link_num323: number = 0; + @State link_num324: number = 0; + @State link_num325: number = 0; + @State link_num326: number = 0; + @State link_num327: number = 0; + @State link_num328: number = 0; + @State link_num329: number = 0; + @State link_num330: number = 0; + @State link_num331: number = 0; + @State link_num332: number = 0; + + + //============================================================================= + @Provide consume_num0: number = 0; + @Provide consume_num1: number = 0; + @Provide consume_num2: number = 0; + @Provide consume_num3: number = 0; + @Provide consume_num4: number = 0; + @Provide consume_num5: number = 0; + @Provide consume_num6: number = 0; + @Provide consume_num7: number = 0; + @Provide consume_num8: number = 0; + @Provide consume_num9: number = 0; + @Provide consume_num10: number = 0; + @Provide consume_num11: number = 0; + @Provide consume_num12: number = 0; + @Provide consume_num13: number = 0; + @Provide consume_num14: number = 0; + @Provide consume_num15: number = 0; + @Provide consume_num16: number = 0; + @Provide consume_num17: number = 0; + @Provide consume_num18: number = 0; + @Provide consume_num19: number = 0; + @Provide consume_num20: number = 0; + @Provide consume_num21: number = 0; + @Provide consume_num22: number = 0; + @Provide consume_num23: number = 0; + @Provide consume_num24: number = 0; + @Provide consume_num25: number = 0; + @Provide consume_num26: number = 0; + @Provide consume_num27: number = 0; + @Provide consume_num28: number = 0; + @Provide consume_num29: number = 0; + @Provide consume_num30: number = 0; + @Provide consume_num31: number = 0; + @Provide consume_num32: number = 0; + @Provide consume_num33: number = 0; + @Provide consume_num34: number = 0; + @Provide consume_num35: number = 0; + @Provide consume_num36: number = 0; + @Provide consume_num37: number = 0; + @Provide consume_num38: number = 0; + @Provide consume_num39: number = 0; + @Provide consume_num40: number = 0; + @Provide consume_num41: number = 0; + @Provide consume_num42: number = 0; + @Provide consume_num43: number = 0; + @Provide consume_num44: number = 0; + @Provide consume_num45: number = 0; + @Provide consume_num46: number = 0; + @Provide consume_num47: number = 0; + @Provide consume_num48: number = 0; + @Provide consume_num49: number = 0; + @Provide consume_num50: number = 0; + @Provide consume_num51: number = 0; + @Provide consume_num52: number = 0; + @Provide consume_num53: number = 0; + @Provide consume_num54: number = 0; + @Provide consume_num55: number = 0; + @Provide consume_num56: number = 0; + @Provide consume_num57: number = 0; + @Provide consume_num58: number = 0; + @Provide consume_num59: number = 0; + @Provide consume_num60: number = 0; + @Provide consume_num61: number = 0; + @Provide consume_num62: number = 0; + @Provide consume_num63: number = 0; + @Provide consume_num64: number = 0; + @Provide consume_num65: number = 0; + @Provide consume_num66: number = 0; + @Provide consume_num67: number = 0; + @Provide consume_num68: number = 0; + @Provide consume_num69: number = 0; + @Provide consume_num70: number = 0; + @Provide consume_num71: number = 0; + @Provide consume_num72: number = 0; + @Provide consume_num73: number = 0; + @Provide consume_num74: number = 0; + @Provide consume_num75: number = 0; + @Provide consume_num76: number = 0; + @Provide consume_num77: number = 0; + @Provide consume_num78: number = 0; + @Provide consume_num79: number = 0; + @Provide consume_num80: number = 0; + @Provide consume_num81: number = 0; + @Provide consume_num82: number = 0; + @Provide consume_num83: number = 0; + @Provide consume_num84: number = 0; + @Provide consume_num85: number = 0; + @Provide consume_num86: number = 0; + @Provide consume_num87: number = 0; + @Provide consume_num88: number = 0; + @Provide consume_num89: number = 0; + @Provide consume_num90: number = 0; + @Provide consume_num91: number = 0; + @Provide consume_num92: number = 0; + @Provide consume_num93: number = 0; + @Provide consume_num94: number = 0; + @Provide consume_num95: number = 0; + @Provide consume_num96: number = 0; + @Provide consume_num97: number = 0; + @Provide consume_num98: number = 0; + @Provide consume_num99: number = 0; + @Provide consume_num100: number = 0; + @Provide consume_num101: number = 0; + @Provide consume_num102: number = 0; + @Provide consume_num103: number = 0; + @Provide consume_num104: number = 0; + @Provide consume_num105: number = 0; + @Provide consume_num106: number = 0; + @Provide consume_num107: number = 0; + @Provide consume_num108: number = 0; + @Provide consume_num109: number = 0; + @Provide consume_num110: number = 0; + @Provide consume_num111: number = 0; + @Provide consume_num112: number = 0; + @Provide consume_num113: number = 0; + @Provide consume_num114: number = 0; + @Provide consume_num115: number = 0; + @Provide consume_num116: number = 0; + @Provide consume_num117: number = 0; + @Provide consume_num118: number = 0; + @Provide consume_num119: number = 0; + @Provide consume_num120: number = 0; + @Provide consume_num121: number = 0; + @Provide consume_num122: number = 0; + @Provide consume_num123: number = 0; + @Provide consume_num124: number = 0; + @Provide consume_num125: number = 0; + @Provide consume_num126: number = 0; + @Provide consume_num127: number = 0; + @Provide consume_num128: number = 0; + @Provide consume_num129: number = 0; + @Provide consume_num130: number = 0; + @Provide consume_num131: number = 0; + @Provide consume_num132: number = 0; + @Provide consume_num133: number = 0; + @Provide consume_num134: number = 0; + @Provide consume_num135: number = 0; + @Provide consume_num136: number = 0; + @Provide consume_num137: number = 0; + @Provide consume_num138: number = 0; + @Provide consume_num139: number = 0; + @Provide consume_num140: number = 0; + @Provide consume_num141: number = 0; + @Provide consume_num142: number = 0; + @Provide consume_num143: number = 0; + @Provide consume_num144: number = 0; + @Provide consume_num145: number = 0; + @Provide consume_num146: number = 0; + @Provide consume_num147: number = 0; + @Provide consume_num148: number = 0; + @Provide consume_num149: number = 0; + @Provide consume_num150: number = 0; + @Provide consume_num151: number = 0; + @Provide consume_num152: number = 0; + @Provide consume_num153: number = 0; + @Provide consume_num154: number = 0; + @Provide consume_num155: number = 0; + @Provide consume_num156: number = 0; + @Provide consume_num157: number = 0; + @Provide consume_num158: number = 0; + @Provide consume_num159: number = 0; + @Provide consume_num160: number = 0; + @Provide consume_num161: number = 0; + @Provide consume_num162: number = 0; + @Provide consume_num163: number = 0; + @Provide consume_num164: number = 0; + @Provide consume_num165: number = 0; + @Provide consume_num166: number = 0; + @Provide consume_num167: number = 0; + @Provide consume_num168: number = 0; + @Provide consume_num169: number = 0; + @Provide consume_num170: number = 0; + @Provide consume_num171: number = 0; + @Provide consume_num172: number = 0; + @Provide consume_num173: number = 0; + @Provide consume_num174: number = 0; + @Provide consume_num175: number = 0; + @Provide consume_num176: number = 0; + @Provide consume_num177: number = 0; + @Provide consume_num178: number = 0; + @Provide consume_num179: number = 0; + @Provide consume_num180: number = 0; + @Provide consume_num181: number = 0; + @Provide consume_num182: number = 0; + @Provide consume_num183: number = 0; + @Provide consume_num184: number = 0; + @Provide consume_num185: number = 0; + @Provide consume_num186: number = 0; + @Provide consume_num187: number = 0; + @Provide consume_num188: number = 0; + @Provide consume_num189: number = 0; + @Provide consume_num190: number = 0; + @Provide consume_num191: number = 0; + @Provide consume_num192: number = 0; + @Provide consume_num193: number = 0; + @Provide consume_num194: number = 0; + @Provide consume_num195: number = 0; + @Provide consume_num196: number = 0; + @Provide consume_num197: number = 0; + @Provide consume_num198: number = 0; + @Provide consume_num199: number = 0; + @Provide consume_num200: number = 0; + @Provide consume_num201: number = 0; + @Provide consume_num202: number = 0; + @Provide consume_num203: number = 0; + @Provide consume_num204: number = 0; + @Provide consume_num205: number = 0; + @Provide consume_num206: number = 0; + @Provide consume_num207: number = 0; + @Provide consume_num208: number = 0; + @Provide consume_num209: number = 0; + @Provide consume_num210: number = 0; + @Provide consume_num211: number = 0; + @Provide consume_num212: number = 0; + @Provide consume_num213: number = 0; + @Provide consume_num214: number = 0; + @Provide consume_num215: number = 0; + @Provide consume_num216: number = 0; + @Provide consume_num217: number = 0; + @Provide consume_num218: number = 0; + @Provide consume_num219: number = 0; + @Provide consume_num220: number = 0; + @Provide consume_num221: number = 0; + @Provide consume_num222: number = 0; + @Provide consume_num223: number = 0; + @Provide consume_num224: number = 0; + @Provide consume_num225: number = 0; + @Provide consume_num226: number = 0; + @Provide consume_num227: number = 0; + @Provide consume_num228: number = 0; + @Provide consume_num229: number = 0; + @Provide consume_num230: number = 0; + @Provide consume_num231: number = 0; + @Provide consume_num232: number = 0; + @Provide consume_num233: number = 0; + @Provide consume_num234: number = 0; + @Provide consume_num235: number = 0; + @Provide consume_num236: number = 0; + @Provide consume_num237: number = 0; + @Provide consume_num238: number = 0; + @Provide consume_num239: number = 0; + @Provide consume_num240: number = 0; + @Provide consume_num241: number = 0; + @Provide consume_num242: number = 0; + @Provide consume_num243: number = 0; + @Provide consume_num244: number = 0; + @Provide consume_num245: number = 0; + @Provide consume_num246: number = 0; + @Provide consume_num247: number = 0; + @Provide consume_num248: number = 0; + @Provide consume_num249: number = 0; + @Provide consume_num250: number = 0; + @Provide consume_num251: number = 0; + @Provide consume_num252: number = 0; + @Provide consume_num253: number = 0; + @Provide consume_num254: number = 0; + @Provide consume_num255: number = 0; + @Provide consume_num256: number = 0; + @Provide consume_num257: number = 0; + @Provide consume_num258: number = 0; + @Provide consume_num259: number = 0; + @Provide consume_num260: number = 0; + @Provide consume_num261: number = 0; + @Provide consume_num262: number = 0; + @Provide consume_num263: number = 0; + @Provide consume_num264: number = 0; + @Provide consume_num265: number = 0; + @Provide consume_num266: number = 0; + @Provide consume_num267: number = 0; + @Provide consume_num268: number = 0; + @Provide consume_num269: number = 0; + @Provide consume_num270: number = 0; + @Provide consume_num271: number = 0; + @Provide consume_num272: number = 0; + @Provide consume_num273: number = 0; + @Provide consume_num274: number = 0; + @Provide consume_num275: number = 0; + @Provide consume_num276: number = 0; + @Provide consume_num277: number = 0; + @Provide consume_num278: number = 0; + @Provide consume_num279: number = 0; + @Provide consume_num280: number = 0; + @Provide consume_num281: number = 0; + @Provide consume_num282: number = 0; + @Provide consume_num283: number = 0; + @Provide consume_num284: number = 0; + @Provide consume_num285: number = 0; + @Provide consume_num286: number = 0; + @Provide consume_num287: number = 0; + @Provide consume_num288: number = 0; + @Provide consume_num289: number = 0; + @Provide consume_num290: number = 0; + @Provide consume_num291: number = 0; + @Provide consume_num292: number = 0; + @Provide consume_num293: number = 0; + @Provide consume_num294: number = 0; + @Provide consume_num295: number = 0; + @Provide consume_num296: number = 0; + @Provide consume_num297: number = 0; + @Provide consume_num298: number = 0; + @Provide consume_num299: number = 0; + @Provide consume_num300: number = 0; + @Provide consume_num301: number = 0; + @Provide consume_num302: number = 0; + @Provide consume_num303: number = 0; + @Provide consume_num304: number = 0; + @Provide consume_num305: number = 0; + @Provide consume_num306: number = 0; + @Provide consume_num307: number = 0; + @Provide consume_num308: number = 0; + @Provide consume_num309: number = 0; + @Provide consume_num310: number = 0; + @Provide consume_num311: number = 0; + @Provide consume_num312: number = 0; + @Provide consume_num313: number = 0; + @Provide consume_num314: number = 0; + @Provide consume_num315: number = 0; + @Provide consume_num316: number = 0; + @Provide consume_num317: number = 0; + @Provide consume_num318: number = 0; + @Provide consume_num319: number = 0; + @Provide consume_num320: number = 0; + @Provide consume_num321: number = 0; + @Provide consume_num322: number = 0; + @Provide consume_num323: number = 0; + @Provide consume_num324: number = 0; + @Provide consume_num325: number = 0; + @Provide consume_num326: number = 0; + @Provide consume_num327: number = 0; + @Provide consume_num328: number = 0; + @Provide consume_num329: number = 0; + @Provide consume_num330: number = 0; + @Provide consume_num331: number = 0; + @Provide consume_num332: number = 0; + + + build() { + Column() { + //============================================================================= + PropVariables( + { + prop_num0: this.prop_num0, + prop_num1: this.prop_num1, + prop_num2: this.prop_num2, + prop_num3: this.prop_num3, + prop_num4: this.prop_num4, + prop_num5: this.prop_num5, + prop_num6: this.prop_num6, + prop_num7: this.prop_num7, + prop_num8: this.prop_num8, + prop_num9: this.prop_num9, + prop_num10: this.prop_num10, + prop_num11: this.prop_num11, + prop_num12: this.prop_num12, + prop_num13: this.prop_num13, + prop_num14: this.prop_num14, + prop_num15: this.prop_num15, + prop_num16: this.prop_num16, + prop_num17: this.prop_num17, + prop_num18: this.prop_num18, + prop_num19: this.prop_num19, + prop_num20: this.prop_num20, + prop_num21: this.prop_num21, + prop_num22: this.prop_num22, + prop_num23: this.prop_num23, + prop_num24: this.prop_num24, + prop_num25: this.prop_num25, + prop_num26: this.prop_num26, + prop_num27: this.prop_num27, + prop_num28: this.prop_num28, + prop_num29: this.prop_num29, + prop_num30: this.prop_num30, + prop_num31: this.prop_num31, + prop_num32: this.prop_num32, + prop_num33: this.prop_num33, + prop_num34: this.prop_num34, + prop_num35: this.prop_num35, + prop_num36: this.prop_num36, + prop_num37: this.prop_num37, + prop_num38: this.prop_num38, + prop_num39: this.prop_num39, + prop_num40: this.prop_num40, + prop_num41: this.prop_num41, + prop_num42: this.prop_num42, + prop_num43: this.prop_num43, + prop_num44: this.prop_num44, + prop_num45: this.prop_num45, + prop_num46: this.prop_num46, + prop_num47: this.prop_num47, + prop_num48: this.prop_num48, + prop_num49: this.prop_num49, + prop_num50: this.prop_num50, + prop_num51: this.prop_num51, + prop_num52: this.prop_num52, + prop_num53: this.prop_num53, + prop_num54: this.prop_num54, + prop_num55: this.prop_num55, + prop_num56: this.prop_num56, + prop_num57: this.prop_num57, + prop_num58: this.prop_num58, + prop_num59: this.prop_num59, + prop_num60: this.prop_num60, + prop_num61: this.prop_num61, + prop_num62: this.prop_num62, + prop_num63: this.prop_num63, + prop_num64: this.prop_num64, + prop_num65: this.prop_num65, + prop_num66: this.prop_num66, + prop_num67: this.prop_num67, + prop_num68: this.prop_num68, + prop_num69: this.prop_num69, + prop_num70: this.prop_num70, + prop_num71: this.prop_num71, + prop_num72: this.prop_num72, + prop_num73: this.prop_num73, + prop_num74: this.prop_num74, + prop_num75: this.prop_num75, + prop_num76: this.prop_num76, + prop_num77: this.prop_num77, + prop_num78: this.prop_num78, + prop_num79: this.prop_num79, + prop_num80: this.prop_num80, + prop_num81: this.prop_num81, + prop_num82: this.prop_num82, + prop_num83: this.prop_num83, + prop_num84: this.prop_num84, + prop_num85: this.prop_num85, + prop_num86: this.prop_num86, + prop_num87: this.prop_num87, + prop_num88: this.prop_num88, + prop_num89: this.prop_num89, + prop_num90: this.prop_num90, + prop_num91: this.prop_num91, + prop_num92: this.prop_num92, + prop_num93: this.prop_num93, + prop_num94: this.prop_num94, + prop_num95: this.prop_num95, + prop_num96: this.prop_num96, + prop_num97: this.prop_num97, + prop_num98: this.prop_num98, + prop_num99: this.prop_num99, + prop_num100: this.prop_num100, + prop_num101: this.prop_num101, + prop_num102: this.prop_num102, + prop_num103: this.prop_num103, + prop_num104: this.prop_num104, + prop_num105: this.prop_num105, + prop_num106: this.prop_num106, + prop_num107: this.prop_num107, + prop_num108: this.prop_num108, + prop_num109: this.prop_num109, + prop_num110: this.prop_num110, + prop_num111: this.prop_num111, + prop_num112: this.prop_num112, + prop_num113: this.prop_num113, + prop_num114: this.prop_num114, + prop_num115: this.prop_num115, + prop_num116: this.prop_num116, + prop_num117: this.prop_num117, + prop_num118: this.prop_num118, + prop_num119: this.prop_num119, + prop_num120: this.prop_num120, + prop_num121: this.prop_num121, + prop_num122: this.prop_num122, + prop_num123: this.prop_num123, + prop_num124: this.prop_num124, + prop_num125: this.prop_num125, + prop_num126: this.prop_num126, + prop_num127: this.prop_num127, + prop_num128: this.prop_num128, + prop_num129: this.prop_num129, + prop_num130: this.prop_num130, + prop_num131: this.prop_num131, + prop_num132: this.prop_num132, + prop_num133: this.prop_num133, + prop_num134: this.prop_num134, + prop_num135: this.prop_num135, + prop_num136: this.prop_num136, + prop_num137: this.prop_num137, + prop_num138: this.prop_num138, + prop_num139: this.prop_num139, + prop_num140: this.prop_num140, + prop_num141: this.prop_num141, + prop_num142: this.prop_num142, + prop_num143: this.prop_num143, + prop_num144: this.prop_num144, + prop_num145: this.prop_num145, + prop_num146: this.prop_num146, + prop_num147: this.prop_num147, + prop_num148: this.prop_num148, + prop_num149: this.prop_num149, + prop_num150: this.prop_num150, + prop_num151: this.prop_num151, + prop_num152: this.prop_num152, + prop_num153: this.prop_num153, + prop_num154: this.prop_num154, + prop_num155: this.prop_num155, + prop_num156: this.prop_num156, + prop_num157: this.prop_num157, + prop_num158: this.prop_num158, + prop_num159: this.prop_num159, + prop_num160: this.prop_num160, + prop_num161: this.prop_num161, + prop_num162: this.prop_num162, + prop_num163: this.prop_num163, + prop_num164: this.prop_num164, + prop_num165: this.prop_num165, + prop_num166: this.prop_num166, + prop_num167: this.prop_num167, + prop_num168: this.prop_num168, + prop_num169: this.prop_num169, + prop_num170: this.prop_num170, + prop_num171: this.prop_num171, + prop_num172: this.prop_num172, + prop_num173: this.prop_num173, + prop_num174: this.prop_num174, + prop_num175: this.prop_num175, + prop_num176: this.prop_num176, + prop_num177: this.prop_num177, + prop_num178: this.prop_num178, + prop_num179: this.prop_num179, + prop_num180: this.prop_num180, + prop_num181: this.prop_num181, + prop_num182: this.prop_num182, + prop_num183: this.prop_num183, + prop_num184: this.prop_num184, + prop_num185: this.prop_num185, + prop_num186: this.prop_num186, + prop_num187: this.prop_num187, + prop_num188: this.prop_num188, + prop_num189: this.prop_num189, + prop_num190: this.prop_num190, + prop_num191: this.prop_num191, + prop_num192: this.prop_num192, + prop_num193: this.prop_num193, + prop_num194: this.prop_num194, + prop_num195: this.prop_num195, + prop_num196: this.prop_num196, + prop_num197: this.prop_num197, + prop_num198: this.prop_num198, + prop_num199: this.prop_num199, + prop_num200: this.prop_num200, + prop_num201: this.prop_num201, + prop_num202: this.prop_num202, + prop_num203: this.prop_num203, + prop_num204: this.prop_num204, + prop_num205: this.prop_num205, + prop_num206: this.prop_num206, + prop_num207: this.prop_num207, + prop_num208: this.prop_num208, + prop_num209: this.prop_num209, + prop_num210: this.prop_num210, + prop_num211: this.prop_num211, + prop_num212: this.prop_num212, + prop_num213: this.prop_num213, + prop_num214: this.prop_num214, + prop_num215: this.prop_num215, + prop_num216: this.prop_num216, + prop_num217: this.prop_num217, + prop_num218: this.prop_num218, + prop_num219: this.prop_num219, + prop_num220: this.prop_num220, + prop_num221: this.prop_num221, + prop_num222: this.prop_num222, + prop_num223: this.prop_num223, + prop_num224: this.prop_num224, + prop_num225: this.prop_num225, + prop_num226: this.prop_num226, + prop_num227: this.prop_num227, + prop_num228: this.prop_num228, + prop_num229: this.prop_num229, + prop_num230: this.prop_num230, + prop_num231: this.prop_num231, + prop_num232: this.prop_num232, + prop_num233: this.prop_num233, + prop_num234: this.prop_num234, + prop_num235: this.prop_num235, + prop_num236: this.prop_num236, + prop_num237: this.prop_num237, + prop_num238: this.prop_num238, + prop_num239: this.prop_num239, + prop_num240: this.prop_num240, + prop_num241: this.prop_num241, + prop_num242: this.prop_num242, + prop_num243: this.prop_num243, + prop_num244: this.prop_num244, + prop_num245: this.prop_num245, + prop_num246: this.prop_num246, + prop_num247: this.prop_num247, + prop_num248: this.prop_num248, + prop_num249: this.prop_num249, + prop_num250: this.prop_num250, + prop_num251: this.prop_num251, + prop_num252: this.prop_num252, + prop_num253: this.prop_num253, + prop_num254: this.prop_num254, + prop_num255: this.prop_num255, + prop_num256: this.prop_num256, + prop_num257: this.prop_num257, + prop_num258: this.prop_num258, + prop_num259: this.prop_num259, + prop_num260: this.prop_num260, + prop_num261: this.prop_num261, + prop_num262: this.prop_num262, + prop_num263: this.prop_num263, + prop_num264: this.prop_num264, + prop_num265: this.prop_num265, + prop_num266: this.prop_num266, + prop_num267: this.prop_num267, + prop_num268: this.prop_num268, + prop_num269: this.prop_num269, + prop_num270: this.prop_num270, + prop_num271: this.prop_num271, + prop_num272: this.prop_num272, + prop_num273: this.prop_num273, + prop_num274: this.prop_num274, + prop_num275: this.prop_num275, + prop_num276: this.prop_num276, + prop_num277: this.prop_num277, + prop_num278: this.prop_num278, + prop_num279: this.prop_num279, + prop_num280: this.prop_num280, + prop_num281: this.prop_num281, + prop_num282: this.prop_num282, + prop_num283: this.prop_num283, + prop_num284: this.prop_num284, + prop_num285: this.prop_num285, + prop_num286: this.prop_num286, + prop_num287: this.prop_num287, + prop_num288: this.prop_num288, + prop_num289: this.prop_num289, + prop_num290: this.prop_num290, + prop_num291: this.prop_num291, + prop_num292: this.prop_num292, + prop_num293: this.prop_num293, + prop_num294: this.prop_num294, + prop_num295: this.prop_num295, + prop_num296: this.prop_num296, + prop_num297: this.prop_num297, + prop_num298: this.prop_num298, + prop_num299: this.prop_num299, + prop_num300: this.prop_num300, + prop_num301: this.prop_num301, + prop_num302: this.prop_num302, + prop_num303: this.prop_num303, + prop_num304: this.prop_num304, + prop_num305: this.prop_num305, + prop_num306: this.prop_num306, + prop_num307: this.prop_num307, + prop_num308: this.prop_num308, + prop_num309: this.prop_num309, + prop_num310: this.prop_num310, + prop_num311: this.prop_num311, + prop_num312: this.prop_num312, + prop_num313: this.prop_num313, + prop_num314: this.prop_num314, + prop_num315: this.prop_num315, + prop_num316: this.prop_num316, + prop_num317: this.prop_num317, + prop_num318: this.prop_num318, + prop_num319: this.prop_num319, + prop_num320: this.prop_num320, + prop_num321: this.prop_num321, + prop_num322: this.prop_num322, + prop_num323: this.prop_num323, + prop_num324: this.prop_num324, + prop_num325: this.prop_num325, + prop_num326: this.prop_num326, + prop_num327: this.prop_num327, + prop_num328: this.prop_num328, + prop_num329: this.prop_num329, + prop_num330: this.prop_num330, + prop_num331: this.prop_num331, + prop_num332: this.prop_num332, + + } + ) + + //============================================================================= + LinkVariables( + { + link_num0: this.link_num0, + link_num1: this.link_num1, + link_num2: this.link_num2, + link_num3: this.link_num3, + link_num4: this.link_num4, + link_num5: this.link_num5, + link_num6: this.link_num6, + link_num7: this.link_num7, + link_num8: this.link_num8, + link_num9: this.link_num9, + link_num10: this.link_num10, + link_num11: this.link_num11, + link_num12: this.link_num12, + link_num13: this.link_num13, + link_num14: this.link_num14, + link_num15: this.link_num15, + link_num16: this.link_num16, + link_num17: this.link_num17, + link_num18: this.link_num18, + link_num19: this.link_num19, + link_num20: this.link_num20, + link_num21: this.link_num21, + link_num22: this.link_num22, + link_num23: this.link_num23, + link_num24: this.link_num24, + link_num25: this.link_num25, + link_num26: this.link_num26, + link_num27: this.link_num27, + link_num28: this.link_num28, + link_num29: this.link_num29, + link_num30: this.link_num30, + link_num31: this.link_num31, + link_num32: this.link_num32, + link_num33: this.link_num33, + link_num34: this.link_num34, + link_num35: this.link_num35, + link_num36: this.link_num36, + link_num37: this.link_num37, + link_num38: this.link_num38, + link_num39: this.link_num39, + link_num40: this.link_num40, + link_num41: this.link_num41, + link_num42: this.link_num42, + link_num43: this.link_num43, + link_num44: this.link_num44, + link_num45: this.link_num45, + link_num46: this.link_num46, + link_num47: this.link_num47, + link_num48: this.link_num48, + link_num49: this.link_num49, + link_num50: this.link_num50, + link_num51: this.link_num51, + link_num52: this.link_num52, + link_num53: this.link_num53, + link_num54: this.link_num54, + link_num55: this.link_num55, + link_num56: this.link_num56, + link_num57: this.link_num57, + link_num58: this.link_num58, + link_num59: this.link_num59, + link_num60: this.link_num60, + link_num61: this.link_num61, + link_num62: this.link_num62, + link_num63: this.link_num63, + link_num64: this.link_num64, + link_num65: this.link_num65, + link_num66: this.link_num66, + link_num67: this.link_num67, + link_num68: this.link_num68, + link_num69: this.link_num69, + link_num70: this.link_num70, + link_num71: this.link_num71, + link_num72: this.link_num72, + link_num73: this.link_num73, + link_num74: this.link_num74, + link_num75: this.link_num75, + link_num76: this.link_num76, + link_num77: this.link_num77, + link_num78: this.link_num78, + link_num79: this.link_num79, + link_num80: this.link_num80, + link_num81: this.link_num81, + link_num82: this.link_num82, + link_num83: this.link_num83, + link_num84: this.link_num84, + link_num85: this.link_num85, + link_num86: this.link_num86, + link_num87: this.link_num87, + link_num88: this.link_num88, + link_num89: this.link_num89, + link_num90: this.link_num90, + link_num91: this.link_num91, + link_num92: this.link_num92, + link_num93: this.link_num93, + link_num94: this.link_num94, + link_num95: this.link_num95, + link_num96: this.link_num96, + link_num97: this.link_num97, + link_num98: this.link_num98, + link_num99: this.link_num99, + link_num100: this.link_num100, + link_num101: this.link_num101, + link_num102: this.link_num102, + link_num103: this.link_num103, + link_num104: this.link_num104, + link_num105: this.link_num105, + link_num106: this.link_num106, + link_num107: this.link_num107, + link_num108: this.link_num108, + link_num109: this.link_num109, + link_num110: this.link_num110, + link_num111: this.link_num111, + link_num112: this.link_num112, + link_num113: this.link_num113, + link_num114: this.link_num114, + link_num115: this.link_num115, + link_num116: this.link_num116, + link_num117: this.link_num117, + link_num118: this.link_num118, + link_num119: this.link_num119, + link_num120: this.link_num120, + link_num121: this.link_num121, + link_num122: this.link_num122, + link_num123: this.link_num123, + link_num124: this.link_num124, + link_num125: this.link_num125, + link_num126: this.link_num126, + link_num127: this.link_num127, + link_num128: this.link_num128, + link_num129: this.link_num129, + link_num130: this.link_num130, + link_num131: this.link_num131, + link_num132: this.link_num132, + link_num133: this.link_num133, + link_num134: this.link_num134, + link_num135: this.link_num135, + link_num136: this.link_num136, + link_num137: this.link_num137, + link_num138: this.link_num138, + link_num139: this.link_num139, + link_num140: this.link_num140, + link_num141: this.link_num141, + link_num142: this.link_num142, + link_num143: this.link_num143, + link_num144: this.link_num144, + link_num145: this.link_num145, + link_num146: this.link_num146, + link_num147: this.link_num147, + link_num148: this.link_num148, + link_num149: this.link_num149, + link_num150: this.link_num150, + link_num151: this.link_num151, + link_num152: this.link_num152, + link_num153: this.link_num153, + link_num154: this.link_num154, + link_num155: this.link_num155, + link_num156: this.link_num156, + link_num157: this.link_num157, + link_num158: this.link_num158, + link_num159: this.link_num159, + link_num160: this.link_num160, + link_num161: this.link_num161, + link_num162: this.link_num162, + link_num163: this.link_num163, + link_num164: this.link_num164, + link_num165: this.link_num165, + link_num166: this.link_num166, + link_num167: this.link_num167, + link_num168: this.link_num168, + link_num169: this.link_num169, + link_num170: this.link_num170, + link_num171: this.link_num171, + link_num172: this.link_num172, + link_num173: this.link_num173, + link_num174: this.link_num174, + link_num175: this.link_num175, + link_num176: this.link_num176, + link_num177: this.link_num177, + link_num178: this.link_num178, + link_num179: this.link_num179, + link_num180: this.link_num180, + link_num181: this.link_num181, + link_num182: this.link_num182, + link_num183: this.link_num183, + link_num184: this.link_num184, + link_num185: this.link_num185, + link_num186: this.link_num186, + link_num187: this.link_num187, + link_num188: this.link_num188, + link_num189: this.link_num189, + link_num190: this.link_num190, + link_num191: this.link_num191, + link_num192: this.link_num192, + link_num193: this.link_num193, + link_num194: this.link_num194, + link_num195: this.link_num195, + link_num196: this.link_num196, + link_num197: this.link_num197, + link_num198: this.link_num198, + link_num199: this.link_num199, + link_num200: this.link_num200, + link_num201: this.link_num201, + link_num202: this.link_num202, + link_num203: this.link_num203, + link_num204: this.link_num204, + link_num205: this.link_num205, + link_num206: this.link_num206, + link_num207: this.link_num207, + link_num208: this.link_num208, + link_num209: this.link_num209, + link_num210: this.link_num210, + link_num211: this.link_num211, + link_num212: this.link_num212, + link_num213: this.link_num213, + link_num214: this.link_num214, + link_num215: this.link_num215, + link_num216: this.link_num216, + link_num217: this.link_num217, + link_num218: this.link_num218, + link_num219: this.link_num219, + link_num220: this.link_num220, + link_num221: this.link_num221, + link_num222: this.link_num222, + link_num223: this.link_num223, + link_num224: this.link_num224, + link_num225: this.link_num225, + link_num226: this.link_num226, + link_num227: this.link_num227, + link_num228: this.link_num228, + link_num229: this.link_num229, + link_num230: this.link_num230, + link_num231: this.link_num231, + link_num232: this.link_num232, + link_num233: this.link_num233, + link_num234: this.link_num234, + link_num235: this.link_num235, + link_num236: this.link_num236, + link_num237: this.link_num237, + link_num238: this.link_num238, + link_num239: this.link_num239, + link_num240: this.link_num240, + link_num241: this.link_num241, + link_num242: this.link_num242, + link_num243: this.link_num243, + link_num244: this.link_num244, + link_num245: this.link_num245, + link_num246: this.link_num246, + link_num247: this.link_num247, + link_num248: this.link_num248, + link_num249: this.link_num249, + link_num250: this.link_num250, + link_num251: this.link_num251, + link_num252: this.link_num252, + link_num253: this.link_num253, + link_num254: this.link_num254, + link_num255: this.link_num255, + link_num256: this.link_num256, + link_num257: this.link_num257, + link_num258: this.link_num258, + link_num259: this.link_num259, + link_num260: this.link_num260, + link_num261: this.link_num261, + link_num262: this.link_num262, + link_num263: this.link_num263, + link_num264: this.link_num264, + link_num265: this.link_num265, + link_num266: this.link_num266, + link_num267: this.link_num267, + link_num268: this.link_num268, + link_num269: this.link_num269, + link_num270: this.link_num270, + link_num271: this.link_num271, + link_num272: this.link_num272, + link_num273: this.link_num273, + link_num274: this.link_num274, + link_num275: this.link_num275, + link_num276: this.link_num276, + link_num277: this.link_num277, + link_num278: this.link_num278, + link_num279: this.link_num279, + link_num280: this.link_num280, + link_num281: this.link_num281, + link_num282: this.link_num282, + link_num283: this.link_num283, + link_num284: this.link_num284, + link_num285: this.link_num285, + link_num286: this.link_num286, + link_num287: this.link_num287, + link_num288: this.link_num288, + link_num289: this.link_num289, + link_num290: this.link_num290, + link_num291: this.link_num291, + link_num292: this.link_num292, + link_num293: this.link_num293, + link_num294: this.link_num294, + link_num295: this.link_num295, + link_num296: this.link_num296, + link_num297: this.link_num297, + link_num298: this.link_num298, + link_num299: this.link_num299, + link_num300: this.link_num300, + link_num301: this.link_num301, + link_num302: this.link_num302, + link_num303: this.link_num303, + link_num304: this.link_num304, + link_num305: this.link_num305, + link_num306: this.link_num306, + link_num307: this.link_num307, + link_num308: this.link_num308, + link_num309: this.link_num309, + link_num310: this.link_num310, + link_num311: this.link_num311, + link_num312: this.link_num312, + link_num313: this.link_num313, + link_num314: this.link_num314, + link_num315: this.link_num315, + link_num316: this.link_num316, + link_num317: this.link_num317, + link_num318: this.link_num318, + link_num319: this.link_num319, + link_num320: this.link_num320, + link_num321: this.link_num321, + link_num322: this.link_num322, + link_num323: this.link_num323, + link_num324: this.link_num324, + link_num325: this.link_num325, + link_num326: this.link_num326, + link_num327: this.link_num327, + link_num328: this.link_num328, + link_num329: this.link_num329, + link_num330: this.link_num330, + link_num331: this.link_num331, + link_num332: this.link_num332, + + } + ) + + //============================================================================= + ConsumeVariables() + } + } +} + +@Component +struct PropVariables { + //============================================================================= + @Prop prop_num0: number = 0; + @Prop prop_num1: number = 0; + @Prop prop_num2: number = 0; + @Prop prop_num3: number = 0; + @Prop prop_num4: number = 0; + @Prop prop_num5: number = 0; + @Prop prop_num6: number = 0; + @Prop prop_num7: number = 0; + @Prop prop_num8: number = 0; + @Prop prop_num9: number = 0; + @Prop prop_num10: number = 0; + @Prop prop_num11: number = 0; + @Prop prop_num12: number = 0; + @Prop prop_num13: number = 0; + @Prop prop_num14: number = 0; + @Prop prop_num15: number = 0; + @Prop prop_num16: number = 0; + @Prop prop_num17: number = 0; + @Prop prop_num18: number = 0; + @Prop prop_num19: number = 0; + @Prop prop_num20: number = 0; + @Prop prop_num21: number = 0; + @Prop prop_num22: number = 0; + @Prop prop_num23: number = 0; + @Prop prop_num24: number = 0; + @Prop prop_num25: number = 0; + @Prop prop_num26: number = 0; + @Prop prop_num27: number = 0; + @Prop prop_num28: number = 0; + @Prop prop_num29: number = 0; + @Prop prop_num30: number = 0; + @Prop prop_num31: number = 0; + @Prop prop_num32: number = 0; + @Prop prop_num33: number = 0; + @Prop prop_num34: number = 0; + @Prop prop_num35: number = 0; + @Prop prop_num36: number = 0; + @Prop prop_num37: number = 0; + @Prop prop_num38: number = 0; + @Prop prop_num39: number = 0; + @Prop prop_num40: number = 0; + @Prop prop_num41: number = 0; + @Prop prop_num42: number = 0; + @Prop prop_num43: number = 0; + @Prop prop_num44: number = 0; + @Prop prop_num45: number = 0; + @Prop prop_num46: number = 0; + @Prop prop_num47: number = 0; + @Prop prop_num48: number = 0; + @Prop prop_num49: number = 0; + @Prop prop_num50: number = 0; + @Prop prop_num51: number = 0; + @Prop prop_num52: number = 0; + @Prop prop_num53: number = 0; + @Prop prop_num54: number = 0; + @Prop prop_num55: number = 0; + @Prop prop_num56: number = 0; + @Prop prop_num57: number = 0; + @Prop prop_num58: number = 0; + @Prop prop_num59: number = 0; + @Prop prop_num60: number = 0; + @Prop prop_num61: number = 0; + @Prop prop_num62: number = 0; + @Prop prop_num63: number = 0; + @Prop prop_num64: number = 0; + @Prop prop_num65: number = 0; + @Prop prop_num66: number = 0; + @Prop prop_num67: number = 0; + @Prop prop_num68: number = 0; + @Prop prop_num69: number = 0; + @Prop prop_num70: number = 0; + @Prop prop_num71: number = 0; + @Prop prop_num72: number = 0; + @Prop prop_num73: number = 0; + @Prop prop_num74: number = 0; + @Prop prop_num75: number = 0; + @Prop prop_num76: number = 0; + @Prop prop_num77: number = 0; + @Prop prop_num78: number = 0; + @Prop prop_num79: number = 0; + @Prop prop_num80: number = 0; + @Prop prop_num81: number = 0; + @Prop prop_num82: number = 0; + @Prop prop_num83: number = 0; + @Prop prop_num84: number = 0; + @Prop prop_num85: number = 0; + @Prop prop_num86: number = 0; + @Prop prop_num87: number = 0; + @Prop prop_num88: number = 0; + @Prop prop_num89: number = 0; + @Prop prop_num90: number = 0; + @Prop prop_num91: number = 0; + @Prop prop_num92: number = 0; + @Prop prop_num93: number = 0; + @Prop prop_num94: number = 0; + @Prop prop_num95: number = 0; + @Prop prop_num96: number = 0; + @Prop prop_num97: number = 0; + @Prop prop_num98: number = 0; + @Prop prop_num99: number = 0; + @Prop prop_num100: number = 0; + @Prop prop_num101: number = 0; + @Prop prop_num102: number = 0; + @Prop prop_num103: number = 0; + @Prop prop_num104: number = 0; + @Prop prop_num105: number = 0; + @Prop prop_num106: number = 0; + @Prop prop_num107: number = 0; + @Prop prop_num108: number = 0; + @Prop prop_num109: number = 0; + @Prop prop_num110: number = 0; + @Prop prop_num111: number = 0; + @Prop prop_num112: number = 0; + @Prop prop_num113: number = 0; + @Prop prop_num114: number = 0; + @Prop prop_num115: number = 0; + @Prop prop_num116: number = 0; + @Prop prop_num117: number = 0; + @Prop prop_num118: number = 0; + @Prop prop_num119: number = 0; + @Prop prop_num120: number = 0; + @Prop prop_num121: number = 0; + @Prop prop_num122: number = 0; + @Prop prop_num123: number = 0; + @Prop prop_num124: number = 0; + @Prop prop_num125: number = 0; + @Prop prop_num126: number = 0; + @Prop prop_num127: number = 0; + @Prop prop_num128: number = 0; + @Prop prop_num129: number = 0; + @Prop prop_num130: number = 0; + @Prop prop_num131: number = 0; + @Prop prop_num132: number = 0; + @Prop prop_num133: number = 0; + @Prop prop_num134: number = 0; + @Prop prop_num135: number = 0; + @Prop prop_num136: number = 0; + @Prop prop_num137: number = 0; + @Prop prop_num138: number = 0; + @Prop prop_num139: number = 0; + @Prop prop_num140: number = 0; + @Prop prop_num141: number = 0; + @Prop prop_num142: number = 0; + @Prop prop_num143: number = 0; + @Prop prop_num144: number = 0; + @Prop prop_num145: number = 0; + @Prop prop_num146: number = 0; + @Prop prop_num147: number = 0; + @Prop prop_num148: number = 0; + @Prop prop_num149: number = 0; + @Prop prop_num150: number = 0; + @Prop prop_num151: number = 0; + @Prop prop_num152: number = 0; + @Prop prop_num153: number = 0; + @Prop prop_num154: number = 0; + @Prop prop_num155: number = 0; + @Prop prop_num156: number = 0; + @Prop prop_num157: number = 0; + @Prop prop_num158: number = 0; + @Prop prop_num159: number = 0; + @Prop prop_num160: number = 0; + @Prop prop_num161: number = 0; + @Prop prop_num162: number = 0; + @Prop prop_num163: number = 0; + @Prop prop_num164: number = 0; + @Prop prop_num165: number = 0; + @Prop prop_num166: number = 0; + @Prop prop_num167: number = 0; + @Prop prop_num168: number = 0; + @Prop prop_num169: number = 0; + @Prop prop_num170: number = 0; + @Prop prop_num171: number = 0; + @Prop prop_num172: number = 0; + @Prop prop_num173: number = 0; + @Prop prop_num174: number = 0; + @Prop prop_num175: number = 0; + @Prop prop_num176: number = 0; + @Prop prop_num177: number = 0; + @Prop prop_num178: number = 0; + @Prop prop_num179: number = 0; + @Prop prop_num180: number = 0; + @Prop prop_num181: number = 0; + @Prop prop_num182: number = 0; + @Prop prop_num183: number = 0; + @Prop prop_num184: number = 0; + @Prop prop_num185: number = 0; + @Prop prop_num186: number = 0; + @Prop prop_num187: number = 0; + @Prop prop_num188: number = 0; + @Prop prop_num189: number = 0; + @Prop prop_num190: number = 0; + @Prop prop_num191: number = 0; + @Prop prop_num192: number = 0; + @Prop prop_num193: number = 0; + @Prop prop_num194: number = 0; + @Prop prop_num195: number = 0; + @Prop prop_num196: number = 0; + @Prop prop_num197: number = 0; + @Prop prop_num198: number = 0; + @Prop prop_num199: number = 0; + @Prop prop_num200: number = 0; + @Prop prop_num201: number = 0; + @Prop prop_num202: number = 0; + @Prop prop_num203: number = 0; + @Prop prop_num204: number = 0; + @Prop prop_num205: number = 0; + @Prop prop_num206: number = 0; + @Prop prop_num207: number = 0; + @Prop prop_num208: number = 0; + @Prop prop_num209: number = 0; + @Prop prop_num210: number = 0; + @Prop prop_num211: number = 0; + @Prop prop_num212: number = 0; + @Prop prop_num213: number = 0; + @Prop prop_num214: number = 0; + @Prop prop_num215: number = 0; + @Prop prop_num216: number = 0; + @Prop prop_num217: number = 0; + @Prop prop_num218: number = 0; + @Prop prop_num219: number = 0; + @Prop prop_num220: number = 0; + @Prop prop_num221: number = 0; + @Prop prop_num222: number = 0; + @Prop prop_num223: number = 0; + @Prop prop_num224: number = 0; + @Prop prop_num225: number = 0; + @Prop prop_num226: number = 0; + @Prop prop_num227: number = 0; + @Prop prop_num228: number = 0; + @Prop prop_num229: number = 0; + @Prop prop_num230: number = 0; + @Prop prop_num231: number = 0; + @Prop prop_num232: number = 0; + @Prop prop_num233: number = 0; + @Prop prop_num234: number = 0; + @Prop prop_num235: number = 0; + @Prop prop_num236: number = 0; + @Prop prop_num237: number = 0; + @Prop prop_num238: number = 0; + @Prop prop_num239: number = 0; + @Prop prop_num240: number = 0; + @Prop prop_num241: number = 0; + @Prop prop_num242: number = 0; + @Prop prop_num243: number = 0; + @Prop prop_num244: number = 0; + @Prop prop_num245: number = 0; + @Prop prop_num246: number = 0; + @Prop prop_num247: number = 0; + @Prop prop_num248: number = 0; + @Prop prop_num249: number = 0; + @Prop prop_num250: number = 0; + @Prop prop_num251: number = 0; + @Prop prop_num252: number = 0; + @Prop prop_num253: number = 0; + @Prop prop_num254: number = 0; + @Prop prop_num255: number = 0; + @Prop prop_num256: number = 0; + @Prop prop_num257: number = 0; + @Prop prop_num258: number = 0; + @Prop prop_num259: number = 0; + @Prop prop_num260: number = 0; + @Prop prop_num261: number = 0; + @Prop prop_num262: number = 0; + @Prop prop_num263: number = 0; + @Prop prop_num264: number = 0; + @Prop prop_num265: number = 0; + @Prop prop_num266: number = 0; + @Prop prop_num267: number = 0; + @Prop prop_num268: number = 0; + @Prop prop_num269: number = 0; + @Prop prop_num270: number = 0; + @Prop prop_num271: number = 0; + @Prop prop_num272: number = 0; + @Prop prop_num273: number = 0; + @Prop prop_num274: number = 0; + @Prop prop_num275: number = 0; + @Prop prop_num276: number = 0; + @Prop prop_num277: number = 0; + @Prop prop_num278: number = 0; + @Prop prop_num279: number = 0; + @Prop prop_num280: number = 0; + @Prop prop_num281: number = 0; + @Prop prop_num282: number = 0; + @Prop prop_num283: number = 0; + @Prop prop_num284: number = 0; + @Prop prop_num285: number = 0; + @Prop prop_num286: number = 0; + @Prop prop_num287: number = 0; + @Prop prop_num288: number = 0; + @Prop prop_num289: number = 0; + @Prop prop_num290: number = 0; + @Prop prop_num291: number = 0; + @Prop prop_num292: number = 0; + @Prop prop_num293: number = 0; + @Prop prop_num294: number = 0; + @Prop prop_num295: number = 0; + @Prop prop_num296: number = 0; + @Prop prop_num297: number = 0; + @Prop prop_num298: number = 0; + @Prop prop_num299: number = 0; + @Prop prop_num300: number = 0; + @Prop prop_num301: number = 0; + @Prop prop_num302: number = 0; + @Prop prop_num303: number = 0; + @Prop prop_num304: number = 0; + @Prop prop_num305: number = 0; + @Prop prop_num306: number = 0; + @Prop prop_num307: number = 0; + @Prop prop_num308: number = 0; + @Prop prop_num309: number = 0; + @Prop prop_num310: number = 0; + @Prop prop_num311: number = 0; + @Prop prop_num312: number = 0; + @Prop prop_num313: number = 0; + @Prop prop_num314: number = 0; + @Prop prop_num315: number = 0; + @Prop prop_num316: number = 0; + @Prop prop_num317: number = 0; + @Prop prop_num318: number = 0; + @Prop prop_num319: number = 0; + @Prop prop_num320: number = 0; + @Prop prop_num321: number = 0; + @Prop prop_num322: number = 0; + @Prop prop_num323: number = 0; + @Prop prop_num324: number = 0; + @Prop prop_num325: number = 0; + @Prop prop_num326: number = 0; + @Prop prop_num327: number = 0; + @Prop prop_num328: number = 0; + @Prop prop_num329: number = 0; + @Prop prop_num330: number = 0; + @Prop prop_num331: number = 0; + @Prop prop_num332: number = 0; + + + build() { + Column() { + Button('Click Me') + .onClick((e: ClickEvent) => { + this.prop_num0++; + this.prop_num1++; + this.prop_num2++; + this.prop_num3++; + this.prop_num4++; + this.prop_num5++; + this.prop_num6++; + this.prop_num7++; + this.prop_num8++; + this.prop_num9++; + this.prop_num10++; + this.prop_num11++; + this.prop_num12++; + this.prop_num13++; + this.prop_num14++; + this.prop_num15++; + this.prop_num16++; + this.prop_num17++; + this.prop_num18++; + this.prop_num19++; + this.prop_num20++; + this.prop_num21++; + this.prop_num22++; + this.prop_num23++; + this.prop_num24++; + this.prop_num25++; + this.prop_num26++; + this.prop_num27++; + this.prop_num28++; + this.prop_num29++; + this.prop_num30++; + this.prop_num31++; + this.prop_num32++; + this.prop_num33++; + this.prop_num34++; + this.prop_num35++; + this.prop_num36++; + this.prop_num37++; + this.prop_num38++; + this.prop_num39++; + this.prop_num40++; + this.prop_num41++; + this.prop_num42++; + this.prop_num43++; + this.prop_num44++; + this.prop_num45++; + this.prop_num46++; + this.prop_num47++; + this.prop_num48++; + this.prop_num49++; + this.prop_num50++; + this.prop_num51++; + this.prop_num52++; + this.prop_num53++; + this.prop_num54++; + this.prop_num55++; + this.prop_num56++; + this.prop_num57++; + this.prop_num58++; + this.prop_num59++; + this.prop_num60++; + this.prop_num61++; + this.prop_num62++; + this.prop_num63++; + this.prop_num64++; + this.prop_num65++; + this.prop_num66++; + this.prop_num67++; + this.prop_num68++; + this.prop_num69++; + this.prop_num70++; + this.prop_num71++; + this.prop_num72++; + this.prop_num73++; + this.prop_num74++; + this.prop_num75++; + this.prop_num76++; + this.prop_num77++; + this.prop_num78++; + this.prop_num79++; + this.prop_num80++; + this.prop_num81++; + this.prop_num82++; + this.prop_num83++; + this.prop_num84++; + this.prop_num85++; + this.prop_num86++; + this.prop_num87++; + this.prop_num88++; + this.prop_num89++; + this.prop_num90++; + this.prop_num91++; + this.prop_num92++; + this.prop_num93++; + this.prop_num94++; + this.prop_num95++; + this.prop_num96++; + this.prop_num97++; + this.prop_num98++; + this.prop_num99++; + this.prop_num100++; + this.prop_num101++; + this.prop_num102++; + this.prop_num103++; + this.prop_num104++; + this.prop_num105++; + this.prop_num106++; + this.prop_num107++; + this.prop_num108++; + this.prop_num109++; + this.prop_num110++; + this.prop_num111++; + this.prop_num112++; + this.prop_num113++; + this.prop_num114++; + this.prop_num115++; + this.prop_num116++; + this.prop_num117++; + this.prop_num118++; + this.prop_num119++; + this.prop_num120++; + this.prop_num121++; + this.prop_num122++; + this.prop_num123++; + this.prop_num124++; + this.prop_num125++; + this.prop_num126++; + this.prop_num127++; + this.prop_num128++; + this.prop_num129++; + this.prop_num130++; + this.prop_num131++; + this.prop_num132++; + this.prop_num133++; + this.prop_num134++; + this.prop_num135++; + this.prop_num136++; + this.prop_num137++; + this.prop_num138++; + this.prop_num139++; + this.prop_num140++; + this.prop_num141++; + this.prop_num142++; + this.prop_num143++; + this.prop_num144++; + this.prop_num145++; + this.prop_num146++; + this.prop_num147++; + this.prop_num148++; + this.prop_num149++; + this.prop_num150++; + this.prop_num151++; + this.prop_num152++; + this.prop_num153++; + this.prop_num154++; + this.prop_num155++; + this.prop_num156++; + this.prop_num157++; + this.prop_num158++; + this.prop_num159++; + this.prop_num160++; + this.prop_num161++; + this.prop_num162++; + this.prop_num163++; + this.prop_num164++; + this.prop_num165++; + this.prop_num166++; + this.prop_num167++; + this.prop_num168++; + this.prop_num169++; + this.prop_num170++; + this.prop_num171++; + this.prop_num172++; + this.prop_num173++; + this.prop_num174++; + this.prop_num175++; + this.prop_num176++; + this.prop_num177++; + this.prop_num178++; + this.prop_num179++; + this.prop_num180++; + this.prop_num181++; + this.prop_num182++; + this.prop_num183++; + this.prop_num184++; + this.prop_num185++; + this.prop_num186++; + this.prop_num187++; + this.prop_num188++; + this.prop_num189++; + this.prop_num190++; + this.prop_num191++; + this.prop_num192++; + this.prop_num193++; + this.prop_num194++; + this.prop_num195++; + this.prop_num196++; + this.prop_num197++; + this.prop_num198++; + this.prop_num199++; + this.prop_num200++; + this.prop_num201++; + this.prop_num202++; + this.prop_num203++; + this.prop_num204++; + this.prop_num205++; + this.prop_num206++; + this.prop_num207++; + this.prop_num208++; + this.prop_num209++; + this.prop_num210++; + this.prop_num211++; + this.prop_num212++; + this.prop_num213++; + this.prop_num214++; + this.prop_num215++; + this.prop_num216++; + this.prop_num217++; + this.prop_num218++; + this.prop_num219++; + this.prop_num220++; + this.prop_num221++; + this.prop_num222++; + this.prop_num223++; + this.prop_num224++; + this.prop_num225++; + this.prop_num226++; + this.prop_num227++; + this.prop_num228++; + this.prop_num229++; + this.prop_num230++; + this.prop_num231++; + this.prop_num232++; + this.prop_num233++; + this.prop_num234++; + this.prop_num235++; + this.prop_num236++; + this.prop_num237++; + this.prop_num238++; + this.prop_num239++; + this.prop_num240++; + this.prop_num241++; + this.prop_num242++; + this.prop_num243++; + this.prop_num244++; + this.prop_num245++; + this.prop_num246++; + this.prop_num247++; + this.prop_num248++; + this.prop_num249++; + this.prop_num250++; + this.prop_num251++; + this.prop_num252++; + this.prop_num253++; + this.prop_num254++; + this.prop_num255++; + this.prop_num256++; + this.prop_num257++; + this.prop_num258++; + this.prop_num259++; + this.prop_num260++; + this.prop_num261++; + this.prop_num262++; + this.prop_num263++; + this.prop_num264++; + this.prop_num265++; + this.prop_num266++; + this.prop_num267++; + this.prop_num268++; + this.prop_num269++; + this.prop_num270++; + this.prop_num271++; + this.prop_num272++; + this.prop_num273++; + this.prop_num274++; + this.prop_num275++; + this.prop_num276++; + this.prop_num277++; + this.prop_num278++; + this.prop_num279++; + this.prop_num280++; + this.prop_num281++; + this.prop_num282++; + this.prop_num283++; + this.prop_num284++; + this.prop_num285++; + this.prop_num286++; + this.prop_num287++; + this.prop_num288++; + this.prop_num289++; + this.prop_num290++; + this.prop_num291++; + this.prop_num292++; + this.prop_num293++; + this.prop_num294++; + this.prop_num295++; + this.prop_num296++; + this.prop_num297++; + this.prop_num298++; + this.prop_num299++; + this.prop_num300++; + this.prop_num301++; + this.prop_num302++; + this.prop_num303++; + this.prop_num304++; + this.prop_num305++; + this.prop_num306++; + this.prop_num307++; + this.prop_num308++; + this.prop_num309++; + this.prop_num310++; + this.prop_num311++; + this.prop_num312++; + this.prop_num313++; + this.prop_num314++; + this.prop_num315++; + this.prop_num316++; + this.prop_num317++; + this.prop_num318++; + this.prop_num319++; + this.prop_num320++; + this.prop_num321++; + this.prop_num322++; + this.prop_num323++; + this.prop_num324++; + this.prop_num325++; + this.prop_num326++; + this.prop_num327++; + this.prop_num328++; + this.prop_num329++; + this.prop_num330++; + this.prop_num331++; + this.prop_num332++; + + }) + } + } +} + +@Component +struct LinkVariables { + @Link link_num0: number = 0; + @Link link_num1: number = 0; + @Link link_num2: number = 0; + @Link link_num3: number = 0; + @Link link_num4: number = 0; + @Link link_num5: number = 0; + @Link link_num6: number = 0; + @Link link_num7: number = 0; + @Link link_num8: number = 0; + @Link link_num9: number = 0; + @Link link_num10: number = 0; + @Link link_num11: number = 0; + @Link link_num12: number = 0; + @Link link_num13: number = 0; + @Link link_num14: number = 0; + @Link link_num15: number = 0; + @Link link_num16: number = 0; + @Link link_num17: number = 0; + @Link link_num18: number = 0; + @Link link_num19: number = 0; + @Link link_num20: number = 0; + @Link link_num21: number = 0; + @Link link_num22: number = 0; + @Link link_num23: number = 0; + @Link link_num24: number = 0; + @Link link_num25: number = 0; + @Link link_num26: number = 0; + @Link link_num27: number = 0; + @Link link_num28: number = 0; + @Link link_num29: number = 0; + @Link link_num30: number = 0; + @Link link_num31: number = 0; + @Link link_num32: number = 0; + @Link link_num33: number = 0; + @Link link_num34: number = 0; + @Link link_num35: number = 0; + @Link link_num36: number = 0; + @Link link_num37: number = 0; + @Link link_num38: number = 0; + @Link link_num39: number = 0; + @Link link_num40: number = 0; + @Link link_num41: number = 0; + @Link link_num42: number = 0; + @Link link_num43: number = 0; + @Link link_num44: number = 0; + @Link link_num45: number = 0; + @Link link_num46: number = 0; + @Link link_num47: number = 0; + @Link link_num48: number = 0; + @Link link_num49: number = 0; + @Link link_num50: number = 0; + @Link link_num51: number = 0; + @Link link_num52: number = 0; + @Link link_num53: number = 0; + @Link link_num54: number = 0; + @Link link_num55: number = 0; + @Link link_num56: number = 0; + @Link link_num57: number = 0; + @Link link_num58: number = 0; + @Link link_num59: number = 0; + @Link link_num60: number = 0; + @Link link_num61: number = 0; + @Link link_num62: number = 0; + @Link link_num63: number = 0; + @Link link_num64: number = 0; + @Link link_num65: number = 0; + @Link link_num66: number = 0; + @Link link_num67: number = 0; + @Link link_num68: number = 0; + @Link link_num69: number = 0; + @Link link_num70: number = 0; + @Link link_num71: number = 0; + @Link link_num72: number = 0; + @Link link_num73: number = 0; + @Link link_num74: number = 0; + @Link link_num75: number = 0; + @Link link_num76: number = 0; + @Link link_num77: number = 0; + @Link link_num78: number = 0; + @Link link_num79: number = 0; + @Link link_num80: number = 0; + @Link link_num81: number = 0; + @Link link_num82: number = 0; + @Link link_num83: number = 0; + @Link link_num84: number = 0; + @Link link_num85: number = 0; + @Link link_num86: number = 0; + @Link link_num87: number = 0; + @Link link_num88: number = 0; + @Link link_num89: number = 0; + @Link link_num90: number = 0; + @Link link_num91: number = 0; + @Link link_num92: number = 0; + @Link link_num93: number = 0; + @Link link_num94: number = 0; + @Link link_num95: number = 0; + @Link link_num96: number = 0; + @Link link_num97: number = 0; + @Link link_num98: number = 0; + @Link link_num99: number = 0; + @Link link_num100: number = 0; + @Link link_num101: number = 0; + @Link link_num102: number = 0; + @Link link_num103: number = 0; + @Link link_num104: number = 0; + @Link link_num105: number = 0; + @Link link_num106: number = 0; + @Link link_num107: number = 0; + @Link link_num108: number = 0; + @Link link_num109: number = 0; + @Link link_num110: number = 0; + @Link link_num111: number = 0; + @Link link_num112: number = 0; + @Link link_num113: number = 0; + @Link link_num114: number = 0; + @Link link_num115: number = 0; + @Link link_num116: number = 0; + @Link link_num117: number = 0; + @Link link_num118: number = 0; + @Link link_num119: number = 0; + @Link link_num120: number = 0; + @Link link_num121: number = 0; + @Link link_num122: number = 0; + @Link link_num123: number = 0; + @Link link_num124: number = 0; + @Link link_num125: number = 0; + @Link link_num126: number = 0; + @Link link_num127: number = 0; + @Link link_num128: number = 0; + @Link link_num129: number = 0; + @Link link_num130: number = 0; + @Link link_num131: number = 0; + @Link link_num132: number = 0; + @Link link_num133: number = 0; + @Link link_num134: number = 0; + @Link link_num135: number = 0; + @Link link_num136: number = 0; + @Link link_num137: number = 0; + @Link link_num138: number = 0; + @Link link_num139: number = 0; + @Link link_num140: number = 0; + @Link link_num141: number = 0; + @Link link_num142: number = 0; + @Link link_num143: number = 0; + @Link link_num144: number = 0; + @Link link_num145: number = 0; + @Link link_num146: number = 0; + @Link link_num147: number = 0; + @Link link_num148: number = 0; + @Link link_num149: number = 0; + @Link link_num150: number = 0; + @Link link_num151: number = 0; + @Link link_num152: number = 0; + @Link link_num153: number = 0; + @Link link_num154: number = 0; + @Link link_num155: number = 0; + @Link link_num156: number = 0; + @Link link_num157: number = 0; + @Link link_num158: number = 0; + @Link link_num159: number = 0; + @Link link_num160: number = 0; + @Link link_num161: number = 0; + @Link link_num162: number = 0; + @Link link_num163: number = 0; + @Link link_num164: number = 0; + @Link link_num165: number = 0; + @Link link_num166: number = 0; + @Link link_num167: number = 0; + @Link link_num168: number = 0; + @Link link_num169: number = 0; + @Link link_num170: number = 0; + @Link link_num171: number = 0; + @Link link_num172: number = 0; + @Link link_num173: number = 0; + @Link link_num174: number = 0; + @Link link_num175: number = 0; + @Link link_num176: number = 0; + @Link link_num177: number = 0; + @Link link_num178: number = 0; + @Link link_num179: number = 0; + @Link link_num180: number = 0; + @Link link_num181: number = 0; + @Link link_num182: number = 0; + @Link link_num183: number = 0; + @Link link_num184: number = 0; + @Link link_num185: number = 0; + @Link link_num186: number = 0; + @Link link_num187: number = 0; + @Link link_num188: number = 0; + @Link link_num189: number = 0; + @Link link_num190: number = 0; + @Link link_num191: number = 0; + @Link link_num192: number = 0; + @Link link_num193: number = 0; + @Link link_num194: number = 0; + @Link link_num195: number = 0; + @Link link_num196: number = 0; + @Link link_num197: number = 0; + @Link link_num198: number = 0; + @Link link_num199: number = 0; + @Link link_num200: number = 0; + @Link link_num201: number = 0; + @Link link_num202: number = 0; + @Link link_num203: number = 0; + @Link link_num204: number = 0; + @Link link_num205: number = 0; + @Link link_num206: number = 0; + @Link link_num207: number = 0; + @Link link_num208: number = 0; + @Link link_num209: number = 0; + @Link link_num210: number = 0; + @Link link_num211: number = 0; + @Link link_num212: number = 0; + @Link link_num213: number = 0; + @Link link_num214: number = 0; + @Link link_num215: number = 0; + @Link link_num216: number = 0; + @Link link_num217: number = 0; + @Link link_num218: number = 0; + @Link link_num219: number = 0; + @Link link_num220: number = 0; + @Link link_num221: number = 0; + @Link link_num222: number = 0; + @Link link_num223: number = 0; + @Link link_num224: number = 0; + @Link link_num225: number = 0; + @Link link_num226: number = 0; + @Link link_num227: number = 0; + @Link link_num228: number = 0; + @Link link_num229: number = 0; + @Link link_num230: number = 0; + @Link link_num231: number = 0; + @Link link_num232: number = 0; + @Link link_num233: number = 0; + @Link link_num234: number = 0; + @Link link_num235: number = 0; + @Link link_num236: number = 0; + @Link link_num237: number = 0; + @Link link_num238: number = 0; + @Link link_num239: number = 0; + @Link link_num240: number = 0; + @Link link_num241: number = 0; + @Link link_num242: number = 0; + @Link link_num243: number = 0; + @Link link_num244: number = 0; + @Link link_num245: number = 0; + @Link link_num246: number = 0; + @Link link_num247: number = 0; + @Link link_num248: number = 0; + @Link link_num249: number = 0; + @Link link_num250: number = 0; + @Link link_num251: number = 0; + @Link link_num252: number = 0; + @Link link_num253: number = 0; + @Link link_num254: number = 0; + @Link link_num255: number = 0; + @Link link_num256: number = 0; + @Link link_num257: number = 0; + @Link link_num258: number = 0; + @Link link_num259: number = 0; + @Link link_num260: number = 0; + @Link link_num261: number = 0; + @Link link_num262: number = 0; + @Link link_num263: number = 0; + @Link link_num264: number = 0; + @Link link_num265: number = 0; + @Link link_num266: number = 0; + @Link link_num267: number = 0; + @Link link_num268: number = 0; + @Link link_num269: number = 0; + @Link link_num270: number = 0; + @Link link_num271: number = 0; + @Link link_num272: number = 0; + @Link link_num273: number = 0; + @Link link_num274: number = 0; + @Link link_num275: number = 0; + @Link link_num276: number = 0; + @Link link_num277: number = 0; + @Link link_num278: number = 0; + @Link link_num279: number = 0; + @Link link_num280: number = 0; + @Link link_num281: number = 0; + @Link link_num282: number = 0; + @Link link_num283: number = 0; + @Link link_num284: number = 0; + @Link link_num285: number = 0; + @Link link_num286: number = 0; + @Link link_num287: number = 0; + @Link link_num288: number = 0; + @Link link_num289: number = 0; + @Link link_num290: number = 0; + @Link link_num291: number = 0; + @Link link_num292: number = 0; + @Link link_num293: number = 0; + @Link link_num294: number = 0; + @Link link_num295: number = 0; + @Link link_num296: number = 0; + @Link link_num297: number = 0; + @Link link_num298: number = 0; + @Link link_num299: number = 0; + @Link link_num300: number = 0; + @Link link_num301: number = 0; + @Link link_num302: number = 0; + @Link link_num303: number = 0; + @Link link_num304: number = 0; + @Link link_num305: number = 0; + @Link link_num306: number = 0; + @Link link_num307: number = 0; + @Link link_num308: number = 0; + @Link link_num309: number = 0; + @Link link_num310: number = 0; + @Link link_num311: number = 0; + @Link link_num312: number = 0; + @Link link_num313: number = 0; + @Link link_num314: number = 0; + @Link link_num315: number = 0; + @Link link_num316: number = 0; + @Link link_num317: number = 0; + @Link link_num318: number = 0; + @Link link_num319: number = 0; + @Link link_num320: number = 0; + @Link link_num321: number = 0; + @Link link_num322: number = 0; + @Link link_num323: number = 0; + @Link link_num324: number = 0; + @Link link_num325: number = 0; + @Link link_num326: number = 0; + @Link link_num327: number = 0; + @Link link_num328: number = 0; + @Link link_num329: number = 0; + @Link link_num330: number = 0; + @Link link_num331: number = 0; + @Link link_num332: number = 0; + + + //============================================================================= + + build() { + Column() { + Button('Click Me') + .onClick((e: ClickEvent) => { + this.link_num0++; + this.link_num1++; + this.link_num2++; + this.link_num3++; + this.link_num4++; + this.link_num5++; + this.link_num6++; + this.link_num7++; + this.link_num8++; + this.link_num9++; + this.link_num10++; + this.link_num11++; + this.link_num12++; + this.link_num13++; + this.link_num14++; + this.link_num15++; + this.link_num16++; + this.link_num17++; + this.link_num18++; + this.link_num19++; + this.link_num20++; + this.link_num21++; + this.link_num22++; + this.link_num23++; + this.link_num24++; + this.link_num25++; + this.link_num26++; + this.link_num27++; + this.link_num28++; + this.link_num29++; + this.link_num30++; + this.link_num31++; + this.link_num32++; + this.link_num33++; + this.link_num34++; + this.link_num35++; + this.link_num36++; + this.link_num37++; + this.link_num38++; + this.link_num39++; + this.link_num40++; + this.link_num41++; + this.link_num42++; + this.link_num43++; + this.link_num44++; + this.link_num45++; + this.link_num46++; + this.link_num47++; + this.link_num48++; + this.link_num49++; + this.link_num50++; + this.link_num51++; + this.link_num52++; + this.link_num53++; + this.link_num54++; + this.link_num55++; + this.link_num56++; + this.link_num57++; + this.link_num58++; + this.link_num59++; + this.link_num60++; + this.link_num61++; + this.link_num62++; + this.link_num63++; + this.link_num64++; + this.link_num65++; + this.link_num66++; + this.link_num67++; + this.link_num68++; + this.link_num69++; + this.link_num70++; + this.link_num71++; + this.link_num72++; + this.link_num73++; + this.link_num74++; + this.link_num75++; + this.link_num76++; + this.link_num77++; + this.link_num78++; + this.link_num79++; + this.link_num80++; + this.link_num81++; + this.link_num82++; + this.link_num83++; + this.link_num84++; + this.link_num85++; + this.link_num86++; + this.link_num87++; + this.link_num88++; + this.link_num89++; + this.link_num90++; + this.link_num91++; + this.link_num92++; + this.link_num93++; + this.link_num94++; + this.link_num95++; + this.link_num96++; + this.link_num97++; + this.link_num98++; + this.link_num99++; + this.link_num100++; + this.link_num101++; + this.link_num102++; + this.link_num103++; + this.link_num104++; + this.link_num105++; + this.link_num106++; + this.link_num107++; + this.link_num108++; + this.link_num109++; + this.link_num110++; + this.link_num111++; + this.link_num112++; + this.link_num113++; + this.link_num114++; + this.link_num115++; + this.link_num116++; + this.link_num117++; + this.link_num118++; + this.link_num119++; + this.link_num120++; + this.link_num121++; + this.link_num122++; + this.link_num123++; + this.link_num124++; + this.link_num125++; + this.link_num126++; + this.link_num127++; + this.link_num128++; + this.link_num129++; + this.link_num130++; + this.link_num131++; + this.link_num132++; + this.link_num133++; + this.link_num134++; + this.link_num135++; + this.link_num136++; + this.link_num137++; + this.link_num138++; + this.link_num139++; + this.link_num140++; + this.link_num141++; + this.link_num142++; + this.link_num143++; + this.link_num144++; + this.link_num145++; + this.link_num146++; + this.link_num147++; + this.link_num148++; + this.link_num149++; + this.link_num150++; + this.link_num151++; + this.link_num152++; + this.link_num153++; + this.link_num154++; + this.link_num155++; + this.link_num156++; + this.link_num157++; + this.link_num158++; + this.link_num159++; + this.link_num160++; + this.link_num161++; + this.link_num162++; + this.link_num163++; + this.link_num164++; + this.link_num165++; + this.link_num166++; + this.link_num167++; + this.link_num168++; + this.link_num169++; + this.link_num170++; + this.link_num171++; + this.link_num172++; + this.link_num173++; + this.link_num174++; + this.link_num175++; + this.link_num176++; + this.link_num177++; + this.link_num178++; + this.link_num179++; + this.link_num180++; + this.link_num181++; + this.link_num182++; + this.link_num183++; + this.link_num184++; + this.link_num185++; + this.link_num186++; + this.link_num187++; + this.link_num188++; + this.link_num189++; + this.link_num190++; + this.link_num191++; + this.link_num192++; + this.link_num193++; + this.link_num194++; + this.link_num195++; + this.link_num196++; + this.link_num197++; + this.link_num198++; + this.link_num199++; + this.link_num200++; + this.link_num201++; + this.link_num202++; + this.link_num203++; + this.link_num204++; + this.link_num205++; + this.link_num206++; + this.link_num207++; + this.link_num208++; + this.link_num209++; + this.link_num210++; + this.link_num211++; + this.link_num212++; + this.link_num213++; + this.link_num214++; + this.link_num215++; + this.link_num216++; + this.link_num217++; + this.link_num218++; + this.link_num219++; + this.link_num220++; + this.link_num221++; + this.link_num222++; + this.link_num223++; + this.link_num224++; + this.link_num225++; + this.link_num226++; + this.link_num227++; + this.link_num228++; + this.link_num229++; + this.link_num230++; + this.link_num231++; + this.link_num232++; + this.link_num233++; + this.link_num234++; + this.link_num235++; + this.link_num236++; + this.link_num237++; + this.link_num238++; + this.link_num239++; + this.link_num240++; + this.link_num241++; + this.link_num242++; + this.link_num243++; + this.link_num244++; + this.link_num245++; + this.link_num246++; + this.link_num247++; + this.link_num248++; + this.link_num249++; + this.link_num250++; + this.link_num251++; + this.link_num252++; + this.link_num253++; + this.link_num254++; + this.link_num255++; + this.link_num256++; + this.link_num257++; + this.link_num258++; + this.link_num259++; + this.link_num260++; + this.link_num261++; + this.link_num262++; + this.link_num263++; + this.link_num264++; + this.link_num265++; + this.link_num266++; + this.link_num267++; + this.link_num268++; + this.link_num269++; + this.link_num270++; + this.link_num271++; + this.link_num272++; + this.link_num273++; + this.link_num274++; + this.link_num275++; + this.link_num276++; + this.link_num277++; + this.link_num278++; + this.link_num279++; + this.link_num280++; + this.link_num281++; + this.link_num282++; + this.link_num283++; + this.link_num284++; + this.link_num285++; + this.link_num286++; + this.link_num287++; + this.link_num288++; + this.link_num289++; + this.link_num290++; + this.link_num291++; + this.link_num292++; + this.link_num293++; + this.link_num294++; + this.link_num295++; + this.link_num296++; + this.link_num297++; + this.link_num298++; + this.link_num299++; + this.link_num300++; + this.link_num301++; + this.link_num302++; + this.link_num303++; + this.link_num304++; + this.link_num305++; + this.link_num306++; + this.link_num307++; + this.link_num308++; + this.link_num309++; + this.link_num310++; + this.link_num311++; + this.link_num312++; + this.link_num313++; + this.link_num314++; + this.link_num315++; + this.link_num316++; + this.link_num317++; + this.link_num318++; + this.link_num319++; + this.link_num320++; + this.link_num321++; + this.link_num322++; + this.link_num323++; + this.link_num324++; + this.link_num325++; + this.link_num326++; + this.link_num327++; + this.link_num328++; + this.link_num329++; + this.link_num330++; + this.link_num331++; + this.link_num332++; + + }) + } + } +} + +@Component +struct ConsumeVariables { + @Consume consume_num0: number; + @Consume consume_num1: number; + @Consume consume_num2: number; + @Consume consume_num3: number; + @Consume consume_num4: number; + @Consume consume_num5: number; + @Consume consume_num6: number; + @Consume consume_num7: number; + @Consume consume_num8: number; + @Consume consume_num9: number; + @Consume consume_num10: number; + @Consume consume_num11: number; + @Consume consume_num12: number; + @Consume consume_num13: number; + @Consume consume_num14: number; + @Consume consume_num15: number; + @Consume consume_num16: number; + @Consume consume_num17: number; + @Consume consume_num18: number; + @Consume consume_num19: number; + @Consume consume_num20: number; + @Consume consume_num21: number; + @Consume consume_num22: number; + @Consume consume_num23: number; + @Consume consume_num24: number; + @Consume consume_num25: number; + @Consume consume_num26: number; + @Consume consume_num27: number; + @Consume consume_num28: number; + @Consume consume_num29: number; + @Consume consume_num30: number; + @Consume consume_num31: number; + @Consume consume_num32: number; + @Consume consume_num33: number; + @Consume consume_num34: number; + @Consume consume_num35: number; + @Consume consume_num36: number; + @Consume consume_num37: number; + @Consume consume_num38: number; + @Consume consume_num39: number; + @Consume consume_num40: number; + @Consume consume_num41: number; + @Consume consume_num42: number; + @Consume consume_num43: number; + @Consume consume_num44: number; + @Consume consume_num45: number; + @Consume consume_num46: number; + @Consume consume_num47: number; + @Consume consume_num48: number; + @Consume consume_num49: number; + @Consume consume_num50: number; + @Consume consume_num51: number; + @Consume consume_num52: number; + @Consume consume_num53: number; + @Consume consume_num54: number; + @Consume consume_num55: number; + @Consume consume_num56: number; + @Consume consume_num57: number; + @Consume consume_num58: number; + @Consume consume_num59: number; + @Consume consume_num60: number; + @Consume consume_num61: number; + @Consume consume_num62: number; + @Consume consume_num63: number; + @Consume consume_num64: number; + @Consume consume_num65: number; + @Consume consume_num66: number; + @Consume consume_num67: number; + @Consume consume_num68: number; + @Consume consume_num69: number; + @Consume consume_num70: number; + @Consume consume_num71: number; + @Consume consume_num72: number; + @Consume consume_num73: number; + @Consume consume_num74: number; + @Consume consume_num75: number; + @Consume consume_num76: number; + @Consume consume_num77: number; + @Consume consume_num78: number; + @Consume consume_num79: number; + @Consume consume_num80: number; + @Consume consume_num81: number; + @Consume consume_num82: number; + @Consume consume_num83: number; + @Consume consume_num84: number; + @Consume consume_num85: number; + @Consume consume_num86: number; + @Consume consume_num87: number; + @Consume consume_num88: number; + @Consume consume_num89: number; + @Consume consume_num90: number; + @Consume consume_num91: number; + @Consume consume_num92: number; + @Consume consume_num93: number; + @Consume consume_num94: number; + @Consume consume_num95: number; + @Consume consume_num96: number; + @Consume consume_num97: number; + @Consume consume_num98: number; + @Consume consume_num99: number; + @Consume consume_num100: number; + @Consume consume_num101: number; + @Consume consume_num102: number; + @Consume consume_num103: number; + @Consume consume_num104: number; + @Consume consume_num105: number; + @Consume consume_num106: number; + @Consume consume_num107: number; + @Consume consume_num108: number; + @Consume consume_num109: number; + @Consume consume_num110: number; + @Consume consume_num111: number; + @Consume consume_num112: number; + @Consume consume_num113: number; + @Consume consume_num114: number; + @Consume consume_num115: number; + @Consume consume_num116: number; + @Consume consume_num117: number; + @Consume consume_num118: number; + @Consume consume_num119: number; + @Consume consume_num120: number; + @Consume consume_num121: number; + @Consume consume_num122: number; + @Consume consume_num123: number; + @Consume consume_num124: number; + @Consume consume_num125: number; + @Consume consume_num126: number; + @Consume consume_num127: number; + @Consume consume_num128: number; + @Consume consume_num129: number; + @Consume consume_num130: number; + @Consume consume_num131: number; + @Consume consume_num132: number; + @Consume consume_num133: number; + @Consume consume_num134: number; + @Consume consume_num135: number; + @Consume consume_num136: number; + @Consume consume_num137: number; + @Consume consume_num138: number; + @Consume consume_num139: number; + @Consume consume_num140: number; + @Consume consume_num141: number; + @Consume consume_num142: number; + @Consume consume_num143: number; + @Consume consume_num144: number; + @Consume consume_num145: number; + @Consume consume_num146: number; + @Consume consume_num147: number; + @Consume consume_num148: number; + @Consume consume_num149: number; + @Consume consume_num150: number; + @Consume consume_num151: number; + @Consume consume_num152: number; + @Consume consume_num153: number; + @Consume consume_num154: number; + @Consume consume_num155: number; + @Consume consume_num156: number; + @Consume consume_num157: number; + @Consume consume_num158: number; + @Consume consume_num159: number; + @Consume consume_num160: number; + @Consume consume_num161: number; + @Consume consume_num162: number; + @Consume consume_num163: number; + @Consume consume_num164: number; + @Consume consume_num165: number; + @Consume consume_num166: number; + @Consume consume_num167: number; + @Consume consume_num168: number; + @Consume consume_num169: number; + @Consume consume_num170: number; + @Consume consume_num171: number; + @Consume consume_num172: number; + @Consume consume_num173: number; + @Consume consume_num174: number; + @Consume consume_num175: number; + @Consume consume_num176: number; + @Consume consume_num177: number; + @Consume consume_num178: number; + @Consume consume_num179: number; + @Consume consume_num180: number; + @Consume consume_num181: number; + @Consume consume_num182: number; + @Consume consume_num183: number; + @Consume consume_num184: number; + @Consume consume_num185: number; + @Consume consume_num186: number; + @Consume consume_num187: number; + @Consume consume_num188: number; + @Consume consume_num189: number; + @Consume consume_num190: number; + @Consume consume_num191: number; + @Consume consume_num192: number; + @Consume consume_num193: number; + @Consume consume_num194: number; + @Consume consume_num195: number; + @Consume consume_num196: number; + @Consume consume_num197: number; + @Consume consume_num198: number; + @Consume consume_num199: number; + @Consume consume_num200: number; + @Consume consume_num201: number; + @Consume consume_num202: number; + @Consume consume_num203: number; + @Consume consume_num204: number; + @Consume consume_num205: number; + @Consume consume_num206: number; + @Consume consume_num207: number; + @Consume consume_num208: number; + @Consume consume_num209: number; + @Consume consume_num210: number; + @Consume consume_num211: number; + @Consume consume_num212: number; + @Consume consume_num213: number; + @Consume consume_num214: number; + @Consume consume_num215: number; + @Consume consume_num216: number; + @Consume consume_num217: number; + @Consume consume_num218: number; + @Consume consume_num219: number; + @Consume consume_num220: number; + @Consume consume_num221: number; + @Consume consume_num222: number; + @Consume consume_num223: number; + @Consume consume_num224: number; + @Consume consume_num225: number; + @Consume consume_num226: number; + @Consume consume_num227: number; + @Consume consume_num228: number; + @Consume consume_num229: number; + @Consume consume_num230: number; + @Consume consume_num231: number; + @Consume consume_num232: number; + @Consume consume_num233: number; + @Consume consume_num234: number; + @Consume consume_num235: number; + @Consume consume_num236: number; + @Consume consume_num237: number; + @Consume consume_num238: number; + @Consume consume_num239: number; + @Consume consume_num240: number; + @Consume consume_num241: number; + @Consume consume_num242: number; + @Consume consume_num243: number; + @Consume consume_num244: number; + @Consume consume_num245: number; + @Consume consume_num246: number; + @Consume consume_num247: number; + @Consume consume_num248: number; + @Consume consume_num249: number; + @Consume consume_num250: number; + @Consume consume_num251: number; + @Consume consume_num252: number; + @Consume consume_num253: number; + @Consume consume_num254: number; + @Consume consume_num255: number; + @Consume consume_num256: number; + @Consume consume_num257: number; + @Consume consume_num258: number; + @Consume consume_num259: number; + @Consume consume_num260: number; + @Consume consume_num261: number; + @Consume consume_num262: number; + @Consume consume_num263: number; + @Consume consume_num264: number; + @Consume consume_num265: number; + @Consume consume_num266: number; + @Consume consume_num267: number; + @Consume consume_num268: number; + @Consume consume_num269: number; + @Consume consume_num270: number; + @Consume consume_num271: number; + @Consume consume_num272: number; + @Consume consume_num273: number; + @Consume consume_num274: number; + @Consume consume_num275: number; + @Consume consume_num276: number; + @Consume consume_num277: number; + @Consume consume_num278: number; + @Consume consume_num279: number; + @Consume consume_num280: number; + @Consume consume_num281: number; + @Consume consume_num282: number; + @Consume consume_num283: number; + @Consume consume_num284: number; + @Consume consume_num285: number; + @Consume consume_num286: number; + @Consume consume_num287: number; + @Consume consume_num288: number; + @Consume consume_num289: number; + @Consume consume_num290: number; + @Consume consume_num291: number; + @Consume consume_num292: number; + @Consume consume_num293: number; + @Consume consume_num294: number; + @Consume consume_num295: number; + @Consume consume_num296: number; + @Consume consume_num297: number; + @Consume consume_num298: number; + @Consume consume_num299: number; + @Consume consume_num300: number; + @Consume consume_num301: number; + @Consume consume_num302: number; + @Consume consume_num303: number; + @Consume consume_num304: number; + @Consume consume_num305: number; + @Consume consume_num306: number; + @Consume consume_num307: number; + @Consume consume_num308: number; + @Consume consume_num309: number; + @Consume consume_num310: number; + @Consume consume_num311: number; + @Consume consume_num312: number; + @Consume consume_num313: number; + @Consume consume_num314: number; + @Consume consume_num315: number; + @Consume consume_num316: number; + @Consume consume_num317: number; + @Consume consume_num318: number; + @Consume consume_num319: number; + @Consume consume_num320: number; + @Consume consume_num321: number; + @Consume consume_num322: number; + @Consume consume_num323: number; + @Consume consume_num324: number; + @Consume consume_num325: number; + @Consume consume_num326: number; + @Consume consume_num327: number; + @Consume consume_num328: number; + @Consume consume_num329: number; + @Consume consume_num330: number; + @Consume consume_num331: number; + @Consume consume_num332: number; + + + //============================================================================= + + build() { + Column() { + Button('Click Me') + .onClick((e: ClickEvent) => { + this.consume_num0++; + this.consume_num1++; + this.consume_num2++; + this.consume_num3++; + this.consume_num4++; + this.consume_num5++; + this.consume_num6++; + this.consume_num7++; + this.consume_num8++; + this.consume_num9++; + this.consume_num10++; + this.consume_num11++; + this.consume_num12++; + this.consume_num13++; + this.consume_num14++; + this.consume_num15++; + this.consume_num16++; + this.consume_num17++; + this.consume_num18++; + this.consume_num19++; + this.consume_num20++; + this.consume_num21++; + this.consume_num22++; + this.consume_num23++; + this.consume_num24++; + this.consume_num25++; + this.consume_num26++; + this.consume_num27++; + this.consume_num28++; + this.consume_num29++; + this.consume_num30++; + this.consume_num31++; + this.consume_num32++; + this.consume_num33++; + this.consume_num34++; + this.consume_num35++; + this.consume_num36++; + this.consume_num37++; + this.consume_num38++; + this.consume_num39++; + this.consume_num40++; + this.consume_num41++; + this.consume_num42++; + this.consume_num43++; + this.consume_num44++; + this.consume_num45++; + this.consume_num46++; + this.consume_num47++; + this.consume_num48++; + this.consume_num49++; + this.consume_num50++; + this.consume_num51++; + this.consume_num52++; + this.consume_num53++; + this.consume_num54++; + this.consume_num55++; + this.consume_num56++; + this.consume_num57++; + this.consume_num58++; + this.consume_num59++; + this.consume_num60++; + this.consume_num61++; + this.consume_num62++; + this.consume_num63++; + this.consume_num64++; + this.consume_num65++; + this.consume_num66++; + this.consume_num67++; + this.consume_num68++; + this.consume_num69++; + this.consume_num70++; + this.consume_num71++; + this.consume_num72++; + this.consume_num73++; + this.consume_num74++; + this.consume_num75++; + this.consume_num76++; + this.consume_num77++; + this.consume_num78++; + this.consume_num79++; + this.consume_num80++; + this.consume_num81++; + this.consume_num82++; + this.consume_num83++; + this.consume_num84++; + this.consume_num85++; + this.consume_num86++; + this.consume_num87++; + this.consume_num88++; + this.consume_num89++; + this.consume_num90++; + this.consume_num91++; + this.consume_num92++; + this.consume_num93++; + this.consume_num94++; + this.consume_num95++; + this.consume_num96++; + this.consume_num97++; + this.consume_num98++; + this.consume_num99++; + this.consume_num100++; + this.consume_num101++; + this.consume_num102++; + this.consume_num103++; + this.consume_num104++; + this.consume_num105++; + this.consume_num106++; + this.consume_num107++; + this.consume_num108++; + this.consume_num109++; + this.consume_num110++; + this.consume_num111++; + this.consume_num112++; + this.consume_num113++; + this.consume_num114++; + this.consume_num115++; + this.consume_num116++; + this.consume_num117++; + this.consume_num118++; + this.consume_num119++; + this.consume_num120++; + this.consume_num121++; + this.consume_num122++; + this.consume_num123++; + this.consume_num124++; + this.consume_num125++; + this.consume_num126++; + this.consume_num127++; + this.consume_num128++; + this.consume_num129++; + this.consume_num130++; + this.consume_num131++; + this.consume_num132++; + this.consume_num133++; + this.consume_num134++; + this.consume_num135++; + this.consume_num136++; + this.consume_num137++; + this.consume_num138++; + this.consume_num139++; + this.consume_num140++; + this.consume_num141++; + this.consume_num142++; + this.consume_num143++; + this.consume_num144++; + this.consume_num145++; + this.consume_num146++; + this.consume_num147++; + this.consume_num148++; + this.consume_num149++; + this.consume_num150++; + this.consume_num151++; + this.consume_num152++; + this.consume_num153++; + this.consume_num154++; + this.consume_num155++; + this.consume_num156++; + this.consume_num157++; + this.consume_num158++; + this.consume_num159++; + this.consume_num160++; + this.consume_num161++; + this.consume_num162++; + this.consume_num163++; + this.consume_num164++; + this.consume_num165++; + this.consume_num166++; + this.consume_num167++; + this.consume_num168++; + this.consume_num169++; + this.consume_num170++; + this.consume_num171++; + this.consume_num172++; + this.consume_num173++; + this.consume_num174++; + this.consume_num175++; + this.consume_num176++; + this.consume_num177++; + this.consume_num178++; + this.consume_num179++; + this.consume_num180++; + this.consume_num181++; + this.consume_num182++; + this.consume_num183++; + this.consume_num184++; + this.consume_num185++; + this.consume_num186++; + this.consume_num187++; + this.consume_num188++; + this.consume_num189++; + this.consume_num190++; + this.consume_num191++; + this.consume_num192++; + this.consume_num193++; + this.consume_num194++; + this.consume_num195++; + this.consume_num196++; + this.consume_num197++; + this.consume_num198++; + this.consume_num199++; + this.consume_num200++; + this.consume_num201++; + this.consume_num202++; + this.consume_num203++; + this.consume_num204++; + this.consume_num205++; + this.consume_num206++; + this.consume_num207++; + this.consume_num208++; + this.consume_num209++; + this.consume_num210++; + this.consume_num211++; + this.consume_num212++; + this.consume_num213++; + this.consume_num214++; + this.consume_num215++; + this.consume_num216++; + this.consume_num217++; + this.consume_num218++; + this.consume_num219++; + this.consume_num220++; + this.consume_num221++; + this.consume_num222++; + this.consume_num223++; + this.consume_num224++; + this.consume_num225++; + this.consume_num226++; + this.consume_num227++; + this.consume_num228++; + this.consume_num229++; + this.consume_num230++; + this.consume_num231++; + this.consume_num232++; + this.consume_num233++; + this.consume_num234++; + this.consume_num235++; + this.consume_num236++; + this.consume_num237++; + this.consume_num238++; + this.consume_num239++; + this.consume_num240++; + this.consume_num241++; + this.consume_num242++; + this.consume_num243++; + this.consume_num244++; + this.consume_num245++; + this.consume_num246++; + this.consume_num247++; + this.consume_num248++; + this.consume_num249++; + this.consume_num250++; + this.consume_num251++; + this.consume_num252++; + this.consume_num253++; + this.consume_num254++; + this.consume_num255++; + this.consume_num256++; + this.consume_num257++; + this.consume_num258++; + this.consume_num259++; + this.consume_num260++; + this.consume_num261++; + this.consume_num262++; + this.consume_num263++; + this.consume_num264++; + this.consume_num265++; + this.consume_num266++; + this.consume_num267++; + this.consume_num268++; + this.consume_num269++; + this.consume_num270++; + this.consume_num271++; + this.consume_num272++; + this.consume_num273++; + this.consume_num274++; + this.consume_num275++; + this.consume_num276++; + this.consume_num277++; + this.consume_num278++; + this.consume_num279++; + this.consume_num280++; + this.consume_num281++; + this.consume_num282++; + this.consume_num283++; + this.consume_num284++; + this.consume_num285++; + this.consume_num286++; + this.consume_num287++; + this.consume_num288++; + this.consume_num289++; + this.consume_num290++; + this.consume_num291++; + this.consume_num292++; + this.consume_num293++; + this.consume_num294++; + this.consume_num295++; + this.consume_num296++; + this.consume_num297++; + this.consume_num298++; + this.consume_num299++; + this.consume_num300++; + this.consume_num301++; + this.consume_num302++; + this.consume_num303++; + this.consume_num304++; + this.consume_num305++; + this.consume_num306++; + this.consume_num307++; + this.consume_num308++; + this.consume_num309++; + this.consume_num310++; + this.consume_num311++; + this.consume_num312++; + this.consume_num313++; + this.consume_num314++; + this.consume_num315++; + this.consume_num316++; + this.consume_num317++; + this.consume_num318++; + this.consume_num319++; + this.consume_num320++; + this.consume_num321++; + this.consume_num322++; + this.consume_num323++; + this.consume_num324++; + this.consume_num325++; + this.consume_num326++; + this.consume_num327++; + this.consume_num328++; + this.consume_num329++; + this.consume_num330++; + this.consume_num331++; + this.consume_num332++; + + }) + } + } +} diff --git a/koala_tools/ui2abc/perf-tests/ui2abcconfig.json b/koala_tools/ui2abc/perf-tests/ui2abcconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..1ccbc3b1addebc36eb2dfb0d5ce5e858013cdcb7 --- /dev/null +++ b/koala_tools/ui2abc/perf-tests/ui2abcconfig.json @@ -0,0 +1,48 @@ +{ + "compilerOptions": { + "package": "@ohos.arkui.perf-tests", + "outDir": "build", + "baseUrl": ".", + "paths": { + "@ohos.arkui": ["../../arkoala-arkts/arkui/sdk"], + "@ohos.arkui.components": ["../../arkoala-arkts/arkui/sdk"], + "@ohos.router": ["../../arkoala-arkts/arkui/sdk/ohos/router.ets"], + "@koalaui/builderLambda": ["../../arkoala-arkts/arkui/sdk/annotations"], + "@koalaui/interop": ["../../interop/src/arkts"], + "@koalaui/harness": ["../../incremental/harness/src/arkts"], + "@koalaui/compat": [ "../../incremental/compat/src/arkts" ], + "@koalaui/common": [ "../../incremental/common/src" ], + "@koalaui/runtime": [ "../../incremental/runtime/ets" ], + "@koalaui/runtime/annotations": [ "../../incremental/runtime/annotations" ] + }, + "plugins": [ + { + "transform": "@koalaui/ui-plugins", + "state": "parsed", + "name": "ui" + }, + { + "transform": "@koalaui/memo-plugin", + "state": "parsed", + "name": "memo" + }, + { + "transform": "@koalaui/ui-plugins", + "state": "checked", + "name": "ui" + }, + { + "transform": "@koalaui/memo-plugin", + "state": "checked", + "name": "memo" + } + ] + }, + "include": [ + "./src/**/*.ets" + ], + "exclude": [ + "./src/positionalMemoization.ets", + "./src/1.1/**/*.ets" + ] +} diff --git a/koala_tools/ui2abc/ui-plugins/BUILD.gn b/koala_tools/ui2abc/ui-plugins/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..71959500854c874331b42fa8fc409b985fa0db4e --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/BUILD.gn @@ -0,0 +1,58 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build/ohos.gni") +import("//foundation/arkui/ace_engine/frameworks/bridge/arkts_frontend/koala_mirror/gn/npm_util.gni") + +node_version = "v16.20.2" +host_arch = "${host_os}-${host_cpu}" + +ui2abc_root = ".." +libarkts_root = "${ui2abc_root}/libarkts" + +npm_cmd("ui_plugin_compile") { + outputs = [ + "$target_out_dir/entry.js" + ] + project_path = rebase_path(".") + run_tasks = [ "compile" ] + + deps = [ + "${libarkts_root}:libarkts" + ] +} + +action("gen_ui_plugin") { + script = "../gn/command/copy_libs.py" + args = [ + "--source_path", rebase_path(get_path_info(".", "abspath")), + "--output_path", rebase_path("$target_gen_dir"), + "--root_out_dir", rebase_path(root_out_dir), + ] + outputs = [ "$target_gen_dir" ] + deps = [ + ":ui_plugin_compile" + ] +} + +# Use from OHOS-SDK build (//build/ohos/sdk/ohos_sdk_description_std.json) + +ohos_copy("ui-plugin-sdk") { + deps = [":gen_ui_plugin" ] + sources = [ rebase_path("$target_gen_dir") ] + outputs = [ target_out_dir + "/$target_name" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" + subsystem_name = "arkui" + part_name = "ace_engine" +} \ No newline at end of file diff --git a/koala_tools/ui2abc/ui-plugins/package.json b/koala_tools/ui2abc/ui-plugins/package.json new file mode 100644 index 0000000000000000000000000000000000000000..e4f0609d3a7a6d8f911bfc1df86cf8061c8a8358 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/package.json @@ -0,0 +1,12 @@ +{ + "name": "@koalaui/ui-plugins", + "main": "./lib/entry.js", + "dependencies": {}, + "scripts": { + "clean": "rimraf build lib .rollup.cache", + "compile": "rollup -c ./rollup.config.mjs", + "compile:libarkts": "npm run compile --prefix ../libarkts", + "check": "npm run compile && rm -rf ../../arkoala-arkts/trivial/user/build && npm run build --prefix ../../arkoala-arkts/trivial/user", + "check:run": "npm run check && npm run run --prefix ../../arkoala-arkts/trivial/user" + } +} diff --git a/koala_tools/ui2abc/ui-plugins/rollup.config.mjs b/koala_tools/ui2abc/ui-plugins/rollup.config.mjs new file mode 100644 index 0000000000000000000000000000000000000000..50c7f61a79e8ad22f9c921d917f0e31f7b49b23d --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/rollup.config.mjs @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2024 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 nodeResolve from "@rollup/plugin-node-resolve"; +import typescript from "@rollup/plugin-typescript"; +import commonjs from '@rollup/plugin-commonjs' +import terser from "@rollup/plugin-terser" + +const ENABLE_SOURCE_MAPS = false; // Enable for debugging + +export default buildPlugin({ + src: "./src/entry.ts", + dst: "./lib/entry.js", + minimize: false, +}) + +/** @return {import("rollup").RollupOptions} */ +function buildPlugin({ src, dst, minimize = false }) { + return { + input: src, + output: { + file: dst, + format: "commonjs", + plugins: [ + minimize && terser({ + format: { + max_line_len: 800 + } + }), + replaceLibarktsImport(), + ], + banner: APACHE_LICENSE_HEADER(), + sourcemap: ENABLE_SOURCE_MAPS + }, + external: ["@koalaui/libarkts"], + plugins: [ + commonjs(), + typescript({ + outputToFilesystem: false, + module: "esnext", + sourceMap: ENABLE_SOURCE_MAPS, + declarationMap: false, + declaration: false, + composite: false, + }), + nodeResolve({ + extensions: [".js", ".mjs", ".cjs", ".ts", ".cts", ".mts"] + }) + ], + } +} + +function APACHE_LICENSE_HEADER() { + return ` +/** +* @license +* Copyright (c) ${new Date().getUTCFullYear()} 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. +*/ + +` +} + +/** @returns {import("rollup").OutputPlugin} */ +function replaceLibarktsImport() { + const REQUIRE_PATTERN = `require('@koalaui/libarkts');` + return { + name: "replace-libarkts-import", + generateBundle(options, bundle) { + for (const [fileName, asset] of Object.entries(bundle)) { + if (!asset.code) continue + asset.code = asset.code.replace(REQUIRE_PATTERN, `require(process.env.LIBARKTS_PATH ?? "../../libarkts/lib/libarkts.js")`) + } + } + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/ui-plugins/src/annotation-translator.ts b/koala_tools/ui2abc/ui-plugins/src/annotation-translator.ts new file mode 100644 index 0000000000000000000000000000000000000000..e65f6040d9d3bcc90e6166b97f7396644dbf4161 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/annotation-translator.ts @@ -0,0 +1,68 @@ + /* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { DecoratorNames, hasDecorator, hasBuilderDecorator, replaceParameterDecorator, replaceTypeAliasDecorator, replaceFunctionTypeDecorator } from "./utils" +import { annotation } from "./common/arkts-utils" +import { CustomComponentNames, InternalAnnotations } from "./utils" + +export class AnnotationsTransformer extends arkts.AbstractVisitor { + + constructor(options?: arkts.VisitorOptions) { + super(options) + this.program = arkts.global.compilerContext!.program + } + + + inStruct = false + + visitor(beforeVisit: arkts.AstNode): arkts.AstNode { + if (arkts.isClassDefinition(beforeVisit) && hasDecorator(beforeVisit, DecoratorNames.COMPONENT)) { + this.inStruct = true + } + // console.log(`builder transform ${node.dumpSrc()} ${arkts.isAnnotationUsage(node)}`) + const node = this.visitEachChild(beforeVisit) + + if (arkts.isFunctionDeclaration(node) && hasBuilderDecorator(node)) { + return arkts.factory.updateFunctionDeclaration(node, node.function, [ + annotation(InternalAnnotations.MEMO)], node.isAnonymous) + } + if (this.inStruct && arkts.isMethodDefinition(node) && ( + hasBuilderDecorator(node) || + node.function?.id?.name == CustomComponentNames.COMPONENT_BUILD_ORI) + ) { + let newNode = this.visitEachChild(beforeVisit) as arkts.MethodDefinition + newNode.function!.setAnnotations([annotation(InternalAnnotations.MEMO)]) + return newNode + } + if (this.inStruct && arkts.isClassProperty(node) && hasDecorator(node, DecoratorNames.BUILDER_PARAM)) { + return node + } + if (arkts.isClassDefinition(node) && hasDecorator(node, DecoratorNames.COMPONENT)) { + this.inStruct = false + return node + } + if (arkts.isETSParameterExpression(node) && hasDecorator(node, DecoratorNames.BUILDER)) { + return replaceParameterDecorator(node, DecoratorNames.BUILDER, InternalAnnotations.MEMO) + } + if (arkts.isTSTypeAliasDeclaration(node) && hasDecorator(node, DecoratorNames.BUILDER)) { + return replaceTypeAliasDecorator(node, DecoratorNames.BUILDER, InternalAnnotations.MEMO) + } + if (arkts.isETSFunctionType(node) && hasDecorator(node, DecoratorNames.BUILDER)) { + return replaceFunctionTypeDecorator(node, DecoratorNames.BUILDER, InternalAnnotations.MEMO) + } + return node + } +} diff --git a/koala_tools/ui2abc/ui-plugins/src/builder-lambda-transformer.ts b/koala_tools/ui2abc/ui-plugins/src/builder-lambda-transformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..30383e783cf81ef24e9f9e78a4de88ebfc45c33c --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/builder-lambda-transformer.ts @@ -0,0 +1,426 @@ +/* + * 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 * as arkts from "@koalaui/libarkts" +import { BuilderLambdaNames, InternalAnnotations, getCustomComponentOptionsName, styledInstance, uiAttributeName, DecoratorNames } from "./utils" +import { StructDescriptor, StructsResolver } from "./struct-recorder" +import { fieldOf } from "./property-transformers" +import { addAnnotation, annotation, backingField, removeAnnotationByName } from "./common/arkts-utils" + + +function isBuilderLambdaAnnotation(annotation: arkts.AnnotationUsage): boolean { + if (annotation.expr === undefined) { + return false + } + if (!arkts.isIdentifier(annotation.expr)) { + return false + } + return annotation.expr.name == BuilderLambdaNames.BUILDER_LAMBDA_NAME +} + +function isComponentBuilderAnnotation(annotation: arkts.AnnotationUsage): boolean { + if (annotation.expr === undefined) { + return false + } + if (!arkts.isIdentifier(annotation.expr)) { + return false + } + return annotation.expr.name == BuilderLambdaNames.ANNOTATION_NAME +} + +function builderLambdaArgumentName(annotation: arkts.AnnotationUsage): string | undefined { + if (!isBuilderLambdaAnnotation(annotation)) return undefined + const property = annotation.properties[0] + if (property === undefined) return undefined + if (!arkts.isClassProperty(property)) return undefined + if (property.value === undefined) return undefined + if (!arkts.isStringLiteral(property.value)) return undefined + + return property.value.str +} + +function getIdentifierScriptFunction(node: arkts.Identifier): arkts.ScriptFunction | undefined { + const decl = arkts.getDecl(node) + if (!arkts.isFunctionDeclaration(decl) && + !arkts.isMethodDefinition(decl)) return undefined + + return decl.function +} + +function getScriptFunction(node: arkts.CallExpression): arkts.ScriptFunction | undefined { + if (arkts.isIdentifier(node.callee)) { + return getIdentifierScriptFunction(node.callee) + } + if (arkts.isMemberExpression(node.callee)) { + const decl = arkts.getDecl(node.callee.property!) + if (!arkts.isMethodDefinition(decl)) return undefined + return decl.function + } + return undefined +} + +function findBuilderLambdaAnnotation(func: arkts.ScriptFunction): arkts.AnnotationUsage | undefined { + const declAnnotations = arkts.getAnnotations(func) + if (declAnnotations.length === 0) { + return undefined + } + return declAnnotations.find(it => isBuilderLambdaAnnotation(it)) +} + +function findComponentBuilderAnnotation(func: arkts.ScriptFunction): arkts.AnnotationUsage | undefined { + const declAnnotations = arkts.getAnnotations(func) + if (declAnnotations.length === 0) { + return undefined + } + return declAnnotations.find(it => isComponentBuilderAnnotation(it)) +} + +function findCallBuilderLambdaAnnotation(node: arkts.CallExpression): arkts.AnnotationUsage | undefined { + const func = getScriptFunction(node) + if (func == undefined) return undefined + + return findBuilderLambdaAnnotation(func) +} + +export function builderLambdaTargetFunctionName(func: arkts.ScriptFunction): string | undefined { + const annotation = findBuilderLambdaAnnotation(func) + if (!annotation) return undefined + + return builderLambdaArgumentName(annotation) +} + +export function builderLambdaFunctionName(node: arkts.CallExpression): string | undefined { + const func = getScriptFunction(node) + if (func == undefined) return undefined + + if (findComponentBuilderAnnotation(func)) { + return func.id?.name! + } + + const annotation = findBuilderLambdaAnnotation(func) + if (!annotation) return undefined + + return builderLambdaArgumentName(annotation) +} +/* + Improve: remove this once compiler is capable of inferring type on its own + whole function is a couple of hacks + */ +function inferType(node: arkts.CallExpression): arkts.Identifier | undefined { + if (arkts.isIdentifier(node.callee)) { + const component = node.callee.name.replace("Impl", "") + return arkts.factory.createIdentifier(uiAttributeName(component)) + } + const decl = arkts.getDecl(node.callee!) + if (arkts.isMethodDefinition(decl)) { + if (arkts.isClassDefinition(decl.parent)) { + return decl.parent.ident + } + } + return undefined +} + +function createBuilderLambdaInstanceLambda(node: arkts.CallExpression): arkts.Expression { + return createInstanceLambda(node.arguments[0], inferType(node)) +} + +function createInstanceLambda( + instanceArgument: arkts.Expression, + parameterTypeName?: arkts.Identifier +): arkts.Expression { + if (arkts.isUndefinedLiteral(instanceArgument)) { + return instanceArgument + } + const lambdaParameter = arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier( + styledInstance, + parameterTypeName !== undefined ? + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + parameterTypeName, undefined, undefined + ) + ) + : undefined + ), + false + ) + const instanceLambdaBody = arkts.factory.createBlockStatement([ + arkts.factory.createExpressionStatement(instanceArgument) + ]) + return arkts.factory.createArrowFunctionExpression( + arkts.factory.createScriptFunction( + instanceLambdaBody, + undefined, + [lambdaParameter], + arkts.factory.createETSPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_ARROW, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + undefined, + undefined + ) + ) +} + +function builderLambdaCallee(name: string) { + if (!name.includes('.')) { + return arkts.factory.createIdentifier(name) + } + // Improve: What are the restrictions on builderLambda name? + return arkts.factory.createMemberExpression( + arkts.factory.createIdentifier(name.split('.')[0]), + arkts.factory.createIdentifier(name.split('.')[1]), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ) +} + +function isOptionsType(type: arkts.TypeNode): type is arkts.ETSTypeReference { + return arkts.isETSTypeReference(type) && arkts.isIdentifier(type.part?.name) && (type.part?.name?.name?.startsWith("__Options") ?? false) +} + +function isStringType(type: arkts.TypeNode): type is arkts.ETSTypeReference { + return arkts.isETSTypeReference(type) && arkts.isIdentifier(type.part?.name) && (type.part?.name?.name == "string") +} + +function maybeFieldRewrite(struct: StructDescriptor, property: arkts.Property): arkts.Expression { + const value = property.value as arkts.MemberExpression + if (!arkts.isIdentifier(property.key)) return property.value! + if (arkts.isThisExpression(value.object) && arkts.isIdentifier(value.property)) { + let targetName = property.key.name + let localName = value.property.name + // Hack to work around the fact that $-conversion already made transition to backing field, + // let's rework. + if (struct.hasDecorator(targetName, DecoratorNames.LINK) && !localName.startsWith("__backing")) { + return fieldOf(arkts.factory.createThisExpression(), backingField(localName)) + } + } + return value +} + +function rewriteOptionsParameter(expression: arkts.Expression, type: arkts.TypeNode, struct: StructDescriptor): arkts.Expression { + if (!arkts.isObjectExpression(expression) || !struct) return expression + return arkts.factory.createTSAsExpression( + arkts.factory.updateObjectExpression( + expression, + expression.properties.map(value => { + if (arkts.isProperty(value) && arkts.isMemberExpression(value.value)) { + return arkts.factory.updateProperty( + value, + arkts.Es2pandaPropertyKind.PROPERTY_KIND_INIT, + value.key, + maybeFieldRewrite(struct, value), false, false + ) + } else { + return value + } + })), + type.clone(), false + ) +} + +function transformBuilderLambdaCall(resolver: StructsResolver | undefined, node: arkts.CallExpression): arkts.CallExpression { + const implFunction = builderLambdaFunctionName(node) + if (implFunction === undefined) { + return node + } + const callee = getScriptFunction(node) + let optionsIndex = -1 + let optionsType: arkts.ETSTypeReference | undefined = undefined + let struct: StructDescriptor | undefined = undefined + let reuseIndex = -1 + let reuseKey: string | undefined = undefined + if (callee) { + callee.params.forEach((it, index) => { + if (arkts.isETSParameterExpression(it)) { + let type = it.typeAnnotation + if (arkts.isETSUnionType(type) && isOptionsType(type.types[0])) { + optionsIndex = index + optionsType = type.types[0] as arkts.ETSTypeReference + struct = resolver?.findStructByOptions(optionsType.baseName!) + } + if (arkts.isETSUnionType(type) && isStringType(type.types[0]) + && struct && struct.hasAnnotation(DecoratorNames.REUSABLE)) { + reuseIndex = index + reuseKey = struct.name + } + } + }) + } + const reuseAgrs: arkts.Expression[] = [] + if (reuseIndex > -1) { + reuseAgrs.push(arkts.factory.createStringLiteral(reuseKey!)) + if (node.arguments.length <= reuseIndex + 1) { + reuseAgrs.push(arkts.factory.createUndefinedLiteral()) + } + } + return arkts.factory.updateCallExpression( + node, + builderLambdaCallee(implFunction), + [ + createBuilderLambdaInstanceLambda(node), + ...node.arguments.slice(1).map((it, index) => { + // Workaround for type inference bug! + if (index == optionsIndex) { + return rewriteOptionsParameter(it, optionsType!, struct!) + } else { + return it + } + }), + ...reuseAgrs + ], + node.typeParams, + node.isOptional, + node.hasTrailingComma, + node.trailingBlock + ) +} + +// Improve: for now it all works, but it is unclear +// if it will keep working under Recheck. +// in theory we don't add new files to import here, +// only the new names from the same file, +// to it should be okay. +function transformETSImportDeclaration(resolver: StructsResolver | undefined, node: arkts.ETSImportDeclaration): arkts.ETSImportDeclaration { + const additionalNames: string[] = [] + node.specifiers.forEach(it => { + if (arkts.isImportSpecifier(it)) { + const name = it.imported + const struct = resolver?.findStruct(it.imported!) + if (struct) { + additionalNames.push(getCustomComponentOptionsName(name?.name!)) + } + const scriptFunction = name ? getIdentifierScriptFunction(name) : undefined + if (scriptFunction) { + const target = builderLambdaTargetFunctionName(scriptFunction) + if (target) { + // Improve: The type name here should not be explicitly manipulated + // but the type checker of the compiler is still incapable + // to infer the proper lambda argument types + additionalNames.push(uiAttributeName(name?.name!)) + additionalNames.push(target) + } else if (findComponentBuilderAnnotation(scriptFunction)) { + additionalNames.push(uiAttributeName(name?.name!)) + } + } + } + }) + if (additionalNames.length == 0) return node + + return arkts.factory.updateETSImportDeclaration( + node, + node.source, + [...node.specifiers, + ...additionalNames.map(it => arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier(it), + arkts.factory.createIdentifier(it) + )) + ], + node.isTypeKind ? arkts.Es2pandaImportKinds.IMPORT_KINDS_TYPES : arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL + ) +} + +function isComponentBuilder(node: arkts.AstNode): boolean { + if (!arkts.isMethodDefinition(node)) return false + const func = node.function! + return findComponentBuilderAnnotation(func) != undefined +} + +function createStyleParameter( + typeNode: arkts.TypeNode | undefined, +): arkts.ETSParameterExpression { + const styleLambdaParam = arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier(BuilderLambdaNames.STYLE_ARROW_PARAM_NAME, typeNode), + false, + undefined + ) + const funcType = arkts.factory.createETSFunctionType( + undefined, + [styleLambdaParam], + arkts.factory.createETSPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_ARROW, + // Improve: get dealt with @memo on type of param in memo-plugin to put MEMO here + ) + + let parameter: arkts.ETSParameterExpression; + const optionalFuncType = arkts.factory.createETSUnionType([funcType, arkts.factory.createETSUndefinedType()]); + parameter = arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier(BuilderLambdaNames.STYLE_PARAM_NAME, optionalFuncType), + false, + undefined, + [annotation(InternalAnnotations.MEMO)] + ) + return parameter +} + +function transformComponentBuilder( + node: arkts.MethodDefinition, +): arkts.MethodDefinition { + const styleArg = createStyleParameter(node.function?.returnTypeAnnotation?.clone()) + const func: arkts.ScriptFunction = node.function! + const newAnnotations = addAnnotation( + removeAnnotationByName(func.annotations, BuilderLambdaNames.ANNOTATION_NAME), + InternalAnnotations.MEMO + ) + const newParams: arkts.Expression[] = [styleArg, ...func.params] + const updateFunc = arkts.factory.updateScriptFunction( + func, + func.body, + func.typeParams, + newParams, + arkts.factory.createETSPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID), + false, + func.flags, + func.modifierFlags, + node.id, + newAnnotations + ) + + const result = arkts.factory.updateMethodDefinition( + node, + node.kind, + node.id, + arkts.factory.createFunctionExpression(arkts.factory.createIdentifier(node.id?.name!), updateFunc), + node.modifierFlags, + false, + node.overloads + ) + + return result +} + + +export class BuilderLambdaTransformer extends arkts.AbstractVisitor { + constructor(private resolver: StructsResolver | undefined) { + super() + } + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + + if (arkts.isCallExpression(node)) { + return transformBuilderLambdaCall(this.resolver, node) + } + if (arkts.isMethodDefinition(node) && isComponentBuilder(node)) { + return transformComponentBuilder(node) + } + if (arkts.isETSImportDeclaration(node)) { + return transformETSImportDeclaration(this.resolver, node) + } + + return node + } +} diff --git a/koala_tools/ui2abc/ui-plugins/src/call-transformer.ts b/koala_tools/ui2abc/ui-plugins/src/call-transformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..122c3297d125c04b411f9873bde5477d389ea6e6 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/call-transformer.ts @@ -0,0 +1,259 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { ApplicationInfo, ComponentTransformerOptions, ProjectConfig } from "./component-transformer" +import { getResourcePackage, Importer } from "./utils" +import { Dollars, getResourceParams, initResourceInfo, loadBuildJson, LoaderJson, ModuleType, RESOURCE_TYPE, ResourceInfo, ResourceParameter } from "./resources-utils" + +export class CallTransformer extends arkts.AbstractVisitor { + + private applicationInfo?: ApplicationInfo + private projectConfig?: ProjectConfig + private classNode?: arkts.ClassDeclaration + private whiteList = ["$r", "$rawfile"] + + private resourceInfo: ResourceInfo + private aceBuildJson: LoaderJson + + constructor(private imports: Importer, options?: ComponentTransformerOptions, projectConfig?: ProjectConfig) { + super() + this.program = arkts.global.compilerContext!.program + this.applicationInfo = options?.applicationInfo + this.projectConfig = projectConfig + + this.aceBuildJson = loadBuildJson(this.projectConfig); + this.resourceInfo = initResourceInfo(this.projectConfig, this.aceBuildJson); + } + + isDollarVariableAccess(identifier: arkts.Identifier): boolean { + if (!this.classNode || !this.classNode.definition) return false + const name = identifier.name + // identifier name starts with $ and not with $r or $rawfile + if (!name.startsWith("$")) return false + if (this.whiteList.includes(name)) return false + // the property is a member of the class + const propName = name.substring(1) + return this.classNode.definition.body + .some(it => arkts.isClassProperty(it) && it.id?.name == propName) + } + + transformDollarVariableAccess(node: arkts.Identifier): arkts.Expression { + return arkts.factory.createMemberExpression( + arkts.factory.createThisExpression(), + arkts.factory.createIdentifier(node.name.substring(1)), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ) + } + + transformDollarCallExpression(node: arkts.CallExpression): arkts.CallExpression { + + if (!arkts.isIdentifier(node.callee) || !this.projectConfig) { + return this.updateResourceCallDefault(node) // TODO: rework + } + + const resourceKind: Dollars = node.callee.name as Dollars; + const transformedKey: string = resourceKind === Dollars.DOLLAR_RESOURCE + ? Dollars.TRANSFORM_DOLLAR_RESOURCE + : Dollars.TRANSFORM_DOLLAR_RAWFILE; + + // add import { _r, _rawfile } from "arkui.component.resources"; + this.imports.add(transformedKey, getResourcePackage()) + + if (arkts.isStringLiteral(node.arguments[0])) { + return this.updateStringLiteralResource( + node, + this.projectConfig, + resourceKind, + transformedKey, + node.arguments[0] + ) + } else if (node.arguments && node.arguments.length) { + const resourceParams: ResourceParameter = getResourceParams(-1, resourceKind === Dollars.DOLLAR_RAWFILE ? RESOURCE_TYPE.rawfile : -1, Array.from(node.arguments)) + this.updateResourceCall( + node, + resourceParams, + this.projectConfig, + transformedKey + ) + } + return node; + } + + updateStringLiteralResource( + node: arkts.CallExpression, + projectConfig: ProjectConfig, + resourceKind: Dollars, + transformedKey: string, + arg: arkts.StringLiteral + ): arkts.CallExpression { + const resourceData: string[] = arg.str.trim().split('.'); + const fromOtherModule: boolean = !!resourceData.length && /^\[.*\]$/g.test(resourceData[0]); + if (resourceKind === Dollars.DOLLAR_RAWFILE) { + let resourceId: number = projectConfig.moduleType === ModuleType.HAR ? -1 : 0; + if (resourceData && resourceData[0] && fromOtherModule) { + resourceId = -1; + } + + const resourceParams: ResourceParameter = getResourceParams(resourceId, RESOURCE_TYPE.rawfile, [node.arguments[0]]) + return this.updateResourceCall( + node, + resourceParams, + projectConfig, + transformedKey + ) + } else { + const resourceId: number = + projectConfig.moduleType === ModuleType.HAR || + fromOtherModule || + !this.resourceInfo.resourcesList[resourceData[0]] + ? -1 + : this.resourceInfo.resourcesList[resourceData[0]].get(resourceData[1])![resourceData[2]]; + + const resourceParams: ResourceParameter = getResourceParams( + resourceId, + RESOURCE_TYPE[resourceData[1].trim()], + projectConfig.moduleType === ModuleType.HAR || fromOtherModule + ? Array.from(node.arguments) + : Array.from(node.arguments.slice(1)) + ) + + return this.updateResourceCall( + node, + resourceParams, + projectConfig, + transformedKey + ) + + } + } + + updateResourceCall( + node: arkts.CallExpression, + resourceParams: ResourceParameter, + projectConfig: ProjectConfig, + transformedKey: string + ): arkts.CallExpression { + + const args = [ + arkts.factory.createNumberLiteral(resourceParams.id), + arkts.factory.createNumberLiteral(resourceParams.type), + arkts.factory.createStringLiteral(projectConfig.bundleName ?? ""), + arkts.factory.createStringLiteral(projectConfig.moduleName ?? "entry"), + ...resourceParams.params, + ]; + return arkts.factory.updateCallExpression( + node, + arkts.factory.createIdentifier(transformedKey), + args, + node.typeParams + ); + } + + // Use from rri. Maybe remove. + updateResourceCallDefault(node: arkts.CallExpression) { + const name = (node.callee as arkts.Identifier).name.replace('$', '_') + // add import { _r, _rawfile } from "@ohos.arkui"; + this.imports.add(name, getResourcePackage()) + const args = node.arguments.slice() + return arkts.factory.updateCallExpression( + node, + arkts.factory.createIdentifier(name), + [ + arkts.factory.createStringLiteral(this.applicationInfo?.bundleName ?? ""), + arkts.factory.createStringLiteral(this.applicationInfo?.moduleName ?? "entry"), + ...args, + ], + node.typeParams + ) + } + + private componentsList = new Map([ + [ "Column", { args: 1 } ], + [ "Row", { args: 1 } ], + [ "Stack", { args: 1 } ], + [ "List", { args: 1 } ], + [ "ListItem", { args: 1 } ], + [ "ListItemGroup", { args: 1 } ], + [ "DatePicker", { args: 1 } ], + [ "Slider", { args: 1 } ], + [ "Tabs", { args: 1 } ], + [ "Text", { args: 2 } ], + [ "TextInput", { args: 1 } ], + [ "Toggle", { args: 1 } ], + [ "Progress", { args: 1 } ], + [ "Swiper", { args: 1 } ], + [ "Grid", { args: 2 } ], + [ "GridCol", { args: 1 } ], + [ "GridRow", { args: 1 } ], + [ "GridItem", { args: 1 } ], + [ "Scroll", { args: 1 } ], + [ "Button", { args: 2 } ], + [ "Image", { args: 2 } ], + [ "Flex", { args: 1 } ], + [ "MenuItem", { args: 1 } ], + [ "MenuItemGroup", { args: 1 } ], + [ "WaterFlow", { args: 1 } ], + + + ]) + + transformComponentCallExpression(node: arkts.CallExpression, nameIdent: arkts.Identifier): arkts.CallExpression { + const name = nameIdent.name + const component = this.componentsList.get(name) + node = this.visitEachChild(node) as arkts.CallExpression + return arkts.factory.createCallExpression(node.callee, + this.insertUndefinedTillTrailing(node.arguments, component.args), + node.typeParams, + node.isOptional, + node.hasTrailingComma, + node.trailingBlock + ) + } + + insertUndefinedTillTrailing(params: readonly arkts.Expression[], requestedParams: number): arkts.Expression[] { + const result: arkts.Expression[] = [] + params.forEach(it => result.push(it)) + while (result.length < requestedParams) { + result.push(arkts.factory.createUndefinedLiteral()) + } + return result + } + + visitor(node: arkts.AstNode): arkts.AstNode { + if (arkts.isClassDeclaration(node)) { + this.classNode = node + const transformed = this.visitEachChild(node) + this.classNode = undefined + return transformed + } + if (arkts.isIdentifier(node)) { + if (this.isDollarVariableAccess(node)) { + return this.transformDollarVariableAccess(node) + } + } else if (arkts.isCallExpression(node) && arkts.isIdentifier(node.callee)) { + // Ugly hack, until Panda 26224 is fixed. + if (this.componentsList.get(node.callee.name)) { + return this.transformComponentCallExpression(node, node.callee) + } + if (this.whiteList.includes(node.callee.name)) { + return this.transformDollarCallExpression(node) + } + } + return this.visitEachChild(node) + } +} diff --git a/koala_tools/ui2abc/ui-plugins/src/checked-state-plugin.ts b/koala_tools/ui2abc/ui-plugins/src/checked-state-plugin.ts new file mode 100644 index 0000000000000000000000000000000000000000..b4ad61e0347e1eaa2be7cbfa164b401cbdb60461 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/checked-state-plugin.ts @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { StyleTransformer } from "./style-transformer" +import { EtsFirstArgTransformer } from "./ets-first-arg-transformer" +import { BuilderLambdaTransformer } from "./builder-lambda-transformer" +import { InstantiateFactoryHelper } from "./instantiate-factory-helper" +import { Importer } from "./utils" +import { StructsResolver, StructTable } from "./struct-recorder" +export interface TransformerOptions { + trace?: boolean, +} + +export default function checkedTransformer( + userPluginOptions?: TransformerOptions +): arkts.ProgramTransformer { + return (program: arkts.Program, _compilationOptions: arkts.CompilationOptions, context: arkts.PluginContext) => { + const structsResolver = context.parameter("structsTable")!; + const result = [ + new InstantiateFactoryHelper(), + new EtsFirstArgTransformer(), + new StyleTransformer(), + new BuilderLambdaTransformer(structsResolver) + ] + .reduce((node: arkts.AstNode, transformer) => transformer.visitor(node), program.ast) + program.setAst(result as arkts.ETSModule) + } +} diff --git a/koala_tools/ui2abc/ui-plugins/src/class-transformer.ts b/koala_tools/ui2abc/ui-plugins/src/class-transformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..0b0de415f6fbc073b049721e275137968e0149c6 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/class-transformer.ts @@ -0,0 +1,611 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { Es2pandaModifierFlags } from "@koalaui/libarkts" + +import { classProperties } from "./common/arkts-utils" +import { + createETSTypeReference, + DecoratorNames, + getComponentPackage, + getDecoratorName, + getRuntimePackage, + Importer, + isDecoratorAnnotation, + mangle +} from "./utils" +import { backingFieldNameOf, fieldOf } from "./property-transformers"; + +type ObservedDecoratorType = DecoratorNames.OBSERVED | DecoratorNames.OBSERVED_V2 + +export class ClassTransformer extends arkts.AbstractVisitor { + constructor(private importer: Importer, options?: arkts.VisitorOptions) { + super(options) + } + + visitor(node: arkts.AstNode): arkts.AstNode { + if (arkts.isETSModule(node)) { + const program = (node as arkts.ETSModule).program + if (program + && (!program.modulePrefix + || (!program.modulePrefix.startsWith(getComponentPackage()) + && !program.modulePrefix.startsWith("@koalaui")))) { + return this.visitEachChild(node) + } + } + if (arkts.isClassDeclaration(node) && !arkts.isETSStructDeclaration(node)) { + const props = classProperties(node, + it => arkts.hasModifierFlag(it, arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC)) + const classContext = extractClassContext(node, props) + return classContext?.isClassObservable() ? this.updateClass(node, props, classContext) : node + } + return node + } + + addObservableClassImplements(result: arkts.TSClassImplements[]) { + const className = "ObservableClass" + this.importer.add(className, getRuntimePackage()) + result.push(arkts.factory.createTSClassImplements(createETSTypeReference(className))) + } + + updateClass(clazz: arkts.ClassDeclaration, + properties: arkts.ClassProperty[], + classContext: ClassContext): arkts.ClassDeclaration { + let classDef = clazz.definition! + const classImplements: arkts.TSClassImplements[] = [ + ...clazz.definition?.implements ?? [], + ] + if (properties.length > 0) { + if (classContext.isClassObservable()) { + this.importer.add("observableProxy", getRuntimePackage()) + this.addObservableClassImplements(classImplements) + } + classDef = arkts.factory.updateClassDefinition( + classDef, + classDef.ident, + classDef.typeParams, + classDef.superTypeParams, + classImplements, + undefined, + classDef.super, + this.rewriteClassProperties(classDef, properties, classDef.body as arkts.ClassElement[] ?? [], classContext), + classDef.modifiers, + classDef.modifierFlags + ) + } + return arkts.factory.updateClassDeclaration(clazz, + classDef.setAnnotations(this.rewriteAnnotations(classDef.annotations)), + clazz.modifierFlags + ) + } + + rewriteClassProperties(classDef: arkts.ClassDefinition, + properties: arkts.ClassProperty[], + body: readonly arkts.ClassElement[], + classContext: ClassContext): arkts.ClassElement[] { + const result: arkts.ClassElement[] = [] + if (classContext.isClassObservable()) { + this.injectClassMetadata(classDef, classContext, result) + } + body.forEach(node => { + if (arkts.isClassProperty(node) && classContext.needRewriteProperty(node)) { + this.rewriteProperty(node, classContext, classDef.ident?.name!, result) + } else if (arkts.isMethodDefinition(node) && node.isConstructor) { + result.push(this.updateConstructor(node, properties, classContext)) + } else { + result.push(node) + } + }) + return result + } + + injectClassMetadata(classDef: arkts.ClassDefinition, classContext: ClassContext, result: arkts.ClassElement[]) { + const classMetadataName = "ClassMetadata" + const classMetadataPropName = mangle("classMetadata") + + this.importer.add(classMetadataName, getRuntimePackage()) + const classMetadataType = createETSTypeReference(classMetadataName) + let trackableProps: string[] | undefined + if (classContext.trackedPropertyNames.length > 0) { + trackableProps = classContext.trackedPropertyNames + } else if (classContext.tracedPropertyNames.length > 0) { + trackableProps = classContext.tracedPropertyNames + } + + let typedProps: [string, string][] | undefined + if (classContext.typedProperties.length > 0) { + typedProps = [] + for (const prop of classContext.typedProperties.values()) { + typedProps.push([prop[0], prop[1][0].args[0]]) + } + } + const metadataCtorArgs: arkts.Expression[] = [ + this.findClassMetadata(classMetadataType, classDef.super), + arkts.factory.createBooleanLiteral(classContext.isObservedV1()), + arkts.factory.createBooleanLiteral(classContext.isObservedV2()), + trackableProps + ? arkts.factory.createArrayExpression(trackableProps.map(it => arkts.factory.createStringLiteral(it))) + : arkts.factory.createUndefinedLiteral(), + typedProps + ? arkts.factory.createArrayExpression(typedProps.map(it => + arkts.factory.createArrayExpression([arkts.factory.createStringLiteral(it[0]), + arkts.factory.createStringLiteral(it[1])]))) + : arkts.factory.createUndefinedLiteral() + ] + result.push( + arkts.factory.createClassProperty( + arkts.factory.createIdentifier(classMetadataPropName), + arkts.factory.createETSNewClassInstanceExpression(classMetadataType, metadataCtorArgs), + arkts.factory.createETSUnionType([classMetadataType, arkts.factory.createETSUndefinedType()]), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PRIVATE + | arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_READONLY + | arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC, + false + ) + ) + createClassMetadataMethod(classDef, classMetadataType, classMetadataPropName, result) + } + + findClassMetadata(classMetadataType: arkts.ETSTypeReference, type: arkts.Expression | undefined): arkts.Expression { + return arkts.isETSTypeReference(type) + ? arkts.factory.createCallExpression( + fieldOf(classMetadataType, "findClassMetadata"), + [ + arkts.factory.createCallExpression( + fieldOf(arkts.factory.createIdentifier("Type"), "from"), + [], + arkts.factory.createTSTypeParameterInstantiation([createETSTypeReference(type.baseName?.name!)]), + false, + false, + ) + ], + undefined, + false, + false + ) + : arkts.factory.createUndefinedLiteral() + } + + rewriteProperty(property: arkts.ClassProperty, + classContext: ClassContext, + className: string, + result: arkts.ClassElement[]) { + let modifiers = arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PRIVATE + if (isStaticProperty(property)) { + modifiers |= arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC + this.importer.add("globalMutableState", getRuntimePackage()) + } + const backing = arkts.factory.createClassProperty( + arkts.factory.createIdentifier(backingFieldNameOf(property)), + createBackingPropertyRValue(property, property.value, classContext), + createBackingPropertyType(property, classContext), + modifiers, + false + ) + backing.setAnnotations(this.rewriteAnnotations(property.annotations)) + result.push(backing) + + result.push(createGetterSetter(property, classContext, className)) + } + + rewriteAnnotations(annotations: readonly arkts.AnnotationUsage[]): arkts.AnnotationUsage[] { + const decorators = [ + DecoratorNames.TRACK, + DecoratorNames.TRACE, + DecoratorNames.OBSERVED, + DecoratorNames.OBSERVED_V2, + DecoratorNames.TYPE, + ] + return annotations.filter(it => + !decorators.some(decorator => isDecoratorAnnotation(it, decorator)) + ) + } + + updateConstructor(method: arkts.MethodDefinition, + properties: arkts.ClassProperty[], + classContext: ClassContext) { + const originalBody = method.function?.body as arkts.BlockStatement + if (!method.function || !originalBody) { + return method + } + + const statements: arkts.Statement[] = [] + originalBody.statements.forEach(state => { + if (arkts.isExpressionStatement(state) + && arkts.isAssignmentExpression((state as arkts.ExpressionStatement).expression)) { + statements.push(this.rewriteStatement(state, properties, classContext)) + } else { + statements.push(state) + } + }) + + return arkts.factory.updateMethodDefinition( + method, + method.kind, + method.id, + arkts.factory.createFunctionExpression( + method.id, + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement(statements), + method.function.typeParams, + method.function.params ?? [], + method.function.returnTypeAnnotation, + method.function.hasReceiver, + method.function.flags, + method.function.modifierFlags, + method.function.id, + method.function.annotations + ) + ), + method.modifierFlags, + method.isComputed + ) + } + + rewriteStatement(state: arkts.ExpressionStatement, + properties: arkts.ClassProperty[], + classContext: ClassContext): arkts.ExpressionStatement { + const expr = state.expression as arkts.AssignmentExpression + if (arkts.isMemberExpression(expr.left) + && arkts.isThisExpression(expr.left.object) + && arkts.isIdentifier(expr.left.property)) { + const propertyName = expr.left.property.name + const property = properties.find(it => it.id?.name == propertyName) + if (property && classContext.needRewriteProperty(property)) { + return arkts.factory.createExpressionStatement( + arkts.factory.createAssignmentExpression( + arkts.factory.createMemberExpression( + arkts.factory.createThisExpression(), + arkts.factory.createIdentifier(backingFieldNameOf(property)), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + observePropIfNeeded(propertyName, expr.right, classContext), + expr.operatorType + ) + ) + } + } + return state + } +} + +function propertyVerifier(property: arkts.ClassProperty): boolean { + return ![arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PRIVATE, + Es2pandaModifierFlags.MODIFIER_FLAGS_PROTECTED] + .some(it => arkts.hasModifierFlag(property, it)); +} + +function getDecoratorArgs(decorator: arkts.AnnotationUsage): string[] { + const args: string[] = [] + for (const prop of decorator.properties) { + if (arkts.isClassProperty(prop) && arkts.isIdentifier(prop.value)) { + args.push(prop.value.name) + } + } + return args +} + +function getDecoratedProperties(properties: readonly arkts.ClassProperty[]): ReadonlyMap { + const propertyInfo = new Map() + for (const prop of properties) { + if (!propertyVerifier(prop)) { + continue + } + const propName = prop.id!.name! + const decorators = propertyInfo.get(propName) ?? [] + + for (const anno of prop.annotations) { + let decorator = getDecoratorName(anno) + if (decorator === undefined) { + continue + } + if (decorators.length === 0) { + propertyInfo.set(propName, decorators) + } + decorators.push(new PropertyDecorator(decorator, getDecoratorArgs(anno))) + } + } + return propertyInfo +} + +function extractClassContext(clazz: arkts.ClassDeclaration, + properties: readonly arkts.ClassProperty[]): ClassContext | undefined { + if (clazz.definition != undefined) { + return new ClassContext(getObservedDecoratorType(clazz.definition), getDecoratedProperties(properties)) + } + return undefined +} + +function createBackingPropertyRValue(property: arkts.ClassProperty, value: arkts.Expression | undefined, classContext: ClassContext): arkts.Expression | undefined { + const propValue = observePropIfNeeded(property.id?.name!, value, classContext) + if (isStaticProperty(property) && classContext.tracedPropertyNames.includes(property.id?.name!)) { + return arkts.factory.createCallExpression( + arkts.factory.createIdentifier("globalMutableState"), + [propValue!], + arkts.factory.createTSTypeParameterInstantiation([property.typeAnnotation!]), + false, + false, + undefined + ) + } + return propValue +} + +function createBackingPropertyType(property: arkts.ClassProperty, classContext: ClassContext) { + return isStaticProperty(property) && classContext.tracedPropertyNames.includes(property.id?.name!) + ? undefined + : property.typeAnnotation +} + +function createPropertyAccess(className: string, property: arkts.ClassProperty, classContext: ClassContext) { + const receiver = isStaticProperty(property) + ? createETSTypeReference(className) + : arkts.factory.createThisExpression() + const expr = fieldOf(receiver, backingFieldNameOf(property)) + if (isStaticProperty(property) && classContext.tracedPropertyNames.includes(property.id?.name!)) { + return fieldOf(expr, "value") + } + return expr +} + +function createGetterSetter(property: arkts.ClassProperty, + classContext: ClassContext, + className: string): arkts.MethodDefinition { + let modifiers = arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC + if (isStaticProperty(property)) { + modifiers |= arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC + } + const name = property.id!.name + const getterStatements: arkts.Statement[] = [] + recreateDisposedState(property, classContext, className, getterStatements) + getterStatements.push(arkts.factory.createReturnStatement(createPropertyAccess(className, property, classContext))) + const getterFunction = arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement(getterStatements), + undefined, + [], + property.typeAnnotation?.clone(), + true, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD | arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_GETTER, + modifiers, + arkts.factory.createIdentifier(name), + [] + ) + + const setterFunction = arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement([ + arkts.factory.createExpressionStatement( + arkts.factory.createAssignmentExpression( + createPropertyAccess(className, property, classContext), + observePropIfNeeded(property.id?.name!, + arkts.factory.createIdentifier("value", property.typeAnnotation?.clone()), + classContext), + arkts.Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION + ) + ) + ]), + undefined, + [ + arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier("value", property.typeAnnotation?.clone()), + false, + undefined, + ) + ], + undefined, + true, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD | arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_SETTER | arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_OVERLOAD, + modifiers, + arkts.factory.createIdentifier(name), + [] + ) + + let setter = arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_SET, + arkts.factory.createIdentifier(name), + arkts.factory.createFunctionExpression(arkts.factory.createIdentifier(name), setterFunction), + modifiers, + false + ) + + let getter = arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_GET, + arkts.factory.createIdentifier(name), + arkts.factory.createFunctionExpression(arkts.factory.createIdentifier(name), getterFunction), + modifiers, + false, + [setter] + ) + + return getter +} + +function createClassMetadataMethod(classDef: arkts.ClassDefinition, + classMetadataType: arkts.ETSTypeReference, + classMetadataPropName: string, + result: arkts.ClassElement[]) { + const body: arkts.Statement[] = [] + body.push( + arkts.factory.createReturnStatement( + fieldOf(createETSTypeReference(classDef.ident?.name!), classMetadataPropName) + ) + ) + createMethodDefinition("getClassMetadata", + arkts.factory.createBlockStatement(body), + arkts.factory.createETSUnionType([classMetadataType, + arkts.factory.createETSUndefinedType()]), + result + ) +} + +function createMethodDefinition(methodName: string, + body: arkts.AstNode, + returnTypeNode: arkts.TypeNode, + result: arkts.ClassElement[]) { + result.push(arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD, + arkts.factory.createIdentifier(methodName), + arkts.factory.createFunctionExpression( + arkts.factory.createIdentifier(methodName), + arkts.factory.createScriptFunction( + body, + undefined, + [], + returnTypeNode, + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + arkts.factory.createIdentifier(methodName), + [] + ) + ), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC + | arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_OVERRIDE, + false + )) +} + +function observePropIfNeeded(propertyName: string, + propertyValue: arkts.Expression | undefined, + classContext: ClassContext) { + const isClassFullyObserved = classContext.isObservedV1() && classContext.trackedPropertyNames.length == 0 + const isTrackedProp = classContext.tracedPropertyNames.includes(propertyName) + const isTracedProp = classContext.trackedPropertyNames.includes(propertyName) + if (propertyValue && (isClassFullyObserved || isTrackedProp || isTracedProp)) { + return arkts.factory.createCallExpression( + arkts.factory.createIdentifier("observableProxy"), + [propertyValue], + undefined, + false, + false, + undefined, + ) + } + return propertyValue +} + +function getObservedDecoratorType(definition: arkts.ClassDefinition): ObservedDecoratorType | undefined { + if (definition.annotations.some(annot => + isDecoratorAnnotation(annot, DecoratorNames.OBSERVED))) { + return DecoratorNames.OBSERVED + } else if (definition.annotations.some(annot => + isDecoratorAnnotation(annot, DecoratorNames.OBSERVED_V2))) { + return DecoratorNames.OBSERVED_V2 + } + return undefined +} + +function isStaticProperty(property: arkts.ClassProperty): boolean { + return arkts.hasModifierFlag(property, arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC) +} + +function recreateDisposedState(property: arkts.ClassProperty, + classContext: ClassContext, + className: string, + statements: arkts.Statement[]) { + if (isStaticProperty(property)) { + const state = fieldOf(createETSTypeReference(className), backingFieldNameOf(property)) + statements.push(arkts.factory.createIfStatement(fieldOf(state, "disposed"), + arkts.factory.createBlockStatement( + [ + arkts.factory.createExpressionStatement( + arkts.factory.createAssignmentExpression( + state, + createBackingPropertyRValue(property, fieldOf(state, "value"), classContext), + arkts.Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION + ) + ) + ] + ) + )) + } +} + +class ClassContext { + readonly decoratorType: ObservedDecoratorType | undefined + readonly properties: ReadonlyMap + + constructor(observedDecoratorType: ObservedDecoratorType | undefined, + properties: ReadonlyMap) { + this.decoratorType = observedDecoratorType + this.properties = properties + + this.verify() + } + + get trackedPropertyNames() { + return Array.from(this.properties.entries()) + .filter(it => it[1].some(it => it.name == DecoratorNames.TRACK)) + .map(it => it[0]) + } + + get tracedPropertyNames() { + return Array.from(this.properties.entries()) + .filter(it => it[1].some(it => it.name == DecoratorNames.TRACE)) + .map(it => it[0]) + } + + get typedPropertyNames() { + return this.typedProperties.map(it => it[0]) + } + + get typedProperties() { + return Array.from(this.properties.entries()) + .filter(it => it[1].some(it => it.name == DecoratorNames.TYPE)) + } + + private verify() { + if (this.decoratorType == DecoratorNames.OBSERVED_V2) { + if (this.trackedPropertyNames.length) { + throw new Error("@Track decorator is not applicable with @ObservedV2 decorator") + } + } else { + if (this.tracedPropertyNames.length || this.typedPropertyNames.length) { + throw new Error("@Trace decorator is only used with @ObservedV2 decorator") + } + } + } + + isObservedV1(): boolean { + return this.decoratorType == DecoratorNames.OBSERVED + } + + isObservedV2(): boolean { + return this.decoratorType == DecoratorNames.OBSERVED_V2 + } + + isClassObservable() { + return this.decoratorType || this.trackedPropertyNames.length + } + + needRewriteProperty(property: arkts.ClassProperty): boolean { + if (this.isObservedV1() || this.trackedPropertyNames.length) { + return !isStaticProperty(property) + } + return this.isObservedV2() && this.tracedPropertyNames.includes(property.id?.name!) + } +} + +class PropertyDecorator { + readonly name: DecoratorNames + readonly args: string[] = [] + + constructor(name: DecoratorNames, args: string[] = []) { + this.name = name + this.args = args + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/ui-plugins/src/common/arkts-utils.ts b/koala_tools/ui2abc/ui-plugins/src/common/arkts-utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..fe164b885cfa59a1723d0d97f4543588a2be6a4f --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/common/arkts-utils.ts @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2024 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 * as arkts from "@koalaui/libarkts" + +export function annotation(name: string, params?: arkts.AstNode[]): arkts.AnnotationUsage { + const ident: arkts.Identifier = arkts.factory.createIdentifier(name).setAnnotationUsage() + const annotation: arkts.AnnotationUsage = arkts.factory.createAnnotationUsage(ident, params ?? []) + annotation.modifierFlags = arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_ANNOTATION_USAGE + + return annotation +} + +export function isAnnotation(node: arkts.AnnotationUsage, annoName: string) { + return node.expr !== undefined && arkts.isIdentifier(node.expr) && node.expr.name === annoName; +} + +export function removeAnnotationByName( + annotations: readonly arkts.AnnotationUsage[], + annoName: string +): arkts.AnnotationUsage[] { + return annotations.filter((it) => !isAnnotation(it, annoName)) +} + +export function addAnnotation( + annotations: readonly arkts.AnnotationUsage[], + annoName: string +): arkts.AnnotationUsage[] { + return annotations.find((it) => isAnnotation(it, annoName)) ? + [...annotations] : + [annotation(annoName), ...annotations] +} + + +export function expectName(node: arkts.AstNode | undefined): string { + if (!node) { + throw new Error("Expected an identifier, got empty node"); + } + if (!arkts.isIdentifier(node)) { + throw new Error("Expected an identifier, got: " + arkts.nodeType(node).toString()); + } + return node.name; +} + +export function mangle(value: string): string { + return `__${value}`; +} + +export function backingField(originalName: string): string { + return mangle(`backing_${originalName}`); +} + +export function filterDefined(value: (T | undefined)[]): T[] { + return value.filter((it: T | undefined): it is T => it != undefined); +} + +export function collect(...value: (ReadonlyArray | T | undefined)[]): T[] { + const empty: (T | undefined)[] = [] + return filterDefined(empty.concat(...value)) +} + +export function matchPrefix(prefixCollection: string[], name: string): boolean { + for (const prefix of prefixCollection) { + if (name.startsWith(prefix)) { + return true; + } + } + return false; +} + +export function classMethods(clazz: arkts.ClassDeclaration, predicate?: (method: arkts.MethodDefinition) => boolean): arkts.MethodDefinition[] { + const body = clazz.definition?.body ?? [] + const methods = body.filter(arkts.isMethodDefinition) + return predicate ? methods.filter(predicate) : methods +} + +export function classProperties(clazz: arkts.ClassDeclaration, predicate?: (prop: arkts.ClassProperty) => boolean): arkts.ClassProperty[] { + const body = clazz.definition?.body ?? [] + const props = body.filter(arkts.isClassProperty) + return predicate ? props.filter(predicate) : props +} diff --git a/koala_tools/ui2abc/ui-plugins/src/common/gensym-generator.ts b/koala_tools/ui2abc/ui-plugins/src/common/gensym-generator.ts new file mode 100644 index 0000000000000000000000000000000000000000..36758a54c510b5740c7ba4c53480d2491e08813c --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/common/gensym-generator.ts @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { UniqueId } from "@koalaui/common" + +export class GenSymGenerator { + // Global for the whole program. + private static callCount: number = 0; + static instance: GenSymGenerator; + + // Set `stable` to true if you want to have more predictable values. + // For example for tests. + // Don't use it in production! + private constructor(public stableForTests: boolean = false) { + if (stableForTests) GenSymGenerator.callCount = 0; + } + + static getInstance(stableForTests: boolean = false): GenSymGenerator { + if (!this.instance) { + this.instance = new GenSymGenerator(stableForTests); + } + + return this.instance; + } + + sha1Id(callName: string): string { + const uniqId = new UniqueId(); + uniqId.addString("gensym uniqid"); + uniqId.addString(callName); + uniqId.addI32(GenSymGenerator.callCount++); + return uniqId.compute().substring(0, 7); + } + + stringId(callName: string): string { + return `${GenSymGenerator.callCount++}_${callName}_id`; + } + + id(callName: string = ""): string { + const positionId = (this.stableForTests) ? + this.stringId(callName) : + this.sha1Id(callName); + + const coreceToStr = parseInt(positionId, 16).toString(); + + // compiler use gensym%%_ but % is illegal before after-check phase + return `gensym___${coreceToStr}`; + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/ui-plugins/src/component-transformer.ts b/koala_tools/ui2abc/ui-plugins/src/component-transformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..5a7cf219791f30dd738c13e1d636d37aa4fad569 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/component-transformer.ts @@ -0,0 +1,872 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { + CustomComponentNames, + getCustomComponentOptionsName, + Importer, + InternalAnnotations, + getComponentPackage, + getCustomComponentPackage, + getCommonMethodPackage, + getRuntimeAnnotationsPackage, + getDecoratorPackage, + hasDecorator, + isDecoratorAnnotation, + getDecoratorProperties, + findDecorator, + createThrowError, + getAnnotationName, + getRouterPackage +} from "./utils"; +import { + BuilderParamTransformer, + ConsumeTransformer, + LinkTransformer, + LocalStorageLinkTransformer, + LocalStoragePropTransformer, + ObjectLinkTransformer, + PropertyTransformer, + PropTransformer, + ProvideTransformer, + StateTransformer, + StorageLinkTransformer, + StoragePropTransformer, + PlainPropertyTransformer, + fieldOf, + LocalPropertyTransformer, + ProviderTransformer, + ConsumerTransformer +} from "./property-transformers"; +import { annotation, isAnnotation, classMethods } from "./common/arkts-utils"; +import { DecoratorNames, DecoratorParameters, hasBuilderDecorator, hasEntryAnnotation } from "./utils"; +import { + factory +} from "./ui-factory" +import { Es2pandaVariableDeclarationKind } from "@koalaui/libarkts"; + +export interface DependentModuleConfig { + packageName: string; + moduleName: string; + moduleType: string; + modulePath: string; + sourceRoots: string[]; + entryFile: string; + language: string; + declFilesPath?: string; + dependencies?: string[]; +} + +export interface ProjectConfig { + bundleName: string; + moduleName: string; + cachePath: string; + dependentModuleList: DependentModuleConfig[]; + appResource: string; + rawFileResource: string; + buildLoaderJson: string; + hspResourcesMap: boolean; + compileHar: boolean; + byteCodeHar: boolean; + uiTransformOptimization: boolean; + resetBundleName: boolean; + allowEmptyBundleName: boolean; + moduleType: string; + moduleRootPath: string; + aceModuleJsonPath: string; + ignoreError: boolean; + projectPath: string, + projectRootPath: string, + integratedHsp: boolean + frameworkMode?: string; +} + +export interface ApplicationInfo { + bundleName: string, + moduleName: string +} + +export interface ComponentTransformerOptions { + arkui?: string + applicationInfo?: ApplicationInfo +} + +function computeOptionsName(clazz: arkts.ClassDeclaration): string { + return clazz.definition?.typeParams?.params?.[1]?.name?.name ?? + getCustomComponentOptionsName(clazz.definition?.ident?.name!) +} + +export class ComponentTransformer extends arkts.AbstractVisitor { + private arkuiImport?: string + + constructor(private imports: Importer, options?: ComponentTransformerOptions) { + super() + this.arkuiImport = options?.arkui + } + + private transformStatements(statements: readonly arkts.Statement[]): arkts.Statement[] { + let result: arkts.Statement[] = [] + this.parseEntryParameter(statements) + this.imports.add( + CustomComponentNames.COMPONENT_CLASS_NAME, + getCustomComponentPackage()) + this.imports.add( + InternalAnnotations.BUILDER_LAMBDA, + getDecoratorPackage()) + this.imports.add( + "CommonMethod", + getCommonMethodPackage()) + this.imports.add(InternalAnnotations.MEMO, getRuntimeAnnotationsPackage()) + this.imports.add(InternalAnnotations.MEMO_STABLE, getRuntimeAnnotationsPackage()) + this.propertyTransformers.forEach(it => it.collectImports(this.imports)) + statements.forEach(statement => { + if (arkts.isETSStructDeclaration(statement)) { + this.rewriteStruct(statement, result) + } else { + result.push(statement) + } + }) + return result + } + + private rewriteModule(node: arkts.ETSModule): arkts.ETSModule { + return arkts.factory.updateETSModule( + node, + this.transformStatements(node.statements), + node.ident, + node.getNamespaceFlag(), + node.program, + ) + } + + private optionsName(clazz: arkts.ClassDefinition): arkts.Identifier { + return arkts.factory.createIdentifier(getCustomComponentOptionsName(clazz.ident!.name)) + } + + private rewriteStructToOptions(node: arkts.ETSStructDeclaration): arkts.TSInterfaceDeclaration { + return arkts.factory.createInterfaceDeclaration( + [], + this.optionsName(node.definition!), + undefined, + arkts.factory.createTSInterfaceBody(this.rewriteOptionsBody(node)), + false, + false, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_EXPORT, + ) + } + + private rewriteOptionsBody(node: arkts.ETSStructDeclaration): arkts.Statement[] { + let result: arkts.Statement[] = [] + forEachProperty(node, property => { + this.getPropertyTransformer(property).applyOptions(property, result) + }) + return result + } + + private rewriteStructToClass(node: arkts.ETSStructDeclaration): arkts.ClassDeclaration { + const definition = arkts.factory.createClassDefinition( + arkts.factory.createIdentifier(node.definition!.ident!.name), + undefined, + undefined, + node.definition?.implements ?? [], + undefined, + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_CLASS_NAME, undefined), + arkts.factory.createTSTypeParameterInstantiation( + [ + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier(node.definition!.ident!.name), + undefined, undefined + ) + ), + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + this.optionsName(node.definition!), + undefined, undefined + ) + ), + ] + ), undefined + ) + ), + this.rewriteStructMembers(node, (node.definition?.body as arkts.ClassElement[]) ?? []), + arkts.Es2pandaClassDefinitionModifiers.CLASS_DEFINITION_MODIFIERS_CLASS_DECL, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_FINAL + ) + definition.setAnnotations([annotation(InternalAnnotations.MEMO_STABLE)]) + return arkts.factory.createClassDeclaration( + definition, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_EXPORT, + ) + } + + private rewriteStructMembers(clazz: arkts.ClassDeclaration, body: readonly arkts.ClassElement[]): arkts.ClassElement[] { + let result: arkts.ClassElement[] = [] + body.forEach(node => { + if (arkts.isClassProperty(node)) { + this.verifyStructProperty(clazz, node) + this.getPropertyTransformer(node).applyStruct(clazz, node, result) + } else if (arkts.isMethodDefinition(node)) { + let method = node as arkts.MethodDefinition + if (method.function?.id?.name == CustomComponentNames.COMPONENT_BUILD_ORI) { + result.push(this.rewriteBuild(clazz, node)) + } else if (hasBuilderDecorator(node)) { + result.push(this.rewriteBuilder(method)) + } else { + result.push(method) + } + } else { + throw new Error(`How to rewrite ${node}?`) + } + }) + this.addInitializeStruct(clazz, result) + this.addDisposeStruct(clazz, result) + this.addEntryParameter(clazz, result) + this.addCustomLayoutParameter(clazz, result) + this.addReusableMethods(clazz, result) + this.addInstantiate(clazz, result) + this.addFreezableParameter(clazz, result) + return result + } + + private addInitializeStruct(clazz: arkts.ClassDeclaration, classBody: arkts.ClassElement[]) { + const statements: arkts.Statement[] = [] + // Improve: this is to workaround panda bug #27680 + // It should be OptionsT, but the compiler has lost the bridge + statements.push( + arkts.factory.createVariableDeclaration( + Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_CONST, + [ + arkts.factory.createVariableDeclarator( + arkts.Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_CONST, + arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_INITIALIZERS_NAME), + arkts.factory.createTSAsExpression( + arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_INITIALIZERS_NAME_0), + arkts.factory.createETSUnionType([ + factory.createTypeReferenceFromString(this.optionsName(clazz.definition!).name), + arkts.factory.createETSUndefinedType() + ]), + false + ) + ) + ] + ) + ) + + forEachProperty(clazz, property => { + this.getPropertyTransformer(property).applyInitializeStruct(this.pageLocalStorage, property, statements) + }) + if (statements.length > 1) { + classBody.push(createVoidMethod(CustomComponentNames.COMPONENT_INITIALIZE_STRUCT, [ + factory.createInitializersOptionsParameter(computeOptionsName(clazz), true), + factory.createContentParameter(), + ], statements)) + } + } + + private addDisposeStruct(clazz: arkts.ClassDeclaration, classBody: arkts.ClassElement[]) { + const statements: arkts.Statement[] = [] + forEachProperty(clazz, property => { + this.getPropertyTransformer(property).applyDisposeStruct(property, statements) + }) + if (statements.length > 0) { + classBody.push(createVoidMethod(CustomComponentNames.COMPONENT_DISPOSE_STRUCT, [], statements)) + } + } + + private addEntryParameter(clazz: arkts.ClassDeclaration, classBody: arkts.ClassElement[]) { + if (clazz.definition?.annotations.some(it => isAnnotation(it, DecoratorNames.ENTRY))) { + classBody.push(createTrueMethod(CustomComponentNames.COMPONENT_IS_ENTRY)) + } + } + + private addFreezableParameter(clazz: arkts.ClassDeclaration, classBody: arkts.ClassElement[]) { + const [_, isFreezable] = getDecoratorProperties( + findDecorator(clazz.definition!.annotations, DecoratorNames.COMPONENT_V2) + ).find(([key]) => key.name == ComponentV2Config.freezableDecoratorPropName) ?? [] + if (isFreezable) { + classBody.push(createTrueMethod(CustomComponentNames.COMPONENT_IS_FREEZABLE)) + } + } + + private addCustomLayoutParameter(clazz: arkts.ClassDeclaration, classBody: arkts.ClassElement[]) { + const methods = classMethods(clazz, method => + method.function?.id?.name == CustomComponentNames.COMPONENT_ONPLACECHILDREN_ORI || + method.function?.id?.name == CustomComponentNames.COMPONENT_ONMEASURESIZE_ORI) + if (methods.length > 0) { + classBody.push(createTrueMethod(CustomComponentNames.COMPONENT_IS_CUSTOM_LAYOUT)) + } + } + + private addReusableMethods(clazz: arkts.ClassDeclaration, classBody: arkts.ClassElement[]) { + if (!clazz.definition?.annotations.some(it => isAnnotation(it, DecoratorNames.REUSABLE))) { + return + } + + const resultName = "result" + const props: arkts.Expression[] = [] + forEachProperty(clazz, property => { + this.getPropertyTransformer(property).applyReuseRecord(property, props) + }) + + if (props.length > 0) { + // Improve: this is to workaround panda bug #27680 + // It should be OptionsT, but the compiler has lost the bridge + const paramTypeDeclaration = arkts.factory.createVariableDeclaration( + Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_CONST, + [ + arkts.factory.createVariableDeclarator( + arkts.Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_CONST, + arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_INITIALIZERS_NAME), + arkts.factory.createTSAsExpression( + arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_INITIALIZERS_NAME_0), + arkts.factory.createETSUnionType([ + factory.createTypeReferenceFromString(this.optionsName(clazz.definition!).name), + arkts.factory.createETSUndefinedType() + ]), + false + ) + ) + ] + ) + const resultDeclaration = arkts.factory.createVariableDeclaration( + arkts.Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_LET, + [ + arkts.factory.createVariableDeclarator( + arkts.Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_LET, + arkts.factory.createIdentifier(resultName, createRecordTypeReference()), + arkts.factory.createObjectExpression( + [], + ) + ) + ] + ) + const initBlock = arkts.factory.createIfStatement( + arkts.factory.createBinaryExpression( + arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_INITIALIZERS_NAME), + arkts.factory.createUndefinedLiteral(), + arkts.Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_NOT_EQUAL + ), + arkts.factory.createBlockStatement([ + arkts.factory.createExpressionStatement( + arkts.factory.createAssignmentExpression( + arkts.factory.createIdentifier(resultName), + arkts.factory.createObjectExpression( + props, + ), + arkts.Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION + ) + ) + ]) + ) + + const methodName = CustomComponentNames.COMPONENT_TO_RECORD + const method = arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD, + arkts.factory.createIdentifier(methodName), + arkts.factory.createFunctionExpression( + arkts.factory.createIdentifier(methodName), + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement([ + paramTypeDeclaration, + resultDeclaration, + initBlock, + arkts.factory.createReturnStatement(arkts.factory.createIdentifier(resultName)) + ]), + undefined, + [factory.createInitializersOptionsParameter(computeOptionsName(clazz), true)], + createRecordTypeReference(), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PROTECTED, + arkts.factory.createIdentifier(methodName), + [] + ) + ), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PROTECTED, + false + ) + classBody.push(method) + } + } + + private createFactoryParameter(typeName: string, paramName: string): arkts.ETSParameterExpression { + return arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier(paramName, + factory.createLambdaFunctionType([], + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier(typeName) + ) + ) + ) + ), false) + } + + private createStringParameter(paramName: string): arkts.ETSParameterExpression { + return arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier(paramName, + arkts.factory.createETSUnionType([ + factory.createTypeReferenceFromString("string"), + arkts.factory.createETSUndefinedType() + ]) + ), true) + } + + private addInstantiate(clazz: arkts.ClassDeclaration, classBody: arkts.ClassElement[]) { + const clazzName = clazz.definition?.ident?.name! + const classOptionsName = computeOptionsName(clazz) + const methodName = `$_instantiate` + const instantiate: arkts.MethodDefinition = arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD, + arkts.factory.createIdentifier(methodName), + arkts.factory.createFunctionExpression( + arkts.factory.createIdentifier(methodName), + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement([createThrowError()]), + undefined, + [ + this.createFactoryParameter(clazzName, "factory"), + factory.createInitializersOptionsParameter(classOptionsName, false, true), + factory.createContentParameter(true), + this.createStringParameter("reuseKey") + ], + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier('CommonMethod')) + ), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC, + arkts.factory.createIdentifier(methodName), + [annotation(InternalAnnotations.MEMO), + annotation(InternalAnnotations.BUILDER_LAMBDA, + [ + arkts.factory.createClassProperty( + arkts.factory.createIdentifier("value"), + arkts.factory.createStringLiteral(CustomComponentNames.COMPONENT_BUILDER_LAMBDA), + undefined, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + false + ) + ]) + ] + ) + ), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_STATIC, + false + ) + classBody.push(instantiate) + } + + private rewriteBuildBody(clazz: arkts.ClassDeclaration, oldBody: arkts.BlockStatement, optionsName: string): arkts.BlockStatement { + let result: arkts.Statement[] = [] + // Improve: this is to workaround panda bug #27680 + // It should be OptionsT, but the compiler has lost the bridge + result.push( + arkts.factory.createVariableDeclaration( + Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_CONST, + [ + arkts.factory.createVariableDeclarator( + arkts.Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_CONST, + arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_INITIALIZERS_NAME), + arkts.factory.createTSAsExpression( + arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_INITIALIZERS_NAME_0), + arkts.factory.createETSUnionType([ + factory.createTypeReferenceFromString(optionsName), + arkts.factory.createETSUndefinedType() + ]), + false + ) + ) + ] + ) + ) + forEachProperty(clazz, property => { + this.getPropertyTransformer(property).applyBuild(property, result) + }) + oldBody.statements.forEach((it) => { + result.push(it) + }) + return arkts.factory.createBlockStatement(result) + } + + private rewriteBuild(clazz: arkts.ClassDeclaration, method: arkts.MethodDefinition): arkts.MethodDefinition { + let isDeclaration = arkts.hasModifierFlag(method, arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_DECLARE) + const className = clazz.definition?.ident?.name! + const classTypeName = clazz.definition?.typeParams?.params?.[0]?.name?.name ?? className + const classOptionsName = computeOptionsName(clazz) + const scriptFunction = method.function as arkts.ScriptFunction + const newFunction = arkts.factory.createScriptFunction( + this.rewriteBuildBody(clazz, scriptFunction.body! as arkts.BlockStatement, classOptionsName), + scriptFunction.typeParams, + [ + factory.createStyleParameter(classTypeName), + factory.createContentParameter(), + factory.createInitializersOptionsParameter(classOptionsName, true) + ], + arkts.factory.createETSPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID), + false, + scriptFunction.flags, + scriptFunction.modifierFlags, + arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_BUILD), + [annotation(InternalAnnotations.MEMO)] + ) + const modifiers: arkts.Es2pandaModifierFlags = isDeclaration + ? arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_ABSTRACT + : arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC; + return arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD, + arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_BUILD), + arkts.factory.createFunctionExpression(arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_BUILD), newFunction), + modifiers, + false + ) + } + + private rewriteBuilder(method: arkts.MethodDefinition): arkts.MethodDefinition { + method.function!.setAnnotations([annotation(InternalAnnotations.MEMO)]) + return method + } + + private pageLocalStorage: arkts.Expression | undefined + + private parseLocalStorage(annotation: arkts.AnnotationUsage | undefined): arkts.Expression | undefined { + if (!annotation || annotation.properties.length === 0) { + return undefined + } + const properties: arkts.ClassProperty[] = annotation.properties.filter(property => { + return arkts.isClassProperty(property) + }).map(property => property as arkts.ClassProperty) + + // shared + const useSharedStorage = !!properties.find(property => { + return property.id?.name === DecoratorParameters.USE_SHARED_STORAGE && arkts.isBooleanLiteral(property.value) && property.value.value + }) + if (useSharedStorage) { + return arkts.factory.createCallExpression( + fieldOf(arkts.factory.createIdentifier("LocalStorage"), "getShared"), [], undefined, false, false, undefined, + ) + } + + // concrete + const storage = properties.find(property => property.id?.name === "storage") + if (storage && storage.value) { + return storage.value + } + + // fallback to one string literal parameter + if (arkts.isStringLiteral(properties[0].value)) { + return arkts.factory.createIdentifier(properties[0].value.str) + } + + return undefined + } + + private parseEntryParameter(statements: readonly arkts.Statement[]) { + for (const statement of statements) { + if (!arkts.isETSStructDeclaration(statement)) { + continue + } + const entryAnnotation = statement.definition?.annotations.filter(it => isAnnotation(it, DecoratorNames.ENTRY))[0] + this.pageLocalStorage = this.parseLocalStorage(entryAnnotation) + if (this.pageLocalStorage) { + break + } + } + } + + propertyTransformers: PropertyTransformer[] = [ + new StateTransformer(), + new PlainPropertyTransformer(), + new LinkTransformer(), + new PropTransformer(), + new StorageLinkTransformer(), + new StoragePropTransformer(), + new LocalStorageLinkTransformer(), + new LocalStoragePropTransformer(), + new ObjectLinkTransformer(), + new ProvideTransformer(), + new ProviderTransformer(), + new ConsumeTransformer(), + new ConsumerTransformer(), + new BuilderParamTransformer(), + new LocalPropertyTransformer() + ] + + verifyStructProperty(clazz: arkts.ClassDeclaration, property: arkts.ClassProperty) { + if (hasDecorator(clazz, DecoratorNames.COMPONENT_V2)) { + const unsuitable = property + .annotations + .find(anno => { + return !ComponentV2Config.allowedDecorators.some(it => isDecoratorAnnotation(anno, it)) + }) + if (unsuitable) { + throw Error(`@${getAnnotationName(unsuitable)} decorator cannot be used with @${DecoratorNames.COMPONENT_V2}`) + } + } + } + + getPropertyTransformer(property: arkts.ClassProperty): PropertyTransformer { + const transformer = this.propertyTransformers.find(it => it.check(property)) + if (transformer) return transformer + throw new Error(`Cannot find transformer for property ${property.id?.name}`) + } + + private getEntryName(className: string): string { + return `__EntryWrapper` + } + + private createEntryWrapper(className: string): arkts.ClassDeclaration { + /* + class `__EntryWrapper` extends EntryPoint { + constructor() {} + @memo public entry(): void { + `${className}`() + } + } + */ + this.imports.add("EntryPoint", getComponentPackage()) + const result = arkts.factory.createClassDeclaration( + arkts.factory.createClassDefinition( + arkts.factory.createIdentifier(this.getEntryName(className)), + undefined, + undefined, + [], + undefined, + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier("EntryPoint", undefined) + ) + ), + [ + arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_CONSTRUCTOR, + arkts.factory.createIdentifier("constructor"), + arkts.factory.createFunctionExpression( + arkts.factory.createIdentifier("constructor"), + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement( + [], + ), + undefined, + [], + undefined, + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_CONSTRUCTOR, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + arkts.factory.createIdentifier("constructor"), + [], + ) + ), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_CONSTRUCTOR, + false, + [], + ), + arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD, + arkts.factory.createIdentifier("entry"), + arkts.factory.createFunctionExpression( + arkts.factory.createIdentifier("entry"), + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement( + [ + arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createIdentifier(className), + [], + undefined, + false, + false, + undefined, + ) + ) + ], + ), + undefined, + [], + arkts.factory.createETSPrimitiveType( + arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID, + ), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + arkts.factory.createIdentifier("entry"), + [annotation(InternalAnnotations.MEMO)], + ), + ), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + false, + ) + ], + arkts.Es2pandaClassDefinitionModifiers.CLASS_DEFINITION_MODIFIERS_CLASS_DECL, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_FINAL, + ), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_EXPORT, + ) + return result + } + + private registerRouterPage(className: string): arkts.Statement { + this.imports.add("registerPage", getRouterPackage()) + return arkts.factory.createBlockStatement([ + arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createIdentifier("registerPage"), + [ + arkts.factory.createStringLiteral(className), + arkts.factory.createCallExpression( + fieldOf( + arkts.factory.createCallExpression( + fieldOf(arkts.factory.createIdentifier("Type"), "from"), + [], + arkts.factory.createTSTypeParameterInstantiation([ + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier(this.getEntryName(className), undefined), undefined, undefined + ) + ) + ]), + false, + false + ), + "getName" + ), + [], undefined, false, false, undefined + ) + ], + undefined, false, false, undefined + ) + ) + ]) + } + + private rewriteStruct(node: arkts.ETSStructDeclaration, result: arkts.Statement[]) { + this.verifyStructAnnotations(node) + result.push(this.rewriteStructToClass(node)) + result.push(this.rewriteStructToOptions(node)) + if (node.definition && hasEntryAnnotation(node.definition)) { + result.push(this.createEntryWrapper(node.definition.ident!.name)) + result.push(this.registerRouterPage(node.definition.ident!.name)) + } + } + + private verifyStructAnnotations(node: arkts.ETSStructDeclaration) { + if (hasDecorator(node, DecoratorNames.COMPONENT) && hasDecorator(node, DecoratorNames.COMPONENT_V2)) { + throw new Error(`@ComponentV2 and @Component decorators cannot be used to decorate the same structure`) + } + if (hasDecorator(node, DecoratorNames.REUSABLE) && hasDecorator(node, DecoratorNames.COMPONENT_V2)) { + throw new Error(`@ComponentV2 decorator does not support component reuse`) + } + const unsuitable = node.definition?.annotations + .filter(it => !isAnnotation(it, DecoratorNames.ENTRY)) + .filter(it => !isAnnotation(it, DecoratorNames.COMPONENT)) + .filter(it => !isAnnotation(it, DecoratorNames.COMPONENT_V2)) + .filter(it => !isAnnotation(it, DecoratorNames.REUSABLE)) + if (unsuitable?.length) { + console.warn(`${unsuitable[0].baseName?.name} decorator is not applicable to struct declaration`) + } + } + + visitor(node: arkts.AstNode): arkts.AstNode { + if (arkts.isETSModule(node)) { + return this.rewriteModule(node) + } + throw new Error(`Must not be there`) + } +} + +function forEachProperty(clazz: arkts.ClassDeclaration, callback: (property: arkts.ClassProperty) => void) { + clazz.definition?.body.forEach(node => { + if (arkts.isClassProperty(node)) callback(node) + }) +} + +function createVoidMethod(methodName: string, parameters: readonly arkts.Expression[], statements: readonly arkts.Statement[]): arkts.MethodDefinition { + return arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD, + arkts.factory.createIdentifier(methodName), + arkts.factory.createFunctionExpression( + arkts.factory.createIdentifier(methodName), + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement(statements), + undefined, + parameters, + arkts.factory.createETSPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PROTECTED, + arkts.factory.createIdentifier(methodName), + [] + ) + ), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PROTECTED, + false + ) +} + +function createTrueMethod(methodName: string): arkts.MethodDefinition { + const body = arkts.factory.createBlockStatement( + [arkts.factory.createReturnStatement(arkts.factory.createBooleanLiteral(true))] + ) + return arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_METHOD, + arkts.factory.createIdentifier(methodName), + arkts.factory.createFunctionExpression( + arkts.factory.createIdentifier(methodName), + arkts.factory.createScriptFunction( + body, + undefined, + [], + arkts.factory.createETSPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_BOOLEAN), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PROTECTED, + arkts.factory.createIdentifier(methodName), + [] + ) + ), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PROTECTED, + false + ) +} + +function createRecordTypeReference(): arkts.TypeNode { + return arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier("Record", undefined), + arkts.factory.createTSTypeParameterInstantiation([ + factory.createTypeReferenceFromString("string"), + factory.createTypeReferenceFromString("Object"), + ]), + undefined + ) + ) +} + +class ComponentV2Config { + static readonly allowedDecorators = [DecoratorNames.LOCAL, + DecoratorNames.PARAM, + DecoratorNames.ONCE, + DecoratorNames.EVENT, + DecoratorNames.PROVIDER, + DecoratorNames.CONSUMER, + ] + + static readonly freezableDecoratorPropName = "freezeWhenInactive" +} \ No newline at end of file diff --git a/koala_tools/ui2abc/ui-plugins/src/entry.ts b/koala_tools/ui2abc/ui-plugins/src/entry.ts new file mode 100644 index 0000000000000000000000000000000000000000..9b09f58ec02bec9c1d7aa41eda82fa8704a3daaa --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/entry.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import checkedTransformer from "./checked-state-plugin" +import parsedTransformer from "./parsed-state-plugin" +import { ProjectConfig } from "./component-transformer" + +export function init(parsedJson?: Object, checkedJson?: Object) { + let pluginContext = new arkts.PluginContextImpl() + const parsedHooks = new arkts.DumpingHooks(arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED, "ui") + const checkedHooks = new arkts.DumpingHooks(arkts.Es2pandaContextState.ES2PANDA_STATE_CHECKED, "ui") + arkts.initVisitsTable() + + return { + name: "ui", + parsed(this: any, hooks: arkts.RunTransformerHooks = parsedHooks) { + arkts.Tracer.pushContext('ui-plugin') + arkts.traceGlobal(() => "Run parsed state plugin", true) + let projectConfig: ProjectConfig | undefined = this.projectConfig + const transform = parsedTransformer(parsedJson, projectConfig) + const prog = arkts.arktsGlobal.compilerContext!.program + const state = arkts.Es2pandaContextState.ES2PANDA_STATE_PARSED + try { + arkts.runTransformer(prog, state, transform, pluginContext, hooks) + arkts.Tracer.popContext() + } catch(e) { + console.trace(e) + throw e + } + }, + checked(hooks: arkts.RunTransformerHooks = checkedHooks) { + arkts.Tracer.pushContext('ui-plugin') + arkts.traceGlobal(() => "Run checked state plugin", true) + const transform = checkedTransformer(checkedJson) + const prog = arkts.arktsGlobal.compilerContext!.program + const state = arkts.Es2pandaContextState.ES2PANDA_STATE_CHECKED + try { + arkts.runTransformer(prog, state, transform, pluginContext, hooks) + arkts.recheckSubtree(prog.ast) + arkts.Tracer.popContext() + } catch(e) { + console.trace(e) + throw e + } + }, + clean() { + arkts.Tracer.pushContext('ui-plugin') + arkts.traceGlobal(() => "Clean", true) + arkts.Tracer.popContext() + pluginContext = new arkts.PluginContextImpl() + } + } +} diff --git a/koala_tools/ui2abc/ui-plugins/src/ets-first-arg-transformer.ts b/koala_tools/ui2abc/ui-plugins/src/ets-first-arg-transformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..4170a051dd19f0700863702bc74d60dc688d260b --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/ets-first-arg-transformer.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { builderLambdaFunctionName } from "./builder-lambda-transformer" + +export class EtsFirstArgTransformer extends arkts.AbstractVisitor { + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + if (arkts.isCallExpression(node) && builderLambdaFunctionName(node) !== undefined) { + return arkts.factory.updateCallExpression( + node, + node.callee, + [arkts.factory.createUndefinedLiteral(), ...node.arguments], + node.typeParams + ) + } + return node + } +} diff --git a/koala_tools/ui2abc/ui-plugins/src/imports-transformer.ts b/koala_tools/ui2abc/ui-plugins/src/imports-transformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..9236f3e11b2e7a003917586088194da1e6cb41df --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/imports-transformer.ts @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Importer } from "./utils" +import * as arkts from "@koalaui/libarkts" + +export class ImportsTransformer extends arkts.AbstractVisitor { + constructor(private imports: Importer) { + super() + } + + visitor(node: arkts.AstNode): arkts.AstNode { + if (arkts.isETSModule(node)) { + return arkts.factory.updateETSModule( + node, + this.imports.emit(node.statements), + node.ident, + node.getNamespaceFlag(), + node.program, + ) + } + throw new Error(`Must not be there`) + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/ui-plugins/src/instantiate-factory-helper.ts b/koala_tools/ui2abc/ui-plugins/src/instantiate-factory-helper.ts new file mode 100644 index 0000000000000000000000000000000000000000..18a918e774a10341ff0f642967a4e28fa853cc57 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/instantiate-factory-helper.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { builderLambdaFunctionName } from "./builder-lambda-transformer" + +function lambdaReturnFilter(node: arkts.AstNode): arkts.AstNode { + if (!arkts.isScriptFunction(node)) return node + if (node.returnTypeAnnotation != undefined)return node + const body = node.body + if (!body) return node + if (!arkts.isBlockStatement(body)) return node + if (body.statements.length != 1) return node + const statement = body.statements[0] + if (!arkts.isReturnStatement(statement)) return node + if (!statement.argument) return node + const expr = statement.argument + if (!arkts.isETSNewClassInstanceExpression(expr)) return node + const typeReference = expr.typeRef + if (!arkts.isETSTypeReference(typeReference)) return node + if (!arkts.isETSTypeReferencePart(typeReference.part)) return node + const part = typeReference.part + if (part.typeParams) return node + const typeName = typeReference.baseName?.name + if (!typeName) return node + + return arkts.factory.updateScriptFunction( + node, + node.body, + node.typeParams, + node.params, + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier(typeName), + undefined, + undefined + ) + ), + node.hasReceiver, + node.flags, + node.modifierFlags, + node.id, + node.annotations + ) +} + +// es2panda creates the following instantiate factory: +// StructBase.$_instantiate(() => new Foo()) +// note that the type is not given. +// That later causes issues with memo rewrites so we rewrite it to +// StructBase.$_instantiate((): Foo => new Foo()) +export class InstantiateFactoryHelper extends arkts.AbstractVisitor { + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + return lambdaReturnFilter(node) + } +} diff --git a/koala_tools/ui2abc/ui-plugins/src/parsed-state-plugin.ts b/koala_tools/ui2abc/ui-plugins/src/parsed-state-plugin.ts new file mode 100644 index 0000000000000000000000000000000000000000..429769cde5ef37227f727744d4c00dd095045fd9 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/parsed-state-plugin.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { ComponentTransformer, ComponentTransformerOptions, ProjectConfig } from './component-transformer' +import { AnnotationsTransformer } from "./annotation-translator" +import { CallTransformer } from "./call-transformer" +import { Importer } from "./utils" +import { ImportsTransformer } from "./imports-transformer" +import { StructRecorder, StructsResolver, StructTable } from "./struct-recorder" +import { StructCallRewriter } from "./struct-call-rewriter" +import { ClassTransformer } from "./class-transformer" + + +export default function parsedTransformer( + userPluginOptions?: ComponentTransformerOptions, + projectConfig?: ProjectConfig +): arkts.ProgramTransformer { + return (program: arkts.Program, compilationOptions: arkts.CompilationOptions, context: arkts.PluginContext) => { + const importer = new Importer() + let resolver = context.parameter("structsTable") + if (!resolver) { + resolver = new StructsResolver() + context.setParameter("structsTable", resolver) + } + + const currentFile = arkts.global.filePath + const structs = resolver.getOrCreateTable(currentFile) + context.setParameter("importer", importer) + + const transformers: arkts.AbstractVisitor[] = [ + new StructRecorder(structs), + new StructCallRewriter(structs, importer), + new ClassTransformer(importer), + new ComponentTransformer(importer, userPluginOptions), + new AnnotationsTransformer(), + new CallTransformer(importer, userPluginOptions, projectConfig), + new ImportsTransformer(importer) + ] + const result = transformers.reduce((node: arkts.AstNode, transformer: arkts.AbstractVisitor) => transformer.visitor(node), program.ast) + program.setAst(result as arkts.ETSModule) + } +} diff --git a/koala_tools/ui2abc/ui-plugins/src/property-transformers.ts b/koala_tools/ui2abc/ui-plugins/src/property-transformers.ts new file mode 100644 index 0000000000000000000000000000000000000000..b3ebbee44bbe921e75d7ba157d52e6e7f01b3779 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/property-transformers.ts @@ -0,0 +1,731 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { Es2pandaTokenType } from "@koalaui/libarkts" + +import { DecoratorNames, DecoratorParameters, findDecorator, getRuntimeRememberPackage, hasDecorator } from "./utils" +import { CustomComponentNames, getDecoratorPackage, getRuntimePackage, Importer, ImportingTransformer, InternalAnnotations } from "./utils" +import { annotation, classMethods, isAnnotation } from "./common/arkts-utils" + +export interface PropertyTransformer extends ImportingTransformer { + check(property: arkts.ClassProperty): boolean + applyBuild(property: arkts.ClassProperty, result: arkts.Statement[]): void + applyStruct(clazz: arkts.ClassDeclaration, property: arkts.ClassProperty, result: arkts.ClassElement[]): void + applyOptions(property: arkts.ClassProperty, result: arkts.Statement[]): void + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void + applyDisposeStruct(property: arkts.ClassProperty, result: arkts.Statement[]): void + applyReuseRecord(property: arkts.ClassProperty, result: arkts.Expression[]): void +} + +function createOptionalClassProperty( + name: string, + property: arkts.ClassProperty +): arkts.ClassProperty { + let result = arkts.factory.createClassProperty( + arkts.factory.createIdentifier(name, undefined), + undefined, + property.typeAnnotation, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_OPTIONAL | arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + false + ) + return result +} + +export function createWrapperType(name: string, type: arkts.TypeNode, useUnion: boolean = false): arkts.TypeNode { + const box = arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier(name), + arkts.factory.createTSTypeParameterInstantiation([type.clone()]), + undefined + ) + ) + return useUnion ? arkts.factory.createETSUnionType([type.clone(), box]) : box +} + +export function backingFieldNameOf(property: arkts.ClassProperty): string { + return "__backing_" + property.id!.name +} + +function thisPropertyMethodCall(property: arkts.ClassProperty, method: string, args: readonly arkts.Expression[] = []): arkts.Statement { + return arkts.factory.createExpressionStatement(thisPropertyMethodCallExpr(property, method, args)) +} + +function thisPropertyMethodCallExpr(property: arkts.ClassProperty, method: string, args: readonly arkts.Expression[] = []): arkts.CallExpression { + return arkts.factory.createCallExpression(fieldOf(fieldOf(arkts.factory.createThisExpression(), backingFieldNameOf(property)), method), args, undefined, false, false, undefined) +} + +function createWrappedProperty( + clazz: arkts.ClassDeclaration, + property: arkts.ClassProperty, + wrapperTypeName: string, + ctorParams: arkts.Expression[] = [] +): arkts.ClassElement[] { + const wrapperTypeForValue = createWrapperType(wrapperTypeName, property.typeAnnotation!) + const wrapperTypeForType = createWrapperType(wrapperTypeName, property.typeAnnotation!) + const name = property.id!.name + let ctorArguments: arkts.Expression[] = [...ctorParams, arkts.factory.createStringLiteral(name)] + if (property.value != undefined) { + ctorArguments.push(property.value) + } + const backingField = arkts.factory.createClassProperty( + arkts.factory.createIdentifier(backingFieldNameOf(property)), + arkts.factory.createETSNewClassInstanceExpression(wrapperTypeForValue, ctorArguments), + wrapperTypeForType, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PRIVATE, + false + ) + + const getterFunction = arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement([ + arkts.factory.createReturnStatement( + arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createMemberExpression( + arkts.factory.createThisExpression(), + arkts.factory.createIdentifier(backingFieldNameOf(property)), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + arkts.factory.createIdentifier("get"), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), [], undefined, false, false, undefined, + ) + ) + ]), + undefined, + [ + ], + property.typeAnnotation?.clone(), + true, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD | arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_GETTER, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + arkts.factory.createIdentifier(name), + [] + ) + + const setterStatements: arkts.Statement[] = [ + arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + arkts.factory.createMemberExpression( + arkts.factory.createThisExpression(), + arkts.factory.createIdentifier(backingFieldNameOf(property)), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + arkts.factory.createIdentifier("set"), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + [ + arkts.factory.createIdentifier("value"), + ], + undefined, + false, + false, + undefined, + ) + ) + ] + const watchMethods = property.annotations.filter(isWatchDecorator).map(getWatchParameter) + for (let i = 0; i < watchMethods.length; i++) { + setterStatements.push(createWatchCall(clazz, watchMethods[i], name)) + } + + const setterFunction = arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement(setterStatements), + undefined, + [ + arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier("value", property.typeAnnotation?.clone()), + false, + undefined, + ) + ], + undefined, + true, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD | arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_SETTER | arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_OVERLOAD, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + arkts.factory.createIdentifier(name), + [] + ) + + let setter = arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_SET, + arkts.factory.createIdentifier(name), + arkts.factory.createFunctionExpression(arkts.factory.createIdentifier(name), setterFunction), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + false + ) + + let getter = arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_GET, + arkts.factory.createIdentifier(name), + arkts.factory.createFunctionExpression(arkts.factory.createIdentifier(name), getterFunction), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + false, + [setter] + ) + + return [backingField, getter] +} + +function addTrackablePropertyTo( + result: arkts.ClassElement[], + clazz: arkts.ClassDeclaration, + property: arkts.ClassProperty, + propertyTypeName: string +) { + const valueType = property.typeAnnotation + if (!valueType) throw new Error(`@${propertyTypeName}: type is not specified for ${property.id?.name}`) + + const propertyName = property.id!.name + const propertyTypeForValue = createWrapperType(propertyTypeName, valueType) + const propertyTypeForType = createWrapperType(propertyTypeName, valueType) + const propertyArgs: arkts.Expression[] = [arkts.factory.createStringLiteral(propertyName)] + const watches = property.annotations.filter(isWatchDecorator).map(getWatchParameter) + if (watches.length > 0) { + propertyArgs.push( + arkts.factory.createArrowFunctionExpression( + arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement( + watches.map(watch => createWatchCall(clazz, watch, propertyName)) + ), + undefined, + [], + undefined, + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_ARROW, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + undefined, + undefined + ) + ) + ) + } + const backingField = arkts.factory.createClassProperty( + arkts.factory.createIdentifier(backingFieldNameOf(property)), + arkts.factory.createETSNewClassInstanceExpression(propertyTypeForValue, propertyArgs), + propertyTypeForType, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PRIVATE, + false + ) + const getterFunction = arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement([ + arkts.factory.createReturnStatement(thisPropertyMethodCallExpr(property, "get")) + ]), + undefined, + [], + valueType.clone(), + true, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD | arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_GETTER, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + arkts.factory.createIdentifier(propertyName), + [] + ) + const setterFunction = arkts.factory.createScriptFunction( + arkts.factory.createBlockStatement([ + thisPropertyMethodCall(property, "set", [arkts.factory.createIdentifier("value")]) + ]), + undefined, + [ + arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier("value", valueType.clone()), + false, + undefined, + ) + ], + undefined, + true, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_METHOD | arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_SETTER | arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_OVERLOAD, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + arkts.factory.createIdentifier(propertyName), + [] + ) + const setter = arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_SET, + arkts.factory.createIdentifier(propertyName), + arkts.factory.createFunctionExpression(arkts.factory.createIdentifier(propertyName), setterFunction), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + false + ) + const getter = arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_GET, + arkts.factory.createIdentifier(propertyName), + arkts.factory.createFunctionExpression(arkts.factory.createIdentifier(propertyName), getterFunction), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + false, + [setter] + ) + result.push(backingField) + result.push(getter) +} + +function isWatchDecorator(usage: arkts.AnnotationUsage): boolean { + return isAnnotation(usage, DecoratorNames.WATCH) +} + +function getWatchParameter(usage: arkts.AnnotationUsage): string { + const properties = usage.properties + if (properties.length != 1) throw new Error("@Watch: only one parameter is expected") + const property = usage.properties[0] + if (!arkts.isClassProperty(property)) throw new Error("@Watch: expected class property") + const parameter = property.value + if (!arkts.isStringLiteral(parameter)) throw new Error("@Watch: expected string literal") + return parameter.str +} + +function isWatchMethod(method: arkts.MethodDefinition, methodName: string): boolean { + const f = method.function + return (f != undefined) + && (f.params.length == 1) + && (f.id?.name == methodName) +} + +function createWatchCall(clazz: arkts.ClassDeclaration, methodName: string, propertyName: string): arkts.Statement { + const parameters = new Array() + const methods = classMethods(clazz, method => isWatchMethod(method, methodName)) + if (methods.length > 0) parameters.push(arkts.factory.createStringLiteral(propertyName)) + return arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + fieldOf(arkts.factory.createThisExpression(), methodName), + parameters, + undefined, + false, + false, + undefined, + ) + ) +} + +function addPropertyRecordTo(result: arkts.Expression[], property: arkts.ClassProperty) { + result.push(arkts.factory.createProperty( + arkts.Es2pandaPropertyKind.PROPERTY_KIND_INIT, + arkts.factory.createStringLiteral(property.id!.name), + arkts.factory.createBinaryExpression( + fieldOf(arkts.factory.createTSNonNullExpression( + arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_INITIALIZERS_NAME) + ), property.id!.name), + property.value ?? arkts.factory.createETSNewClassInstanceExpression( + arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier("Object", undefined), undefined, undefined + ) + ), + []), + arkts.Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_NULLISH_COALESCING + ), + false, false + )) +} + +export abstract class PropertyTransformerBase implements PropertyTransformer { + constructor(public decoratorName: DecoratorNames, public className: string) { + } + check(property: arkts.ClassProperty): boolean { + return hasDecorator(property, this.decoratorName) + } + collectImports(importer: Importer): void { + importer.add(this.className, getDecoratorPackage()) + } + applyOptions(property: arkts.ClassProperty, result: arkts.ClassElement[]): void { + } + applyStruct(clazz: arkts.ClassDeclaration, property: arkts.ClassProperty, result: arkts.ClassElement[]): void { + addTrackablePropertyTo(result, clazz, property, this.className) + } + abstract applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void + applyDisposeStruct(property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "aboutToBeDeleted")) + } + applyReuseRecord(property: arkts.ClassProperty, result: arkts.Expression[]): void { + } + applyBuild(property: arkts.ClassProperty, result: arkts.Statement[]): void { + } +} + +export class StateTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.STATE, "StateDecoratorProperty") + } + applyOptions(property: arkts.ClassProperty, result: arkts.ClassElement[]): void { + result.push(createOptionalClassProperty(property.id!.name, property)) + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "init", [initializerOf(property), property.value!])) + } + applyReuseRecord(property: arkts.ClassProperty, result: arkts.Expression[]): void { + addPropertyRecordTo(result, property) + } +} + +export class PlainPropertyTransformer implements PropertyTransformer { + check(property: arkts.ClassProperty): boolean { + return property.annotations.length == 0 + } + collectImports(imports: Importer): void { + imports.add("PlainStructProperty", getDecoratorPackage()) + } + applyOptions(property: arkts.ClassProperty, result: arkts.ClassElement[]): void { + result.push(createOptionalClassProperty(property.id!.name, property)) + } + applyStruct(clazz: arkts.ClassDeclaration, property: arkts.ClassProperty, result: arkts.ClassElement[]): void { + result.push(...createWrappedProperty(clazz, property, "PlainStructProperty")) + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "init", [initializerOf(property)])) + } + applyDisposeStruct(property: arkts.ClassProperty, result: arkts.Statement[]): void { + } + applyReuseRecord(property: arkts.ClassProperty, result: arkts.Expression[]): void { + addPropertyRecordTo(result, property) + } + applyBuild(property: arkts.ClassProperty, result: arkts.Statement[]): void { + } +} + +export class LinkTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.LINK, "LinkDecoratorProperty") + } + applyOptions(property: arkts.ClassProperty, result: arkts.ClassElement[]): void { + result.push(arkts.factory.createClassProperty( + arkts.factory.createIdentifier(property.id?.name!), + undefined, + createWrapperType("SubscribedAbstractProperty", property.typeAnnotation!, true), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_OPTIONAL, + false + )) + //result.push(createOptionalClassProperty(property.id!.name, property)) + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "linkTo", [initializerOf(property)])) + } + applyReuseRecord(property: arkts.ClassProperty, result: arkts.Expression[]): void { + addPropertyRecordTo(result, property) + } + collectImports(imports: Importer): void { + imports.add("SubscribedAbstractProperty", getDecoratorPackage()) + imports.add("LinkDecoratorProperty", getDecoratorPackage()) + } +} + +function withStorageKey(expressions: arkts.Expression[], property: arkts.ClassProperty, decorator: DecoratorNames): arkts.Expression[] { + const props = property.annotations.find(usage => isAnnotation(usage, decorator))!.properties + if (props.length > 1) throw new Error(`@${decorator}: only one parameter is expected`) + if (props.length > 0) { + const prop = props[0] + if (!arkts.isClassProperty(prop)) throw new Error(`@${decorator}: expected class property`) + const param = prop.value + if (param) expressions.push(param) + } + return expressions +} + +export class StorageLinkTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.STORAGE_LINK, "StorageLinkDecoratorProperty") + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "init", withStorageKey([property.value!], property, this.decoratorName))) + } +} + + +export class LocalStorageLinkTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.LOCAL_STORAGE_LINK, "LocalStorageLinkDecoratorProperty") + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + if (!localStorage) throw new Error("@LocalStorageLink decorator requires specified local storage") + result.push(thisPropertyMethodCall(property, "init", withStorageKey([property.value!, localStorage], property, this.decoratorName))) + } +} + +export class PropTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.PROP, "PropDecoratorProperty") + } + applyOptions(property: arkts.ClassProperty, result: arkts.ClassElement[]): void { + result.push(createOptionalClassProperty(property.id!.name, property)) + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "init", [initializerOf(property), property.value ?? arkts.factory.createUndefinedLiteral()])) + } + applyReuseRecord(property: arkts.ClassProperty, result: arkts.Expression[]): void { + addPropertyRecordTo(result, property) + } + applyBuild(property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "update", [initializerOf(property)])) + } +} + +export class StoragePropTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.STORAGE_PROP, "StoragePropDecoratorProperty") + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "init", withStorageKey([property.value!], property, this.decoratorName))) + } +} + +export class LocalStoragePropTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.LOCAL_STORAGE_PROP, "LocalStoragePropDecoratorProperty") + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + if (!localStorage) throw new Error("@LocalStorageProp decorator requires specified local storage") + result.push(thisPropertyMethodCall(property, "init", withStorageKey([property.value!, localStorage], property, this.decoratorName))) + } +} + +export class ObjectLinkTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.OBJECT_LINK, "ObjectLinkDecoratorProperty") + } + applyOptions(property: arkts.ClassProperty, result: arkts.ClassElement[]): void { + result.push(createOptionalClassProperty(property.id!.name, property)) + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "init", [initializerOf(property), property.value ?? arkts.factory.createUndefinedLiteral()])) + } + applyReuseRecord(property: arkts.ClassProperty, result: arkts.Expression[]): void { + addPropertyRecordTo(result, property) + } + applyBuild(property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "update", [initializerOf(property)])) + } +} + +export function fieldOf(base: arkts.Expression, name: string, optional: boolean = false): arkts.Expression { + const result = arkts.factory.createMemberExpression( + base, + arkts.factory.createIdentifier(name), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + optional + ) + if (optional) return arkts.factory.createChainExpression(result) + return result +} + +function initializerOf(property: arkts.ClassProperty): arkts.Expression { + return fieldOf(arkts.factory.createIdentifier(CustomComponentNames.COMPONENT_INITIALIZERS_NAME), property.id!.name, true) +} + +function parseAllowOverride(propertyOriginal: arkts.ClassProperty, decoratorName: DecoratorNames): boolean { + const allowOverrideProperty = + findDecorator(propertyOriginal.annotations, decoratorName) + ?.properties.find(it => { + return arkts.isClassProperty(it) && it.id?.name === DecoratorParameters.ALLOW_OVERRIDE + }) + return allowOverrideProperty !== undefined +} + +function callStatementsOnce(statements: arkts.Statement[]): arkts.Statement { + const lambdaBody = arkts.factory.createBlockStatement(statements) + const lambda = arkts.factory.createScriptFunction( + lambdaBody, + undefined, + [], + undefined, + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_ARROW, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_NONE, + undefined, + undefined + ) + return arkts.factory.createExpressionStatement( + arkts.factory.createCallExpression( + arkts.factory.createIdentifier("once"), + [ arkts.factory.createArrowFunctionExpression(lambda) ], + undefined, + false, + false, + undefined, + ) + ) +} + +export class ProvideTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.PROVIDE, "ProvideDecoratorProperty") + } + applyOptions(property: arkts.ClassProperty, result: arkts.ClassElement[]): void { + result.push(createOptionalClassProperty(property.id!.name, property)) + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "init", [initializerOf(property), property.value!])) + } + applyReuseRecord(property: arkts.ClassProperty, result: arkts.Expression[]): void { + addPropertyRecordTo(result, property) + } + applyBuild(property: arkts.ClassProperty, result: arkts.Statement[]): void { + const allowOverride = parseAllowOverride(property, this.decoratorName) + const params = withStorageKey([], property, this.decoratorName) + if (!allowOverride) { + result.push(callStatementsOnce([ + thisPropertyMethodCall(property, "checkOverrides", params) + ])) + } + result.push(thisPropertyMethodCall(property, "provide", params)) + } + collectImports(imports: Importer): void { + super.collectImports(imports) + imports.add("once", getRuntimeRememberPackage()) + } +} + +export class ProviderTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.PROVIDER, "ProvideDecoratorProperty") + } + + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + if (property.value == undefined) { + throw new Error(`@Provider decorator requires an initial value for '${property.id?.name}'`) + } + result.push( + thisPropertyMethodCall(property, "init", [arkts.factory.createUndefinedLiteral(), + arkts.factory.createTSAsExpression(property.value, property.typeAnnotation, false) + ]) + ) + } + + applyBuild(property: arkts.ClassProperty, result: arkts.Statement[]): void { + if (parseAllowOverride(property, this.decoratorName)) { + throw new Error(`@Provider does not support the allowOverride parameter. Name overloading is already used by default.`) + } + result.push(thisPropertyMethodCall(property, "provide", withStorageKey([], property, this.decoratorName))) + } +} + +export class ConsumeTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.CONSUME, "ConsumeDecoratorProperty") + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + if (property.value) throw new Error("@Consume decorator does not expect property initializer") + result.push(thisPropertyMethodCall(property, "init", withStorageKey([], property, this.decoratorName))) + } +} + +export class ConsumerTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.CONSUMER, "ConsumerDecoratorProperty") + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + if (property.value == undefined) { + throw new Error(`@Consumer decorator requires an initial value for '${property.id?.name}'`) + } + result.push( + thisPropertyMethodCall(property, + "init", + withStorageKey([arkts.factory.createTSAsExpression(property.value, property.typeAnnotation, false)], property, this.decoratorName)) + ) + } +} + +export class BuilderParamTransformer implements PropertyTransformer { + check(property: arkts.ClassProperty): boolean { + return hasDecorator(property, DecoratorNames.BUILDER_PARAM) + } + collectImports(result: Importer): void { + } + applyOptions(property: arkts.ClassProperty, result: arkts.ClassElement[]): void { + let backing = createOptionalClassProperty(property.id!.name, property) + backing.setAnnotations([annotation(InternalAnnotations.MEMO)]) + result.push(backing) + } + applyStruct(clazz: arkts.ClassDeclaration, property: arkts.ClassProperty, result: arkts.ClassElement[]): void { + let backing = arkts.factory.createClassProperty( + property.id, + property.value, + undefined, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + false + ) + backing.setAnnotations([annotation(InternalAnnotations.MEMO)]) + result.push(backing) + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(applyInitStatement(property)) + } + applyDisposeStruct(property: arkts.ClassProperty, result: arkts.Statement[]): void { + } + applyReuseRecord(property: arkts.ClassProperty, result: arkts.Expression[]): void { + // cause ClassCastError on panda while using default value + // LambdaObject$lambda$invoke$805 cannot be cast to std.core.Function0 + // addPropertyRecordTo(result, property) + } + applyBuild(property: arkts.ClassProperty, result: arkts.Statement[]): void { + } +} + +export class LocalPropertyTransformer extends PropertyTransformerBase { + constructor() { + super(DecoratorNames.LOCAL, "StateDecoratorProperty") + } + applyInitializeStruct(localStorage: arkts.Expression | undefined, property: arkts.ClassProperty, result: arkts.Statement[]): void { + result.push(thisPropertyMethodCall(property, "init", [arkts.factory.createUndefinedLiteral(), property.value!])) + } + applyReuseRecord(property: arkts.ClassProperty, result: arkts.Expression[]): void { + addPropertyRecordTo(result, property) + } +} + +function applyInitStatement(property: arkts.ClassProperty): arkts.Statement { + const name = property.id?.name! + const initDeclaration = arkts.factory.createVariableDeclaration( + arkts.Es2pandaVariableDeclarationKind.VARIABLE_DECLARATION_KIND_CONST, + [ + arkts.factory.createVariableDeclarator( + arkts.Es2pandaVariableDeclaratorFlag.VARIABLE_DECLARATOR_FLAG_CONST, + arkts.factory.createIdentifier(name), + initializerOf(property) + ) + ] + ) + const initBlock = arkts.factory.createIfStatement( + arkts.factory.createBinaryExpression( + arkts.factory.createIdentifier(name), + arkts.factory.createUndefinedLiteral(), + Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_NOT_EQUAL + ), + arkts.factory.createBlockStatement([ + arkts.factory.createExpressionStatement( + arkts.factory.createAssignmentExpression( + fieldOf(arkts.factory.createThisExpression(), name), + arkts.factory.createTSNonNullExpression(arkts.factory.createIdentifier(name)), + arkts.Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION + ) + ) + ]) + ) + return arkts.factory.createBlockStatement([initDeclaration, initBlock]) +} + +export function isOptionBackedByProperty(property: arkts.ClassProperty): boolean { + return hasDecorator(property, DecoratorNames.LINK) +} + +export function isOptionBackedByPropertyName(decorator: string): boolean { + return decorator == DecoratorNames.LINK +} diff --git a/koala_tools/ui2abc/ui-plugins/src/resources-utils.ts b/koala_tools/ui2abc/ui-plugins/src/resources-utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..64d1a08cb2f925252d2f52b5d08437f5b16c2b42 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/resources-utils.ts @@ -0,0 +1,212 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { ProjectConfig } from "./component-transformer"; +import * as fs from "fs" +import * as path from "path" + +export const RESOURCE_TYPE: Record = { + color: 10001, + float: 10002, + string: 10003, + plural: 10004, + boolean: 10005, + intarray: 10006, + integer: 10007, + pattern: 10008, + strarray: 10009, + media: 20000, + rawfile: 30000, + symbol: 40000, +}; + +export enum ModuleType { + HAR = 'har', + ENTRY = 'entry', + FEATURE = 'feature', + SHARED = 'shared', +} + +export enum Dollars { + DOLLAR_RESOURCE = '$r', + DOLLAR_RAWFILE = '$rawfile', + DOLLAR_DOLLAR = '$$', + TRANSFORM_DOLLAR_RESOURCE = '_r', + TRANSFORM_DOLLAR_RAWFILE = '_rawfile', +} + +type ResourceMap = Map>; + +export interface ResourceList { + [key: string]: ResourceMap; +} + +export interface ResourceInfo { + resourcesList: ResourceList; + rawfile: Set; +} + +export interface LoaderJson { + hspResourcesMap: Record; +} + +export interface ResourceParameter { + id: number; + type: number; + params: arkts.Expression[]; +} + +export function getResourceParams(id: number, type: number, params: arkts.Expression[]): ResourceParameter { + return { id, type, params }; +} + +export function loadBuildJson(projectConfig: ProjectConfig | undefined): any { + if (!!projectConfig && projectConfig.buildLoaderJson && fs.existsSync(projectConfig.buildLoaderJson)) { + try { + const content = fs.readFileSync(projectConfig.buildLoaderJson, 'utf-8'); + const parsedContent = JSON.parse(content); + return parsedContent; + } catch (error) { + throw new Error('Error: The file is not a valid JSON format.'); + } + } + return {}; +} + +export function initResourceInfo(projectConfig: ProjectConfig | undefined, aceBuildJson: LoaderJson): ResourceInfo { + let resourcesList: ResourceList = { + app: new Map>(), + sys: new Map>(), + }; + let rawfile: Set = new Set(); + if (!!projectConfig) { + readAppResource(resourcesList, projectConfig, aceBuildJson, rawfile); + } + return { resourcesList, rawfile }; +} + +function readAppResource( + resourcesList: ResourceList, + projectConfig: ProjectConfig, + aceBuildJson: LoaderJson, + rawfile: Set +): void { + if ('hspResourcesMap' in aceBuildJson && aceBuildJson.hspResourcesMap) { + readHspResource(aceBuildJson, projectConfig, resourcesList); + } + readSystemResource(resourcesList); + if (!!projectConfig.appResource && fs.existsSync(projectConfig.appResource)) { + const appResource: string = fs.readFileSync(projectConfig.appResource, 'utf-8'); + const resourceArr: string[] = appResource.split(/\n/); + const resourceMap: ResourceMap = new Map>(); + processResourceArr(resourceArr, resourceMap, projectConfig.appResource); + for (let [key, value] of resourceMap) { + resourcesList.app.set(key, value); + } + } + if (projectConfig.rawFileResource) { + processResourcesRawfile(projectConfig, projectConfig.rawFileResource, rawfile); + } +} + +function readSystemResource(resourcesList: ResourceList): void { + const sysResourcePath = path.resolve(__dirname, '../sysResource.js'); + if (fs.existsSync(sysResourcePath)) { + const sysObj: Record> = require(sysResourcePath).sys; + Object.keys(sysObj).forEach((key: string) => { + resourcesList.sys.set(key, sysObj[key]); + }); + } +} + +function processResourceArr( + resourceArr: string[], + resourceMap: Map>, + resourcePath: string +): void { + for (let i = 0; i < resourceArr.length; i++) { + if (!resourceArr[i].length) { + continue; + } + const resourceData = resourceArr[i].split(/\s/); + if (resourceData.length === 3 && !isNaN(Number(resourceData[2]))) { + rescordResourceNameAndIdMap(resourceMap, resourceData); + } else { + console.warn(`ArkTS:WARN The format of file '${resourcePath}' is incorrect.`); + break; + } + } +} + +function rescordResourceNameAndIdMap(resourceMap: Map>, resourceData: string[]): void { + if (resourceMap.get(resourceData[0])) { + const resourceNameAndId: Record = resourceMap.get(resourceData[0])!; + if (!resourceNameAndId[resourceData[1]] || resourceNameAndId[resourceData[1]] !== Number(resourceData[2])) { + resourceNameAndId[resourceData[1]] = Number(resourceData[2]); + } + } else { + let obj: Record = {}; + obj[resourceData[1]] = Number(resourceData[2]); + resourceMap.set(resourceData[0], obj); + } +} + +function readHspResource(aceBuildJson: LoaderJson, projectConfig: ProjectConfig, resourcesList: ResourceList): void { + projectConfig.hspResourcesMap = true; + for (const hspName in aceBuildJson.hspResourcesMap) { + if (fs.existsSync(aceBuildJson.hspResourcesMap[hspName])) { + const resourceMap: ResourceMap = new Map>(); + resourcesList[hspName] = new Map>(); + const hspResource: string = fs.readFileSync(aceBuildJson.hspResourcesMap[hspName], 'utf-8'); + const resourceArr: string[] = hspResource.split(/\n/); + processResourceArr(resourceArr, resourceMap, aceBuildJson.hspResourcesMap[hspName]); + for (const [key, value] of resourceMap) { + resourcesList[hspName].set(key, value); + } + } + } +} + +function processResourcesRawfile( + projectConfig: ProjectConfig, + rawfilePath: string, + rawfileSet: Set, + resourceName: string = '' +): void { + if (fs.existsSync(projectConfig.rawFileResource) && fs.statSync(rawfilePath).isDirectory()) { + const files: string[] = fs.readdirSync(rawfilePath); + files.forEach((file: string) => { + if (fs.statSync(path.join(rawfilePath, file)).isDirectory()) { + processResourcesRawfile( + projectConfig, + path.join(rawfilePath, file), + rawfileSet, + resourceName ? resourceName + '/' + file : file + ); + } else { + addRawfileResourceToSet(rawfileSet, file, resourceName); + } + }); + } +} + +function addRawfileResourceToSet(rawfileSet: Set, file: string, resourceName: string = ''): void { + if (resourceName) { + rawfileSet.add(resourceName + '/' + file); + } else { + rawfileSet.add(file); + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/ui-plugins/src/struct-call-rewriter.ts b/koala_tools/ui2abc/ui-plugins/src/struct-call-rewriter.ts new file mode 100644 index 0000000000000000000000000000000000000000..503bb5efaccf3321548ac77fd485aea7345f7513 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/struct-call-rewriter.ts @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { getCustomComponentOptionsName, Importer, InternalAnnotations, DecoratorNames } from "./utils" +import { fieldOf } from "./property-transformers" +import { annotation, backingField } from "./common/arkts-utils" +import { StructDescriptor, StructTable } from "./struct-recorder"; + +export class StructCallRewriter extends arkts.AbstractVisitor { + currentStructRewritten: StructDescriptor | undefined = undefined + currentStructCalled: StructDescriptor | undefined = undefined + isInCall = false + + constructor(private structs: StructTable, private importer: Importer) { + super() + } + + private addImports(statement: arkts.ETSImportDeclaration) { + statement.specifiers.forEach(it => { + const name = (it as arkts.ImportSpecifier).imported + if (name && this.structs?.findStruct(name.name)) { + this.importer.add(getCustomComponentOptionsName(name.name), statement.source?.str!) + } + }) + } + + visitor(node: arkts.AstNode, options?: object): arkts.AstNode { + if (arkts.isETSImportDeclaration(node)) { + this.addImports(node) + return node + } + if (arkts.isETSStructDeclaration(node)) { + const struct = StructTable.toDescriptor(node) + this.currentStructRewritten = struct + const result = this.visitEachChild(node) + this.currentStructRewritten = undefined + return result + } + if (arkts.isCallExpression(node) && arkts.isIdentifier(node.callee)) { + this.isInCall = true + this.currentStructCalled = this.structs.findStruct(node.callee.name) + const result = this.visitEachChild(node) + this.currentStructCalled = undefined + this.isInCall = false + return result + } + + if (this.currentStructRewritten != undefined && this.isInCall && arkts.isObjectExpression(node)) { + return this.createObjectLiteralRewrite(node) + } + return this.visitEachChild(node) + } + + private createObjectLiteralRewrite(expression: arkts.ObjectExpression): arkts.Expression { + return arkts.factory.updateObjectExpression( + expression, + expression.properties.map(value => { + if (arkts.isProperty(value) && arkts.isIdentifier(value.value)) { + return arkts.factory.createProperty( + arkts.Es2pandaPropertyKind.PROPERTY_KIND_INIT, + value.key, + this.createDollarRewrite(value.value), false, false + ) + } else if (arkts.isProperty(value) && arkts.isArrowFunctionExpression(value.value)) { + return arkts.factory.createProperty( + arkts.Es2pandaPropertyKind.PROPERTY_KIND_INIT, + value.key, + this.updateArrowFunctionExpression(value.key as arkts.Identifier, value.value), false, false + ) + } else { + return value + } + }) + ) + } + + // Improve: FIX, move to checked phase + private updateArrowFunctionExpression(targetPropertyNameId: arkts.Identifier, original: arkts.ArrowFunctionExpression): arkts.ArrowFunctionExpression { + let targetPropertyName = targetPropertyNameId.name + // Add @memo annotation if using @BuildParam decorated property + let decorators = this.currentStructCalled?.decoratorsFor(targetPropertyName) + if (decorators?.find(it => it == DecoratorNames.BUILDER_PARAM)) { + original.setAnnotations([annotation(InternalAnnotations.MEMO)]) + } + return original + } + + private createMemberRewrite(original: arkts.MemberExpression): arkts.Expression { + if (!this.currentStructRewritten) return original + if (arkts.isThisExpression(original.object) && arkts.isIdentifier(original.property)) { + let thisPropertyName = original.property.name + // Use backing field instead of property value, if using property. + let decorators = this.currentStructRewritten.decoratorsFor(thisPropertyName) + if (decorators && decorators.includes(DecoratorNames.LINK)) { + return fieldOf(arkts.factory.createThisExpression(), backingField(thisPropertyName)) + } + } + return original + } + + private createDollarRewrite(original: arkts.Identifier): arkts.Expression { + if (!this.currentStructRewritten) return original + if (original.name.startsWith('$')) { + let thisPropertyName = original.name.substring(1) + // Use backing field instead of property value, if using property. + let decorators = this.currentStructRewritten?.decoratorsFor(thisPropertyName) + if (decorators && decorators.length > 0) { + return fieldOf(arkts.factory.createThisExpression(), backingField(thisPropertyName)) + } + } + return original + } +} \ No newline at end of file diff --git a/koala_tools/ui2abc/ui-plugins/src/struct-recorder.ts b/koala_tools/ui2abc/ui-plugins/src/struct-recorder.ts new file mode 100644 index 0000000000000000000000000000000000000000..f30198beb21b392a2350c7012c5149b511b8b082 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/struct-recorder.ts @@ -0,0 +1,220 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import * as fs from "fs" +import * as path from "path" +import { CustomComponentNames } from "./utils" +import { metaDatabase } from "@koalaui/libarkts" + +export class PropertyDescriptor { + constructor(public name: string, public decorators: string[]) { } + toJSON(): string { + return `{"name": "${this.name}", "decorators": [${this.decorators.map(it => `"${it}"`).join(",")}]}` + } +} + +export class StructDescriptor { + constructor(public name: string, public annotations: string[], public properties: PropertyDescriptor[]) { } + static fromJSON(parsed: any): StructDescriptor[] { + return parsed.structs.map((struct: any) => new StructDescriptor(struct.name, struct.annotations, + struct.properties.map((property: any) => + new PropertyDescriptor(property.name, property.annotations) + ) + )) + } + toJSON(): string { + return `{ "name": "${this.name}", ` + + `"annotations": [${this.annotations.map(it => `"${it}"`).join(",")}], ` + + `"properties": [${this.properties.map(it => it.toJSON()).join(", ")}] }` + } + + decoratorsFor(name: string): string[] | undefined { + return this.properties.find(it => it.name == name)?.decorators + } + + hasDecorator(property: string, decorator: string): boolean { + return this.decoratorsFor(property)?.includes(decorator) ?? false + } + + hasAnnotation(annotation: string): boolean { + return this.annotations?.includes(annotation) ?? false + } +} +export class StructsResolver { + private structByFile = new Map() + + constructor() { + this.init() + } + + init() { + for (let source of arkts.arktsGlobal.compilerContext!.program.getExternalSources()) { + const name = source.getName() + if (name.startsWith("std.")) continue + if (name.startsWith("escompat")) continue + if (name.startsWith("arkui")) continue + if (name.startsWith("@koalaui")) continue + if (name.startsWith("arkui.stateManagement")) continue + + let program = source.programs[0] + let table = this.getOrCreateTable(program.sourceFilePath) + table.recordStructs(program) + this.addTable(program.sourceFilePath, table) + } + } + + addTable(fileName: string, table: StructTable) { + this.structByFile.set(fileName, table) + } + + getOrCreateTable(fileName: string) { + let result = this.structByFile.get(fileName) + if (!result) { + result = new StructTable(fileName) + this.addTable(fileName, result) + } + return result + } + + findDeclarationFile(declaration: arkts.AstNode): string { + let current: arkts.AstNode|undefined = declaration + while (current && !arkts.isETSModule(current)) { + current = current.parent + } + if (!current) throw new Error(`Is not part of module`) + let module = current as arkts.ETSModule + return module.program!.sourceFilePath + } + + private declarationToTable(declaration: arkts.AstNode): StructTable { + const declarationFile = this.findDeclarationFile(declaration) + if (!declarationFile) throw new Error(`No declaration file`) + let structs = this.structByFile.get(declarationFile) + if (!structs) { + structs = new StructTable(declarationFile) + this.addTable(declarationFile, structs) + } + return structs + } + + findStructByOptions(name: arkts.AstNode|undefined): StructDescriptor | undefined { + if (!name) return undefined + const declaration = arkts.getDecl(name) + if (!declaration || !arkts.isTSInterfaceDeclaration(declaration)) return undefined + const structName = declaration.id!.name.replace(CustomComponentNames.COMPONENT_INTERFACE_PREFIX, "") + return this.declarationToTable(declaration).findStruct(structName) + } + + findStruct(name: arkts.Identifier): StructDescriptor | undefined { + const declaration = arkts.getDecl(name) + if (!declaration) return undefined + return this.declarationToTable(declaration).findStruct(name.name) + } + + hasDefinition(filename: string): boolean { + return this.structByFile.has(filename) + } +} + +export class StructTable { + private structByName = new Map() + constructor(private fileName: string) { } + readDB() { + const db = metaDatabase(this.fileName) + if (fs.existsSync(db)) { + try { + this.addDescriptors( + StructDescriptor.fromJSON( + JSON.parse( + fs.readFileSync(db, "utf-8") + ) + ) + ) + } catch (e: any) { + console.log(e.stack) + } + } + } + recordStructs(program: arkts.Program) { + new StructRecorder(this).visitor(program.ast) + } + findStruct(name: string): StructDescriptor|undefined { + return this.structByName.get(name) + } + addStruct(declaration: arkts.ETSStructDeclaration) { + if (this.structByName.has(declaration.definition?.ident?.name!)) return + const descriptor = StructTable.toDescriptor(declaration) + this.addDescriptor(descriptor) + } + addDescriptor(descriptor: StructDescriptor) { + this.structByName.set(descriptor.name, descriptor) + } + addDescriptors(descriptors: StructDescriptor[]) { + descriptors.forEach(it => this.addDescriptor(it)) + } + static toDescriptor(declaration: arkts.ETSStructDeclaration): StructDescriptor { + return new StructDescriptor( + declaration.definition?.ident?.name!, + StructTable.extractAnnotations(declaration), + declaration.definition!.body + .filter(arkts.isClassProperty) + .map((classProperty: arkts.ClassProperty) => + new PropertyDescriptor((classProperty.key as arkts.Identifier).name!, + StructTable.extractDecorators(classProperty)) + ) + ) + } + static extractDecorators(property: arkts.ClassProperty): string[] { + let annotations = property.annotations + .filter(it => arkts.isIdentifier(it.expr)) + .map(it => (it.expr as arkts.Identifier).name!) + return annotations; + } + static extractAnnotations(declaration: arkts.ETSStructDeclaration): string[] { + let annotations = declaration?.definition?.annotations + .filter(it => arkts.isIdentifier(it.expr)) + .map(it => (it.expr as arkts.Identifier).name!) ?? [] + return annotations + } +} + +export class StructRecorder extends arkts.AbstractVisitor { + constructor(private table: StructTable) { + super() + } + + visitor(node: arkts.AstNode): arkts.AstNode { + if (arkts.isETSModule(node)) { + const result = this.visitEachChild(node) + return result + } + if (arkts.isETSStructDeclaration(node)) { + this.table.addStruct(node) + return node + } + // Do not go inside classes, structs cannot be there. + if (arkts.isClassDeclaration(node)) { + return node + } + if (arkts.isFunctionDeclaration(node)) { + return node + } + if (arkts.isTSInterfaceDeclaration(node)) { + return node + } + return this.visitEachChild(node) + } +} diff --git a/koala_tools/ui2abc/ui-plugins/src/style-transformer.ts b/koala_tools/ui2abc/ui-plugins/src/style-transformer.ts new file mode 100644 index 0000000000000000000000000000000000000000..3073c21438be22269f1bf46f7abc7ccf8a65df3e --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/style-transformer.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { builderLambdaFunctionName } from "./builder-lambda-transformer" +import { styledInstance } from "./utils" + +export class StyleTransformer extends arkts.AbstractVisitor { + visitor(beforeChildren: arkts.AstNode): arkts.AstNode { + const node = this.visitEachChild(beforeChildren) + const isCallChain = arkts.isCallExpression(node) + && arkts.isMemberExpression(node.callee) + && arkts.isCallExpression(node.callee.object) + if (!isCallChain) { + return node + } + const implFunction = builderLambdaFunctionName(node.callee.object) + if (implFunction === undefined) { + return node + } + return transformStyle(node, node.callee, node.callee.object, node.callee.object.arguments) + } +} + +function transformStyle( + outerCall: arkts.CallExpression, + dot: arkts.MemberExpression, + innerCall: arkts.CallExpression, + args: readonly arkts.Expression[] +): arkts.AstNode { + const firstArg = args[0] + const firstArgOrUndefined = arkts.isUndefinedLiteral(firstArg) ? undefined : firstArg + const restArgs = args.slice(1) + + const newDot = arkts.factory.updateMemberExpression( + dot, + firstArgOrUndefined ?? arkts.factory.createIdentifier(styledInstance, undefined), + dot.property, + dot.kind, + dot.isComputed, + dot.isOptional + ) + + const detachedStyle = arkts.factory.updateCallExpression( + outerCall, + newDot, + outerCall.arguments, + outerCall.typeParams + ) + + return arkts.factory.updateCallExpression( + innerCall, + innerCall.callee, + [detachedStyle, ...restArgs], + innerCall.typeParams + ) +} diff --git a/koala_tools/ui2abc/ui-plugins/src/ui-factory.ts b/koala_tools/ui2abc/ui-plugins/src/ui-factory.ts new file mode 100644 index 0000000000000000000000000000000000000000..bec12670b461abb04607293dcbffcd829b711f18 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/ui-factory.ts @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { + BuilderLambdaNames, + CustomComponentNames, + InternalAnnotations +} from "./utils"; +import { annotation } from "./common/arkts-utils"; + +export class factory { + /** + * create `instance: ` as identifier + */ + static createInstanceIdentifier(typeName: string): arkts.Identifier { + return arkts.factory.createIdentifier( + BuilderLambdaNames.STYLE_ARROW_PARAM_NAME, + factory.createTypeReferenceFromString(typeName) + ) + } + + /** + * create `instance: ` as parameter + */ + static createInstanceParameter(typeName: string): arkts.ETSParameterExpression { + return arkts.factory.createETSParameterExpression( + factory.createInstanceIdentifier(typeName), + false + ) + } + + /** + * create `(instance: ) => void` + */ + static createStyleLambdaFunctionType(typeName: string): arkts.ETSFunctionType { + return arkts.factory.createETSFunctionType( + undefined, + [ + factory.createInstanceParameter(typeName) + ], + arkts.factory.createETSPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_ARROW + ); + } + + /** + * create `style: ((instance: ) => void) | undefined` as identifier + */ + static createStyleIdentifier(typeName: string): arkts.Identifier { + return arkts.factory.createIdentifier( + BuilderLambdaNames.STYLE_PARAM_NAME, + arkts.factory.createETSUnionType([ + factory.createStyleLambdaFunctionType(typeName), + arkts.factory.createETSUndefinedType() + ]) + ) + } + + /** + * create `@memo() style: ((instance: ) => void) | undefined` as parameter + */ + static createStyleParameter(typeName: string): arkts.ETSParameterExpression { + const styleParam: arkts.Identifier = factory.createStyleIdentifier(typeName); + const param = arkts.factory.createETSParameterExpression(styleParam, false); + param.setAnnotations([annotation(InternalAnnotations.MEMO)]); + return param; + } + + /** + * create `initializers: | undefined` as identifier + */ + static createInitializerOptionsIdentifier(optionsName: string, inBuild: boolean): arkts.Identifier { + return arkts.factory.createIdentifier( + inBuild ? CustomComponentNames.COMPONENT_INITIALIZERS_NAME_0 : CustomComponentNames.COMPONENT_INITIALIZERS_NAME, + arkts.factory.createETSUnionType([ + factory.createTypeReferenceFromString(inBuild ? 'Object' : optionsName), + arkts.factory.createETSUndefinedType() + ]) + ) + } + + /** + * create `initializers: | undefined` as parameter + */ + static createInitializersOptionsParameter(optionsName: string, inBuild: boolean, isOptional: boolean = false): arkts.ETSParameterExpression { + return arkts.factory.createETSParameterExpression( + factory.createInitializerOptionsIdentifier( + optionsName, inBuild + ), + isOptional + ) + } + + /** + * create `content: (() => void) | undefined` as identifier + */ + static createContentIdentifier(isOptional: boolean): arkts.Identifier { + return arkts.factory.createIdentifier( + BuilderLambdaNames.CONTENT_PARAM_NAME, + isOptional ? factory.createLambdaFunctionType() : + arkts.factory.createETSUnionType([ + factory.createLambdaFunctionType(), + arkts.factory.createETSUndefinedType() + ]) + ) + } + + /** + * create `@memo() content: (() => void) | undefined` as parameter + */ + static createContentParameter(isOptional: boolean = false): arkts.ETSParameterExpression { + const contentParam: arkts.Identifier = factory.createContentIdentifier(isOptional) + const param = arkts.factory.createETSParameterExpression(contentParam, isOptional) + param.setAnnotations([annotation(InternalAnnotations.MEMO)]) + return param + } + + /** + * create type from string + */ + static createTypeReferenceFromString(name: string): arkts.TypeNode { + return arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier(name, undefined), undefined, undefined + ) + ); + } + + /** + * create `() => `. If returnType is not given, then using `void`. + */ + static createLambdaFunctionType( + params?: arkts.Expression[], + returnType?: arkts.TypeNode | undefined + ): arkts.ETSFunctionType { + return arkts.factory.createETSFunctionType( + undefined, + params ?? [], + returnType + ?? arkts.factory.createETSPrimitiveType(arkts.Es2pandaPrimitiveType.PRIMITIVE_TYPE_VOID), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_ARROW + ) + } +} diff --git a/koala_tools/ui2abc/ui-plugins/src/utils.ts b/koala_tools/ui2abc/ui-plugins/src/utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..94160290b1f4b001540ddfdd3f37e5954d9ba5d8 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/src/utils.ts @@ -0,0 +1,606 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as arkts from "@koalaui/libarkts" +import { annotation } from "./common/arkts-utils" + +export const styledInstance = mangle("instance") + +export function mangle(value: string): string { + return `__${value}` +} + +export enum CustomComponentNames { + COMPONENT_BUILD_ORI = 'build', + COMPONENT_CONSTRUCTOR_ORI = 'constructor', + COMPONENT_CLASS_NAME = 'CustomComponent', + COMPONENT_INTERFACE_PREFIX = '__Options_', + COMPONENT_DISPOSE_STRUCT = '__disposeStruct', + COMPONENT_INITIALIZE_STRUCT = '__initializeStruct', + COMPONENT_UPDATE_STRUCT = '__updateStruct', + COMPONENT_TO_RECORD = '__toRecord', + COMPONENT_BUILD = '_build', + REUSABLE_COMPONENT_REBIND_STATE = '__rebindStates', + COMPONENT_INITIALIZERS_NAME_0 = 'initializers0', + COMPONENT_INITIALIZERS_NAME = 'initializers', + COMPONENT_IS_ENTRY = 'isEntry', + COMPONENT_IS_CUSTOM_LAYOUT = 'isCustomLayoutComponent', + COMPONENT_ONPLACECHILDREN_ORI = 'onPlaceChildren', + COMPONENT_ONMEASURESIZE_ORI = 'onMeasureSize', + COMPONENT_BUILDER_LAMBDA = 'CustomComponent.$_instantiate', + COMPONENT_IS_FREEZABLE = 'isFreezable', +} + +export enum BuilderLambdaNames { + ANNOTATION_NAME = 'ComponentBuilder', + BUILDER_LAMBDA_NAME = 'BuilderLambda', + ORIGIN_METHOD_NAME = '$_instantiate', + TRANSFORM_METHOD_NAME = '$_instantiate', + STYLE_PARAM_NAME = 'style', + STYLE_ARROW_PARAM_NAME = 'instance', + CONTENT_PARAM_NAME = 'content', +} + +export enum InternalAnnotations { + MEMO = 'memo', + MEMO_STABLE = 'memo_stable', + BUILDER_LAMBDA = 'BuilderLambda' +} + +function isKoalaWorkspace() { + return process.env.KOALA_WORKSPACE == "1" +} + +export function getRuntimePackage(): string { + if (isKoalaWorkspace()) { + return '@koalaui/runtime' + } else { + return 'arkui.stateManagement.runtime' + } +} + +export function getRuntimeRememberPackage(): string { + if (isKoalaWorkspace()) { + return '@koalaui/runtime' + } else { + return '@koalaui.runtime.memo.remember' + } +} + +export function getRuntimeAnnotationsPackage(): string { + if (isKoalaWorkspace()) { + return '@koalaui/runtime/annotations' + } else { + return 'arkui.stateManagement.runtime' + } +} + +export function getDecoratorPackage(): string { + if (isKoalaWorkspace()) { + return 'arkui' + } else { + return 'arkui.stateManagement.decorator' + } +} + +export function getComponentPackage(): string { + if (isKoalaWorkspace()) { + return 'arkui' + } else { + return 'arkui.component' + } +} + +export function getCustomComponentPackage(): string { + if (isKoalaWorkspace()) { + return 'arkui' + } else { + return 'arkui.component.customComponent' + } +} + +export function getCommonMethodPackage(): string { + if (isKoalaWorkspace()) { + return 'arkui' + } else { + return 'arkui.component.common' + } +} + +export function getRouterPackage(): string { + if (isKoalaWorkspace()) { + return 'arkui' + } else { + return 'arkui.ohos.router' + } +} + +export function getResourcePackage(): string { + if (isKoalaWorkspace()) { + return 'arkui' + } else { + return 'arkui.component.resources' + } +} + +export function uiAttributeName(componentName: string): string { + return `${componentName}Attribute` +} +export function getCustomComponentOptionsName(className: string): string { + return `${CustomComponentNames.COMPONENT_INTERFACE_PREFIX}${className}` +} + +export function getTypeParamsFromClassDecl(node: arkts.ClassDeclaration | undefined): readonly arkts.TSTypeParameter[] { + return node?.definition?.typeParams?.params ?? []; +} + +export function getTypeNameFromTypeParameter(node: arkts.TSTypeParameter | undefined): string | undefined { + return node?.name?.name; +} + +export function createOptionalClassProperty( + name: string, + property: arkts.ClassProperty, + stageManagementIdent: string, + modifiers: arkts.Es2pandaModifierFlags +): arkts.ClassProperty { + let newType: arkts.TypeNode | undefined = property.typeAnnotation; + if (property.typeAnnotation && arkts.isETSFunctionType(property.typeAnnotation)) { + newType = arkts.factory.createETSFunctionType( + property.typeAnnotation.typeParams, + property.typeAnnotation.params, + property.typeAnnotation.returnType, + false, + property.typeAnnotation.flags + ); + } + const newProperty = arkts.factory.createClassProperty( + arkts.factory.createIdentifier(name, undefined), + undefined, + stageManagementIdent.length ? createStageManagementType(stageManagementIdent, property) : + newType, + modifiers, + false + ); + return arkts.classPropertySetOptional(newProperty, true); +} + +export function createStageManagementType(stageManagementIdent: string, property: arkts.ClassProperty): arkts.ETSTypeReference { + let newType: arkts.TypeNode | undefined = property.typeAnnotation; + if (property.typeAnnotation && arkts.isETSFunctionType(property.typeAnnotation)) { + newType = arkts.factory.createETSFunctionType( + property.typeAnnotation.typeParams, + property.typeAnnotation.params, + property.typeAnnotation.returnType, + false, + property.typeAnnotation.flags + ); + } + return arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart( + arkts.factory.createIdentifier(stageManagementIdent, undefined), + arkts.factory.createTSTypeParameterInstantiation( + [ + newType ? newType : + arkts.factory.createETSUndefinedType(), + ] + ), + undefined + ) + ); +} + +export function makeImport(what: string, asWhat: string, where: string) { + const source: arkts.StringLiteral = arkts.factory.createStringLiteral(where) + return arkts.factory.createETSImportDeclaration( + source, + [ + arkts.factory.createImportSpecifier( + arkts.factory.createIdentifier(what), + arkts.factory.createIdentifier(asWhat) + ) + ], + arkts.Es2pandaImportKinds.IMPORT_KINDS_ALL + ) +} + +export class Importer { + storage = new Map() + private defaultArkUIImports1 = [ + 'Color', + 'ClickEvent', 'FlexAlign', + 'Image', 'Button', 'List', + 'PageTransitionEnter', 'PageTransitionExit', 'PageTransitionOptions', + 'Column', 'ColumnOptions', 'Row', 'RowOptions', + 'FlexOptions', 'TabsOptions', 'StackOptions', 'ToggleOptions', 'TextInputOptions', + 'TestComponent', 'TestComponentOptions', 'ForEach', 'Text', + 'Margin', 'Padding', 'BorderOptions', 'Curve', 'RouteType', 'TextOverflowOptions', + 'Flex', 'FlexWrap', 'HorizontalAlign', 'Scroll', 'Tabs', 'TabsController', 'TabContent', + 'NavDestination', 'NavPathStack', + 'IDataSource', 'DataChangeListener', 'ItemAlign', 'ImageFit', 'FlexDirection', + 'FontWeight', 'Counter', 'Toggle', 'ToggleType', 'BarMode', 'TextAlign', 'VerticalAlign', + 'TextOverflow', 'BarState', 'NavPathInfo', 'Stack', 'Swiper', + 'ListItem', 'Navigator', 'Position', 'Axis', + 'TextInput', 'Font', 'Alignment', 'Visibility', 'ImageRepeat', 'SizeOptions', 'Divider', + 'TabBarOptions', 'Navigation', 'Span', 'NavigationMode', 'BarPosition', 'EnterKeyType', + 'LazyForEach', + 'UITestComponentAttribute', 'ForEach', 'Text', + 'AppStorage', 'LocalStorage', 'AbstractProperty', 'SubscribedAbstractProperty', + ] + private defaultArkUIImports2 = [ 'TestComponentOptions' ] + + constructor() { + const withDefaultImports = isKoalaWorkspace() ? true : false + if (withDefaultImports) { + this.defaultArkUIImports2.forEach(it => { + this.add(it, 'arkui') + }) + } + } + add(what: string, where: string, asWhat?: string) { + const previous = this.storage.get(what) + if (!asWhat) + asWhat = what + if (previous != undefined && (previous[0] != where || previous[1] != asWhat)) + throw new Error(`Mismatching import ${what} from ${where}`) + this.storage.set(what, [where, asWhat]) + } + emit(statements: readonly arkts.Statement[]): arkts.Statement[] { + const newStatements = [...statements] + this.storage.forEach(([where, asWhat], what) => { + newStatements.unshift(makeImport(what, asWhat, where)) + }) + return newStatements + } +} + +export interface ImportingTransformer { + collectImports(imports: Importer): void +} + +export function createETSTypeReference(typeName: string, typeParamsName?: string[]) { + const typeParams = typeParamsName + ? arkts.factory.createTSTypeParameterInstantiation( + typeParamsName.map(name => arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart(arkts.factory.createIdentifier(name)) + )) + ) : undefined + return arkts.factory.createETSTypeReference( + arkts.factory.createETSTypeReferencePart(arkts.factory.createIdentifier(typeName), typeParams) + ) +} + +export enum DecoratorNames { + ENTRY = "Entry", + COMPONENT = "Component", + COMPONENT_V2 = "ComponentV2", + REUSABLE = "Reusable", + STATE = "State", + STORAGE_LINK = "StorageLink", + STORAGE_PROP = "StorageProp", + LINK = "Link", + PROP = "Prop", + PROVIDE = "Provide", + PROVIDER = "Provider", + CONSUME = "Consume", + CONSUMER = "Consumer", + OBJECT_LINK = "ObjectLink", + OBSERVED = "Observed", + OBSERVED_V2 = "ObservedV2", + WATCH = "Watch", + BUILDER_PARAM = "BuilderParam", + BUILDER = "Builder", + CUSTOM_DIALOG = "CustomDialog", + LOCAL_STORAGE_PROP = "LocalStorageProp", + LOCAL_STORAGE_LINK = "LocalStorageLink", + LOCAL_BUILDER = "LocalBuilder", + TRACK = "Track", + TRACE = "Trace", + TYPE = "Type", + LOCAL = "Local", + ONCE = "Once", + EVENT = "Event", + PARAM = "Param" +} + +const DECORATOR_NAMES_SET = new Set(Object.values(DecoratorNames)); + +export enum DecoratorParameters { + USE_SHARED_STORAGE = "useSharedStorage", + ALLOW_OVERRIDE = "allowOverride", +} + +export function hasEntryAnnotation(node: arkts.ClassDefinition): boolean { + return node.annotations.some((it) => + it.expr !== undefined && arkts.isIdentifier(it.expr) && it.expr.name === DecoratorNames.ENTRY + ) +} + +export function getAnnotationName(anno: arkts.AnnotationUsage): string | undefined { + if (!anno.expr) { + return undefined + } + return arkts.isIdentifier(anno.expr) ? anno.expr.name : undefined +} + +export function getDecoratorName(anno: arkts.AnnotationUsage): DecoratorNames | undefined { + const name = getAnnotationName(anno); + return name && DECORATOR_NAMES_SET.has(name as DecoratorNames) + ? name as DecoratorNames + : undefined +} + +export function isDecoratorAnnotation(anno: arkts.AnnotationUsage, decoratorName: DecoratorNames): boolean { + return getAnnotationName(anno) === decoratorName; +} + +export function hasDecorator(property: + arkts.ClassProperty | + arkts.ClassDefinition | + arkts.ClassDeclaration | + arkts.MethodDefinition | + arkts.FunctionDeclaration | + arkts.ETSParameterExpression | + arkts.TSTypeAliasDeclaration | + arkts.ETSFunctionType, + decoratorName: DecoratorNames +): boolean { + if (arkts.isMethodDefinition(property)) { + return findDecorator(property.function!.annotations, decoratorName) != undefined + } + if (arkts.isETSStructDeclaration(property)) { + return findDecorator(property.definition!.annotations, decoratorName) != undefined + } + if (arkts.isClassDeclaration(property)) { + return findDecorator(property.definition!.annotations, decoratorName) != undefined + } + return findDecorator(property.annotations, decoratorName) != undefined +} + +export function replaceParameterDecorator(node: arkts.ETSParameterExpression, oldName: DecoratorNames, newName: string) { + if (node.annotations.find(annotation => annotation.baseName?.name == oldName) == undefined) return node + let newAnnotations = node.annotations?.map(anno => isDecoratorAnnotation(anno, oldName) ? annotation(newName) : anno) + return arkts.factory.updateETSParameterExpression(node, node.ident, node.isOptional, node.initializer, newAnnotations) +} + +export function replaceTypeAliasDecorator(node: arkts.TSTypeAliasDeclaration, oldName: DecoratorNames, newName: string) { + if (node.annotations.find(annotation => annotation.baseName?.name == oldName) == undefined) return node + let newAnnotations = node.annotations?.map(anno => isDecoratorAnnotation(anno, oldName) ? annotation(newName) : anno) + return arkts.factory.updateTSTypeAliasDeclaration(node, node.id, node.typeParams, node.typeAnnotation, newAnnotations, node.modifierFlags) +} + +export function replaceFunctionTypeDecorator(node: arkts.ETSFunctionType, oldName: DecoratorNames, newName: string) { + if (node.annotations.find(annotation => annotation.baseName?.name == oldName) == undefined) return node + let newAnnotations = node.annotations?.map(anno => isDecoratorAnnotation(anno, oldName) ? annotation(newName) : anno) + return arkts.factory.updateETSFunctionType(node, node.typeParams, node.params, node.returnType, node.isExtensionFunction, node.flags, newAnnotations) +} + + +export function hasBuilderDecorator(property: arkts.ClassProperty | arkts.ClassDefinition | arkts.ClassDeclaration | arkts.MethodDefinition | arkts.FunctionDeclaration): boolean { + return hasDecorator(property, DecoratorNames.BUILDER) || hasDecorator(property, DecoratorNames.LOCAL_BUILDER) +} + +export function getStageManagmentType(node: arkts.ClassProperty): string { + if (hasDecorator(node, DecoratorNames.STATE)) { + return "StateDecoratedVariable"; + } else if (hasDecorator(node, DecoratorNames.PROP) || hasDecorator(node, DecoratorNames.STORAGE_PROP) || + hasDecorator(node, DecoratorNames.LOCAL_STORAGE_PROP) || hasDecorator(node, DecoratorNames.OBJECT_LINK) + ) { + return "SyncedProperty"; + } + return "MutableState"; +} + +export function createGetter( + name: string, + type: arkts.TypeNode | undefined, + returns: arkts.Expression +): arkts.MethodDefinition { + const body = arkts.factory.createBlockStatement( + [arkts.factory.createReturnStatement(returns)] + ) + + const scriptFunction = arkts.factory.createScriptFunction( + body, + undefined, + [], + type?.clone(), + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_GETTER, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + arkts.factory.createIdentifier(name), + undefined + ) + + return arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_GET, + arkts.factory.createIdentifier(name), + arkts.factory.createFunctionExpression(arkts.factory.createIdentifier(name), scriptFunction), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + false + ); +} + +export function createSetter( + name: string, + type: arkts.TypeNode | undefined, + left: arkts.Expression, + right: arkts.Expression, + needMemo: boolean = false +): arkts.MethodDefinition { + const body = arkts.factory.createBlockStatement( + [ + arkts.factory.createExpressionStatement(arkts.factory.createAssignmentExpression( + left, + right, + arkts.Es2pandaTokenType.TOKEN_TYPE_PUNCTUATOR_SUBSTITUTION + )) + ] + ) + const param: arkts.ETSParameterExpression = arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier('value', type?.clone()), + false + ); + if (needMemo) { + param.setAnnotations([annotation(InternalAnnotations.MEMO)]) + } + const scriptFunction = arkts.factory.createScriptFunction( + body, + undefined, + [param], + undefined, + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_SETTER, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + arkts.factory.createIdentifier(name), + undefined + ) + + return arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_SET, + arkts.factory.createIdentifier(name), + arkts.factory.createFunctionExpression(arkts.factory.createIdentifier(name), scriptFunction), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + false + ); +} + +export function createSetter2( + name: string, + type: arkts.TypeNode | undefined, + statement: arkts.Statement +): arkts.MethodDefinition { + const body = arkts.factory.createBlockStatement([statement]); + const param: arkts.ETSParameterExpression = arkts.factory.createETSParameterExpression( + arkts.factory.createIdentifier('value', type?.clone()), + false + ); + const scriptFunction = arkts.factory.createScriptFunction( + body, + undefined, + [param], + undefined, + false, + arkts.Es2pandaScriptFunctionFlags.SCRIPT_FUNCTION_FLAGS_SETTER, + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + arkts.factory.createIdentifier(name), + undefined + ); + + return arkts.factory.createMethodDefinition( + arkts.Es2pandaMethodDefinitionKind.METHOD_DEFINITION_KIND_SET, + arkts.factory.createIdentifier(name), + arkts.factory.createFunctionExpression(arkts.factory.createIdentifier(name), scriptFunction), + arkts.Es2pandaModifierFlags.MODIFIER_FLAGS_PUBLIC, + false + ); +} + +export function generateThisBackingValue( + name: string, + optional: boolean = false, + nonNull: boolean = false +): arkts.MemberExpression { + const member: arkts.Expression = generateThisBacking(name, optional, nonNull); + return arkts.factory.createMemberExpression( + member, + arkts.factory.createIdentifier('value', undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ); +} + +export function generateThisBacking( + name: string, + optional: boolean = false, + nonNull: boolean = false +): arkts.Expression { + const member: arkts.Expression = arkts.factory.createMemberExpression( + arkts.factory.createThisExpression(), + arkts.factory.createIdentifier(name, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + optional + ); + return nonNull ? arkts.factory.createTSNonNullExpression(member) : member; +} + +function getValueStr(node: arkts.AstNode): string | undefined { + if (!arkts.isClassProperty(node) || !node.value) return undefined; + return arkts.isStringLiteral(node.value) ? node.value.str : undefined; +} + +function getAnnotationValue(anno: arkts.AnnotationUsage, decoratorName: DecoratorNames): string | undefined { + const isSuitableAnnotation: boolean = !!anno.expr + && arkts.isIdentifier(anno.expr) + && anno.expr.name === decoratorName; + if (isSuitableAnnotation && anno.properties.length === 1) { + return getValueStr(anno.properties.at(0)!); + } + return undefined; +} + +export function getValueInDecorator(node: arkts.ClassProperty, decoratorName: DecoratorNames): string | undefined { + const annotations: readonly arkts.AnnotationUsage[] = node.annotations; + for (let i = 0; i < annotations.length; i++) { + const anno: arkts.AnnotationUsage = annotations[i]; + const str: string | undefined = getAnnotationValue(anno, decoratorName); + if (!!str) { + return str; + } + } + return undefined; +} + +export function generateGetOrSetCall(beforCall: arkts.Expression, type: string) { + return arkts.factory.createCallExpression( + arkts.factory.createMemberExpression( + beforCall, + arkts.factory.createIdentifier(type, undefined), + arkts.Es2pandaMemberExpressionKind.MEMBER_EXPRESSION_KIND_PROPERTY_ACCESS, + false, + false + ), + type === "set" ? [arkts.factory.createIdentifier("value", undefined)] : [], + undefined, + false, + false, + undefined, + ); +} + +export function findDecorator(annotations: readonly arkts.AnnotationUsage[], decoratorName: DecoratorNames): arkts.AnnotationUsage | undefined { + return annotations.find(anno => isDecoratorAnnotation(anno, decoratorName) ? anno : undefined) +} + +export function getDecoratorProperties(anno: arkts.AnnotationUsage | undefined): Array<[arkts.Identifier, arkts.Expression | undefined]> { + return anno + ? anno.properties + .filter((prop): prop is arkts.ClassProperty & { key: arkts.Identifier } => + arkts.isClassProperty(prop) && arkts.isIdentifier(prop.key) + ) + .map(prop => [prop.key, prop.value]) + : [] +} + +export function createThrowError(message?: string): arkts.ThrowStatement { + return arkts.factory.createThrowStatement( + arkts.factory.createETSNewClassInstanceExpression( + createETSTypeReference("Error"), + message ? [arkts.factory.createStringLiteral(message)] : [] + ) + ) +} \ No newline at end of file diff --git a/koala_tools/ui2abc/ui-plugins/tsconfig.json b/koala_tools/ui2abc/ui-plugins/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..3853af984543804b8aaeb2e1159417a71e825cb4 --- /dev/null +++ b/koala_tools/ui2abc/ui-plugins/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "@koalaui/build-common/tsconfig.json", + "compilerOptions": { + "outDir": "build", + "baseUrl": ".", + "rootDir": ".", + "module": "CommonJS" + }, + "include": [ + "./src/**/*.ts" + ], + "references": [ + {"path": "../libarkts"} + ] +}