@triniwiz/nativescript-masonkit 1.0.0-alpha.4 → 1.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common.d.ts +7 -9
- package/common.js +277 -552
- package/common.js.map +1 -1
- package/helpers.d.ts +32 -10
- package/helpers.js +772 -286
- package/helpers.js.map +1 -1
- package/index.android.d.ts +6 -2
- package/index.android.js +21 -3
- package/index.android.js.map +1 -1
- package/index.d.ts +64 -7
- package/index.ios.d.ts +9 -6
- package/index.ios.js +39 -25
- package/index.ios.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/include.gradle +18 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +108 -64
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +47 -20
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +6692 -794
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +216 -128
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +47 -20
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +6692 -794
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +6692 -794
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +58 -21
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +43 -43
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/build.xcconfig +1 -2
- package/platforms/ios/src/MasonV8Module.h +583 -0
- package/platforms/ios/src/MasonV8Module.mm +1005 -0
- package/platforms/ios/src/{include → cpp/include}/mason_native.h +47 -20
- package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
- package/platforms/ios/src/module.modulemap +2 -2
- package/platforms/new_native_src/cpp/Caches.cpp +36 -0
- package/platforms/new_native_src/cpp/Caches.h +42 -0
- package/platforms/new_native_src/cpp/Common.h +34 -0
- package/platforms/new_native_src/cpp/ConcurrentMap.h +57 -0
- package/platforms/new_native_src/cpp/Helpers.cpp +101 -0
- package/platforms/new_native_src/cpp/Helpers.h +364 -0
- package/platforms/new_native_src/cpp/MasonImpl.cpp +68 -0
- package/platforms/new_native_src/cpp/MasonImpl.h +40 -0
- package/platforms/new_native_src/cpp/MasonNodeImpl.cpp +89 -0
- package/platforms/new_native_src/cpp/MasonNodeImpl.h +47 -0
- package/platforms/new_native_src/cpp/MasonStyleImpl.cpp +2181 -0
- package/platforms/new_native_src/cpp/MasonStyleImpl.h +420 -0
- package/platforms/{ios/Mason.xcframework/ios-arm64/Mason.framework/PrivateHeaders → new_native_src/cpp/include}/mason_native.h +464 -168
- package/platforms/new_native_src/cpp/include/robin_hood.h +2544 -0
- package/pods/Headers/include/APIDesign.md +72 -0
- package/pods/Headers/include/DEPS +10 -0
- package/pods/Headers/include/DIR_METADATA +11 -0
- package/pods/Headers/include/OWNERS +23 -0
- package/pods/Headers/include/cppgc/DEPS +8 -0
- package/pods/Headers/include/cppgc/OWNERS +2 -0
- package/pods/Headers/include/cppgc/README.md +133 -0
- package/pods/Headers/include/cppgc/allocation.h +310 -0
- package/pods/Headers/include/cppgc/common.h +29 -0
- package/pods/Headers/include/cppgc/cross-thread-persistent.h +465 -0
- package/pods/Headers/include/cppgc/custom-space.h +97 -0
- package/pods/Headers/include/cppgc/default-platform.h +67 -0
- package/pods/Headers/include/cppgc/ephemeron-pair.h +30 -0
- package/pods/Headers/include/cppgc/explicit-management.h +100 -0
- package/pods/Headers/include/cppgc/garbage-collected.h +106 -0
- package/pods/Headers/include/cppgc/heap-consistency.h +266 -0
- package/pods/Headers/include/cppgc/heap-state.h +82 -0
- package/pods/Headers/include/cppgc/heap-statistics.h +120 -0
- package/pods/Headers/include/cppgc/heap.h +206 -0
- package/pods/Headers/include/cppgc/internal/api-constants.h +55 -0
- package/pods/Headers/include/cppgc/internal/atomic-entry-flag.h +48 -0
- package/pods/Headers/include/cppgc/internal/caged-heap-local-data.h +79 -0
- package/pods/Headers/include/cppgc/internal/compiler-specific.h +38 -0
- package/pods/Headers/include/cppgc/internal/finalizer-trait.h +93 -0
- package/pods/Headers/include/cppgc/internal/gc-info.h +156 -0
- package/pods/Headers/include/cppgc/internal/logging.h +50 -0
- package/pods/Headers/include/cppgc/internal/name-trait.h +122 -0
- package/pods/Headers/include/cppgc/internal/persistent-node.h +216 -0
- package/pods/Headers/include/cppgc/internal/pointer-policies.h +186 -0
- package/pods/Headers/include/cppgc/internal/write-barrier.h +435 -0
- package/pods/Headers/include/cppgc/liveness-broker.h +77 -0
- package/pods/Headers/include/cppgc/macros.h +26 -0
- package/pods/Headers/include/cppgc/member.h +291 -0
- package/pods/Headers/include/cppgc/name-provider.h +65 -0
- package/pods/Headers/include/cppgc/object-size-trait.h +58 -0
- package/pods/Headers/include/cppgc/persistent.h +370 -0
- package/pods/Headers/include/cppgc/platform.h +156 -0
- package/pods/Headers/include/cppgc/prefinalizer.h +75 -0
- package/pods/Headers/include/cppgc/process-heap-statistics.h +36 -0
- package/pods/Headers/include/cppgc/sentinel-pointer.h +32 -0
- package/pods/Headers/include/cppgc/source-location.h +92 -0
- package/pods/Headers/include/cppgc/testing.h +106 -0
- package/pods/Headers/include/cppgc/trace-trait.h +116 -0
- package/pods/Headers/include/cppgc/type-traits.h +240 -0
- package/pods/Headers/include/cppgc/visitor.h +379 -0
- package/pods/Headers/include/js_protocol-1.2.json +936 -0
- package/pods/Headers/include/js_protocol-1.3.json +1112 -0
- package/pods/Headers/include/js_protocol.pdl +1709 -0
- package/pods/Headers/include/libffi/arm64/ffi.h +524 -0
- package/pods/Headers/include/libffi/arm64/ffitarget.h +92 -0
- package/pods/Headers/include/libffi/x86_64/ffi.h +524 -0
- package/pods/Headers/include/libffi/x86_64/ffitarget.h +147 -0
- package/pods/Headers/include/libffi.h +12 -0
- package/pods/Headers/include/libplatform/DEPS +9 -0
- package/pods/Headers/include/libplatform/libplatform-export.h +29 -0
- package/pods/Headers/include/libplatform/libplatform.h +106 -0
- package/pods/Headers/include/libplatform/v8-tracing.h +333 -0
- package/pods/Headers/include/v8-array-buffer.h +433 -0
- package/pods/Headers/include/v8-callbacks.h +397 -0
- package/pods/Headers/include/v8-container.h +129 -0
- package/pods/Headers/include/v8-context.h +407 -0
- package/pods/Headers/include/v8-cppgc.h +215 -0
- package/pods/Headers/include/v8-data.h +80 -0
- package/pods/Headers/include/v8-date.h +43 -0
- package/pods/Headers/include/v8-debug.h +168 -0
- package/pods/Headers/include/v8-embedder-heap.h +218 -0
- package/pods/Headers/include/v8-embedder-state-scope.h +51 -0
- package/pods/Headers/include/v8-exception.h +217 -0
- package/pods/Headers/include/v8-extension.h +62 -0
- package/pods/Headers/include/v8-external.h +37 -0
- package/pods/Headers/include/v8-fast-api-calls.h +939 -0
- package/pods/Headers/include/v8-forward.h +81 -0
- package/pods/Headers/include/v8-function-callback.h +475 -0
- package/pods/Headers/include/v8-function.h +125 -0
- package/pods/Headers/include/v8-initialization.h +315 -0
- package/pods/Headers/include/v8-inspector-protocol.h +13 -0
- package/pods/Headers/include/v8-inspector.h +376 -0
- package/pods/Headers/include/v8-internal.h +661 -0
- package/pods/Headers/include/v8-isolate.h +1709 -0
- package/pods/Headers/include/v8-json.h +47 -0
- package/pods/Headers/include/v8-local-handle.h +455 -0
- package/pods/Headers/include/v8-locker.h +149 -0
- package/pods/Headers/include/v8-maybe.h +137 -0
- package/pods/Headers/include/v8-memory-span.h +43 -0
- package/pods/Headers/include/v8-message.h +216 -0
- package/pods/Headers/include/v8-metrics.h +255 -0
- package/pods/Headers/include/v8-microtask-queue.h +152 -0
- package/pods/Headers/include/v8-microtask.h +28 -0
- package/pods/Headers/include/v8-object.h +775 -0
- package/pods/Headers/include/v8-persistent-handle.h +590 -0
- package/pods/Headers/include/v8-platform.h +1092 -0
- package/pods/Headers/include/v8-primitive-object.h +118 -0
- package/pods/Headers/include/v8-primitive.h +866 -0
- package/pods/Headers/include/v8-profiler.h +1198 -0
- package/pods/Headers/include/v8-promise.h +174 -0
- package/pods/Headers/include/v8-proxy.h +50 -0
- package/pods/Headers/include/v8-regexp.h +105 -0
- package/pods/Headers/include/v8-script.h +748 -0
- package/pods/Headers/include/v8-snapshot.h +196 -0
- package/pods/Headers/include/v8-statistics.h +217 -0
- package/pods/Headers/include/v8-template.h +1079 -0
- package/pods/Headers/include/v8-traced-handle.h +420 -0
- package/pods/Headers/include/v8-typed-array.h +282 -0
- package/pods/Headers/include/v8-unwinder-state.h +31 -0
- package/pods/Headers/include/v8-unwinder.h +132 -0
- package/pods/Headers/include/v8-util.h +658 -0
- package/pods/Headers/include/v8-value-serializer-version.h +24 -0
- package/pods/Headers/include/v8-value-serializer.h +279 -0
- package/pods/Headers/include/v8-value.h +526 -0
- package/pods/Headers/include/v8-version-string.h +38 -0
- package/pods/Headers/include/v8-version.h +20 -0
- package/pods/Headers/include/v8-wasm-trap-handler-posix.h +31 -0
- package/pods/Headers/include/v8-wasm-trap-handler-win.h +28 -0
- package/pods/Headers/include/v8-wasm.h +257 -0
- package/pods/Headers/include/v8-weak-callback-info.h +86 -0
- package/pods/Headers/include/v8.h +88 -0
- package/pods/Headers/include/v8config.h +605 -0
- package/pods/Headers/inspector/InspectorServer.h +20 -0
- package/pods/Headers/inspector/JsV8InspectorClient.h +66 -0
- package/pods/Headers/inspector/base/trace_event/common/trace_event_common.h +1123 -0
- package/pods/Headers/inspector/base64.h +9 -0
- package/pods/Headers/inspector/src/base/address-region.h +95 -0
- package/pods/Headers/inspector/src/base/atomic-utils.h +219 -0
- package/pods/Headers/inspector/src/base/atomicops.h +332 -0
- package/pods/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +89 -0
- package/pods/Headers/inspector/src/base/base-export.h +31 -0
- package/pods/Headers/inspector/src/base/bits.h +343 -0
- package/pods/Headers/inspector/src/base/build_config.h +234 -0
- package/pods/Headers/inspector/src/base/compiler-specific.h +136 -0
- package/pods/Headers/inspector/src/base/export-template.h +163 -0
- package/pods/Headers/inspector/src/base/flags.h +130 -0
- package/pods/Headers/inspector/src/base/immediate-crash.h +162 -0
- package/pods/Headers/inspector/src/base/lazy-instance.h +258 -0
- package/pods/Headers/inspector/src/base/logging.h +417 -0
- package/pods/Headers/inspector/src/base/macros.h +423 -0
- package/pods/Headers/inspector/src/base/memory.h +89 -0
- package/pods/Headers/inspector/src/base/once.h +108 -0
- package/pods/Headers/inspector/src/base/optional.h +882 -0
- package/pods/Headers/inspector/src/base/platform/mutex.h +370 -0
- package/pods/Headers/inspector/src/base/platform/platform.h +476 -0
- package/pods/Headers/inspector/src/base/platform/semaphore.h +108 -0
- package/pods/Headers/inspector/src/base/platform/v8-time.h +513 -0
- package/pods/Headers/inspector/src/base/platform/wrappers.h +73 -0
- package/pods/Headers/inspector/src/base/safe_conversions.h +389 -0
- package/pods/Headers/inspector/src/base/safe_conversions_impl.h +822 -0
- package/pods/Headers/inspector/src/base/template-utils.h +113 -0
- package/pods/Headers/inspector/src/base/v8-fallthrough.h +21 -0
- package/pods/Headers/inspector/src/common/checks.h +38 -0
- package/pods/Headers/inspector/src/common/globals.h +1842 -0
- package/pods/Headers/inspector/src/debug/debug-interface.h +667 -0
- package/pods/Headers/inspector/src/debug/interface-types.h +175 -0
- package/pods/Headers/inspector/src/init/v8.h +52 -0
- package/pods/Headers/inspector/src/inspector/custom-preview.h +24 -0
- package/pods/Headers/inspector/src/inspector/injected-script.h +251 -0
- package/pods/Headers/inspector/src/inspector/inspected-context.h +79 -0
- package/pods/Headers/inspector/src/inspector/protocol/CSS.h +2148 -0
- package/pods/Headers/inspector/src/inspector/protocol/Console.h +211 -0
- package/pods/Headers/inspector/src/inspector/protocol/DOM.h +1008 -0
- package/pods/Headers/inspector/src/inspector/protocol/Debugger.h +892 -0
- package/pods/Headers/inspector/src/inspector/protocol/Forward.h +75 -0
- package/pods/Headers/inspector/src/inspector/protocol/HeapProfiler.h +346 -0
- package/pods/Headers/inspector/src/inspector/protocol/Log.h +342 -0
- package/pods/Headers/inspector/src/inspector/protocol/Network.h +2528 -0
- package/pods/Headers/inspector/src/inspector/protocol/Overlay.h +281 -0
- package/pods/Headers/inspector/src/inspector/protocol/Page.h +1189 -0
- package/pods/Headers/inspector/src/inspector/protocol/Profiler.h +1001 -0
- package/pods/Headers/inspector/src/inspector/protocol/Protocol.h +617 -0
- package/pods/Headers/inspector/src/inspector/protocol/Runtime.h +1696 -0
- package/pods/Headers/inspector/src/inspector/protocol/Schema.h +146 -0
- package/pods/Headers/inspector/src/inspector/protocol/Security.h +793 -0
- package/pods/Headers/inspector/src/inspector/remote-object-id.h +54 -0
- package/pods/Headers/inspector/src/inspector/search-util.h +26 -0
- package/pods/Headers/inspector/src/inspector/string-16.h +180 -0
- package/pods/Headers/inspector/src/inspector/string-util.h +128 -0
- package/pods/Headers/inspector/src/inspector/v8-console-agent-impl.h +48 -0
- package/pods/Headers/inspector/src/inspector/v8-console-message.h +147 -0
- package/pods/Headers/inspector/src/inspector/v8-console.h +173 -0
- package/pods/Headers/inspector/src/inspector/v8-css-agent-impl.h +62 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +248 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-id.h +44 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger-script.h +123 -0
- package/pods/Headers/inspector/src/inspector/v8-debugger.h +257 -0
- package/pods/Headers/inspector/src/inspector/v8-dom-agent-impl.h +91 -0
- package/pods/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +80 -0
- package/pods/Headers/inspector/src/inspector/v8-inspector-impl.h +191 -0
- package/pods/Headers/inspector/src/inspector/v8-inspector-session-impl.h +156 -0
- package/pods/Headers/inspector/src/inspector/v8-log-agent-impl.h +34 -0
- package/pods/Headers/inspector/src/inspector/v8-network-agent-impl.h +71 -0
- package/pods/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +24 -0
- package/pods/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +70 -0
- package/pods/Headers/inspector/src/inspector/v8-page-agent-impl.h +88 -0
- package/pods/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +104 -0
- package/pods/Headers/inspector/src/inspector/v8-regex.h +38 -0
- package/pods/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +157 -0
- package/pods/Headers/inspector/src/inspector/v8-schema-agent-impl.h +38 -0
- package/pods/Headers/inspector/src/inspector/v8-stack-trace-impl.h +164 -0
- package/pods/Headers/inspector/src/inspector/v8-string-conversions.h +17 -0
- package/pods/Headers/inspector/src/inspector/v8-value-utils.h +23 -0
- package/pods/Headers/inspector/src/inspector/value-mirror.h +87 -0
- package/pods/Headers/inspector/src/libplatform/default-platform.h +92 -0
- package/pods/Headers/inspector/src/logging/tracing-flags.h +50 -0
- package/pods/Headers/inspector/src/numbers/conversions.h +183 -0
- package/pods/Headers/inspector/src/tracing/trace-event.h +664 -0
- package/pods/Headers/inspector/src/utils/allocation.h +367 -0
- package/pods/Headers/inspector/src/utils/vector.h +324 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +305 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +314 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +62 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +6 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +58 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +47 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +80 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +52 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +26 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +104 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +39 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +406 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +32 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +158 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +99 -0
- package/pods/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +139 -0
- package/pods/Headers/inspector/utils.h +32 -0
- package/pods/Headers/inspector/v8-inspector-platform.h +44 -0
- package/pods/Headers/jsi/decorator.h +762 -0
- package/pods/Headers/jsi/instrumentation.h +117 -0
- package/pods/Headers/jsi/jsi-inl.h +322 -0
- package/pods/Headers/jsi/jsi.h +1387 -0
- package/pods/Headers/jsi/jsilib.h +59 -0
- package/pods/Headers/jsi/threadsafe.h +79 -0
- package/pods/Headers/runtime/ArgConverter.h +61 -0
- package/pods/Headers/runtime/ArrayAdapter.h +13 -0
- package/pods/Headers/runtime/Caches.h +98 -0
- package/pods/Headers/runtime/ClassBuilder.h +61 -0
- package/pods/Headers/runtime/Common.h +9 -0
- package/pods/Headers/runtime/ConcurrentMap.h +55 -0
- package/pods/Headers/runtime/ConcurrentQueue.h +28 -0
- package/pods/Headers/runtime/Console.h +27 -0
- package/pods/Headers/runtime/Constants.h +15 -0
- package/pods/Headers/runtime/DataWrapper.h +671 -0
- package/pods/Headers/runtime/DictionaryAdapter.h +13 -0
- package/pods/Headers/runtime/ExtVector.h +21 -0
- package/pods/Headers/runtime/FFICall.h +105 -0
- package/pods/Headers/runtime/FastEnumerationAdapter.h +13 -0
- package/pods/Headers/runtime/FunctionReference.h +18 -0
- package/pods/Headers/runtime/Helpers.h +84 -0
- package/pods/Headers/runtime/InlineFunctions.h +16 -0
- package/pods/Headers/runtime/Interop.h +202 -0
- package/pods/Headers/runtime/KnownUnknownClassPair.h +35 -0
- package/pods/Headers/runtime/Metadata.h +981 -0
- package/pods/Headers/runtime/MetadataBuilder.h +72 -0
- package/pods/Headers/runtime/MetadataInlines.h +157 -0
- package/pods/Headers/runtime/ModuleInternal.h +59 -0
- package/pods/Headers/runtime/NSDataAdapter.h +13 -0
- package/pods/Headers/runtime/NativeScriptException.h +27 -0
- package/pods/Headers/runtime/ObjectManager.h +31 -0
- package/pods/Headers/runtime/OneByteStringResource.h +21 -0
- package/pods/Headers/runtime/Pointer.h +26 -0
- package/pods/Headers/runtime/PromiseProxy.h +15 -0
- package/pods/Headers/runtime/Reference.h +38 -0
- package/pods/Headers/runtime/Runtime.h +67 -0
- package/pods/Headers/runtime/RuntimeConfig.h +17 -0
- package/pods/Headers/runtime/SetTimeout.h +34 -0
- package/pods/Headers/runtime/SimpleAllocator.h +23 -0
- package/pods/Headers/runtime/StringHasher.h +315 -0
- package/pods/Headers/runtime/SymbolIterator.h +18 -0
- package/pods/Headers/runtime/SymbolLoader.h +27 -0
- package/pods/Headers/runtime/TNSDerivedClass.h +8 -0
- package/pods/Headers/runtime/TSHelpers.h +15 -0
- package/pods/Headers/runtime/Tasks.h +19 -0
- package/pods/Headers/runtime/UnmanagedType.h +21 -0
- package/pods/Headers/runtime/WeakRef.h +15 -0
- package/pods/Headers/runtime/Worker.h +26 -0
- package/pods/Headers/runtime/robin_hood.h +2184 -0
- package/pods/Headers/v8runtime/HostProxy.h +71 -0
- package/pods/Headers/v8runtime/JSIV8ValueConverter.h +70 -0
- package/pods/Headers/v8runtime/V8PointerValue.h +44 -0
- package/pods/Headers/v8runtime/V8Runtime.h +215 -0
- package/pods/Headers/v8runtime/V8RuntimeConfig.h +26 -0
- package/pods/Headers/v8runtime/V8RuntimeFactory.h +21 -0
- package/pods/NativeScript.podspec +68 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/PrivateHeaders/mason_native.h +0 -676
- package/platforms/ios/src/JSIModule.h +0 -217
- package/platforms/ios/src/JSIModule.mm +0 -2788
|
@@ -1,2788 +0,0 @@
|
|
|
1
|
-
#import "JSIModule.h"
|
|
2
|
-
#import "Mason/Mason-Swift.h"
|
|
3
|
-
|
|
4
|
-
using namespace facebook::jsi;
|
|
5
|
-
using namespace std;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
std::vector<CMasonMinMax> toNonRepeatedTrackSizingFunction(facebook::jsi::Runtime &runtime, facebook::jsi::Array &array) {
|
|
9
|
-
auto len = array.length(runtime);
|
|
10
|
-
|
|
11
|
-
std::vector<CMasonMinMax> buffer;
|
|
12
|
-
|
|
13
|
-
if (len == 0) {
|
|
14
|
-
return buffer;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
buffer.reserve(len);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
for (int i = 0; i < len; i++) {
|
|
21
|
-
auto value = array.getValueAtIndex(runtime, i).asObject(
|
|
22
|
-
runtime);
|
|
23
|
-
|
|
24
|
-
// object {type: number, min_type: number, min_value: number, max_type: number, max_value: number};
|
|
25
|
-
auto min_type = (int) value.getProperty(runtime, "min_type").getNumber();
|
|
26
|
-
auto min_value = (float) value.getProperty(runtime, "min_value").getNumber();
|
|
27
|
-
|
|
28
|
-
auto max_type = (int) value.getProperty(runtime, "max_type").getNumber();
|
|
29
|
-
auto max_value = (float) value.getProperty(runtime, "max_value").getNumber();
|
|
30
|
-
|
|
31
|
-
CMasonMinMax minMax;
|
|
32
|
-
minMax.min_type = min_type;
|
|
33
|
-
minMax.min_value = min_value;
|
|
34
|
-
minMax.max_type = max_type;
|
|
35
|
-
minMax.max_value = max_value;
|
|
36
|
-
|
|
37
|
-
buffer.push_back(minMax);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return buffer;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
void destroy_c_mason_track_sizing_function(CMasonTrackSizingFunction tracking){
|
|
44
|
-
switch (tracking.tag) {
|
|
45
|
-
case Repeat:
|
|
46
|
-
{
|
|
47
|
-
auto array = tracking.repeat._2;
|
|
48
|
-
if(array != nullptr){
|
|
49
|
-
free(array->array);
|
|
50
|
-
free(array);
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
break;
|
|
54
|
-
default:
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
std::vector<CMasonTrackSizingFunction> toTrackSizingFunction(facebook::jsi::Runtime &runtime, facebook::jsi::Array &array) {
|
|
61
|
-
|
|
62
|
-
auto len = array.length(runtime);
|
|
63
|
-
|
|
64
|
-
std::vector<CMasonTrackSizingFunction> buffer;
|
|
65
|
-
|
|
66
|
-
if (len == 0) {
|
|
67
|
-
return buffer;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
buffer.reserve(len);
|
|
71
|
-
|
|
72
|
-
for (int i = 0; i < len; i++) {
|
|
73
|
-
auto object = array.getValueAtIndex(runtime, i).asObject(runtime);
|
|
74
|
-
bool is_repeating = object.getProperty(runtime, "is_repeating").asBool();
|
|
75
|
-
auto repeating_type = (int)object.getProperty(runtime, "repeating_type").asNumber();
|
|
76
|
-
auto repeating_count = (short)object.getProperty(runtime, "repeating_count").asNumber();
|
|
77
|
-
auto value = object.getProperty(runtime, "value");
|
|
78
|
-
if(is_repeating){
|
|
79
|
-
auto value_array = value.asObject(runtime).asArray(runtime);
|
|
80
|
-
auto repeating_length = value_array.size(runtime);
|
|
81
|
-
|
|
82
|
-
auto min_max_size = sizeof(CMasonMinMax);
|
|
83
|
-
|
|
84
|
-
auto tracks = (CMasonMinMax*)malloc(repeating_length * min_max_size);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
for (int j = 0; j < repeating_length; j++) {
|
|
88
|
-
auto repeat_object = value_array.getValueAtIndex(runtime, j).asObject(runtime);
|
|
89
|
-
|
|
90
|
-
auto min_type = (int)repeat_object.getProperty(runtime, "min_type").asNumber();
|
|
91
|
-
auto min_value = (float)repeat_object.getProperty(runtime, "min_value").asNumber();
|
|
92
|
-
auto max_type = (int)repeat_object.getProperty(runtime, "max_type").asNumber();
|
|
93
|
-
auto max_value = (float)repeat_object.getProperty(runtime, "max_value").asNumber();
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
CMasonMinMax minMax;
|
|
97
|
-
minMax.min_type = min_type;
|
|
98
|
-
minMax.min_value = min_value;
|
|
99
|
-
|
|
100
|
-
minMax.max_type = max_type;
|
|
101
|
-
minMax.max_value = max_value;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
tracks[i * min_max_size] = minMax;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
CMasonTrackSizingFunction repeat;
|
|
109
|
-
repeat.tag = Repeat;
|
|
110
|
-
Repeat_Body body;
|
|
111
|
-
body._0 = repeating_type;
|
|
112
|
-
auto array = (CMasonNonRepeatedTrackSizingFunctionArray*)malloc(sizeof(CMasonNonRepeatedTrackSizingFunctionArray));
|
|
113
|
-
array->array = tracks;
|
|
114
|
-
array->length = repeating_length;
|
|
115
|
-
body._1 = repeating_count;
|
|
116
|
-
body._2 = array;
|
|
117
|
-
repeat.repeat = body;
|
|
118
|
-
buffer.emplace_back(repeat);
|
|
119
|
-
|
|
120
|
-
}else {
|
|
121
|
-
|
|
122
|
-
CMasonTrackSizingFunction single;
|
|
123
|
-
single.tag = Single;
|
|
124
|
-
|
|
125
|
-
auto single_object = value.asObject(runtime);
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
auto min_type = (int)single_object.getProperty(runtime, "min_type").asNumber();
|
|
130
|
-
auto min_value = (float)single_object.getProperty(runtime, "min_value").asNumber();
|
|
131
|
-
auto max_type = (int)single_object.getProperty(runtime, "max_type").asNumber();
|
|
132
|
-
auto max_value = (float)single_object.getProperty(runtime, "max_value").asNumber();
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
CMasonMinMax minMax;
|
|
136
|
-
minMax.min_type = min_type;
|
|
137
|
-
minMax.min_value = min_value;
|
|
138
|
-
|
|
139
|
-
minMax.max_type = max_type;
|
|
140
|
-
minMax.max_value = max_value;
|
|
141
|
-
|
|
142
|
-
single.single = minMax;
|
|
143
|
-
|
|
144
|
-
buffer.emplace_back(single);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
return buffer;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
template<typename NativeFunc>
|
|
153
|
-
static void createFunc(Runtime &jsiRuntime, const char *prop, int paramCount, NativeFunc &&func) {
|
|
154
|
-
auto f = Function::createFromHostFunction(jsiRuntime,
|
|
155
|
-
PropNameID::forAscii(jsiRuntime, prop),
|
|
156
|
-
paramCount,
|
|
157
|
-
std::forward<NativeFunc>(func));
|
|
158
|
-
jsiRuntime.global().setProperty(jsiRuntime, prop, std::move(f));
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
#define CREATE_FUNC(prop, paramCount, func) \
|
|
162
|
-
createFunc(jsiRuntime, prop, paramCount, func)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
static void* getPointerValue(const facebook::jsi::Value &value, facebook::jsi::Runtime &runtime) {
|
|
166
|
-
// todo switch to bigint
|
|
167
|
-
auto ptrValue = std::stoll(value.asString(runtime).utf8(runtime));
|
|
168
|
-
|
|
169
|
-
return reinterpret_cast<void*>(ptrValue);
|
|
170
|
-
|
|
171
|
-
//return reinterpret_cast<void*>(value.asBigInt(runtime).Int64Value(runtime));
|
|
172
|
-
// return reinterpret_cast<void*>((int64_t)value.asNumber());
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
void install(Runtime &jsiRuntime) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
CREATE_FUNC("__Mason_updateStyleWithValues", 77, [](Runtime &runtime, const Value &thisValue,
|
|
181
|
-
const Value *arguments, size_t count) -> Value {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
185
|
-
auto display = (int) arguments[1].asNumber();
|
|
186
|
-
auto position = (int) arguments[2].asNumber();
|
|
187
|
-
auto direction = (int) arguments[3].asNumber();
|
|
188
|
-
|
|
189
|
-
auto flexDirection = (int) arguments[4].asNumber();
|
|
190
|
-
auto flexWrap = (int) arguments[5].asNumber();
|
|
191
|
-
auto overflow = (int) arguments[6].asNumber();
|
|
192
|
-
|
|
193
|
-
auto alignItems = (int) arguments[7].asNumber();
|
|
194
|
-
auto alignSelf = (int) arguments[8].asNumber();
|
|
195
|
-
auto alignContent = (int) arguments[9].asNumber();
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
auto justifyItems = (int) arguments[10].asNumber();
|
|
199
|
-
auto justifySelf = (int) arguments[11].asNumber();
|
|
200
|
-
auto justifyContent = (int) arguments[12].asNumber();
|
|
201
|
-
|
|
202
|
-
auto insetLeftType = (int) arguments[13].asNumber();
|
|
203
|
-
auto insetLeftValue = (float) arguments[14].asNumber();
|
|
204
|
-
|
|
205
|
-
auto insetRightType = (int) arguments[15].asNumber();
|
|
206
|
-
auto insetRightValue = (float) arguments[16].asNumber();
|
|
207
|
-
|
|
208
|
-
auto insetTopType = (int) arguments[17].asNumber();
|
|
209
|
-
auto insetTopValue = (float) arguments[18].asNumber();
|
|
210
|
-
|
|
211
|
-
auto insetBottomType = (int) arguments[19].asNumber();
|
|
212
|
-
auto insetBottomValue = (float) arguments[20].asNumber();
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
auto marginLeftType = (int) arguments[21].asNumber();
|
|
216
|
-
auto marginLeftValue = (float) arguments[22].asNumber();
|
|
217
|
-
|
|
218
|
-
auto marginRightType = (int) arguments[23].asNumber();
|
|
219
|
-
auto marginRightValue = (float) arguments[24].asNumber();
|
|
220
|
-
|
|
221
|
-
auto marginTopType = (int) arguments[25].asNumber();
|
|
222
|
-
auto marginTopValue = (float) arguments[26].asNumber();
|
|
223
|
-
|
|
224
|
-
auto marginBottomType = (int) arguments[27].asNumber();
|
|
225
|
-
auto marginBottomValue = (float) arguments[28].asNumber();
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
auto paddingLeftType = (int) arguments[29].asNumber();
|
|
229
|
-
auto paddingLeftValue = (float) arguments[30].asNumber();
|
|
230
|
-
|
|
231
|
-
auto paddingRightType = (int) arguments[31].asNumber();
|
|
232
|
-
auto paddingRightValue = (float) arguments[32].asNumber();
|
|
233
|
-
|
|
234
|
-
auto paddingTopType = (int) arguments[33].asNumber();
|
|
235
|
-
auto paddingTopValue = (float) arguments[34].asNumber();
|
|
236
|
-
|
|
237
|
-
auto paddingBottomType = (int) arguments[35].asNumber();
|
|
238
|
-
auto paddingBottomValue = (float) arguments[36].asNumber();
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
auto borderLeftType = (int) arguments[37].asNumber();
|
|
242
|
-
auto borderLeftValue = (float) arguments[38].asNumber();
|
|
243
|
-
|
|
244
|
-
auto borderRightType = (int) arguments[39].asNumber();
|
|
245
|
-
auto borderRightValue = (float) arguments[40].asNumber();
|
|
246
|
-
|
|
247
|
-
auto borderTopType = (int) arguments[41].asNumber();
|
|
248
|
-
auto borderTopValue = (float) arguments[42].asNumber();
|
|
249
|
-
|
|
250
|
-
auto borderBottomType = (int) arguments[43].asNumber();
|
|
251
|
-
auto borderBottomValue = (float) arguments[44].asNumber();
|
|
252
|
-
|
|
253
|
-
auto flexGrow = (float) arguments[45].asNumber();
|
|
254
|
-
auto flexShrink = (float) arguments[46].asNumber();
|
|
255
|
-
|
|
256
|
-
auto flexBasisType = (int) arguments[47].asNumber();
|
|
257
|
-
auto flexBasisValue = (float) arguments[48].asNumber();
|
|
258
|
-
|
|
259
|
-
auto widthType = (int) arguments[49].asNumber();
|
|
260
|
-
auto widthValue = (float) arguments[50].asNumber();
|
|
261
|
-
|
|
262
|
-
auto heightType = (int) arguments[51].asNumber();
|
|
263
|
-
auto heightValue = (float) arguments[52].asNumber();
|
|
264
|
-
|
|
265
|
-
auto minWidthType = (int) arguments[53].asNumber();
|
|
266
|
-
auto minWidthValue = (float) arguments[54].asNumber();
|
|
267
|
-
|
|
268
|
-
auto minHeightType = (int) arguments[55].asNumber();
|
|
269
|
-
auto minHeightValue = (float) arguments[56].asNumber();
|
|
270
|
-
|
|
271
|
-
auto maxWidthType = (int) arguments[57].asNumber();
|
|
272
|
-
auto maxWidthValue = (float) arguments[58].asNumber();
|
|
273
|
-
|
|
274
|
-
auto maxHeightType = (int) arguments[59].asNumber();
|
|
275
|
-
auto maxHeightValue = (float) arguments[60].asNumber();
|
|
276
|
-
|
|
277
|
-
auto gapRowType = (int) arguments[61].asNumber();
|
|
278
|
-
auto gapRowValue = (float) arguments[62].asNumber();
|
|
279
|
-
|
|
280
|
-
auto gapColumnType = (int) arguments[63].asNumber();
|
|
281
|
-
auto gapColumnValue = (float) arguments[64].asNumber();
|
|
282
|
-
|
|
283
|
-
auto aspectRatio = (float) arguments[65].asNumber();
|
|
284
|
-
|
|
285
|
-
auto gridAutoRowsValue = arguments[66].asObject(runtime).getArray(runtime);
|
|
286
|
-
|
|
287
|
-
auto gridAutoColumnsValue = arguments[67].asObject(runtime).getArray(runtime);
|
|
288
|
-
|
|
289
|
-
auto gridAutoRowsBuffer = toNonRepeatedTrackSizingFunction(runtime,
|
|
290
|
-
gridAutoRowsValue);
|
|
291
|
-
|
|
292
|
-
CMasonNonRepeatedTrackSizingFunctionArray gridAutoRows = {};
|
|
293
|
-
gridAutoRows.array = gridAutoRowsBuffer.data();
|
|
294
|
-
gridAutoRows.length = gridAutoRowsBuffer.size();
|
|
295
|
-
|
|
296
|
-
auto gridAutoColumnsBuffer = toNonRepeatedTrackSizingFunction(runtime,
|
|
297
|
-
gridAutoColumnsValue);
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
CMasonNonRepeatedTrackSizingFunctionArray gridAutoColumns = {};
|
|
302
|
-
gridAutoColumns.array = gridAutoColumnsBuffer.data();
|
|
303
|
-
gridAutoColumns.length = gridAutoColumnsBuffer.size();
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
auto gridAutoFlow = (int) arguments[68].asNumber();
|
|
307
|
-
|
|
308
|
-
auto gridColumnStartType = (int) arguments[69].asNumber();
|
|
309
|
-
auto gridColumnStartValue = (short) arguments[70].asNumber();
|
|
310
|
-
|
|
311
|
-
auto gridColumnEndType = (int) arguments[71].asNumber();
|
|
312
|
-
auto gridColumnEndValue = (short) arguments[72].asNumber();
|
|
313
|
-
|
|
314
|
-
auto gridRowStartType = (int) arguments[73].asNumber();
|
|
315
|
-
auto gridRowStartValue = (short) arguments[74].asNumber();
|
|
316
|
-
|
|
317
|
-
auto gridRowEndType = (int) arguments[75].asNumber();
|
|
318
|
-
auto gridRowEndValue = (short) arguments[76].asNumber();
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
auto gridTemplateRowsValue = arguments[77].asObject(runtime).getArray(runtime);
|
|
322
|
-
auto gridTemplateColumnsValue = arguments[78].asObject(runtime).getArray(
|
|
323
|
-
runtime);
|
|
324
|
-
|
|
325
|
-
auto gridTemplateRowsBuffer = toTrackSizingFunction(runtime, gridTemplateRowsValue);
|
|
326
|
-
|
|
327
|
-
CMasonTrackSizingFunctionArray gridTemplateRows = {};
|
|
328
|
-
|
|
329
|
-
gridTemplateRows.array = gridTemplateRowsBuffer.data();
|
|
330
|
-
gridTemplateRows.length = gridTemplateRowsBuffer.size();
|
|
331
|
-
|
|
332
|
-
auto gridTemplateColumnsBuffer = toTrackSizingFunction(runtime,
|
|
333
|
-
gridTemplateColumnsValue);
|
|
334
|
-
|
|
335
|
-
CMasonTrackSizingFunctionArray gridTemplateColumns = {};
|
|
336
|
-
|
|
337
|
-
gridTemplateColumns.array = gridTemplateColumnsBuffer.data();
|
|
338
|
-
gridTemplateColumns.length = gridTemplateColumnsBuffer.size();
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
[MasonReexports style_update_with_values
|
|
343
|
-
:style
|
|
344
|
-
:display
|
|
345
|
-
:position
|
|
346
|
-
:direction
|
|
347
|
-
:flexDirection
|
|
348
|
-
:flexWrap
|
|
349
|
-
:overflow
|
|
350
|
-
:alignItems
|
|
351
|
-
:alignSelf
|
|
352
|
-
:alignContent
|
|
353
|
-
:justifyItems
|
|
354
|
-
:justifySelf
|
|
355
|
-
:justifyContent
|
|
356
|
-
|
|
357
|
-
:insetLeftType :insetLeftValue
|
|
358
|
-
:insetRightType :insetRightValue
|
|
359
|
-
:insetTopType :insetTopValue
|
|
360
|
-
:insetBottomType :insetBottomValue
|
|
361
|
-
|
|
362
|
-
:marginLeftType :marginLeftValue
|
|
363
|
-
:marginRightType :marginRightValue
|
|
364
|
-
:marginTopType :marginTopValue
|
|
365
|
-
:marginBottomType :marginBottomValue
|
|
366
|
-
|
|
367
|
-
:paddingLeftType :paddingLeftValue
|
|
368
|
-
:paddingRightType :paddingRightValue
|
|
369
|
-
:paddingTopType :paddingTopValue
|
|
370
|
-
:paddingBottomType :paddingBottomValue
|
|
371
|
-
|
|
372
|
-
:borderLeftType :borderLeftValue
|
|
373
|
-
:borderRightType :borderRightValue
|
|
374
|
-
:borderTopType :borderTopValue
|
|
375
|
-
:borderBottomType :borderBottomValue
|
|
376
|
-
|
|
377
|
-
:flexGrow :flexShrink
|
|
378
|
-
:flexBasisType :flexBasisValue
|
|
379
|
-
|
|
380
|
-
:widthType :widthValue
|
|
381
|
-
:heightType :heightValue
|
|
382
|
-
|
|
383
|
-
:minWidthType :minWidthValue
|
|
384
|
-
:minHeightType :minHeightValue
|
|
385
|
-
|
|
386
|
-
:maxWidthType :maxWidthValue
|
|
387
|
-
:maxHeightType :maxHeightValue
|
|
388
|
-
|
|
389
|
-
:gapRowType :gapRowValue
|
|
390
|
-
:gapColumnType :gapColumnValue
|
|
391
|
-
:aspectRatio
|
|
392
|
-
:&gridAutoRows :&gridAutoColumns
|
|
393
|
-
:gridAutoFlow
|
|
394
|
-
:gridColumnStartType :gridColumnStartValue
|
|
395
|
-
:gridColumnEndType :gridColumnEndValue
|
|
396
|
-
:gridRowStartType :gridRowStartValue
|
|
397
|
-
:gridRowEndType :gridRowEndValue
|
|
398
|
-
:&gridTemplateRows
|
|
399
|
-
gridTemplateColumns: &gridTemplateColumns];
|
|
400
|
-
|
|
401
|
-
for(int i = 0; i < gridTemplateRowsBuffer.size();i++){
|
|
402
|
-
auto it = gridTemplateRowsBuffer[i];
|
|
403
|
-
destroy_c_mason_track_sizing_function(it);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
for(int i = 0; i < gridTemplateColumnsBuffer.size();i++){
|
|
407
|
-
auto it = gridTemplateColumnsBuffer[i];
|
|
408
|
-
destroy_c_mason_track_sizing_function(it);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
return Value::undefined();
|
|
412
|
-
});
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
CREATE_FUNC("__Mason_compute", 2, [](Runtime &runtime, const Value &thisValue,
|
|
417
|
-
const Value *arguments, size_t count) -> Value {
|
|
418
|
-
|
|
419
|
-
auto mason = reinterpret_cast<void*>((int64_t)arguments[0].asNumber());
|
|
420
|
-
auto node = reinterpret_cast<void*>((int64_t)arguments[1].asNumber());
|
|
421
|
-
|
|
422
|
-
[MasonReexports node_compute:mason :node];
|
|
423
|
-
|
|
424
|
-
return Value::undefined();
|
|
425
|
-
|
|
426
|
-
});
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
CREATE_FUNC("__Mason_computeWH", 4, [](Runtime &runtime, const Value &thisValue,
|
|
431
|
-
const Value *arguments, size_t count) -> Value {
|
|
432
|
-
|
|
433
|
-
auto mason = reinterpret_cast<void*>((int64_t)arguments[0].asNumber());
|
|
434
|
-
auto node = reinterpret_cast<void*>((int64_t)arguments[1].asNumber());
|
|
435
|
-
|
|
436
|
-
auto width = (float)arguments[2].asNumber();
|
|
437
|
-
auto height = (float)arguments[3].asNumber();
|
|
438
|
-
|
|
439
|
-
[MasonReexports node_compute_wh:mason :node width:width height:height];
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
return Value::undefined();
|
|
443
|
-
|
|
444
|
-
});
|
|
445
|
-
|
|
446
|
-
createFunc(jsiRuntime, "__Mason_computeMaxContent", 2, [](Runtime &runtime, const Value &thisValue,
|
|
447
|
-
const Value *arguments, size_t count) -> Value {
|
|
448
|
-
|
|
449
|
-
auto mason = reinterpret_cast<void*>((int64_t)arguments[0].asNumber());
|
|
450
|
-
auto node = reinterpret_cast<void*>((int64_t)arguments[1].asNumber());
|
|
451
|
-
|
|
452
|
-
[MasonReexports node_compute_max_content:mason :node];
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
return Value::undefined();
|
|
456
|
-
|
|
457
|
-
});
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
CREATE_FUNC("__Mason_computeMinContent", 2, [](Runtime &runtime, const Value &thisValue,
|
|
461
|
-
const Value *arguments, size_t count) -> Value {
|
|
462
|
-
|
|
463
|
-
auto mason = reinterpret_cast<void*>((int64_t)arguments[0].asNumber());
|
|
464
|
-
auto node = reinterpret_cast<void*>((int64_t)arguments[1].asNumber());
|
|
465
|
-
|
|
466
|
-
[MasonReexports node_compute_min_content:mason :node];
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
return Value::undefined();
|
|
470
|
-
|
|
471
|
-
});
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
/* todo */
|
|
475
|
-
/*
|
|
476
|
-
createFunc(jsiRuntime, "__Mason_layout", 2, [](Runtime &runtime, const Value &thisValue,
|
|
477
|
-
const Value *arguments,
|
|
478
|
-
const Value *, size_t) -> Value {
|
|
479
|
-
|
|
480
|
-
auto mason = reinterpret_cast<void*>((int64_t)arguments[0].asNumber());
|
|
481
|
-
auto node = reinterpret_cast<void*>((int64_t)arguments[1].asNumber());
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
return Value::undefined();
|
|
486
|
-
|
|
487
|
-
});
|
|
488
|
-
*/
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
// CREATE_FUNC("__Mason_getComputedLayout", 2, [](Runtime &runtime, const Value &thisValue,
|
|
492
|
-
// const Value *arguments, size_t count) -> Value {
|
|
493
|
-
//
|
|
494
|
-
// auto style = reinterpret_cast<void*>((int64_t)arguments[0].asNumber());
|
|
495
|
-
//
|
|
496
|
-
// auto layout = Object(runtime);
|
|
497
|
-
//
|
|
498
|
-
// auto layoutPtr = &layout;
|
|
499
|
-
//
|
|
500
|
-
//
|
|
501
|
-
// auto width = [MasonReexports style_get_width:style];
|
|
502
|
-
//
|
|
503
|
-
// return dimensionToJS(runtime, width);
|
|
504
|
-
//
|
|
505
|
-
// });
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
CREATE_FUNC("__Mason_isDirty", 2, [](Runtime &runtime, const Value &thisValue,
|
|
509
|
-
const Value *arguments, size_t count) -> Value {
|
|
510
|
-
|
|
511
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
512
|
-
|
|
513
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
514
|
-
|
|
515
|
-
auto value = [MasonReexports node_dirty:mason :node];
|
|
516
|
-
|
|
517
|
-
return Value(value);
|
|
518
|
-
|
|
519
|
-
}
|
|
520
|
-
);
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
CREATE_FUNC("__Mason_markDirty", 2, [](Runtime &runtime, const Value &thisValue,
|
|
524
|
-
const Value *arguments, size_t count) -> Value {
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
528
|
-
|
|
529
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
530
|
-
|
|
531
|
-
[MasonReexports node_mark_dirty:mason :node];
|
|
532
|
-
|
|
533
|
-
return Value::undefined();
|
|
534
|
-
});
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
CREATE_FUNC("__Mason_getDisplay", 1, [](Runtime &runtime, const Value &thisValue,
|
|
538
|
-
const Value *arguments, size_t count) -> Value {
|
|
539
|
-
|
|
540
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
541
|
-
|
|
542
|
-
auto value = [MasonReexports style_get_display: style];
|
|
543
|
-
|
|
544
|
-
return Value(value);
|
|
545
|
-
|
|
546
|
-
}
|
|
547
|
-
);
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
CREATE_FUNC("__Mason_setDisplay", 5, [](Runtime &runtime, const Value &thisValue,
|
|
551
|
-
const Value *arguments, size_t count) -> Value {
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
555
|
-
|
|
556
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
557
|
-
|
|
558
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
559
|
-
auto update = arguments[4].asBool();
|
|
560
|
-
|
|
561
|
-
auto display = (int) arguments[3].asNumber();
|
|
562
|
-
|
|
563
|
-
[MasonReexports style_set_display:style :display];
|
|
564
|
-
|
|
565
|
-
if (update) {
|
|
566
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
return Value::undefined();
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
);
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
CREATE_FUNC("__Mason_getPosition", 1, [](Runtime &runtime, const Value &thisValue,
|
|
576
|
-
const Value *arguments, size_t count) -> Value {
|
|
577
|
-
|
|
578
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
579
|
-
|
|
580
|
-
auto position = [MasonReexports style_get_position:style];
|
|
581
|
-
|
|
582
|
-
return Value(position);
|
|
583
|
-
|
|
584
|
-
});
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
CREATE_FUNC("__Mason_setPosition", 5, [](Runtime &runtime, const Value &thisValue,
|
|
588
|
-
const Value *arguments, size_t count) -> Value {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
592
|
-
|
|
593
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
594
|
-
|
|
595
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
596
|
-
auto update = arguments[4].asBool();
|
|
597
|
-
|
|
598
|
-
auto position = (int) arguments[3].asNumber();
|
|
599
|
-
|
|
600
|
-
[MasonReexports style_set_position:mason :position];
|
|
601
|
-
|
|
602
|
-
if (update) {
|
|
603
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
return Value::undefined();
|
|
607
|
-
|
|
608
|
-
});
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
CREATE_FUNC("__Mason_getFlexWrap", 1, [](Runtime &runtime, const Value &thisValue,
|
|
612
|
-
const Value *arguments, size_t count) -> Value {
|
|
613
|
-
|
|
614
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
615
|
-
|
|
616
|
-
auto ret = [MasonReexports style_get_flex_wrap:style];
|
|
617
|
-
|
|
618
|
-
return Value(ret);
|
|
619
|
-
|
|
620
|
-
});
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
CREATE_FUNC("__Mason_setFlexWrap", 5, [](Runtime &runtime, const Value &thisValue,
|
|
624
|
-
const Value *arguments, size_t count) -> Value {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
628
|
-
|
|
629
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
630
|
-
|
|
631
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
632
|
-
auto update = arguments[4].asBool();
|
|
633
|
-
|
|
634
|
-
auto new_value = (int) arguments[3].asNumber();
|
|
635
|
-
|
|
636
|
-
[MasonReexports style_set_flex_wrap:style :new_value];
|
|
637
|
-
|
|
638
|
-
if (update) {
|
|
639
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
return Value::undefined();
|
|
643
|
-
|
|
644
|
-
});
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
CREATE_FUNC("__Mason_getAlignItems", 1, [](Runtime &runtime, const Value &thisValue,
|
|
648
|
-
const Value *arguments, size_t count) -> Value {
|
|
649
|
-
|
|
650
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
651
|
-
|
|
652
|
-
auto ret = [MasonReexports style_get_align_items:style];
|
|
653
|
-
|
|
654
|
-
return Value(ret);
|
|
655
|
-
|
|
656
|
-
});
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
CREATE_FUNC("__Mason_setAlignItems", 5, [](Runtime &runtime, const Value &thisValue,
|
|
660
|
-
const Value *arguments, size_t count) -> Value {
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
664
|
-
|
|
665
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
666
|
-
|
|
667
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
668
|
-
auto update = arguments[4].asBool();
|
|
669
|
-
|
|
670
|
-
auto new_value = (int) arguments[3].asNumber();
|
|
671
|
-
|
|
672
|
-
[MasonReexports style_set_align_items:style :new_value];
|
|
673
|
-
|
|
674
|
-
if (update) {
|
|
675
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
return Value::undefined();
|
|
679
|
-
|
|
680
|
-
});
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
CREATE_FUNC("__Mason_getAlignContent", 1, [](Runtime &runtime, const Value &thisValue,
|
|
684
|
-
const Value *arguments, size_t count) -> Value {
|
|
685
|
-
|
|
686
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
687
|
-
|
|
688
|
-
auto ret = [MasonReexports style_get_align_content:style];
|
|
689
|
-
|
|
690
|
-
return Value(ret);
|
|
691
|
-
|
|
692
|
-
});
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
CREATE_FUNC("__Mason_setAlignContent", 5, [](Runtime &runtime, const Value &thisValue,
|
|
696
|
-
const Value *arguments, size_t count) -> Value {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
700
|
-
|
|
701
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
702
|
-
|
|
703
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
704
|
-
auto update = arguments[4].asBool();
|
|
705
|
-
|
|
706
|
-
auto new_value = (int) arguments[3].asNumber();
|
|
707
|
-
|
|
708
|
-
[MasonReexports style_set_align_content:style :new_value];
|
|
709
|
-
|
|
710
|
-
if (update) {
|
|
711
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
return Value::undefined();
|
|
715
|
-
|
|
716
|
-
});
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
CREATE_FUNC("__Mason_getAlignSelf", 1, [](Runtime &runtime, const Value &thisValue,
|
|
720
|
-
const Value *arguments, size_t count) -> Value {
|
|
721
|
-
|
|
722
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
723
|
-
|
|
724
|
-
auto ret = [MasonReexports style_get_align_self:style];
|
|
725
|
-
|
|
726
|
-
return Value(ret);
|
|
727
|
-
|
|
728
|
-
});
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
CREATE_FUNC("__Mason_setAlignSelf", 5, [](Runtime &runtime, const Value &thisValue,
|
|
732
|
-
const Value *arguments, size_t count) -> Value {
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
736
|
-
|
|
737
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
738
|
-
|
|
739
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
740
|
-
auto update = arguments[4].asBool();
|
|
741
|
-
|
|
742
|
-
auto new_value = (int) arguments[3].asNumber();
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
[MasonReexports style_set_align_self:style :new_value];
|
|
746
|
-
|
|
747
|
-
if (update) {
|
|
748
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
return Value::undefined();
|
|
752
|
-
|
|
753
|
-
});
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
CREATE_FUNC("__Mason_getJustifyItems", 1, [](Runtime &runtime, const Value &thisValue,
|
|
759
|
-
const Value *arguments, size_t count) -> Value {
|
|
760
|
-
|
|
761
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
762
|
-
|
|
763
|
-
auto ret = [MasonReexports style_get_justify_items:style];
|
|
764
|
-
|
|
765
|
-
return Value(ret);
|
|
766
|
-
|
|
767
|
-
});
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
CREATE_FUNC("__Mason_setJustifyItems", 5, [](Runtime &runtime, const Value &thisValue,
|
|
771
|
-
const Value *arguments, size_t count) -> Value {
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
775
|
-
|
|
776
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
777
|
-
|
|
778
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
779
|
-
auto update = arguments[4].asBool();
|
|
780
|
-
|
|
781
|
-
auto new_value = (int) arguments[3].asNumber();
|
|
782
|
-
|
|
783
|
-
[MasonReexports style_set_justify_items:style :new_value];
|
|
784
|
-
|
|
785
|
-
if (update) {
|
|
786
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
return Value::undefined();
|
|
790
|
-
|
|
791
|
-
});
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
CREATE_FUNC("__Mason_getJustifySelf", 1, [](Runtime &runtime, const Value &thisValue,
|
|
796
|
-
const Value *arguments, size_t count) -> Value {
|
|
797
|
-
|
|
798
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
799
|
-
|
|
800
|
-
auto ret = [MasonReexports style_get_justify_self:style];
|
|
801
|
-
|
|
802
|
-
return Value(ret);
|
|
803
|
-
|
|
804
|
-
});
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
CREATE_FUNC("__Mason_setJustifySelf", 5, [](Runtime &runtime, const Value &thisValue,
|
|
808
|
-
const Value *arguments, size_t count) -> Value {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
812
|
-
|
|
813
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
814
|
-
|
|
815
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
816
|
-
auto update = arguments[4].asBool();
|
|
817
|
-
|
|
818
|
-
auto new_value = (int) arguments[3].asNumber();
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
[MasonReexports style_set_justify_self:style :new_value];
|
|
822
|
-
|
|
823
|
-
if (update) {
|
|
824
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
return Value::undefined();
|
|
828
|
-
|
|
829
|
-
});
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
CREATE_FUNC("__Mason_getJustifyContent", 1, [](Runtime &runtime, const Value &thisValue,
|
|
833
|
-
const Value *arguments, size_t count) -> Value {
|
|
834
|
-
|
|
835
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
836
|
-
|
|
837
|
-
auto ret = [MasonReexports style_get_justify_content:style];
|
|
838
|
-
|
|
839
|
-
return Value(ret);
|
|
840
|
-
|
|
841
|
-
});
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
CREATE_FUNC("__Mason_setJustifyContent", 5, [](Runtime &runtime, const Value &thisValue,
|
|
845
|
-
const Value *arguments, size_t count) -> Value {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
849
|
-
|
|
850
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
851
|
-
|
|
852
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
853
|
-
auto update = arguments[4].asBool();
|
|
854
|
-
|
|
855
|
-
auto new_value = (int) arguments[3].asNumber();
|
|
856
|
-
|
|
857
|
-
[MasonReexports style_set_justify_content:style :new_value];
|
|
858
|
-
|
|
859
|
-
if (update) {
|
|
860
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
return Value::undefined();
|
|
864
|
-
|
|
865
|
-
});
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
CREATE_FUNC("__Mason_setInset", 6, [](Runtime &runtime, const Value &thisValue,
|
|
869
|
-
const Value *arguments, size_t count) -> Value {
|
|
870
|
-
|
|
871
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
872
|
-
|
|
873
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
874
|
-
|
|
875
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
876
|
-
auto update = arguments[5].asBool();
|
|
877
|
-
|
|
878
|
-
auto value = (float) arguments[3].asNumber();
|
|
879
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
[MasonReexports style_set_inset:style :value :jsToLengthPercentageAutoType(value_type)];
|
|
883
|
-
|
|
884
|
-
if (update) {
|
|
885
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
return Value::undefined();
|
|
889
|
-
|
|
890
|
-
});
|
|
891
|
-
|
|
892
|
-
CREATE_FUNC("__Mason_getInsetLeft", 1, [](Runtime &runtime, const Value &thisValue,
|
|
893
|
-
const Value *arguments, size_t count) -> Value {
|
|
894
|
-
|
|
895
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
896
|
-
|
|
897
|
-
auto ret = [MasonReexports style_get_inset_left:style];
|
|
898
|
-
|
|
899
|
-
return lengthPercentageAutoToJS(runtime, ret);
|
|
900
|
-
|
|
901
|
-
});
|
|
902
|
-
|
|
903
|
-
CREATE_FUNC("__Mason_setInsetLeft", 6, [](Runtime &runtime, const Value &thisValue,
|
|
904
|
-
const Value *arguments, size_t count) -> Value {
|
|
905
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
906
|
-
|
|
907
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
908
|
-
|
|
909
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
910
|
-
auto update = arguments[5].asBool();
|
|
911
|
-
|
|
912
|
-
auto value = (float) arguments[3].asNumber();
|
|
913
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
914
|
-
|
|
915
|
-
[MasonReexports style_set_inset_left:style :value :jsToLengthPercentageAutoType(value_type)];
|
|
916
|
-
|
|
917
|
-
if (update) {
|
|
918
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
return Value::undefined();
|
|
922
|
-
|
|
923
|
-
});
|
|
924
|
-
|
|
925
|
-
CREATE_FUNC("__Mason_getPositionRight", 1, [](Runtime &runtime, const Value &thisValue,
|
|
926
|
-
const Value *arguments, size_t count) -> Value {
|
|
927
|
-
|
|
928
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
929
|
-
|
|
930
|
-
auto ret = [MasonReexports style_get_inset_right:style];
|
|
931
|
-
|
|
932
|
-
return lengthPercentageAutoToJS(runtime, ret);
|
|
933
|
-
|
|
934
|
-
});
|
|
935
|
-
|
|
936
|
-
CREATE_FUNC("__Mason_setPositionRight", 6, [](Runtime &runtime, const Value &thisValue,
|
|
937
|
-
const Value *arguments, size_t count) -> Value {
|
|
938
|
-
|
|
939
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
940
|
-
|
|
941
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
942
|
-
|
|
943
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
944
|
-
auto update = arguments[5].asBool();
|
|
945
|
-
|
|
946
|
-
auto value = (float) arguments[3].asNumber();
|
|
947
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
948
|
-
|
|
949
|
-
[MasonReexports style_set_inset_right:style :value :jsToLengthPercentageAutoType(value_type)];
|
|
950
|
-
|
|
951
|
-
if (update) {
|
|
952
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
return Value::undefined();
|
|
956
|
-
|
|
957
|
-
});
|
|
958
|
-
|
|
959
|
-
CREATE_FUNC("__Mason_getPositionTop", 1, [](Runtime &runtime, const Value &thisValue,
|
|
960
|
-
const Value *arguments, size_t count) -> Value {
|
|
961
|
-
|
|
962
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
963
|
-
|
|
964
|
-
auto ret = [MasonReexports style_get_inset_top:style];
|
|
965
|
-
|
|
966
|
-
return lengthPercentageAutoToJS(runtime, ret);
|
|
967
|
-
|
|
968
|
-
});
|
|
969
|
-
|
|
970
|
-
CREATE_FUNC("__Mason_setPositionTop", 6, [](Runtime &runtime, const Value &thisValue,
|
|
971
|
-
const Value *arguments, size_t count) -> Value {
|
|
972
|
-
|
|
973
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
974
|
-
|
|
975
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
976
|
-
|
|
977
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
978
|
-
auto update = arguments[5].asBool();
|
|
979
|
-
|
|
980
|
-
auto value = (float) arguments[3].asNumber();
|
|
981
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
982
|
-
|
|
983
|
-
[MasonReexports style_set_inset_top:style :value :jsToLengthPercentageAutoType(value_type)];
|
|
984
|
-
|
|
985
|
-
if (update) {
|
|
986
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
return Value::undefined();
|
|
990
|
-
|
|
991
|
-
});
|
|
992
|
-
|
|
993
|
-
CREATE_FUNC("__Mason_getPositionBottom", 1, [](Runtime &runtime, const Value &thisValue,
|
|
994
|
-
const Value *arguments, size_t count) -> Value {
|
|
995
|
-
|
|
996
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
997
|
-
|
|
998
|
-
auto ret = [MasonReexports style_get_inset_bottom:style];
|
|
999
|
-
|
|
1000
|
-
return lengthPercentageAutoToJS(runtime, ret);
|
|
1001
|
-
|
|
1002
|
-
});
|
|
1003
|
-
|
|
1004
|
-
CREATE_FUNC("__Mason_setPositionBottom", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1005
|
-
const Value *arguments, size_t count) -> Value {
|
|
1006
|
-
|
|
1007
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1008
|
-
|
|
1009
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1010
|
-
|
|
1011
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1012
|
-
auto update = arguments[5].asBool();
|
|
1013
|
-
|
|
1014
|
-
auto value = (float) arguments[3].asNumber();
|
|
1015
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
[MasonReexports style_set_inset_bottom:style :value :jsToLengthPercentageAutoType(value_type)];
|
|
1019
|
-
|
|
1020
|
-
if (update) {
|
|
1021
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
return Value::undefined();
|
|
1025
|
-
|
|
1026
|
-
});
|
|
1027
|
-
|
|
1028
|
-
CREATE_FUNC("__Mason_setMargin", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1029
|
-
const Value *arguments, size_t count) -> Value {
|
|
1030
|
-
|
|
1031
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1032
|
-
|
|
1033
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1034
|
-
|
|
1035
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1036
|
-
auto update = arguments[5].asBool();
|
|
1037
|
-
|
|
1038
|
-
auto value = (float) arguments[3].asNumber();
|
|
1039
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1040
|
-
|
|
1041
|
-
[MasonReexports style_set_margin:style :value :jsToLengthPercentageAutoType(value_type)];
|
|
1042
|
-
|
|
1043
|
-
if (update) {
|
|
1044
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
return Value::undefined();
|
|
1048
|
-
|
|
1049
|
-
});
|
|
1050
|
-
|
|
1051
|
-
CREATE_FUNC("__Mason_getMarginLeft", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1052
|
-
const Value *arguments, size_t count) -> Value {
|
|
1053
|
-
|
|
1054
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1055
|
-
|
|
1056
|
-
auto ret = [MasonReexports style_get_margin_left:style];
|
|
1057
|
-
|
|
1058
|
-
return lengthPercentageAutoToJS(runtime, ret);
|
|
1059
|
-
|
|
1060
|
-
});
|
|
1061
|
-
|
|
1062
|
-
CREATE_FUNC("__Mason_setMarginLeft", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1063
|
-
const Value *arguments, size_t count) -> Value {
|
|
1064
|
-
|
|
1065
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1066
|
-
|
|
1067
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1068
|
-
|
|
1069
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1070
|
-
auto update = arguments[5].asBool();
|
|
1071
|
-
|
|
1072
|
-
auto value = (float) arguments[3].asNumber();
|
|
1073
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
[MasonReexports style_set_margin_left:style :value :jsToLengthPercentageAutoType(value_type)];
|
|
1077
|
-
|
|
1078
|
-
if (update) {
|
|
1079
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
return Value::undefined();
|
|
1083
|
-
|
|
1084
|
-
});
|
|
1085
|
-
|
|
1086
|
-
CREATE_FUNC("__Mason_getMarginRight", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1087
|
-
const Value *arguments, size_t count) -> Value {
|
|
1088
|
-
|
|
1089
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1090
|
-
|
|
1091
|
-
auto ret = [MasonReexports style_get_margin_right:style];
|
|
1092
|
-
|
|
1093
|
-
return lengthPercentageAutoToJS(runtime, ret);
|
|
1094
|
-
|
|
1095
|
-
});
|
|
1096
|
-
|
|
1097
|
-
CREATE_FUNC("__Mason_setMarginRight", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1098
|
-
const Value *arguments, size_t count) -> Value {
|
|
1099
|
-
|
|
1100
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1101
|
-
|
|
1102
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1103
|
-
|
|
1104
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1105
|
-
auto update = arguments[5].asBool();
|
|
1106
|
-
|
|
1107
|
-
auto value = (float) arguments[3].asNumber();
|
|
1108
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
[MasonReexports style_set_margin_right:style :value :jsToLengthPercentageAutoType(value_type)];
|
|
1112
|
-
|
|
1113
|
-
if (update) {
|
|
1114
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
return Value::undefined();
|
|
1118
|
-
|
|
1119
|
-
});
|
|
1120
|
-
|
|
1121
|
-
CREATE_FUNC("__Mason_getMarginTop", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1122
|
-
const Value *arguments, size_t count) -> Value {
|
|
1123
|
-
|
|
1124
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1125
|
-
|
|
1126
|
-
auto ret = [MasonReexports style_get_margin_top:style];
|
|
1127
|
-
|
|
1128
|
-
return lengthPercentageAutoToJS(runtime, ret);
|
|
1129
|
-
|
|
1130
|
-
});
|
|
1131
|
-
|
|
1132
|
-
CREATE_FUNC("__Mason_setMarginTop", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1133
|
-
const Value *arguments, size_t count) -> Value {
|
|
1134
|
-
|
|
1135
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1136
|
-
|
|
1137
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1138
|
-
|
|
1139
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1140
|
-
auto update = arguments[5].asBool();
|
|
1141
|
-
|
|
1142
|
-
auto value = (float) arguments[3].asNumber();
|
|
1143
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
[MasonReexports style_set_margin_top:style :value :jsToLengthPercentageAutoType(value_type)];
|
|
1147
|
-
|
|
1148
|
-
if (update) {
|
|
1149
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
return Value::undefined();
|
|
1153
|
-
|
|
1154
|
-
});
|
|
1155
|
-
|
|
1156
|
-
CREATE_FUNC("__Mason_getMarginBottom", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1157
|
-
const Value *arguments, size_t count) -> Value {
|
|
1158
|
-
|
|
1159
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1160
|
-
|
|
1161
|
-
auto ret = [MasonReexports style_get_margin_bottom:style];
|
|
1162
|
-
|
|
1163
|
-
return lengthPercentageAutoToJS(runtime, ret);
|
|
1164
|
-
|
|
1165
|
-
});
|
|
1166
|
-
|
|
1167
|
-
CREATE_FUNC("__Mason_setMarginBottom", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1168
|
-
const Value *arguments, size_t count) -> Value {
|
|
1169
|
-
|
|
1170
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1171
|
-
|
|
1172
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1173
|
-
|
|
1174
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1175
|
-
auto update = arguments[5].asBool();
|
|
1176
|
-
|
|
1177
|
-
auto value = (float) arguments[3].asNumber();
|
|
1178
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
[MasonReexports style_set_margin_bottom:style :value :jsToLengthPercentageAutoType(value_type)];
|
|
1182
|
-
|
|
1183
|
-
if (update) {
|
|
1184
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
return Value::undefined();
|
|
1188
|
-
|
|
1189
|
-
});
|
|
1190
|
-
|
|
1191
|
-
CREATE_FUNC("__Mason_setPadding", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1192
|
-
const Value *arguments, size_t count) -> Value {
|
|
1193
|
-
|
|
1194
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1195
|
-
|
|
1196
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1197
|
-
|
|
1198
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1199
|
-
auto update = arguments[5].asBool();
|
|
1200
|
-
|
|
1201
|
-
auto value = (float) arguments[3].asNumber();
|
|
1202
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
[MasonReexports style_set_padding:style :value :jsToLengthPercentageType(value_type)];
|
|
1206
|
-
|
|
1207
|
-
if (update) {
|
|
1208
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
return Value::undefined();
|
|
1212
|
-
|
|
1213
|
-
});
|
|
1214
|
-
|
|
1215
|
-
CREATE_FUNC("__Mason_getPaddingLeft", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1216
|
-
const Value *arguments, size_t count) -> Value {
|
|
1217
|
-
|
|
1218
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1219
|
-
|
|
1220
|
-
auto ret = [MasonReexports style_get_padding_left:style];
|
|
1221
|
-
|
|
1222
|
-
return lengthPercentageToJS(runtime, ret);
|
|
1223
|
-
|
|
1224
|
-
});
|
|
1225
|
-
|
|
1226
|
-
CREATE_FUNC("__Mason_setPaddingLeft", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1227
|
-
const Value *arguments, size_t count) -> Value {
|
|
1228
|
-
|
|
1229
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1230
|
-
|
|
1231
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1232
|
-
|
|
1233
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1234
|
-
auto update = arguments[5].asBool();
|
|
1235
|
-
|
|
1236
|
-
auto value = (float) arguments[3].asNumber();
|
|
1237
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
[MasonReexports style_set_padding_left:style :value :jsToLengthPercentageType(value_type)];
|
|
1241
|
-
|
|
1242
|
-
if (update) {
|
|
1243
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
return Value::undefined();
|
|
1247
|
-
|
|
1248
|
-
});
|
|
1249
|
-
|
|
1250
|
-
CREATE_FUNC("__Mason_getPaddingRight", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1251
|
-
const Value *arguments, size_t count) -> Value {
|
|
1252
|
-
|
|
1253
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1254
|
-
|
|
1255
|
-
auto ret = [MasonReexports style_get_padding_right:style];
|
|
1256
|
-
|
|
1257
|
-
return lengthPercentageToJS(runtime, ret);
|
|
1258
|
-
|
|
1259
|
-
});
|
|
1260
|
-
|
|
1261
|
-
CREATE_FUNC("__Mason_setPaddingRight", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1262
|
-
const Value *arguments, size_t count) -> Value {
|
|
1263
|
-
|
|
1264
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1265
|
-
|
|
1266
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1267
|
-
|
|
1268
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1269
|
-
auto update = arguments[5].asBool();
|
|
1270
|
-
|
|
1271
|
-
auto value = (float) arguments[3].asNumber();
|
|
1272
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
[MasonReexports style_set_padding_right:style :value :jsToLengthPercentageType(value_type)];
|
|
1276
|
-
|
|
1277
|
-
if (update) {
|
|
1278
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
return Value::undefined();
|
|
1282
|
-
|
|
1283
|
-
});
|
|
1284
|
-
|
|
1285
|
-
CREATE_FUNC("__Mason_getPaddingTop", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1286
|
-
const Value *arguments, size_t count) -> Value {
|
|
1287
|
-
|
|
1288
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1289
|
-
|
|
1290
|
-
auto ret = [MasonReexports style_get_padding_top:style];
|
|
1291
|
-
|
|
1292
|
-
return lengthPercentageToJS(runtime, ret);
|
|
1293
|
-
|
|
1294
|
-
});
|
|
1295
|
-
|
|
1296
|
-
CREATE_FUNC("__Mason_setPaddingTop", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1297
|
-
const Value *arguments, size_t count) -> Value {
|
|
1298
|
-
|
|
1299
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1300
|
-
|
|
1301
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1302
|
-
|
|
1303
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1304
|
-
auto update = arguments[5].asBool();
|
|
1305
|
-
|
|
1306
|
-
auto value = (float) arguments[3].asNumber();
|
|
1307
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
[MasonReexports style_set_padding_top:style :value :jsToLengthPercentageType(value_type)];
|
|
1311
|
-
|
|
1312
|
-
if (update) {
|
|
1313
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
return Value::undefined();
|
|
1317
|
-
|
|
1318
|
-
});
|
|
1319
|
-
|
|
1320
|
-
CREATE_FUNC("__Mason_getPaddingBottom", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1321
|
-
const Value *arguments, size_t count) -> Value {
|
|
1322
|
-
|
|
1323
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1324
|
-
|
|
1325
|
-
auto ret = [MasonReexports style_get_padding_bottom:style];
|
|
1326
|
-
|
|
1327
|
-
return lengthPercentageToJS(runtime, ret);
|
|
1328
|
-
|
|
1329
|
-
});
|
|
1330
|
-
|
|
1331
|
-
CREATE_FUNC("__Mason_setPaddingBottom", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1332
|
-
const Value *arguments, size_t count) -> Value {
|
|
1333
|
-
|
|
1334
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1335
|
-
|
|
1336
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1337
|
-
|
|
1338
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1339
|
-
auto update = arguments[5].asBool();
|
|
1340
|
-
|
|
1341
|
-
auto value = (float) arguments[3].asNumber();
|
|
1342
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
[MasonReexports style_set_padding_bottom:style :value :jsToLengthPercentageType(value_type)];
|
|
1346
|
-
|
|
1347
|
-
if (update) {
|
|
1348
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
return Value::undefined();
|
|
1352
|
-
|
|
1353
|
-
});
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
CREATE_FUNC("__Mason_setBorder", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1357
|
-
const Value *arguments, size_t count) -> Value {
|
|
1358
|
-
|
|
1359
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1360
|
-
|
|
1361
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1362
|
-
|
|
1363
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1364
|
-
auto update = arguments[5].asBool();
|
|
1365
|
-
|
|
1366
|
-
auto value = (float) arguments[3].asNumber();
|
|
1367
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
[MasonReexports style_set_border:style :value :jsToLengthPercentageType(value_type)];
|
|
1371
|
-
|
|
1372
|
-
if (update) {
|
|
1373
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
return Value::undefined();
|
|
1377
|
-
|
|
1378
|
-
});
|
|
1379
|
-
|
|
1380
|
-
CREATE_FUNC("__Mason_getBorderLeft", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1381
|
-
const Value *arguments, size_t count) -> Value {
|
|
1382
|
-
|
|
1383
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1384
|
-
|
|
1385
|
-
auto ret = [MasonReexports style_get_border_left:style];
|
|
1386
|
-
|
|
1387
|
-
return lengthPercentageToJS(runtime, ret);
|
|
1388
|
-
|
|
1389
|
-
});
|
|
1390
|
-
|
|
1391
|
-
CREATE_FUNC("__Mason_setBorderLeft", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1392
|
-
const Value *arguments, size_t count) -> Value {
|
|
1393
|
-
|
|
1394
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1395
|
-
|
|
1396
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1397
|
-
|
|
1398
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1399
|
-
auto update = arguments[5].asBool();
|
|
1400
|
-
|
|
1401
|
-
auto value = (float) arguments[3].asNumber();
|
|
1402
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
[MasonReexports style_set_border_left:style :value :jsToLengthPercentageType(value_type)];
|
|
1406
|
-
|
|
1407
|
-
if (update) {
|
|
1408
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
return Value::undefined();
|
|
1412
|
-
|
|
1413
|
-
});
|
|
1414
|
-
|
|
1415
|
-
CREATE_FUNC("__Mason_getBorderRight", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1416
|
-
const Value *arguments, size_t count) -> Value {
|
|
1417
|
-
|
|
1418
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1419
|
-
|
|
1420
|
-
auto ret = [MasonReexports style_get_border_right:style];
|
|
1421
|
-
|
|
1422
|
-
return lengthPercentageToJS(runtime, ret);
|
|
1423
|
-
|
|
1424
|
-
});
|
|
1425
|
-
|
|
1426
|
-
CREATE_FUNC("__Mason_setBorderRight", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1427
|
-
const Value *arguments, size_t count) -> Value {
|
|
1428
|
-
|
|
1429
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1430
|
-
|
|
1431
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1432
|
-
|
|
1433
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1434
|
-
auto update = arguments[5].asBool();
|
|
1435
|
-
|
|
1436
|
-
auto value = (float) arguments[3].asNumber();
|
|
1437
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
[MasonReexports style_set_border_right:style :value :jsToLengthPercentageType(value_type)];
|
|
1441
|
-
|
|
1442
|
-
if (update) {
|
|
1443
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1444
|
-
}
|
|
1445
|
-
|
|
1446
|
-
return Value::undefined();
|
|
1447
|
-
|
|
1448
|
-
});
|
|
1449
|
-
|
|
1450
|
-
CREATE_FUNC("__Mason_getBorderTop", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1451
|
-
const Value *arguments, size_t count) -> Value {
|
|
1452
|
-
|
|
1453
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1454
|
-
|
|
1455
|
-
auto ret = [MasonReexports style_get_border_top:style];
|
|
1456
|
-
|
|
1457
|
-
return lengthPercentageToJS(runtime, ret);
|
|
1458
|
-
|
|
1459
|
-
});
|
|
1460
|
-
|
|
1461
|
-
CREATE_FUNC("__Mason_setBorderTop", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1462
|
-
const Value *arguments, size_t count) -> Value {
|
|
1463
|
-
|
|
1464
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1465
|
-
|
|
1466
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1467
|
-
|
|
1468
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1469
|
-
auto update = arguments[5].asBool();
|
|
1470
|
-
|
|
1471
|
-
auto value = (float) arguments[3].asNumber();
|
|
1472
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
[MasonReexports style_set_border_top:style :value :jsToLengthPercentageType(value_type)];
|
|
1476
|
-
|
|
1477
|
-
if (update) {
|
|
1478
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
return Value::undefined();
|
|
1482
|
-
|
|
1483
|
-
});
|
|
1484
|
-
|
|
1485
|
-
CREATE_FUNC("__Mason_getBorderBottom", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1486
|
-
const Value *arguments, size_t count) -> Value {
|
|
1487
|
-
|
|
1488
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1489
|
-
|
|
1490
|
-
auto ret = [MasonReexports style_get_border_bottom:style];
|
|
1491
|
-
|
|
1492
|
-
return lengthPercentageToJS(runtime, ret);
|
|
1493
|
-
|
|
1494
|
-
});
|
|
1495
|
-
|
|
1496
|
-
CREATE_FUNC("__Mason_setBorderBottom", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1497
|
-
const Value *arguments, size_t count) -> Value {
|
|
1498
|
-
|
|
1499
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1500
|
-
|
|
1501
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1502
|
-
|
|
1503
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1504
|
-
auto update = arguments[5].asBool();
|
|
1505
|
-
|
|
1506
|
-
auto value = (float) arguments[3].asNumber();
|
|
1507
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
[MasonReexports style_set_border_bottom:style :value :jsToLengthPercentageType(value_type)];
|
|
1511
|
-
|
|
1512
|
-
if (update) {
|
|
1513
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
return Value::undefined();
|
|
1517
|
-
|
|
1518
|
-
});
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
CREATE_FUNC("__Mason_getFlexGrow", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1522
|
-
const Value *arguments, size_t count) -> Value {
|
|
1523
|
-
|
|
1524
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1525
|
-
|
|
1526
|
-
auto ret = (double) [MasonReexports style_get_flex_grow:style];
|
|
1527
|
-
|
|
1528
|
-
return Value(ret);
|
|
1529
|
-
|
|
1530
|
-
}
|
|
1531
|
-
|
|
1532
|
-
);
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
CREATE_FUNC("__Mason_setFlexGrow", 5, [](Runtime &runtime, const Value &thisValue,
|
|
1536
|
-
const Value *arguments, size_t count) -> Value {
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1540
|
-
|
|
1541
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1542
|
-
|
|
1543
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1544
|
-
auto update = arguments[4].asBool();
|
|
1545
|
-
|
|
1546
|
-
auto new_value = (float) arguments[3].asNumber();
|
|
1547
|
-
|
|
1548
|
-
[MasonReexports style_set_flex_grow:style :new_value];
|
|
1549
|
-
|
|
1550
|
-
if (update) {
|
|
1551
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
return Value::undefined();
|
|
1555
|
-
|
|
1556
|
-
});
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
CREATE_FUNC("__Mason_getFlexShrink", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1560
|
-
const Value *arguments, size_t count) -> Value {
|
|
1561
|
-
|
|
1562
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1563
|
-
|
|
1564
|
-
auto ret = (double) [MasonReexports style_get_flex_shrink:style];
|
|
1565
|
-
|
|
1566
|
-
return Value(ret);
|
|
1567
|
-
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
);
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
CREATE_FUNC("__Mason_setFlexShrink", 5, [](Runtime &runtime, const Value &thisValue,
|
|
1574
|
-
const Value *arguments, size_t count) -> Value {
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1578
|
-
|
|
1579
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1580
|
-
|
|
1581
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1582
|
-
auto update = arguments[4].asBool();
|
|
1583
|
-
|
|
1584
|
-
auto new_value = (float) arguments[3].asNumber();
|
|
1585
|
-
|
|
1586
|
-
[MasonReexports style_set_flex_shrink:style : new_value];
|
|
1587
|
-
|
|
1588
|
-
if (update) {
|
|
1589
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
return Value::undefined();
|
|
1593
|
-
|
|
1594
|
-
});
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
CREATE_FUNC("__Mason_getFlexBasis", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1598
|
-
const Value *arguments, size_t count) -> Value {
|
|
1599
|
-
|
|
1600
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1601
|
-
|
|
1602
|
-
auto ret = [MasonReexports style_get_flex_basis:style];
|
|
1603
|
-
|
|
1604
|
-
return dimensionToJS(runtime, ret);
|
|
1605
|
-
|
|
1606
|
-
});
|
|
1607
|
-
|
|
1608
|
-
CREATE_FUNC("__Mason_setFlexBasis", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1609
|
-
const Value *arguments, size_t count) -> Value {
|
|
1610
|
-
|
|
1611
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1612
|
-
|
|
1613
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1614
|
-
|
|
1615
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1616
|
-
auto update = arguments[5].asBool();
|
|
1617
|
-
|
|
1618
|
-
auto value = (float) arguments[3].asNumber();
|
|
1619
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1620
|
-
|
|
1621
|
-
[MasonReexports style_set_flex_basis:style :value :jsToDimensionType(value_type)];
|
|
1622
|
-
|
|
1623
|
-
if (update) {
|
|
1624
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
return Value::undefined();
|
|
1628
|
-
|
|
1629
|
-
});
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
CREATE_FUNC("__Mason_getGap", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1633
|
-
const Value *arguments, size_t count) -> Value {
|
|
1634
|
-
|
|
1635
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1636
|
-
|
|
1637
|
-
auto size = [MasonReexports style_get_gap: style];
|
|
1638
|
-
|
|
1639
|
-
return sizeToJS(runtime, size);
|
|
1640
|
-
|
|
1641
|
-
});
|
|
1642
|
-
|
|
1643
|
-
CREATE_FUNC("__Mason_setGap", 8, [](Runtime &runtime, const Value &thisValue,
|
|
1644
|
-
const Value *arguments, size_t count) -> Value {
|
|
1645
|
-
|
|
1646
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1647
|
-
|
|
1648
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1649
|
-
|
|
1650
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1651
|
-
|
|
1652
|
-
auto update = arguments[7].asBool();
|
|
1653
|
-
|
|
1654
|
-
auto width_value = (float) arguments[3].asNumber();
|
|
1655
|
-
auto width_type = (int) arguments[4].asNumber();
|
|
1656
|
-
|
|
1657
|
-
auto height_value = (float) arguments[5].asNumber();
|
|
1658
|
-
auto height_type = (int) arguments[6].asNumber();
|
|
1659
|
-
|
|
1660
|
-
[MasonReexports style_set_gap:style :width_value :jsToLengthPercentageType(width_type) :height_value :jsToLengthPercentageType(height_type)];
|
|
1661
|
-
|
|
1662
|
-
if (update) {
|
|
1663
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
return Value::undefined();
|
|
1667
|
-
|
|
1668
|
-
});
|
|
1669
|
-
|
|
1670
|
-
CREATE_FUNC("__Mason_getRowGap", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1671
|
-
const Value *arguments, size_t count) -> Value {
|
|
1672
|
-
|
|
1673
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1674
|
-
|
|
1675
|
-
auto ret = [MasonReexports style_get_row_gap:style];
|
|
1676
|
-
|
|
1677
|
-
return lengthPercentageToJS(runtime, ret);
|
|
1678
|
-
|
|
1679
|
-
});
|
|
1680
|
-
|
|
1681
|
-
CREATE_FUNC("__Mason_setRowGap", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1682
|
-
const Value *arguments, size_t count) -> Value {
|
|
1683
|
-
|
|
1684
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1685
|
-
|
|
1686
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1687
|
-
|
|
1688
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1689
|
-
|
|
1690
|
-
auto update = arguments[5].asBool();
|
|
1691
|
-
|
|
1692
|
-
auto row_value = (float) arguments[3].asNumber();
|
|
1693
|
-
auto row_type = (int) arguments[4].asNumber();
|
|
1694
|
-
|
|
1695
|
-
[MasonReexports style_set_row_gap:style :row_value :jsToLengthPercentageType(row_type)];
|
|
1696
|
-
|
|
1697
|
-
if (update) {
|
|
1698
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
return Value::undefined();
|
|
1702
|
-
|
|
1703
|
-
});
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
CREATE_FUNC("__Mason_getColumnGap", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1707
|
-
const Value *arguments, size_t count) -> Value {
|
|
1708
|
-
|
|
1709
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1710
|
-
|
|
1711
|
-
auto ret = [MasonReexports style_get_column_gap:style];
|
|
1712
|
-
|
|
1713
|
-
return lengthPercentageToJS(runtime, ret);
|
|
1714
|
-
|
|
1715
|
-
});
|
|
1716
|
-
|
|
1717
|
-
CREATE_FUNC("__Mason_setColumnGap", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1718
|
-
const Value *arguments, size_t count) -> Value {
|
|
1719
|
-
|
|
1720
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1721
|
-
|
|
1722
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1723
|
-
|
|
1724
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1725
|
-
|
|
1726
|
-
auto update = arguments[5].asBool();
|
|
1727
|
-
|
|
1728
|
-
auto row_value = (float) arguments[3].asNumber();
|
|
1729
|
-
auto row_type = (int) arguments[4].asNumber();
|
|
1730
|
-
|
|
1731
|
-
[MasonReexports style_set_column_gap:style :row_value :jsToLengthPercentageType(row_type)];
|
|
1732
|
-
|
|
1733
|
-
if (update) {
|
|
1734
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1735
|
-
}
|
|
1736
|
-
|
|
1737
|
-
return Value::undefined();
|
|
1738
|
-
|
|
1739
|
-
});
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
CREATE_FUNC("__Mason_getAspectRatio", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1743
|
-
const Value *arguments, size_t count) -> Value {
|
|
1744
|
-
|
|
1745
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1746
|
-
|
|
1747
|
-
auto ret = (double) [MasonReexports style_get_aspect_ratio:style];
|
|
1748
|
-
|
|
1749
|
-
return Value(ret);
|
|
1750
|
-
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
);
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
CREATE_FUNC("__Mason_setAspectRatio", 5, [](Runtime &runtime, const Value &thisValue,
|
|
1757
|
-
const Value *arguments, size_t count) -> Value {
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1761
|
-
|
|
1762
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1763
|
-
|
|
1764
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1765
|
-
auto update = arguments[4].asBool();
|
|
1766
|
-
|
|
1767
|
-
auto new_value = (float) arguments[3].asNumber();
|
|
1768
|
-
|
|
1769
|
-
[MasonReexports style_set_aspect_ratio:style :new_value];
|
|
1770
|
-
|
|
1771
|
-
if (update) {
|
|
1772
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1773
|
-
}
|
|
1774
|
-
|
|
1775
|
-
return Value::undefined();
|
|
1776
|
-
|
|
1777
|
-
});
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
CREATE_FUNC("__Mason_getFlexDirection", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1781
|
-
const Value *arguments, size_t count) -> Value {
|
|
1782
|
-
|
|
1783
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1784
|
-
|
|
1785
|
-
auto value = [MasonReexports style_get_flex_direction:style];
|
|
1786
|
-
|
|
1787
|
-
return Value(value);
|
|
1788
|
-
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
);
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
CREATE_FUNC("__Mason_setFlexDirection", 5, [](Runtime &runtime, const Value &thisValue,
|
|
1795
|
-
const Value *arguments, size_t count) -> Value {
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1799
|
-
|
|
1800
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1801
|
-
|
|
1802
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1803
|
-
auto update = arguments[4].asBool();
|
|
1804
|
-
|
|
1805
|
-
auto direction = (int) arguments[3].asNumber();
|
|
1806
|
-
|
|
1807
|
-
[MasonReexports style_set_flex_direction:style :direction];
|
|
1808
|
-
|
|
1809
|
-
if (update) {
|
|
1810
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
return Value::undefined();
|
|
1814
|
-
|
|
1815
|
-
});
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
CREATE_FUNC("__Mason_getMinWidth", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1819
|
-
const Value *arguments, size_t count) -> Value {
|
|
1820
|
-
|
|
1821
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1822
|
-
|
|
1823
|
-
auto width = [MasonReexports style_get_min_width:style];
|
|
1824
|
-
|
|
1825
|
-
return dimensionToJS(runtime, width);
|
|
1826
|
-
|
|
1827
|
-
});
|
|
1828
|
-
|
|
1829
|
-
CREATE_FUNC("__Mason_setMinWidth", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1830
|
-
const Value *arguments, size_t count) -> Value {
|
|
1831
|
-
|
|
1832
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1833
|
-
|
|
1834
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1835
|
-
|
|
1836
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1837
|
-
auto update = arguments[5].asBool();
|
|
1838
|
-
|
|
1839
|
-
auto value = (float) arguments[3].asNumber();
|
|
1840
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1841
|
-
|
|
1842
|
-
[MasonReexports style_set_min_width:style :value :jsToDimensionType(value_type)];
|
|
1843
|
-
|
|
1844
|
-
if (update) {
|
|
1845
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
return Value::undefined();
|
|
1849
|
-
|
|
1850
|
-
});
|
|
1851
|
-
|
|
1852
|
-
CREATE_FUNC("__Mason_getMinHeight", 2, [](Runtime &runtime, const Value &thisValue,
|
|
1853
|
-
const Value *arguments, size_t count) -> Value {
|
|
1854
|
-
|
|
1855
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1856
|
-
|
|
1857
|
-
auto height = [MasonReexports style_get_min_height:style];
|
|
1858
|
-
|
|
1859
|
-
return dimensionToJS(runtime, height);
|
|
1860
|
-
});
|
|
1861
|
-
|
|
1862
|
-
CREATE_FUNC("__Mason_setMinHeight", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1863
|
-
const Value *arguments, size_t count) -> Value {
|
|
1864
|
-
|
|
1865
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1866
|
-
|
|
1867
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1868
|
-
|
|
1869
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1870
|
-
auto update = arguments[5].asBool();
|
|
1871
|
-
|
|
1872
|
-
auto value = (float) arguments[3].asNumber();
|
|
1873
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
[MasonReexports style_set_min_height:style :value :jsToDimensionType(value_type)];
|
|
1877
|
-
|
|
1878
|
-
if (update) {
|
|
1879
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
return Value::undefined();
|
|
1883
|
-
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
);
|
|
1887
|
-
|
|
1888
|
-
CREATE_FUNC("__Mason_getWidth", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1889
|
-
const Value *arguments, size_t count) -> Value {
|
|
1890
|
-
|
|
1891
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1892
|
-
|
|
1893
|
-
auto width = [MasonReexports style_get_width:style];
|
|
1894
|
-
|
|
1895
|
-
return dimensionToJS(runtime, width);
|
|
1896
|
-
|
|
1897
|
-
});
|
|
1898
|
-
|
|
1899
|
-
CREATE_FUNC("__Mason_setWidth", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1900
|
-
const Value *arguments, size_t count) -> Value {
|
|
1901
|
-
|
|
1902
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1903
|
-
|
|
1904
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1905
|
-
|
|
1906
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1907
|
-
auto update = arguments[5].asBool();
|
|
1908
|
-
|
|
1909
|
-
auto value = (float) arguments[3].asNumber();
|
|
1910
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
[MasonReexports style_set_width:style :value :jsToDimensionType(value_type)];
|
|
1914
|
-
|
|
1915
|
-
if (update) {
|
|
1916
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
return Value::undefined();
|
|
1920
|
-
|
|
1921
|
-
});
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
CREATE_FUNC("__Mason_getHeight", 2, [](Runtime &runtime, const Value &thisValue,
|
|
1925
|
-
const Value *arguments, size_t count) -> Value {
|
|
1926
|
-
|
|
1927
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1928
|
-
|
|
1929
|
-
auto height = [MasonReexports style_get_min_height:style];
|
|
1930
|
-
|
|
1931
|
-
return dimensionToJS(runtime, height);
|
|
1932
|
-
});
|
|
1933
|
-
|
|
1934
|
-
CREATE_FUNC("__Mason_setHeight", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1935
|
-
const Value *arguments, size_t count) -> Value {
|
|
1936
|
-
|
|
1937
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1938
|
-
|
|
1939
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1940
|
-
|
|
1941
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1942
|
-
auto update = arguments[5].asBool();
|
|
1943
|
-
|
|
1944
|
-
auto value = (float) arguments[3].asNumber();
|
|
1945
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
[MasonReexports style_set_height:style :value :jsToDimensionType(value_type)];
|
|
1949
|
-
|
|
1950
|
-
if (update) {
|
|
1951
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
return Value::undefined();
|
|
1955
|
-
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
);
|
|
1959
|
-
|
|
1960
|
-
CREATE_FUNC("__Mason_getMaxWidth", 1, [](Runtime &runtime, const Value &thisValue,
|
|
1961
|
-
const Value *arguments, size_t count) -> Value {
|
|
1962
|
-
|
|
1963
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1964
|
-
|
|
1965
|
-
auto width = [MasonReexports style_get_max_width:style];
|
|
1966
|
-
|
|
1967
|
-
return dimensionToJS(runtime, width);
|
|
1968
|
-
|
|
1969
|
-
});
|
|
1970
|
-
|
|
1971
|
-
CREATE_FUNC("__Mason_setMaxWidth", 6, [](Runtime &runtime, const Value &thisValue,
|
|
1972
|
-
const Value *arguments, size_t count) -> Value {
|
|
1973
|
-
|
|
1974
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
1975
|
-
|
|
1976
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
1977
|
-
|
|
1978
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
1979
|
-
auto update = arguments[5].asBool();
|
|
1980
|
-
|
|
1981
|
-
auto value = (float) arguments[3].asNumber();
|
|
1982
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
[MasonReexports style_set_max_width:style :value :jsToDimensionType(value_type)];
|
|
1986
|
-
|
|
1987
|
-
if (update) {
|
|
1988
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
1989
|
-
}
|
|
1990
|
-
|
|
1991
|
-
return Value::undefined();
|
|
1992
|
-
|
|
1993
|
-
});
|
|
1994
|
-
|
|
1995
|
-
CREATE_FUNC("__Mason_getMaxHeight", 2, [](Runtime &runtime, const Value &thisValue,
|
|
1996
|
-
const Value *arguments, size_t count) -> Value {
|
|
1997
|
-
|
|
1998
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
1999
|
-
|
|
2000
|
-
auto height = [MasonReexports style_get_max_height:style];
|
|
2001
|
-
|
|
2002
|
-
return dimensionToJS(runtime, height);
|
|
2003
|
-
});
|
|
2004
|
-
|
|
2005
|
-
CREATE_FUNC("__Mason_setMaxHeight", 6, [](Runtime &runtime, const Value &thisValue,
|
|
2006
|
-
const Value *arguments, size_t count) -> Value {
|
|
2007
|
-
|
|
2008
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2009
|
-
|
|
2010
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2011
|
-
|
|
2012
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2013
|
-
auto update = arguments[5].asBool();
|
|
2014
|
-
|
|
2015
|
-
auto value = (float) arguments[3].asNumber();
|
|
2016
|
-
auto value_type = (int) arguments[4].asNumber();
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
[MasonReexports style_set_max_width:style :value :jsToDimensionType(value_type)];
|
|
2020
|
-
|
|
2021
|
-
if (update) {
|
|
2022
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2023
|
-
}
|
|
2024
|
-
|
|
2025
|
-
return Value::undefined();
|
|
2026
|
-
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
);
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
CREATE_FUNC("__Mason_getGridAutoRows", 2, [](Runtime &runtime, const Value &thisValue,
|
|
2036
|
-
const Value *arguments, size_t count) -> Value {
|
|
2037
|
-
|
|
2038
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2039
|
-
|
|
2040
|
-
auto rows = [MasonReexports style_get_grid_auto_rows:style];
|
|
2041
|
-
|
|
2042
|
-
auto parsed = [MasonReexports util_parse_non_repeated_track_sizing_function:rows];
|
|
2043
|
-
|
|
2044
|
-
[MasonReexports destroyWithNonRepeatedTrackSizingFunctionArray: rows];
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
return facebook::jsi::String::createFromUtf8(runtime, std::string(parsed.UTF8String, parsed.length));
|
|
2048
|
-
});
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
CREATE_FUNC("__Mason_setGridAutoRows", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2052
|
-
const Value *arguments, size_t count) -> Value {
|
|
2053
|
-
|
|
2054
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2055
|
-
|
|
2056
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2057
|
-
|
|
2058
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2059
|
-
auto update = arguments[4].asBool();
|
|
2060
|
-
|
|
2061
|
-
auto array = arguments[3].asObject(runtime).getArray(runtime);
|
|
2062
|
-
|
|
2063
|
-
auto value = toNonRepeatedTrackSizingFunction(runtime, array);
|
|
2064
|
-
|
|
2065
|
-
CMasonNonRepeatedTrackSizingFunctionArray val;
|
|
2066
|
-
val.array = value.data();
|
|
2067
|
-
val.length = value.size();
|
|
2068
|
-
|
|
2069
|
-
[MasonReexports style_set_grid_auto_rows:style :&val];
|
|
2070
|
-
|
|
2071
|
-
if (update) {
|
|
2072
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
return Value::undefined();
|
|
2076
|
-
|
|
2077
|
-
}
|
|
2078
|
-
|
|
2079
|
-
);
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
CREATE_FUNC("__Mason_getGridAutoColumns", 2, [](Runtime &runtime, const Value &thisValue,
|
|
2083
|
-
const Value *arguments, size_t count) -> Value {
|
|
2084
|
-
|
|
2085
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
auto columns = [MasonReexports style_get_grid_auto_columns:style];
|
|
2089
|
-
|
|
2090
|
-
auto parsed = [MasonReexports util_parse_non_repeated_track_sizing_function:columns];
|
|
2091
|
-
|
|
2092
|
-
[MasonReexports destroyWithNonRepeatedTrackSizingFunctionArray:columns];
|
|
2093
|
-
|
|
2094
|
-
return facebook::jsi::String::createFromUtf8(runtime, std::string(parsed.UTF8String, parsed.length));
|
|
2095
|
-
});
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
CREATE_FUNC("__Mason_setGridAutoColumns", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2099
|
-
const Value *arguments, size_t count) -> Value {
|
|
2100
|
-
|
|
2101
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2102
|
-
|
|
2103
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2104
|
-
|
|
2105
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2106
|
-
auto update = arguments[4].asBool();
|
|
2107
|
-
|
|
2108
|
-
auto array = arguments[3].asObject(runtime).getArray(runtime);
|
|
2109
|
-
|
|
2110
|
-
auto value = toNonRepeatedTrackSizingFunction(runtime, array);
|
|
2111
|
-
|
|
2112
|
-
CMasonNonRepeatedTrackSizingFunctionArray val;
|
|
2113
|
-
val.array = value.data();
|
|
2114
|
-
val.length = value.size();
|
|
2115
|
-
|
|
2116
|
-
[MasonReexports style_set_grid_auto_columns:style :&val];
|
|
2117
|
-
|
|
2118
|
-
if (update) {
|
|
2119
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2120
|
-
}
|
|
2121
|
-
|
|
2122
|
-
return Value::undefined();
|
|
2123
|
-
|
|
2124
|
-
}
|
|
2125
|
-
|
|
2126
|
-
);
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
CREATE_FUNC("__Mason_getAutoFlow", 1, [](Runtime &runtime, const Value &thisValue,
|
|
2130
|
-
const Value *arguments, size_t count) -> Value {
|
|
2131
|
-
|
|
2132
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2133
|
-
|
|
2134
|
-
auto value = [MasonReexports style_get_grid_auto_flow: style];
|
|
2135
|
-
|
|
2136
|
-
return Value(value);
|
|
2137
|
-
|
|
2138
|
-
}
|
|
2139
|
-
|
|
2140
|
-
);
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
CREATE_FUNC("__Mason_setAutoFlow", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2144
|
-
const Value *arguments, size_t count) -> Value {
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2148
|
-
|
|
2149
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2150
|
-
|
|
2151
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2152
|
-
auto update = arguments[4].asBool();
|
|
2153
|
-
|
|
2154
|
-
auto flow = (int) arguments[3].asNumber();
|
|
2155
|
-
|
|
2156
|
-
[MasonReexports style_set_grid_auto_flow:style :flow];
|
|
2157
|
-
|
|
2158
|
-
if (update) {
|
|
2159
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
|
-
return Value::undefined();
|
|
2163
|
-
|
|
2164
|
-
});
|
|
2165
|
-
|
|
2166
|
-
CREATE_FUNC("__Mason_getArea", 1, [](Runtime &runtime, const Value &thisValue,
|
|
2167
|
-
const Value *arguments, size_t count) -> Value {
|
|
2168
|
-
|
|
2169
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2170
|
-
|
|
2171
|
-
auto row_start = [MasonReexports style_get_grid_row_start: style];
|
|
2172
|
-
auto row_end = [MasonReexports style_get_grid_row_start: style];
|
|
2173
|
-
|
|
2174
|
-
auto col_start = [MasonReexports style_get_grid_column_start: style];
|
|
2175
|
-
auto col_end = [MasonReexports style_get_grid_column_start: style];
|
|
2176
|
-
|
|
2177
|
-
auto ret = facebook::jsi::Object(runtime);
|
|
2178
|
-
ret.setProperty(runtime, "col_start_type", (int) col_start.value_type);
|
|
2179
|
-
ret.setProperty(runtime, "col_start_value", (int) col_start.value);
|
|
2180
|
-
ret.setProperty(runtime, "col_end_type", (int) col_end.value_type);
|
|
2181
|
-
ret.setProperty(runtime, "col_end_value", (int) col_end.value);
|
|
2182
|
-
|
|
2183
|
-
ret.setProperty(runtime, "row_start_type", (int) row_start.value_type);
|
|
2184
|
-
ret.setProperty(runtime, "row_start_value", (int) row_start.value);
|
|
2185
|
-
ret.setProperty(runtime, "row_end_type", (int) row_end.value_type);
|
|
2186
|
-
ret.setProperty(runtime, "row_end_value", (int) row_end.value);
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
std::stringstream ss;
|
|
2190
|
-
if (col_start.value == col_end.value && col_start.value_type == col_end.value_type) {
|
|
2191
|
-
if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2192
|
-
ss << "auto";
|
|
2193
|
-
} else {
|
|
2194
|
-
ss << col_start.value;
|
|
2195
|
-
if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2196
|
-
ss << " span";
|
|
2197
|
-
}
|
|
2198
|
-
}
|
|
2199
|
-
} else {
|
|
2200
|
-
if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2201
|
-
ss << "auto";
|
|
2202
|
-
} else {
|
|
2203
|
-
ss << col_start.value;
|
|
2204
|
-
if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2205
|
-
ss << " span";
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
|
|
2209
|
-
ss << " / ";
|
|
2210
|
-
|
|
2211
|
-
if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2212
|
-
ss << "auto";
|
|
2213
|
-
} else {
|
|
2214
|
-
ss << col_end.value;
|
|
2215
|
-
if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2216
|
-
ss << " span";
|
|
2217
|
-
}
|
|
2218
|
-
}
|
|
2219
|
-
}
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
ret.setProperty(runtime, "colFormatted", ss.str().c_str());
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
std::stringstream row_ss;
|
|
2226
|
-
if (row_start.value == row_end.value && row_start.value_type == row_end.value_type) {
|
|
2227
|
-
if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2228
|
-
row_ss << "auto";
|
|
2229
|
-
} else {
|
|
2230
|
-
row_ss << row_start.value;
|
|
2231
|
-
if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2232
|
-
row_ss << " span";
|
|
2233
|
-
}
|
|
2234
|
-
}
|
|
2235
|
-
} else {
|
|
2236
|
-
if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2237
|
-
row_ss << "auto";
|
|
2238
|
-
} else {
|
|
2239
|
-
row_ss << row_start.value;
|
|
2240
|
-
if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2241
|
-
row_ss << " span";
|
|
2242
|
-
}
|
|
2243
|
-
}
|
|
2244
|
-
|
|
2245
|
-
row_ss << " / ";
|
|
2246
|
-
|
|
2247
|
-
if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2248
|
-
row_ss << "auto";
|
|
2249
|
-
} else {
|
|
2250
|
-
row_ss << row_end.value;
|
|
2251
|
-
if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2252
|
-
row_ss << " span";
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
ret.setProperty(runtime, "rowFormatted", row_ss.str().c_str());
|
|
2258
|
-
|
|
2259
|
-
return ret;
|
|
2260
|
-
|
|
2261
|
-
}
|
|
2262
|
-
|
|
2263
|
-
);
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
CREATE_FUNC("__Mason_setArea", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2267
|
-
const Value *arguments, size_t count) -> Value {
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2271
|
-
|
|
2272
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2273
|
-
|
|
2274
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2275
|
-
auto update = arguments[4].asBool();
|
|
2276
|
-
|
|
2277
|
-
auto object = arguments[3].asObject(runtime);
|
|
2278
|
-
|
|
2279
|
-
auto rowStartType = (int) object.getProperty(runtime, "row_start_type").asNumber();
|
|
2280
|
-
auto rowStartValue = (short) object.getProperty(runtime, "row_start_value").asNumber();
|
|
2281
|
-
|
|
2282
|
-
auto rowEndType = (int) object.getProperty(runtime, "row_end_type").asNumber();
|
|
2283
|
-
auto rowEndValue = (short) object.getProperty(runtime, "row_end_value").asNumber();
|
|
2284
|
-
|
|
2285
|
-
auto columnStartType = (int) object.getProperty(runtime, "col_start_type").asNumber();
|
|
2286
|
-
auto columnStartValue = (short) object.getProperty(runtime, "col_start_value").asNumber();
|
|
2287
|
-
|
|
2288
|
-
auto columnEndType = (int) object.getProperty(runtime, "col_end_type").asNumber();
|
|
2289
|
-
auto columnEndValue = (short) object.getProperty(runtime, "col_end_value").asNumber();
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
[MasonReexports style_set_grid_area:
|
|
2293
|
-
style
|
|
2294
|
-
:jsToGridPlacement(rowStartValue, rowStartType)
|
|
2295
|
-
:jsToGridPlacement(rowEndValue, rowEndType)
|
|
2296
|
-
:jsToGridPlacement(columnStartValue, columnStartType)
|
|
2297
|
-
:jsToGridPlacement(columnEndValue, columnEndType)
|
|
2298
|
-
];
|
|
2299
|
-
|
|
2300
|
-
if (update) {
|
|
2301
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2302
|
-
}
|
|
2303
|
-
|
|
2304
|
-
return Value::undefined();
|
|
2305
|
-
|
|
2306
|
-
});
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
CREATE_FUNC("__Mason_getColumn", 1, [](Runtime &runtime, const Value &thisValue,
|
|
2311
|
-
const Value *arguments, size_t count) -> Value {
|
|
2312
|
-
|
|
2313
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2314
|
-
|
|
2315
|
-
auto col_start = [MasonReexports style_get_grid_column_start: style];
|
|
2316
|
-
auto col_end = [MasonReexports style_get_grid_column_start: style];
|
|
2317
|
-
|
|
2318
|
-
auto ret = facebook::jsi::Object(runtime);
|
|
2319
|
-
ret.setProperty(runtime, "col_start_type", (int)col_start.value_type);
|
|
2320
|
-
ret.setProperty(runtime, "col_start_value", (int)col_start.value);
|
|
2321
|
-
ret.setProperty(runtime, "col_end_type", (int)col_end.value_type);
|
|
2322
|
-
ret.setProperty(runtime, "col_end_value", (int)col_end.value);
|
|
2323
|
-
|
|
2324
|
-
std::stringstream ss;
|
|
2325
|
-
if (col_start.value == col_end.value && col_start.value_type == col_end.value_type) {
|
|
2326
|
-
if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2327
|
-
ss << "auto";
|
|
2328
|
-
} else {
|
|
2329
|
-
ss << col_start.value;
|
|
2330
|
-
if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2331
|
-
ss << " span";
|
|
2332
|
-
}
|
|
2333
|
-
}
|
|
2334
|
-
} else {
|
|
2335
|
-
if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2336
|
-
ss << "auto";
|
|
2337
|
-
} else {
|
|
2338
|
-
ss << col_start.value;
|
|
2339
|
-
if (col_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2340
|
-
ss << " span";
|
|
2341
|
-
}
|
|
2342
|
-
}
|
|
2343
|
-
|
|
2344
|
-
ss << " / ";
|
|
2345
|
-
|
|
2346
|
-
if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2347
|
-
ss << "auto";
|
|
2348
|
-
} else {
|
|
2349
|
-
ss << col_end.value;
|
|
2350
|
-
if (col_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2351
|
-
ss << " span";
|
|
2352
|
-
}
|
|
2353
|
-
}
|
|
2354
|
-
}
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
ret.setProperty(runtime, "colFormatted", ss.str().c_str());
|
|
2358
|
-
|
|
2359
|
-
return ret;
|
|
2360
|
-
|
|
2361
|
-
}
|
|
2362
|
-
|
|
2363
|
-
);
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
CREATE_FUNC("__Mason_setColumn", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2367
|
-
const Value *arguments, size_t count) -> Value {
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2371
|
-
|
|
2372
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2373
|
-
|
|
2374
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2375
|
-
auto update = arguments[4].asBool();
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
auto object = arguments[3].asObject(runtime);
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
auto columnStartType = (int) object.getProperty(runtime, "col_start_type").asNumber();
|
|
2382
|
-
auto columnStartValue = (short) object.getProperty(runtime, "col_start_value").asNumber();
|
|
2383
|
-
|
|
2384
|
-
auto columnEndType = (int) object.getProperty(runtime, "col_end_type").asNumber();
|
|
2385
|
-
auto columnEndValue = (short) object.getProperty(runtime, "col_end_value").asNumber();
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
[MasonReexports style_set_grid_column:style :jsToGridPlacement(columnStartValue, columnStartType) :jsToGridPlacement(columnEndValue, columnEndType)];
|
|
2389
|
-
|
|
2390
|
-
if (update) {
|
|
2391
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2392
|
-
}
|
|
2393
|
-
|
|
2394
|
-
return Value::undefined();
|
|
2395
|
-
|
|
2396
|
-
});
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
CREATE_FUNC("__Mason_getColumnStart", 1, [](Runtime &runtime, const Value &thisValue,
|
|
2400
|
-
const Value *arguments, size_t count) -> Value {
|
|
2401
|
-
|
|
2402
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2403
|
-
|
|
2404
|
-
auto value = [MasonReexports style_get_grid_column_start: style];
|
|
2405
|
-
|
|
2406
|
-
return gridPlacementToJS(runtime, value);
|
|
2407
|
-
|
|
2408
|
-
}
|
|
2409
|
-
|
|
2410
|
-
);
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
CREATE_FUNC("__Mason_setColumnStart", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2414
|
-
const Value *arguments, size_t count) -> Value {
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2418
|
-
|
|
2419
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2420
|
-
|
|
2421
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2422
|
-
auto update = arguments[4].asBool();
|
|
2423
|
-
|
|
2424
|
-
auto object = arguments[3].asObject(runtime);
|
|
2425
|
-
|
|
2426
|
-
auto value = (short) object.getProperty(runtime, "value").asNumber();
|
|
2427
|
-
auto type = (int) object.getProperty(runtime, "type").asNumber();
|
|
2428
|
-
|
|
2429
|
-
if (type >= 0 && type < 3) {
|
|
2430
|
-
[MasonReexports style_set_grid_column_start:style :jsToGridPlacement(value, type)];
|
|
2431
|
-
|
|
2432
|
-
if (update) {
|
|
2433
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2434
|
-
}
|
|
2435
|
-
}
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
return Value::undefined();
|
|
2439
|
-
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
);
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
CREATE_FUNC("__Mason_getColumnEnd", 1, [](Runtime &runtime, const Value &thisValue,
|
|
2446
|
-
const Value *arguments, size_t count) -> Value {
|
|
2447
|
-
|
|
2448
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2449
|
-
|
|
2450
|
-
auto value = [MasonReexports style_get_grid_column_end: style];
|
|
2451
|
-
|
|
2452
|
-
return gridPlacementToJS(runtime, value);
|
|
2453
|
-
|
|
2454
|
-
}
|
|
2455
|
-
|
|
2456
|
-
);
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
CREATE_FUNC("__Mason_setColumnEnd", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2460
|
-
const Value *arguments, size_t count) -> Value {
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2464
|
-
|
|
2465
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2466
|
-
|
|
2467
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2468
|
-
auto update = arguments[4].asBool();
|
|
2469
|
-
|
|
2470
|
-
auto object = arguments[3].asObject(runtime);
|
|
2471
|
-
|
|
2472
|
-
auto value = (short) object.getProperty(runtime, "value").asNumber();
|
|
2473
|
-
auto type = (int) object.getProperty(runtime, "type").asNumber();
|
|
2474
|
-
|
|
2475
|
-
if (type >= 0 && type < 3) {
|
|
2476
|
-
[MasonReexports style_set_grid_column_end:style :jsToGridPlacement(value, type)];
|
|
2477
|
-
|
|
2478
|
-
if (update) {
|
|
2479
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
return Value::undefined();
|
|
2485
|
-
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
|
-
);
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
CREATE_FUNC("__Mason_getRow", 1, [](Runtime &runtime, const Value &thisValue,
|
|
2492
|
-
const Value *arguments, size_t count) -> Value {
|
|
2493
|
-
|
|
2494
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2495
|
-
|
|
2496
|
-
auto row_start = [MasonReexports style_get_grid_row_start: style];
|
|
2497
|
-
auto row_end = [MasonReexports style_get_grid_row_start: style];
|
|
2498
|
-
|
|
2499
|
-
auto ret = facebook::jsi::Object(runtime);
|
|
2500
|
-
|
|
2501
|
-
ret.setProperty(runtime, "row_start_type", (int)row_start.value_type);
|
|
2502
|
-
ret.setProperty(runtime, "row_start_value", (int)row_start.value);
|
|
2503
|
-
ret.setProperty(runtime, "row_end_type", (int)row_end.value_type);
|
|
2504
|
-
ret.setProperty(runtime, "row_end_value", (int)row_end.value);
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
std::stringstream row_ss;
|
|
2508
|
-
if (row_start.value == row_end.value && row_start.value_type == row_end.value_type) {
|
|
2509
|
-
if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2510
|
-
row_ss << "auto";
|
|
2511
|
-
} else {
|
|
2512
|
-
row_ss << row_start.value;
|
|
2513
|
-
if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2514
|
-
row_ss << " span";
|
|
2515
|
-
}
|
|
2516
|
-
}
|
|
2517
|
-
} else {
|
|
2518
|
-
if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2519
|
-
row_ss << "auto";
|
|
2520
|
-
} else {
|
|
2521
|
-
row_ss << row_start.value;
|
|
2522
|
-
if (row_start.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2523
|
-
row_ss << " span";
|
|
2524
|
-
}
|
|
2525
|
-
}
|
|
2526
|
-
|
|
2527
|
-
row_ss << " / ";
|
|
2528
|
-
|
|
2529
|
-
if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeAuto) {
|
|
2530
|
-
row_ss << "auto";
|
|
2531
|
-
} else {
|
|
2532
|
-
row_ss << row_end.value;
|
|
2533
|
-
if (row_end.value_type == CMasonGridPlacementType::MasonGridPlacementTypeSpan) {
|
|
2534
|
-
row_ss << " span";
|
|
2535
|
-
}
|
|
2536
|
-
}
|
|
2537
|
-
}
|
|
2538
|
-
|
|
2539
|
-
ret.setProperty(runtime, "rowFormatted", row_ss.str().c_str());
|
|
2540
|
-
|
|
2541
|
-
return ret;
|
|
2542
|
-
|
|
2543
|
-
}
|
|
2544
|
-
|
|
2545
|
-
);
|
|
2546
|
-
|
|
2547
|
-
CREATE_FUNC("__Mason_setRow", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2548
|
-
const Value *arguments, size_t count) -> Value {
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2552
|
-
|
|
2553
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2554
|
-
|
|
2555
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2556
|
-
auto update = arguments[4].asBool();
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
auto object = arguments[3].asObject(runtime);
|
|
2560
|
-
|
|
2561
|
-
auto rowStartType = (int) object.getProperty(runtime, "row_start_type").asNumber();
|
|
2562
|
-
auto rowStartValue = (short) object.getProperty(runtime, "row_start_value").asNumber();
|
|
2563
|
-
|
|
2564
|
-
auto rowEndType = (int) object.getProperty(runtime, "row_end_type").asNumber();
|
|
2565
|
-
auto rowEndValue = (short) object.getProperty(runtime, "row_end_value").asNumber();
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
[MasonReexports style_set_grid_row:style :jsToGridPlacement(rowStartValue, rowStartType) :jsToGridPlacement(rowEndValue,rowEndType)];
|
|
2569
|
-
|
|
2570
|
-
if (update) {
|
|
2571
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2572
|
-
}
|
|
2573
|
-
|
|
2574
|
-
return Value::undefined();
|
|
2575
|
-
|
|
2576
|
-
});
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
CREATE_FUNC("__Mason_getRowStart", 1, [](Runtime &runtime, const Value &thisValue,
|
|
2580
|
-
const Value *arguments, size_t count) -> Value {
|
|
2581
|
-
|
|
2582
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2583
|
-
|
|
2584
|
-
auto value = [MasonReexports style_get_grid_row_start: style];
|
|
2585
|
-
|
|
2586
|
-
return gridPlacementToJS(runtime, value);
|
|
2587
|
-
|
|
2588
|
-
}
|
|
2589
|
-
|
|
2590
|
-
);
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
CREATE_FUNC("__Mason_setRowStart", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2594
|
-
const Value *arguments, size_t count) -> Value {
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2598
|
-
|
|
2599
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2600
|
-
|
|
2601
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2602
|
-
auto update = arguments[4].asBool();
|
|
2603
|
-
|
|
2604
|
-
auto object = arguments[3].asObject(runtime);
|
|
2605
|
-
|
|
2606
|
-
auto value = (short) object.getProperty(runtime, "value").asNumber();
|
|
2607
|
-
auto type = (int) object.getProperty(runtime, "type").asNumber();
|
|
2608
|
-
|
|
2609
|
-
if (type >= 0 && type < 3) {
|
|
2610
|
-
[MasonReexports style_set_grid_row_start: style :jsToGridPlacement(value, type)];
|
|
2611
|
-
|
|
2612
|
-
if (update) {
|
|
2613
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2614
|
-
}
|
|
2615
|
-
}
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
return Value::undefined();
|
|
2619
|
-
|
|
2620
|
-
}
|
|
2621
|
-
|
|
2622
|
-
);
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
CREATE_FUNC("__Mason_getRowEnd", 1, [](Runtime &runtime, const Value &thisValue,
|
|
2626
|
-
const Value *arguments, size_t count) -> Value {
|
|
2627
|
-
|
|
2628
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2629
|
-
|
|
2630
|
-
auto value = [MasonReexports style_get_grid_row_end: style];
|
|
2631
|
-
|
|
2632
|
-
return gridPlacementToJS(runtime, value);
|
|
2633
|
-
|
|
2634
|
-
}
|
|
2635
|
-
|
|
2636
|
-
);
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
CREATE_FUNC("__Mason_setRowEnd", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2640
|
-
const Value *arguments, size_t count) -> Value {
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2644
|
-
|
|
2645
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2646
|
-
|
|
2647
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2648
|
-
auto update = arguments[4].asBool();
|
|
2649
|
-
|
|
2650
|
-
auto object = arguments[3].asObject(runtime);
|
|
2651
|
-
|
|
2652
|
-
auto value = (short) object.getProperty(runtime, "value").asNumber();
|
|
2653
|
-
auto type = (int) object.getProperty(runtime, "type").asNumber();
|
|
2654
|
-
|
|
2655
|
-
if (type >= 0 && type < 3) {
|
|
2656
|
-
[MasonReexports style_set_grid_row_end: style :jsToGridPlacement(value, type)];
|
|
2657
|
-
|
|
2658
|
-
if (update) {
|
|
2659
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2660
|
-
}
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
return Value::undefined();
|
|
2665
|
-
|
|
2666
|
-
}
|
|
2667
|
-
|
|
2668
|
-
);
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
CREATE_FUNC("__Mason_getGridTemplateRows", 2, [](Runtime &runtime, const Value &thisValue,
|
|
2672
|
-
const Value *arguments, size_t count) -> Value {
|
|
2673
|
-
|
|
2674
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2675
|
-
|
|
2676
|
-
auto rows = [MasonReexports style_get_grid_template_rows: style];
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
auto parsed = [MasonReexports util_parse_auto_repeating_track_sizing_function: rows];
|
|
2680
|
-
|
|
2681
|
-
return facebook::jsi::String::createFromUtf8(runtime,
|
|
2682
|
-
std::string(parsed.UTF8String, parsed.length));
|
|
2683
|
-
});
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
CREATE_FUNC("__Mason_setGridTemplateRows", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2687
|
-
const Value *arguments, size_t count) -> Value {
|
|
2688
|
-
|
|
2689
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2690
|
-
|
|
2691
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2692
|
-
|
|
2693
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2694
|
-
auto update = arguments[4].asBool();
|
|
2695
|
-
|
|
2696
|
-
auto array = arguments[3].asObject(runtime).getArray(runtime);
|
|
2697
|
-
|
|
2698
|
-
auto value = toTrackSizingFunction(runtime, array);
|
|
2699
|
-
|
|
2700
|
-
CMasonTrackSizingFunctionArray rows = {};
|
|
2701
|
-
rows.array = value.data();
|
|
2702
|
-
rows.length = value.size();
|
|
2703
|
-
|
|
2704
|
-
[MasonReexports style_set_grid_template_rows:style :&rows];
|
|
2705
|
-
|
|
2706
|
-
for(int i = 0; i < value.size();i++){
|
|
2707
|
-
auto it = value[i];
|
|
2708
|
-
destroy_c_mason_track_sizing_function(it);
|
|
2709
|
-
}
|
|
2710
|
-
|
|
2711
|
-
if (update) {
|
|
2712
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2713
|
-
}
|
|
2714
|
-
|
|
2715
|
-
return Value::undefined();
|
|
2716
|
-
|
|
2717
|
-
}
|
|
2718
|
-
|
|
2719
|
-
);
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
CREATE_FUNC("__Mason_getGridTemplateColumns", 2, [](Runtime &runtime, const Value &thisValue,
|
|
2723
|
-
const Value *arguments, size_t count) -> Value {
|
|
2724
|
-
|
|
2725
|
-
auto style = getPointerValue(arguments[0], runtime);
|
|
2726
|
-
|
|
2727
|
-
auto columns = [MasonReexports style_get_grid_template_columns:style];
|
|
2728
|
-
|
|
2729
|
-
auto parsed = [MasonReexports util_parse_auto_repeating_track_sizing_function: columns];
|
|
2730
|
-
|
|
2731
|
-
return facebook::jsi::String::createFromUtf8(runtime,
|
|
2732
|
-
std::string(parsed.UTF8String, parsed.length));
|
|
2733
|
-
});
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
CREATE_FUNC("__Mason_setGridTemplateColumns", 5, [](Runtime &runtime, const Value &thisValue,
|
|
2737
|
-
const Value *arguments, size_t count) -> Value {
|
|
2738
|
-
|
|
2739
|
-
auto mason = getPointerValue(arguments[0], runtime);
|
|
2740
|
-
|
|
2741
|
-
auto node = getPointerValue(arguments[1], runtime);
|
|
2742
|
-
|
|
2743
|
-
auto style = getPointerValue(arguments[2], runtime);
|
|
2744
|
-
auto update = arguments[4].asBool();
|
|
2745
|
-
|
|
2746
|
-
auto array = arguments[3].asObject(runtime).getArray(runtime);
|
|
2747
|
-
|
|
2748
|
-
auto value = toTrackSizingFunction(runtime, array);
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
CMasonTrackSizingFunctionArray columns = {};
|
|
2752
|
-
columns.array = value.data();
|
|
2753
|
-
columns.length = value.size();
|
|
2754
|
-
|
|
2755
|
-
[MasonReexports style_set_grid_template_columns:style :&columns];
|
|
2756
|
-
|
|
2757
|
-
for(int i = 0; i < value.size();i++){
|
|
2758
|
-
auto it = value[i];
|
|
2759
|
-
destroy_c_mason_track_sizing_function(it);
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
|
-
if (update) {
|
|
2763
|
-
[MasonReexports node_set_style:mason :node :style];
|
|
2764
|
-
}
|
|
2765
|
-
|
|
2766
|
-
return Value::undefined();
|
|
2767
|
-
|
|
2768
|
-
}
|
|
2769
|
-
|
|
2770
|
-
);
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
}
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
@implementation JSIModule
|
|
2782
|
-
|
|
2783
|
-
- (void )install {
|
|
2784
|
-
std::shared_ptr<facebook::jsi::Runtime> rt = [JSIRuntime runtime];
|
|
2785
|
-
install(*rt);
|
|
2786
|
-
}
|
|
2787
|
-
|
|
2788
|
-
@end
|