Compare commits
100 Commits
jmaurice-u
...
v2.0.0-bet
Author | SHA1 | Date | |
---|---|---|---|
|
11721f487d | ||
|
6570e43a83 | ||
|
6628873c2a | ||
|
edf91b245d | ||
|
a4c339264a | ||
|
9a50bd7d61 | ||
|
1b3ddbbf4a | ||
|
24d2782ad3 | ||
|
f216c84175 | ||
|
b5d105132e | ||
|
0aec0a1ac4 | ||
|
506027925d | ||
|
0294373929 | ||
|
23e58ebaf5 | ||
|
3e3c4f09f9 | ||
|
cd7390e093 | ||
|
d63f078fd4 | ||
|
75322f2bcb | ||
|
b8a0240aaf | ||
|
8c8235cfcf | ||
|
f3e9b6bfb0 | ||
|
ca4cf852aa | ||
|
2d19f45c86 | ||
|
2d408acbab | ||
|
3792d72462 | ||
|
36e491754f | ||
|
a2832f4d55 | ||
|
8a07ffe6c8 | ||
|
4fc1657f2c | ||
|
5e74e20a4d | ||
|
1ab0c7b493 | ||
|
9a0ba05d13 | ||
|
186f4d318d | ||
|
f2b4e42ca2 | ||
|
3fb698c08b | ||
|
6f31ea8e03 | ||
|
974473aa99 | ||
|
13e2b5ee73 | ||
|
6db81656ac | ||
|
e53d1ee28a | ||
|
a97dbecb49 | ||
|
9e1b14cd9e | ||
|
3b088c3383 | ||
|
149849d22b | ||
|
e769dd97d8 | ||
|
e409bfb43a | ||
|
82096a1465 | ||
|
af89315fd4 | ||
|
104646d8ca | ||
|
aa812d0e48 | ||
|
0a6a581936 | ||
|
0cb4a49d38 | ||
|
172bd0a88e | ||
|
420f0016c6 | ||
|
a1fbbc6070 | ||
|
b8126cdc6c | ||
|
54d78926ce | ||
|
3a69a040c4 | ||
|
1712b38282 | ||
|
44ea3c1555 | ||
|
19aed1d63e | ||
|
70153cc16c | ||
|
f3633a256b | ||
|
d8dec0f85a | ||
|
080d16cabf | ||
|
3156cb207f | ||
|
f32d37a3d5 | ||
|
893b3e3957 | ||
|
215f0a9d6d | ||
|
c1a5219b03 | ||
|
26a7f72124 | ||
|
4692e97ba0 | ||
|
fc6485b8cd | ||
|
36406ce17c | ||
|
c878ceeabd | ||
|
01c0c4ed3b | ||
|
fc68765314 | ||
|
292bbc43d6 | ||
|
b15894b70a | ||
|
85ff2f06c2 | ||
|
7afddfd204 | ||
|
3138a438af | ||
|
88f1f3cab9 | ||
|
19e15a4455 | ||
|
5fd3240f85 | ||
|
e255cdd562 | ||
|
d06f7b989e | ||
|
3782644b32 | ||
|
b17f08ed49 | ||
|
c09405d58c | ||
|
3f9f0f3ceb | ||
|
92e83193c4 | ||
|
13eacf8858 | ||
|
220d2582c9 | ||
|
ed6223c0c0 | ||
|
ba38a2c784 | ||
|
996267dbcb | ||
|
4266409934 | ||
|
483e399158 | ||
|
5496554cbf |
8
.github/actions/setup-android/action.yml
vendored
8
.github/actions/setup-android/action.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Setup Android envirionment
|
name: Setup Android environment
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
@@ -6,5 +6,7 @@ runs:
|
|||||||
- name: Select Java Version
|
- name: Select Java Version
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v2
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: zulu
|
||||||
java-version: 11
|
java-version: 17
|
||||||
|
- name: Configure Gradle Caches
|
||||||
|
uses: gradle/gradle-build-action@v2
|
||||||
|
38
.github/workflows/publish-android-release.yml
vendored
Normal file
38
.github/workflows/publish-android-release.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
name: Publish Android Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
name: Publish to Maven Central
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup
|
||||||
|
uses: ./.github/actions/setup-android
|
||||||
|
|
||||||
|
- name: Publish to Maven Local
|
||||||
|
run: ./gradlew publishToMavenLocal
|
||||||
|
env:
|
||||||
|
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
|
||||||
|
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
|
||||||
|
|
||||||
|
- name: Upload Build Artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: 'snapshot-artifacts'
|
||||||
|
path: '~/.m2/repository/'
|
||||||
|
|
||||||
|
- name: Publish to the Maven Central
|
||||||
|
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
|
||||||
|
env:
|
||||||
|
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
|
||||||
|
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
|
||||||
|
ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }}
|
||||||
|
ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }}
|
36
.github/workflows/publish-android-snashot.yml
vendored
Normal file
36
.github/workflows/publish-android-snashot.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: Publish Android Snapshot
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
name: Publish Snapshot
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup
|
||||||
|
uses: ./.github/actions/setup-android
|
||||||
|
|
||||||
|
- name: Publish to Maven Local
|
||||||
|
run: ./gradlew publishToMavenLocal
|
||||||
|
env:
|
||||||
|
ORG_GRADLE_PROJECT_USE_SNAPSHOT: true
|
||||||
|
|
||||||
|
- name: Upload Build Artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: 'snapshot-artifacts'
|
||||||
|
path: '~/.m2/repository/'
|
||||||
|
|
||||||
|
- name: Publish to the Snapshot Repository
|
||||||
|
run: ./gradlew publishToSonatype
|
||||||
|
env:
|
||||||
|
ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }}
|
||||||
|
ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }}
|
||||||
|
ORG_GRADLE_PROJECT_USE_SNAPSHOT: true
|
29
.github/workflows/publish-android.yml
vendored
29
.github/workflows/publish-android.yml
vendored
@@ -1,29 +0,0 @@
|
|||||||
name: Android
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- created
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
name: Publish to Maven Central
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup
|
|
||||||
uses: ./.github/actions/setup-android
|
|
||||||
|
|
||||||
- name: Publish and release
|
|
||||||
run: |
|
|
||||||
./gradlew :yoga:assembleRelease publish --info
|
|
||||||
./gradlew closeAndReleaseRepository
|
|
||||||
env:
|
|
||||||
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
|
|
||||||
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
|
|
||||||
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }}
|
|
||||||
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }}
|
|
||||||
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
|
|
29
.github/workflows/publish-cocoapods-release.yml
vendored
Normal file
29
.github/workflows/publish-cocoapods-release.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
name: Publish CocoaPods Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
name: Publish to CocoaPods trunk
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup
|
||||||
|
uses: ./.github/actions/setup-apple
|
||||||
|
|
||||||
|
- name: Publish Yoga
|
||||||
|
run: pod trunk push Yoga.podspec
|
||||||
|
env:
|
||||||
|
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
|
||||||
|
|
||||||
|
- name: Publish YogaKit
|
||||||
|
# Must run with --synchronous since YogaKit may depend on the just published version of Yoga
|
||||||
|
run: pod trunk push YogaKit.podspec --synchronous
|
||||||
|
env:
|
||||||
|
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
|
25
.github/workflows/publish-npm-release.yml
vendored
Normal file
25
.github/workflows/publish-npm-release.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Publish NPM Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
name: Publish to npmjs registry
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup
|
||||||
|
uses: ./.github/actions/setup-js
|
||||||
|
|
||||||
|
- name: Store auth token in config file
|
||||||
|
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
|
||||||
|
|
||||||
|
- name: yarn publish
|
||||||
|
run: yarn publish
|
||||||
|
working-directory: javascript
|
14
.github/workflows/validate-apple.yml
vendored
14
.github/workflows/validate-apple.yml
vendored
@@ -9,7 +9,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-pods:
|
lint-pods:
|
||||||
name: Lint
|
name: Lint pod
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -18,12 +18,11 @@ jobs:
|
|||||||
- name: Setup
|
- name: Setup
|
||||||
uses: ./.github/actions/setup-apple
|
uses: ./.github/actions/setup-apple
|
||||||
|
|
||||||
- name: pod spec lint
|
- name: pod lib lint
|
||||||
run: pod spec lint --verbose
|
run: pod lib lint --verbose --include-podspecs=**/*.podspec
|
||||||
continue-on-error: true # Apple Build is Broken
|
|
||||||
|
|
||||||
build-sample:
|
build-sample:
|
||||||
name: Build [${{ matrix.mode }}]
|
name: Build sample [${{ matrix.mode }}]
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -38,9 +37,10 @@ jobs:
|
|||||||
- name: pod install
|
- name: pod install
|
||||||
run: pod install
|
run: pod install
|
||||||
working-directory: ./YogaKit/YogaKitSample
|
working-directory: ./YogaKit/YogaKitSample
|
||||||
continue-on-error: true # Apple Build is Broken
|
|
||||||
|
|
||||||
# TODO: xcodebuild
|
- name: xcodebuild YogaKitSample.xcworkspace
|
||||||
|
run: xcodebuild -workspace YogaKitSample.xcworkspace -scheme YogaKitSample
|
||||||
|
working-directory: ./YogaKit/YogaKitSample
|
||||||
|
|
||||||
clang-format:
|
clang-format:
|
||||||
name: Format
|
name: Format
|
||||||
|
18
.github/workflows/validate-js.yml
vendored
18
.github/workflows/validate-js.yml
vendored
@@ -72,3 +72,21 @@ jobs:
|
|||||||
- name: yarn lint
|
- name: yarn lint
|
||||||
run: yarn lint
|
run: yarn lint
|
||||||
working-directory: javascript
|
working-directory: javascript
|
||||||
|
|
||||||
|
pack:
|
||||||
|
name: Pack
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup
|
||||||
|
uses: ./.github/actions/setup-js
|
||||||
|
|
||||||
|
- name: yarn pack
|
||||||
|
run: yarn pack --filename yoga-layout.tar.gz
|
||||||
|
working-directory: javascript
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: npm-package
|
||||||
|
path: javascript/yoga-layout.tar.gz
|
||||||
|
4
.gitignore
vendored
4
.gitignore
vendored
@@ -64,7 +64,11 @@ Carthage/Build
|
|||||||
|
|
||||||
# Gradle
|
# Gradle
|
||||||
.gradle
|
.gradle
|
||||||
|
local.properties
|
||||||
|
|
||||||
# NDK/CMake
|
# NDK/CMake
|
||||||
.cxx
|
.cxx
|
||||||
.externalNativeBuild
|
.externalNativeBuild
|
||||||
|
|
||||||
|
# Docusarus build
|
||||||
|
.docusaurus
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
# This source code is licensed under the MIT license found in the
|
# This source code is licensed under the MIT license found in the
|
||||||
# LICENSE file in the root directory of this source tree.
|
# LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13...3.26)
|
||||||
project(yoga-all)
|
project(yoga-all)
|
||||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||||
|
|
||||||
|
20
Yoga.podspec
20
Yoga.podspec
@@ -6,20 +6,21 @@
|
|||||||
|
|
||||||
Pod::Spec.new do |spec|
|
Pod::Spec.new do |spec|
|
||||||
spec.name = 'Yoga'
|
spec.name = 'Yoga'
|
||||||
spec.version = '1.14.0'
|
spec.version = '2.0.0-beta.2'
|
||||||
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
||||||
spec.homepage = 'https://yogalayout.com/'
|
spec.homepage = 'https://yogalayout.com/'
|
||||||
spec.documentation_url = 'https://yogalayout.com/docs'
|
spec.documentation_url = 'https://yogalayout.com/docs'
|
||||||
|
|
||||||
spec.summary = 'Yoga is a cross-platform layout engine which implements Flexbox.'
|
spec.summary = 'An embeddable and performant flexbox layout engine with bindings for multiple languages'
|
||||||
spec.description = 'Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.'
|
|
||||||
|
|
||||||
spec.authors = 'Facebook'
|
spec.authors = {'Meta Open Source' => 'opensource@meta.com'}
|
||||||
spec.source = {
|
spec.source = {
|
||||||
:git => 'https://github.com/facebook/yoga.git',
|
:git => 'https://github.com/facebook/yoga.git',
|
||||||
:tag => spec.version.to_s,
|
:tag => "v#{spec.version.to_s}",
|
||||||
}
|
}
|
||||||
spec.platforms = { :ios => "8.0", :osx => "10.7", :tvos => "10.0", :watchos => "2.0" }
|
|
||||||
|
spec.ios.deployment_target = "13.4"
|
||||||
|
|
||||||
spec.module_name = 'yoga'
|
spec.module_name = 'yoga'
|
||||||
spec.requires_arc = false
|
spec.requires_arc = false
|
||||||
spec.pod_target_xcconfig = {
|
spec.pod_target_xcconfig = {
|
||||||
@@ -30,10 +31,11 @@ Pod::Spec.new do |spec|
|
|||||||
'-fexceptions',
|
'-fexceptions',
|
||||||
'-Wall',
|
'-Wall',
|
||||||
'-Werror',
|
'-Werror',
|
||||||
|
'-Wextra',
|
||||||
'-std=c++14',
|
'-std=c++14',
|
||||||
'-fPIC'
|
'-fPIC'
|
||||||
]
|
]
|
||||||
spec.source_files = 'yoga/**/*.{c,h,cpp}'
|
spec.source_files = 'yoga/**/*.{h,cpp}'
|
||||||
spec.public_header_files = 'yoga/*.h'
|
spec.public_header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGValue}.h'
|
||||||
|
spec.swift_version = '5.1'
|
||||||
end
|
end
|
||||||
|
@@ -5,29 +5,24 @@
|
|||||||
|
|
||||||
podspec = Pod::Spec.new do |spec|
|
podspec = Pod::Spec.new do |spec|
|
||||||
spec.name = 'YogaKit'
|
spec.name = 'YogaKit'
|
||||||
spec.version = '1.18.1'
|
spec.version = '2.0.0-beta.2'
|
||||||
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
||||||
spec.homepage = 'https://facebook.github.io/yoga/'
|
spec.homepage = 'https://yogalayout.com/'
|
||||||
spec.documentation_url = 'https://facebook.github.io/yoga/docs/'
|
spec.documentation_url = 'https://yogalayout.com/docs'
|
||||||
|
spec.deprecated = true
|
||||||
|
|
||||||
spec.summary = 'Yoga is a cross-platform layout engine which implements Flexbox.'
|
spec.summary = 'YogaKit allows using the Yoga layout engine in combination with UIKit'
|
||||||
spec.description = 'Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.'
|
|
||||||
|
|
||||||
spec.authors = 'Facebook'
|
spec.authors = {'Meta Open Source' => 'opensource@meta.com'}
|
||||||
spec.source = {
|
spec.source = {
|
||||||
:git => 'https://github.com/facebook/yoga.git',
|
:git => 'https://github.com/facebook/yoga.git',
|
||||||
:tag => "1.18.0",
|
:tag => "v#{spec.version.to_s}",
|
||||||
}
|
}
|
||||||
|
|
||||||
spec.platform = :ios
|
spec.platforms = { :ios => "13.4" }
|
||||||
spec.ios.deployment_target = '8.0'
|
|
||||||
spec.ios.frameworks = 'UIKit'
|
spec.ios.frameworks = 'UIKit'
|
||||||
spec.module_name = 'YogaKit'
|
spec.module_name = 'YogaKit'
|
||||||
spec.dependency 'Yoga', '~> 1.14'
|
spec.dependency 'Yoga', "~> #{spec.version.to_s}"
|
||||||
# Fixes the bug related the xcode 11 not able to find swift related frameworks.
|
|
||||||
# https://github.com/Carthage/Carthage/issues/2825
|
|
||||||
# https://twitter.com/krzyzanowskim/status/1151549874653081601?s=21
|
|
||||||
spec.pod_target_xcconfig = {"LD_VERIFY_BITCODE": "NO"}
|
|
||||||
spec.source_files = 'YogaKit/Source/*.{h,m,swift}'
|
spec.source_files = 'YogaKit/Source/*.{h,m,swift}'
|
||||||
spec.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga}.h'
|
spec.public_header_files = 'YogaKit/Source/{YGLayout,UIView+Yoga}.h'
|
||||||
spec.private_header_files = 'YogaKit/Source/YGLayout+Private.h'
|
spec.private_header_files = 'YogaKit/Source/YGLayout+Private.h'
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
3.0.2
|
|
@@ -175,6 +175,7 @@ static YGConfigRef globalConfig;
|
|||||||
globalConfig = YGConfigNew();
|
globalConfig = YGConfigNew();
|
||||||
YGConfigSetExperimentalFeatureEnabled(
|
YGConfigSetExperimentalFeatureEnabled(
|
||||||
globalConfig, YGExperimentalFeatureWebFlexBasis, true);
|
globalConfig, YGExperimentalFeatureWebFlexBasis, true);
|
||||||
|
YGConfigSetErrata(globalConfig, YGErrataClassic);
|
||||||
YGConfigSetPointScaleFactor(globalConfig, [UIScreen mainScreen].scale);
|
YGConfigSetPointScaleFactor(globalConfig, [UIScreen mainScreen].scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -252,6 +252,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)testFrameAndOriginPlacement {
|
- (void)testFrameAndOriginPlacement {
|
||||||
|
// https://www.internalfb.com/intern/test/562950017690956
|
||||||
|
XCTSkip(
|
||||||
|
@"TODO: this test fails with actual dimensions off by 1px from expected");
|
||||||
|
|
||||||
const CGSize containerSize = CGSizeMake(320, 50);
|
const CGSize containerSize = CGSizeMake(320, 50);
|
||||||
|
|
||||||
UIView* container = [[UIView alloc]
|
UIView* container = [[UIView alloc]
|
||||||
|
@@ -1,6 +1,17 @@
|
|||||||
use_frameworks!
|
use_frameworks!
|
||||||
|
|
||||||
|
platform :ios, "13.4"
|
||||||
|
|
||||||
target 'YogaKitSample' do
|
target 'YogaKitSample' do
|
||||||
pod 'YogaKit', :path => '../../YogaKit.podspec'
|
pod 'YogaKit', :path => '../../YogaKit.podspec'
|
||||||
pod 'IGListKit', '~> 2.1.0'
|
pod 'Yoga', :path => '../../Yoga.podspec'
|
||||||
|
pod 'IGListKit', '~> 4.0.0'
|
||||||
|
end
|
||||||
|
|
||||||
|
post_install do |installer|
|
||||||
|
installer.pods_project.targets.each do |target|
|
||||||
|
target.build_configurations.each do |config|
|
||||||
|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.4'
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@@ -1,26 +1,33 @@
|
|||||||
PODS:
|
PODS:
|
||||||
- IGListKit (2.1.0):
|
- IGListDiffKit (4.0.0)
|
||||||
- IGListKit/Default (= 2.1.0)
|
- IGListKit (4.0.0):
|
||||||
- IGListKit/Default (2.1.0):
|
- IGListDiffKit (= 4.0.0)
|
||||||
- IGListKit/Diffing
|
- Yoga (2.0.0-beta.1)
|
||||||
- IGListKit/Diffing (2.1.0)
|
- YogaKit (2.0.0-beta.1):
|
||||||
- Yoga (1.7.0)
|
- Yoga (~> 2.0.0-beta.1)
|
||||||
- YogaKit (1.7.0):
|
|
||||||
- Yoga (~> 1.7)
|
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- IGListKit (~> 2.1.0)
|
- IGListKit (~> 4.0.0)
|
||||||
|
- Yoga (from `../../Yoga.podspec`)
|
||||||
- YogaKit (from `../../YogaKit.podspec`)
|
- YogaKit (from `../../YogaKit.podspec`)
|
||||||
|
|
||||||
|
SPEC REPOS:
|
||||||
|
trunk:
|
||||||
|
- IGListDiffKit
|
||||||
|
- IGListKit
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
|
Yoga:
|
||||||
|
:path: "../../Yoga.podspec"
|
||||||
YogaKit:
|
YogaKit:
|
||||||
:path: ../../YogaKit.podspec
|
:path: "../../YogaKit.podspec"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
IGListKit: b826c68ef7a4ae1626c09d4d3e1ea7a169e6c36e
|
IGListDiffKit: 665d6cf43ce726e676013db9c7d6c4294259b6b2
|
||||||
Yoga: 2ed1d7accfef3610a67f58c0cf101a0662137f2c
|
IGListKit: fd5a5d21935298f5849fa49d426843cff97b77c7
|
||||||
YogaKit: 31576530e8fcae3175469719ec3212397403330b
|
Yoga: 090c6851e548d085d6211b5466b57ba8f4013a90
|
||||||
|
YogaKit: 5ae1939cd7516fdf6c343abb4b4aa381c9911ccf
|
||||||
|
|
||||||
PODFILE CHECKSUM: 216f8e7127767709e0e43f3711208d238fa5c404
|
PODFILE CHECKSUM: e5d9841ef739884db00a29f2d529d16bf247a4ca
|
||||||
|
|
||||||
COCOAPODS: 1.1.1
|
COCOAPODS: 1.12.1
|
||||||
|
@@ -1,10 +1,3 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// !$*UTF8*$!
|
// !$*UTF8*$!
|
||||||
{
|
{
|
||||||
archiveVersion = 1;
|
archiveVersion = 1;
|
||||||
@@ -178,7 +171,6 @@
|
|||||||
13687D401DF8748300E7C260 /* Frameworks */,
|
13687D401DF8748300E7C260 /* Frameworks */,
|
||||||
13687D411DF8748300E7C260 /* Resources */,
|
13687D411DF8748300E7C260 /* Resources */,
|
||||||
FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */,
|
FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */,
|
||||||
6E01EB987F1564F3D71EBE5A /* [CP] Copy Pods Resources */,
|
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@@ -272,28 +264,16 @@
|
|||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
);
|
);
|
||||||
name = "[CP] Check Pods Manifest.lock";
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-YogaKitSample-checkManifestLockResult.txt",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
6E01EB987F1564F3D71EBE5A /* [CP] Copy Pods Resources */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputPaths = (
|
|
||||||
);
|
|
||||||
name = "[CP] Copy Pods Resources";
|
|
||||||
outputPaths = (
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-resources.sh\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */ = {
|
FA2FB9DD6471BDD3FBCE503B /* [CP] Embed Pods Frameworks */ = {
|
||||||
@@ -302,13 +282,22 @@
|
|||||||
files = (
|
files = (
|
||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-frameworks.sh",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/IGListDiffKit/IGListDiffKit.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/IGListKit/IGListKit.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/Yoga/yoga.framework",
|
||||||
|
"${BUILT_PRODUCTS_DIR}/YogaKit/YogaKit.framework",
|
||||||
);
|
);
|
||||||
name = "[CP] Embed Pods Frameworks";
|
name = "[CP] Embed Pods Frameworks";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IGListDiffKit.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IGListKit.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework",
|
||||||
|
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YogaKit.framework",
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-frameworks.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-YogaKitSample/Pods-YogaKitSample-frameworks.sh\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
@@ -366,7 +355,7 @@
|
|||||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
CODE_SIGNING_ALLOWED = NO;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
@@ -385,7 +374,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
|
||||||
MTL_ENABLE_DEBUG_INFO = YES;
|
MTL_ENABLE_DEBUG_INFO = YES;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
@@ -414,7 +403,7 @@
|
|||||||
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
CLANG_WARN_SUSPICIOUS_MOVES = YES;
|
||||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
CODE_SIGNING_ALLOWED = NO;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
@@ -427,7 +416,7 @@
|
|||||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.1;
|
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
VALIDATE_PRODUCT = YES;
|
VALIDATE_PRODUCT = YES;
|
||||||
@@ -446,7 +435,7 @@
|
|||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_INSTALL_OBJC_HEADER = NO;
|
SWIFT_INSTALL_OBJC_HEADER = NO;
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_VERSION = 5.1;
|
||||||
};
|
};
|
||||||
name = Debug;
|
name = Debug;
|
||||||
};
|
};
|
||||||
@@ -461,7 +450,7 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample;
|
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_INSTALL_OBJC_HEADER = NO;
|
SWIFT_INSTALL_OBJC_HEADER = NO;
|
||||||
SWIFT_VERSION = 3.0;
|
SWIFT_VERSION = 5.1;
|
||||||
};
|
};
|
||||||
name = Release;
|
name = Release;
|
||||||
};
|
};
|
||||||
@@ -471,7 +460,7 @@
|
|||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
INFOPLIST_FILE = YogaKitSampleTests/Info.plist;
|
INFOPLIST_FILE = YogaKitSampleTests/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSampleTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSampleTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
@@ -485,7 +474,7 @@
|
|||||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
INFOPLIST_FILE = YogaKitSampleTests/Info.plist;
|
INFOPLIST_FILE = YogaKitSampleTests/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSampleTests;
|
PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSampleTests;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
@@ -18,12 +18,12 @@ private final class ExampleModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ExampleModel: IGListDiffable {
|
extension ExampleModel: ListDiffable {
|
||||||
fileprivate func diffIdentifier() -> NSObjectProtocol {
|
fileprivate func diffIdentifier() -> NSObjectProtocol {
|
||||||
return title as NSString
|
return title as NSString
|
||||||
}
|
}
|
||||||
|
|
||||||
fileprivate func isEqual(toDiffableObject object: IGListDiffable?) -> Bool {
|
fileprivate func isEqual(toDiffableObject object: ListDiffable?) -> Bool {
|
||||||
guard let otherObj = object as? ExampleModel else { return false }
|
guard let otherObj = object as? ExampleModel else { return false }
|
||||||
|
|
||||||
return (title == otherObj.title) &&
|
return (title == otherObj.title) &&
|
||||||
@@ -31,12 +31,16 @@ extension ExampleModel: IGListDiffable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class ExamplesViewController: UIViewController, IGListAdapterDataSource, IGListSingleSectionControllerDelegate {
|
final class ExamplesViewController: UIViewController, ListAdapterDataSource, ListSingleSectionControllerDelegate {
|
||||||
private lazy var adapter: IGListAdapter = {
|
|
||||||
return IGListAdapter(updater: IGListAdapterUpdater(), viewController: self, workingRangeSize: 0)
|
|
||||||
}()
|
|
||||||
private let collectionView = IGListCollectionView(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout())
|
|
||||||
|
|
||||||
|
private lazy var adapter: ListAdapter = {
|
||||||
|
return ListAdapter(updater: ListAdapterUpdater(), viewController: self, workingRangeSize: 0)
|
||||||
|
}()
|
||||||
|
private lazy var collectionView: UICollectionView = {
|
||||||
|
let collectionView = UICollectionView(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout())
|
||||||
|
collectionView.backgroundColor = UIColor.systemBackground
|
||||||
|
return collectionView
|
||||||
|
}()
|
||||||
|
|
||||||
// Update this to array to create more examples.
|
// Update this to array to create more examples.
|
||||||
private let models: [ExampleModel] = [ExampleModel(title: "Basic Layout", controllerClass: BasicViewController.self),
|
private let models: [ExampleModel] = [ExampleModel(title: "Basic Layout", controllerClass: BasicViewController.self),
|
||||||
@@ -59,16 +63,16 @@ final class ExamplesViewController: UIViewController, IGListAdapterDataSource, I
|
|||||||
|
|
||||||
//MARK: IGListAdapterDataSource
|
//MARK: IGListAdapterDataSource
|
||||||
|
|
||||||
func objects(for listAdapter: IGListAdapter) -> [IGListDiffable] {
|
func objects(for listAdapter: ListAdapter) -> [ListDiffable] {
|
||||||
return models as [IGListDiffable]
|
return models as [ListDiffable]
|
||||||
}
|
}
|
||||||
|
|
||||||
func listAdapter(_ listAdapter: IGListAdapter, sectionControllerFor object: Any) -> IGListSectionController {
|
func listAdapter(_ listAdapter: ListAdapter, sectionControllerFor object: Any) -> ListSectionController {
|
||||||
let sizeBlock: IGListSingleSectionCellSizeBlock = { (model, context) in
|
let sizeBlock: ListSingleSectionCellSizeBlock = { (model, context) in
|
||||||
return CGSize(width: (context?.containerSize.width)!, height: 75.0)
|
return CGSize(width: (context?.containerSize.width)!, height: 75.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
let configureBlock: IGListSingleSectionCellConfigureBlock = { (model, cell) in
|
let configureBlock: ListSingleSectionCellConfigureBlock = { (model, cell) in
|
||||||
guard let m = model as? ExampleModel, let c = cell as? SingleLabelCollectionCell else {
|
guard let m = model as? ExampleModel, let c = cell as? SingleLabelCollectionCell else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -76,18 +80,17 @@ final class ExamplesViewController: UIViewController, IGListAdapterDataSource, I
|
|||||||
c.label.text = m.title
|
c.label.text = m.title
|
||||||
}
|
}
|
||||||
|
|
||||||
let sectionController = IGListSingleSectionController(cellClass: SingleLabelCollectionCell.self,
|
let sectionController = ListSingleSectionController(cellClass: SingleLabelCollectionCell.self,
|
||||||
configureBlock: configureBlock,
|
configureBlock: configureBlock,
|
||||||
sizeBlock: sizeBlock)
|
sizeBlock: sizeBlock)
|
||||||
sectionController.selectionDelegate = self
|
sectionController.selectionDelegate = self
|
||||||
return sectionController
|
return sectionController
|
||||||
}
|
}
|
||||||
|
|
||||||
func emptyView(for listAdapter: IGListAdapter) -> UIView? { return nil }
|
func emptyView(for listAdapter: ListAdapter) -> UIView? { return nil }
|
||||||
|
|
||||||
//MARK: IGListSingleSectionControllerDelegate
|
//MARK: IGListSingleSectionControllerDelegate
|
||||||
|
func didSelect(_ sectionController: ListSingleSectionController, with object: Any) {
|
||||||
func didSelect(_ sectionController: IGListSingleSectionController) {
|
|
||||||
let section = adapter.section(for: sectionController)
|
let section = adapter.section(for: sectionController)
|
||||||
let model = models[section]
|
let model = models[section]
|
||||||
|
|
||||||
|
@@ -10,11 +10,11 @@ import YogaKit
|
|||||||
|
|
||||||
final class BasicViewController: UIViewController {
|
final class BasicViewController: UIViewController {
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
let containerSize = self.view.bounds.size
|
let containerSize = self.view.bounds.size
|
||||||
|
|
||||||
let root = self.view!
|
view.backgroundColor = UIColor.systemBackground
|
||||||
root.backgroundColor = .white
|
view.configureLayout { (layout) in
|
||||||
root.configureLayout { (layout) in
|
|
||||||
layout.isEnabled = true
|
layout.isEnabled = true
|
||||||
layout.width = YGValue(containerSize.width)
|
layout.width = YGValue(containerSize.width)
|
||||||
layout.height = YGValue(containerSize.height)
|
layout.height = YGValue(containerSize.height)
|
||||||
@@ -30,24 +30,29 @@ final class BasicViewController: UIViewController {
|
|||||||
layout.height = 10
|
layout.height = 10
|
||||||
layout.marginBottom = 25
|
layout.marginBottom = 25
|
||||||
}
|
}
|
||||||
root.addSubview(child1)
|
view.addSubview(child1)
|
||||||
|
|
||||||
let child2 = UIView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
|
let child2 = UIView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))
|
||||||
child2.backgroundColor = .green
|
child2.backgroundColor = .green
|
||||||
child2.configureLayout { (layout) in
|
child2.configureLayout { (layout) in
|
||||||
layout.isEnabled = true
|
layout.isEnabled = true
|
||||||
layout.alignSelf = .flexEnd
|
layout.alignSelf = .flexEnd
|
||||||
|
layout.width = 200
|
||||||
|
layout.height = 200
|
||||||
}
|
}
|
||||||
root.addSubview(child2)
|
view.addSubview(child2)
|
||||||
|
|
||||||
let child3 = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
|
let child3 = UIView(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
|
||||||
child3.backgroundColor = .yellow
|
child3.backgroundColor = .yellow
|
||||||
child3.configureLayout { (layout) in
|
child3.configureLayout { (layout) in
|
||||||
layout.isEnabled = true
|
layout.isEnabled = true
|
||||||
layout.alignSelf = .flexStart
|
layout.alignSelf = .flexStart
|
||||||
}
|
layout.width = 100
|
||||||
root.addSubview(child3)
|
layout.height = 100
|
||||||
|
|
||||||
root.yoga.applyLayout(preservingOrigin: true)
|
}
|
||||||
|
view.addSubview(child3)
|
||||||
|
|
||||||
|
view.yoga.applyLayout(preservingOrigin: true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -14,6 +14,7 @@ final class LayoutInclusionViewController: UIViewController {
|
|||||||
private let contentView: UIView = UIView(frame: .zero)
|
private let contentView: UIView = UIView(frame: .zero)
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
|
super.viewDidLoad()
|
||||||
let root = self.view!
|
let root = self.view!
|
||||||
root.backgroundColor = .white
|
root.backgroundColor = .white
|
||||||
root.configureLayout { (layout) in
|
root.configureLayout { (layout) in
|
||||||
@@ -51,9 +52,9 @@ final class LayoutInclusionViewController: UIViewController {
|
|||||||
}
|
}
|
||||||
contentView.addSubview(disappearingView)
|
contentView.addSubview(disappearingView)
|
||||||
|
|
||||||
button.setTitle("Add Blue View", for: UIControlState.selected)
|
button.setTitle("Add Blue View", for: .selected)
|
||||||
button.setTitle("Remove Blue View", for: UIControlState.normal)
|
button.setTitle("Remove Blue View", for: .normal)
|
||||||
button.addTarget(self, action: #selector(buttonWasTapped), for: UIControlEvents.touchUpInside)
|
button.addTarget(self, action: #selector(buttonWasTapped), for: .touchUpInside)
|
||||||
button.configureLayout { (layout) in
|
button.configureLayout { (layout) in
|
||||||
layout.isEnabled = true
|
layout.isEnabled = true
|
||||||
layout.height = 300
|
layout.height = 300
|
||||||
@@ -66,7 +67,7 @@ final class LayoutInclusionViewController: UIViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MARK - UIButton Action
|
// MARK - UIButton Action
|
||||||
func buttonWasTapped() {
|
@objc func buttonWasTapped() {
|
||||||
button.isSelected = !button.isSelected
|
button.isSelected = !button.isSelected
|
||||||
|
|
||||||
button.isUserInteractionEnabled = false
|
button.isUserInteractionEnabled = false
|
||||||
|
@@ -5,7 +5,10 @@
|
|||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
apply plugin: 'com.android.library'
|
plugins {
|
||||||
|
id("com.android.library")
|
||||||
|
id("publish")
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'com.facebook.yoga.android'
|
namespace 'com.facebook.yoga.android'
|
||||||
@@ -23,16 +26,16 @@ android {
|
|||||||
targetCompatibility rootProject.targetCompatibilityVersion
|
targetCompatibility rootProject.targetCompatibilityVersion
|
||||||
sourceCompatibility rootProject.sourceCompatibilityVersion
|
sourceCompatibility rootProject.sourceCompatibilityVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
multipleVariants {
|
||||||
|
withSourcesJar()
|
||||||
|
withJavadocJar()
|
||||||
|
includeBuildTypeValues('debug', 'release')
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':yoga')
|
api project(':yoga')
|
||||||
}
|
}
|
||||||
|
|
||||||
// We don't build Javadoc at this time as we can't disable "BUCK" files
|
|
||||||
// from mistakenly getting parsed as Java.
|
|
||||||
tasks.withType(Javadoc).all {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'com.vanniktech.maven.publish'
|
|
||||||
|
@@ -1,12 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
#
|
|
||||||
# This source code is licensed under the MIT license found in the LICENSE
|
|
||||||
# file in the root directory of this source tree.
|
|
||||||
#
|
|
||||||
|
|
||||||
GROUP=com.facebook.yoga.android
|
|
||||||
POM_NAME=YogaLayout
|
|
||||||
POM_DESCRIPTION=YogaLayout
|
|
||||||
POM_ARTIFACT_ID=yoga-layout
|
|
||||||
POM_PACKAGING=aar
|
|
@@ -1,48 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright 2014-present, Facebook, Inc.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
This source code is licensed under the license found in the
|
|
||||||
LICENSE-examples file in the root directory of this source tree.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:versionCode="1"
|
|
||||||
android:versionName="1.0"
|
|
||||||
>
|
|
||||||
|
|
||||||
<variable name="applicationId" value="com.facebook.yoga"/>
|
|
||||||
<variable name="app_label" value="Yoga Sample App"/>
|
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:label="@string/app_name"
|
|
||||||
android:icon="@drawable/ic_launcher"
|
|
||||||
android:allowBackup="false"
|
|
||||||
android:theme="@style/NoTitleBarWhiteBG"
|
|
||||||
android:supportsRtl="true"
|
|
||||||
>
|
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name=".MainActivity"
|
|
||||||
android:exported="true"
|
|
||||||
>
|
|
||||||
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
|
||||||
</intent-filter>
|
|
||||||
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name=".BenchmarkActivity"
|
|
||||||
android:exported="false"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</application>
|
|
||||||
|
|
||||||
</manifest>
|
|
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
key.alias=androiddebugkey
|
|
||||||
key.store.password=android
|
|
||||||
key.alias.password=android
|
|
@@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright 2014-present, Facebook, Inc.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
This source code is licensed under the license found in the
|
|
||||||
LICENSE-examples file in the root directory of this source tree.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<menu
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
>
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_home"
|
|
||||||
android:title="Home"
|
|
||||||
android:showAsAction="always"
|
|
||||||
/>
|
|
||||||
</menu>
|
|
@@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Copyright 2014-present, Facebook, Inc.
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
This source code is licensed under the license found in the
|
|
||||||
LICENSE-examples file in the root directory of this source tree.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<menu
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
>
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_benchmark"
|
|
||||||
android:title="Benchmark"
|
|
||||||
android:showAsAction="always"
|
|
||||||
/>
|
|
||||||
</menu>
|
|
@@ -4,7 +4,7 @@
|
|||||||
# LICENSE file in the root directory of this source tree.
|
# LICENSE file in the root directory of this source tree.
|
||||||
|
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13...3.26)
|
||||||
project(benchmark)
|
project(benchmark)
|
||||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||||
|
|
||||||
|
@@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
#define YGBENCHMARKS(BLOCK) \
|
#define YGBENCHMARKS(BLOCK) \
|
||||||
int main(int argc, char const* argv[]) { \
|
int main(int argc, char const* argv[]) { \
|
||||||
|
(void) argc; \
|
||||||
|
(void) argv; \
|
||||||
clock_t __start; \
|
clock_t __start; \
|
||||||
clock_t __endTimes[NUM_REPETITIONS]; \
|
clock_t __endTimes[NUM_REPETITIONS]; \
|
||||||
{ BLOCK } \
|
{ BLOCK } \
|
||||||
@@ -78,9 +80,10 @@ static YGSize _measure(
|
|||||||
YGMeasureMode widthMode,
|
YGMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
YGMeasureMode heightMode) {
|
YGMeasureMode heightMode) {
|
||||||
|
(void) node;
|
||||||
return (YGSize){
|
return (YGSize){
|
||||||
.width = widthMode == YGMeasureModeUndefined ? 10 : width,
|
.width = widthMode == YGMeasureModeUndefined ? 10 : width,
|
||||||
.height = heightMode == YGMeasureModeUndefined ? 10 : width,
|
.height = heightMode == YGMeasureModeUndefined ? 10 : height,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,11 +1,13 @@
|
|||||||
/**
|
/*
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
*
|
*
|
||||||
* This source code is licensed under the MIT license found in the
|
* This source code is licensed under the MIT license found in the
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*
|
|
||||||
* @format
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const asm = require("../build/wasm-sync");
|
plugins { `kotlin-dsl` }
|
||||||
module.exports = require("./_entrySync")(asm);
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
gradlePluginPortal()
|
||||||
|
}
|
76
build-logic/src/main/kotlin/publish.gradle.kts
Normal file
76
build-logic/src/main/kotlin/publish.gradle.kts
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("maven-publish")
|
||||||
|
id("signing")
|
||||||
|
}
|
||||||
|
|
||||||
|
group = "com.facebook.yoga"
|
||||||
|
|
||||||
|
if ("USE_SNAPSHOT".byProperty.toBoolean()) {
|
||||||
|
version = "${"VERSION_NAME".byProperty}-SNAPSHOT"
|
||||||
|
} else {
|
||||||
|
version = "VERSION_NAME".byProperty.toString()
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
register<MavenPublication>("default") {
|
||||||
|
groupId = project.group.toString()
|
||||||
|
artifactId = project.name
|
||||||
|
version = project.version.toString()
|
||||||
|
afterEvaluate { from(components["default"]) }
|
||||||
|
pom {
|
||||||
|
description.set(
|
||||||
|
"An embeddable and performant flexbox layout engine with bindings for multiple languages")
|
||||||
|
name.set(project.name)
|
||||||
|
url.set("https://github.com/facebook/yoga.git")
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name.set("MIT License")
|
||||||
|
url.set("https://github.com/facebook/yoga/blob/main/LICENSE")
|
||||||
|
distribution.set("repo")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id.set("Meta Open Source")
|
||||||
|
name.set("Meta Open Source")
|
||||||
|
email.set("opensource@meta.com")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scm { url.set("scm:git:git@github.com:facebook/yoga.git") }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
val signingKey = "SIGNING_KEY".byProperty
|
||||||
|
val signingPwd = "SIGNING_PWD".byProperty
|
||||||
|
|
||||||
|
if (signingKey.isNullOrBlank() || signingPwd.isNullOrBlank()) {
|
||||||
|
logger.info("Signing disabled as the GPG key was not found")
|
||||||
|
} else {
|
||||||
|
logger.info("GPG Key found - Signing enabled")
|
||||||
|
}
|
||||||
|
|
||||||
|
signing {
|
||||||
|
useInMemoryPgpKeys(signingKey, signingPwd)
|
||||||
|
sign(publishing.publications)
|
||||||
|
isRequired = !(signingKey.isNullOrBlank() || signingPwd.isNullOrBlank())
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fix for https://youtrack.jetbrains.com/issue/KT-46466/
|
||||||
|
// On Gradle 8+, the signing task is not correctly wired to the publishing tasks.
|
||||||
|
// This requires a fix on KGP that is currently pending.
|
||||||
|
val signingTasks = tasks.withType<Sign>()
|
||||||
|
|
||||||
|
tasks.withType<AbstractPublishToMaven>().configureEach { dependsOn(signingTasks) }
|
||||||
|
|
||||||
|
val String.byProperty: String?
|
||||||
|
get() = providers.gradleProperty(this).orNull
|
44
build.gradle
44
build.gradle
@@ -5,37 +5,47 @@
|
|||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
plugins {
|
||||||
|
id("com.android.library") version "8.0.1" apply false
|
||||||
|
id("com.android.application") version "8.0.1" apply false
|
||||||
|
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
|
||||||
|
}
|
||||||
|
|
||||||
buildscript {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
|
||||||
classpath 'com.android.tools.build:gradle:7.3.1'
|
|
||||||
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.15.1'
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
|
||||||
// in the individual module build.gradle files
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
group = "com.facebook.yoga"
|
||||||
repositories {
|
|
||||||
google()
|
if (project.hasProperty("USE_SNAPSHOT") && project.property("USE_SNAPSHOT").toBoolean()) {
|
||||||
mavenCentral()
|
version = getProperty("VERSION_NAME") + "-SNAPSHOT"
|
||||||
}
|
} else {
|
||||||
|
version = getProperty("VERSION_NAME")
|
||||||
|
}
|
||||||
|
|
||||||
|
def sonatypeUsername = findProperty("SONATYPE_USERNAME")?.toString()
|
||||||
|
def sonatypePassword = findProperty("SONATYPE_PASSWORD")?.toString()
|
||||||
|
|
||||||
|
nexusPublishing {
|
||||||
|
repositories {
|
||||||
|
sonatype {
|
||||||
|
username.set(sonatypeUsername)
|
||||||
|
password.set(sonatypePassword)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
buildToolsVersion = "33.0.0"
|
buildToolsVersion = "33.0.0"
|
||||||
ndkVersion = "23.1.7779620" // Corresponds to AGP 7.3
|
ndkVersion = "23.1.7779620"
|
||||||
cmakeVersion = "3.18.1+"
|
|
||||||
minSdkVersion = 21
|
minSdkVersion = 21
|
||||||
compileSdkVersion = 33
|
compileSdkVersion = 33
|
||||||
targetSdkVersion = 33
|
targetSdkVersion = 33
|
||||||
sourceCompatibilityVersion = JavaVersion.VERSION_1_7
|
sourceCompatibilityVersion = JavaVersion.VERSION_1_8
|
||||||
targetCompatibilityVersion = JavaVersion.VERSION_1_7
|
targetCompatibilityVersion = JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
|
@@ -33,6 +33,7 @@ add_compile_options(
|
|||||||
-fexceptions
|
-fexceptions
|
||||||
# Enable warnings and warnings as errors
|
# Enable warnings and warnings as errors
|
||||||
-Wall
|
-Wall
|
||||||
|
-Wextra
|
||||||
-Werror
|
-Werror
|
||||||
# Disable RTTI
|
# Disable RTTI
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>
|
$<$<COMPILE_LANGUAGE:CXX>:-fno-rtti>
|
||||||
|
272
csharp/.gitignore
vendored
272
csharp/.gitignore
vendored
@@ -1,272 +0,0 @@
|
|||||||
## Ignore Visual Studio temporary files, build results, and
|
|
||||||
## files generated by popular Visual Studio add-ons.
|
|
||||||
|
|
||||||
# User-specific files
|
|
||||||
*.suo
|
|
||||||
*.user
|
|
||||||
*.userosscache
|
|
||||||
*.sln.docstates
|
|
||||||
|
|
||||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
|
||||||
*.userprefs
|
|
||||||
|
|
||||||
# Build results
|
|
||||||
[Dd]ebug/
|
|
||||||
[Dd]ebugPublic/
|
|
||||||
[Rr]elease/
|
|
||||||
[Rr]eleases/
|
|
||||||
x64/
|
|
||||||
x86/
|
|
||||||
bld/
|
|
||||||
[Bb]in/
|
|
||||||
[Oo]bj/
|
|
||||||
[Ll]og/
|
|
||||||
|
|
||||||
# Visual Studio 2015 cache/options directory
|
|
||||||
.vs/
|
|
||||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
|
||||||
#wwwroot/
|
|
||||||
|
|
||||||
# MSTest test Results
|
|
||||||
[Tt]est[Rr]esult*/
|
|
||||||
[Bb]uild[Ll]og.*
|
|
||||||
|
|
||||||
# NUNIT
|
|
||||||
*.VisualState.xml
|
|
||||||
TestResult.xml
|
|
||||||
tests/Facebook.Yoga/NUnit-[0-9\.]*/
|
|
||||||
tests/Facebook.Yoga/YogaTest.dll
|
|
||||||
tests/Facebook.Yoga/YogaTest.dll.mdb
|
|
||||||
tests/Facebook.Yoga/libyoga.dylib
|
|
||||||
|
|
||||||
# Build Results of an ATL Project
|
|
||||||
[Dd]ebugPS/
|
|
||||||
[Rr]eleasePS/
|
|
||||||
dlldata.c
|
|
||||||
|
|
||||||
# DNX
|
|
||||||
project.lock.json
|
|
||||||
project.fragment.lock.json
|
|
||||||
artifacts/
|
|
||||||
|
|
||||||
*_i.c
|
|
||||||
*_p.c
|
|
||||||
*_i.h
|
|
||||||
*.ilk
|
|
||||||
*.meta
|
|
||||||
*.obj
|
|
||||||
*.pch
|
|
||||||
*.pdb
|
|
||||||
*.pgc
|
|
||||||
*.pgd
|
|
||||||
*.rsp
|
|
||||||
*.sbr
|
|
||||||
*.tlb
|
|
||||||
*.tli
|
|
||||||
*.tlh
|
|
||||||
*.tmp
|
|
||||||
*.tmp_proj
|
|
||||||
*.log
|
|
||||||
*.vspscc
|
|
||||||
*.vssscc
|
|
||||||
.builds
|
|
||||||
*.pidb
|
|
||||||
*.svclog
|
|
||||||
*.scc
|
|
||||||
|
|
||||||
# Chutzpah Test files
|
|
||||||
_Chutzpah*
|
|
||||||
|
|
||||||
# Visual C++ cache files
|
|
||||||
ipch/
|
|
||||||
*.aps
|
|
||||||
*.ncb
|
|
||||||
*.opendb
|
|
||||||
*.opensdf
|
|
||||||
*.sdf
|
|
||||||
*.cachefile
|
|
||||||
*.VC.db
|
|
||||||
*.VC.VC.opendb
|
|
||||||
|
|
||||||
# Visual Studio profiler
|
|
||||||
*.psess
|
|
||||||
*.vsp
|
|
||||||
*.vspx
|
|
||||||
*.sap
|
|
||||||
|
|
||||||
# TFS 2012 Local Workspace
|
|
||||||
$tf/
|
|
||||||
|
|
||||||
# Guidance Automation Toolkit
|
|
||||||
*.gpState
|
|
||||||
|
|
||||||
# ReSharper is a .NET coding add-in
|
|
||||||
_ReSharper*/
|
|
||||||
*.[Rr]e[Ss]harper
|
|
||||||
*.DotSettings.user
|
|
||||||
|
|
||||||
# JustCode is a .NET coding add-in
|
|
||||||
.JustCode
|
|
||||||
|
|
||||||
# TeamCity is a build add-in
|
|
||||||
_TeamCity*
|
|
||||||
|
|
||||||
# DotCover is a Code Coverage Tool
|
|
||||||
*.dotCover
|
|
||||||
|
|
||||||
# Visual Studio code coverage results
|
|
||||||
*.coverage
|
|
||||||
*.coveragexml
|
|
||||||
|
|
||||||
# NCrunch
|
|
||||||
_NCrunch_*
|
|
||||||
.*crunch*.local.xml
|
|
||||||
nCrunchTemp_*
|
|
||||||
|
|
||||||
# MightyMoose
|
|
||||||
*.mm.*
|
|
||||||
AutoTest.Net/
|
|
||||||
|
|
||||||
# Web workbench (sass)
|
|
||||||
.sass-cache/
|
|
||||||
|
|
||||||
# Installshield output folder
|
|
||||||
[Ee]xpress/
|
|
||||||
|
|
||||||
# DocProject is a documentation generator add-in
|
|
||||||
DocProject/buildhelp/
|
|
||||||
DocProject/Help/*.HxT
|
|
||||||
DocProject/Help/*.HxC
|
|
||||||
DocProject/Help/*.hhc
|
|
||||||
DocProject/Help/*.hhk
|
|
||||||
DocProject/Help/*.hhp
|
|
||||||
DocProject/Help/Html2
|
|
||||||
DocProject/Help/html
|
|
||||||
|
|
||||||
# Click-Once directory
|
|
||||||
publish/
|
|
||||||
|
|
||||||
# Publish Web Output
|
|
||||||
*.[Pp]ublish.xml
|
|
||||||
*.azurePubxml
|
|
||||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
|
||||||
# but database connection strings (with potential passwords) will be unencrypted
|
|
||||||
*.pubxml
|
|
||||||
*.publishproj
|
|
||||||
|
|
||||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
|
||||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
|
||||||
# in these scripts will be unencrypted
|
|
||||||
PublishScripts/
|
|
||||||
|
|
||||||
# NuGet Packages
|
|
||||||
*.nupkg
|
|
||||||
# The packages folder can be ignored because of Package Restore
|
|
||||||
**/packages/*
|
|
||||||
# except build/, which is used as an MSBuild target.
|
|
||||||
!**/packages/build/
|
|
||||||
# Uncomment if necessary however generally it will be regenerated when needed
|
|
||||||
#!**/packages/repositories.config
|
|
||||||
# NuGet v3's project.json files produces more ignoreable files
|
|
||||||
*.nuget.props
|
|
||||||
*.nuget.targets
|
|
||||||
|
|
||||||
# Microsoft Azure Build Output
|
|
||||||
csx/
|
|
||||||
*.build.csdef
|
|
||||||
|
|
||||||
# Microsoft Azure Emulator
|
|
||||||
ecf/
|
|
||||||
rcf/
|
|
||||||
|
|
||||||
# Windows Store app package directories and files
|
|
||||||
AppPackages/
|
|
||||||
BundleArtifacts/
|
|
||||||
Package.StoreAssociation.xml
|
|
||||||
_pkginfo.txt
|
|
||||||
|
|
||||||
# Visual Studio cache files
|
|
||||||
# files ending in .cache can be ignored
|
|
||||||
*.[Cc]ache
|
|
||||||
# but keep track of directories ending in .cache
|
|
||||||
!*.[Cc]ache/
|
|
||||||
|
|
||||||
# Others
|
|
||||||
ClientBin/
|
|
||||||
~$*
|
|
||||||
*~
|
|
||||||
*.dbmdl
|
|
||||||
*.dbproj.schemaview
|
|
||||||
*.jfm
|
|
||||||
*.pfx
|
|
||||||
*.publishsettings
|
|
||||||
node_modules/
|
|
||||||
orleans.codegen.cs
|
|
||||||
|
|
||||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
|
||||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
|
||||||
#bower_components/
|
|
||||||
|
|
||||||
# RIA/Silverlight projects
|
|
||||||
Generated_Code/
|
|
||||||
|
|
||||||
# Backup & report files from converting an old project file
|
|
||||||
# to a newer Visual Studio version. Backup files are not needed,
|
|
||||||
# because we have git ;-)
|
|
||||||
_UpgradeReport_Files/
|
|
||||||
Backup*/
|
|
||||||
UpgradeLog*.XML
|
|
||||||
UpgradeLog*.htm
|
|
||||||
|
|
||||||
# SQL Server files
|
|
||||||
*.mdf
|
|
||||||
*.ldf
|
|
||||||
|
|
||||||
# Business Intelligence projects
|
|
||||||
*.rdl.data
|
|
||||||
*.bim.layout
|
|
||||||
*.bim_*.settings
|
|
||||||
|
|
||||||
# Microsoft Fakes
|
|
||||||
FakesAssemblies/
|
|
||||||
|
|
||||||
# GhostDoc plugin setting file
|
|
||||||
*.GhostDoc.xml
|
|
||||||
|
|
||||||
# Node.js Tools for Visual Studio
|
|
||||||
.ntvs_analysis.dat
|
|
||||||
|
|
||||||
# Visual Studio 6 build log
|
|
||||||
*.plg
|
|
||||||
|
|
||||||
# Visual Studio 6 workspace options file
|
|
||||||
*.opt
|
|
||||||
|
|
||||||
# Visual Studio LightSwitch build output
|
|
||||||
**/*.HTMLClient/GeneratedArtifacts
|
|
||||||
**/*.DesktopClient/GeneratedArtifacts
|
|
||||||
**/*.DesktopClient/ModelManifest.xml
|
|
||||||
**/*.Server/GeneratedArtifacts
|
|
||||||
**/*.Server/ModelManifest.xml
|
|
||||||
_Pvt_Extensions
|
|
||||||
|
|
||||||
# Paket dependency manager
|
|
||||||
.paket/paket.exe
|
|
||||||
paket-files/
|
|
||||||
|
|
||||||
# FAKE - F# Make
|
|
||||||
.fake/
|
|
||||||
|
|
||||||
# JetBrains Rider
|
|
||||||
.idea/
|
|
||||||
*.sln.iml
|
|
||||||
|
|
||||||
# CodeRush
|
|
||||||
.cr/
|
|
||||||
|
|
||||||
# Python Tools for Visual Studio (PTVS)
|
|
||||||
__pycache__/
|
|
||||||
*.pyc
|
|
||||||
|
|
||||||
# local buck build
|
|
||||||
lib/
|
|
1
csharp/Android/.gitignore
vendored
1
csharp/Android/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
lib/
|
|
@@ -1,63 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{2021459E-8FB1-44A4-89F1-E291769CD2C6}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>Facebook.Yoga.Android.Tests</RootNamespace>
|
|
||||||
<AssemblyName>Facebook.Yoga.Android.Tests</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v7.1</TargetFrameworkVersion>
|
|
||||||
<AndroidApplication>True</AndroidApplication>
|
|
||||||
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
|
|
||||||
<AndroidResgenClass>Resource</AndroidResgenClass>
|
|
||||||
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
|
|
||||||
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
|
|
||||||
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
|
||||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
|
||||||
<AndroidTlsProvider></AndroidTlsProvider>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<AndroidLinkMode>None</AndroidLinkMode>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release</OutputPath>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<AndroidManagedSymbols>true</AndroidManagedSymbols>
|
|
||||||
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="Mono.Android" />
|
|
||||||
<Reference Include="Xamarin.Android.NUnitLite" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="MainActivity.cs" />
|
|
||||||
<Compile Include="Resources\Resource.designer.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Properties\AndroidManifest.xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Facebook.Yoga.Android\Facebook.Yoga.Android.csproj">
|
|
||||||
<Project>{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}</Project>
|
|
||||||
<Name>Facebook.Yoga.Android</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="..\..\tests\Facebook.Yoga\Facebook.Yoga.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\..\tests\Facebook.Yoga\Facebook.Yoga.Shared.Tests.projitems')" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
|
||||||
</Project>
|
|
@@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using Android.App;
|
|
||||||
using Android.OS;
|
|
||||||
using Xamarin.Android.NUnitLite;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga.Android.Tests
|
|
||||||
{
|
|
||||||
[Activity(Label = "Facebook.Yoga.Android.Tests", MainLauncher = true)]
|
|
||||||
public class MainActivity : TestSuiteActivity
|
|
||||||
{
|
|
||||||
protected override void OnCreate(Bundle bundle)
|
|
||||||
{
|
|
||||||
AddTest(Assembly.GetExecutingAssembly());
|
|
||||||
base.OnCreate(bundle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:versionCode="1"
|
|
||||||
android:versionName="1.0"
|
|
||||||
package="Facebook.Yoga.Android.Tests">
|
|
||||||
|
|
||||||
<uses-sdk
|
|
||||||
android:minSdkVersion="19" />
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:label="Facebook.Yoga.Android.Tests">
|
|
||||||
</application>
|
|
||||||
|
|
||||||
</manifest>
|
|
@@ -1,33 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio 2012
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Yoga.Android.Tests", "Facebook.Yoga.Android.Tests\Facebook.Yoga.Android.Tests.csproj", "{2021459E-8FB1-44A4-89F1-E291769CD2C6}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Yoga.Android", "Facebook.Yoga.Android\Facebook.Yoga.Android.csproj", "{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{4804A8E6-E7B7-4F9E-A446-3DE8E73DB38A}"
|
|
||||||
EndProject
|
|
||||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Facebook.Yoga.Shared", "..\Facebook.Yoga\Facebook.Yoga.Shared.shproj", "{91C42D32-291D-4B72-90B4-551663D60B8B}"
|
|
||||||
EndProject
|
|
||||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Facebook.Yoga.Shared.Tests", "..\tests\Facebook.Yoga\Facebook.Yoga.Shared.Tests.shproj", "{4EDC82D9-A201-4831-8FE0-98F468F8E4AE}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(NestedProjects) = preSolution
|
|
||||||
{91C42D32-291D-4B72-90B4-551663D60B8B} = {4804A8E6-E7B7-4F9E-A446-3DE8E73DB38A}
|
|
||||||
{4EDC82D9-A201-4831-8FE0-98F468F8E4AE} = {4804A8E6-E7B7-4F9E-A446-3DE8E73DB38A}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@@ -1,20 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<BuildDependsOn>NativeLibraryARMV7;NativeLibraryX86;$(BuildDependsOn)</BuildDependsOn>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Target Name="NativeLibraryARMV7" Outputs="$(ProjectDir)/lib/armeabi-v7a/libyoga.so">
|
|
||||||
<Exec WorkingDirectory="$(ProjectDir)" Command="$(ProjectDir)../../build-native.sh" />
|
|
||||||
<Copy SourceFiles="$(ProjectDir)../../../buck-out/gen/csharp/yoganet#android-armv7,shared/libyoga.so" DestinationFiles="$(ProjectDir)/lib/armeabi-v7a/libyoga.so" SkipUnchangedFiles="true" />
|
|
||||||
</Target>
|
|
||||||
<!--
|
|
||||||
<Target Name="NativeLibraryARM64" Outputs="$(ProjectDir)/lib/arm64-v8a/libyoga.so">
|
|
||||||
<Exec WorkingDirectory="$(ProjectDir)" Command="$(ProjectDir)../../build-native.sh" />
|
|
||||||
<Copy SourceFiles="$(ProjectDir)../../../buck-out/gen/csharp/yoganet#android-arm64,shared/libyoga.so" DestinationFiles="$(ProjectDir)/lib/arm64-v8/libyoga.so" SkipUnchangedFiles="true" />
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
<Target Name="NativeLibraryX86" Outputs="$(ProjectDir)/lib/x86/libyoga.so">
|
|
||||||
<Exec WorkingDirectory="$(ProjectDir)" Command="$(ProjectDir)../../build-native.sh" />
|
|
||||||
<Copy SourceFiles="$(ProjectDir)../../../buck-out/gen/csharp/yoganet#android-x86,shared/libyoga.so" DestinationFiles="$(ProjectDir)/lib/x86/libyoga.so" SkipUnchangedFiles="true" />
|
|
||||||
</Target>
|
|
||||||
</Project>
|
|
@@ -1,64 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<RootNamespace>Facebook.Yoga.Android</RootNamespace>
|
|
||||||
<AssemblyName>Facebook.Yoga</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v7.1</TargetFrameworkVersion>
|
|
||||||
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
|
|
||||||
<AndroidResgenClass>Resource</AndroidResgenClass>
|
|
||||||
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
|
|
||||||
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
|
|
||||||
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
|
|
||||||
<AndroidTlsProvider></AndroidTlsProvider>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<AndroidLinkMode>None</AndroidLinkMode>
|
|
||||||
<AndroidSupportedAbis>arm64-v8a;armeabi;armeabi-v7a;x86</AndroidSupportedAbis>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release</OutputPath>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<AndroidManagedSymbols>true</AndroidManagedSymbols>
|
|
||||||
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="Mono.Android" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="CustomBuildAction.targets" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="lib\x86\" />
|
|
||||||
<Folder Include="lib\armeabi-v7a\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedNativeLibrary Include="lib\x86\libyoga.so">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</EmbeddedNativeLibrary>
|
|
||||||
<EmbeddedNativeLibrary Include="lib\armeabi-v7a\libyoga.so">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</EmbeddedNativeLibrary>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="..\..\Facebook.Yoga\Facebook.Yoga.Shared.projitems" Label="Shared" Condition="Exists('..\..\Facebook.Yoga\Facebook.Yoga.Shared.projitems')" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
|
||||||
<Import Project="CustomBuildAction.targets" />
|
|
||||||
</Project>
|
|
@@ -1,130 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio 2012
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Android", "Android", "{B674A497-DC8E-4286-A889-0C004235AA18}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "iOS", "iOS", "{AC14A7DE-A180-46EC-8A88-77F60E73A099}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{09905D88-652D-4A72-8521-6CB1AF347795}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "macOS", "macOS", "{9BDE3670-188E-470F-9B89-CEC0EB042AB5}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Yoga.iOS", "iOS\Facebook.Yoga.iOS\Facebook.Yoga.iOS.csproj", "{128FB32A-C4A1-4363-BF06-0A36E700B7FA}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Yoga.iOS.Tests", "iOS\Facebook.Yoga.iOS.Tests\Facebook.Yoga.iOS.Tests.csproj", "{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}"
|
|
||||||
EndProject
|
|
||||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Facebook.Yoga.Shared", "Facebook.Yoga\Facebook.Yoga.Shared.shproj", "{91C42D32-291D-4B72-90B4-551663D60B8B}"
|
|
||||||
EndProject
|
|
||||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Facebook.Yoga.Shared.Tests", "tests\Facebook.Yoga\Facebook.Yoga.Shared.Tests.shproj", "{4EDC82D9-A201-4831-8FE0-98F468F8E4AE}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Yoga.Android", "Android\Facebook.Yoga.Android\Facebook.Yoga.Android.csproj", "{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Yoga.Android.Tests", "Android\Facebook.Yoga.Android.Tests\Facebook.Yoga.Android.Tests.csproj", "{2021459E-8FB1-44A4-89F1-E291769CD2C6}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuspec", "nuspec", "{2C3685DB-91B9-4207-9446-1C513DB36978}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
nuget\Facebook.Yoga.dll.config = nuget\Facebook.Yoga.dll.config
|
|
||||||
nuget\Facebook.Yoga.nuspec = nuget\Facebook.Yoga.nuspec
|
|
||||||
nuget\Facebook.Yoga.OSX.targets = nuget\Facebook.Yoga.OSX.targets
|
|
||||||
nuget\Facebook.Yoga.targets = nuget\Facebook.Yoga.targets
|
|
||||||
nuget\Facebook.Yoga.Universal.targets = nuget\Facebook.Yoga.Universal.targets
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Yoga.Mac", "Mac\Facebook.Yoga.Mac.csproj", "{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Yoga.Mac.Tests", "Mac\Facebook.Yoga.Mac.Tests\Facebook.Yoga.Mac.Tests.csproj", "{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
Debug|iPhoneSimulator = Debug|iPhoneSimulator
|
|
||||||
Release|iPhone = Release|iPhone
|
|
||||||
Release|iPhoneSimulator = Release|iPhoneSimulator
|
|
||||||
Debug|iPhone = Debug|iPhone
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Release|iPhone.ActiveCfg = Release|Any CPU
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Release|iPhone.Build.0 = Release|Any CPU
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA}.Debug|iPhone.Build.0 = Debug|Any CPU
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Release|Any CPU.ActiveCfg = Release|iPhone
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Release|Any CPU.Build.0 = Release|iPhone
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Release|iPhone.ActiveCfg = Release|iPhone
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Release|iPhone.Build.0 = Release|iPhone
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71}.Debug|iPhone.Build.0 = Debug|iPhone
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Release|iPhone.ActiveCfg = Release|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Release|iPhone.Build.0 = Release|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363}.Debug|iPhone.Build.0 = Debug|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Release|iPhone.ActiveCfg = Release|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Release|iPhone.Build.0 = Release|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6}.Debug|iPhone.Build.0 = Debug|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Release|iPhone.ActiveCfg = Release|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Release|iPhone.Build.0 = Release|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}.Debug|iPhone.Build.0 = Debug|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Release|iPhone.ActiveCfg = Release|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Release|iPhone.Build.0 = Release|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}.Debug|iPhone.Build.0 = Debug|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(NestedProjects) = preSolution
|
|
||||||
{128FB32A-C4A1-4363-BF06-0A36E700B7FA} = {AC14A7DE-A180-46EC-8A88-77F60E73A099}
|
|
||||||
{FCF0BE59-AE56-4D4F-8524-94532B2DFC71} = {AC14A7DE-A180-46EC-8A88-77F60E73A099}
|
|
||||||
{91C42D32-291D-4B72-90B4-551663D60B8B} = {09905D88-652D-4A72-8521-6CB1AF347795}
|
|
||||||
{4EDC82D9-A201-4831-8FE0-98F468F8E4AE} = {09905D88-652D-4A72-8521-6CB1AF347795}
|
|
||||||
{EDF7CF8B-5640-4E1D-A2C7-E4BC8BE44363} = {B674A497-DC8E-4286-A889-0C004235AA18}
|
|
||||||
{2021459E-8FB1-44A4-89F1-E291769CD2C6} = {B674A497-DC8E-4286-A889-0C004235AA18}
|
|
||||||
{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71} = {9BDE3670-188E-470F-9B89-CEC0EB042AB5}
|
|
||||||
{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77} = {9BDE3670-188E-470F-9B89-CEC0EB042AB5}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
@@ -1,11 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public delegate float BaselineFunction(YogaNode node, float width, float height);
|
|
||||||
}
|
|
@@ -1,45 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
|
||||||
<HasSharedItems>true</HasSharedItems>
|
|
||||||
<SharedGUID>91c42d32-291d-4b72-90b4-551663d60b8b</SharedGUID>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Label="Configuration">
|
|
||||||
<Import_RootNamespace>Facebook.Yoga.Shared</Import_RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)BaselineFunction.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Logger.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)MeasureFunction.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)MeasureOutput.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)Native.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YGConfigHandle.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YGNodeHandle.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaAlign.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaBaselineFunc.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaConfig.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaConstants.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaDimension.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaDirection.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaDisplay.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaEdge.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaExperimentalFeature.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaFlexDirection.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaJustify.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaLogger.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaLogLevel.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaMeasureFunc.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaMeasureMode.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaNode.Spacing.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaNode.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaOverflow.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaPositionType.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaPrintOptions.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaSize.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaUnit.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaValue.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaValueExtensions.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaWrap.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>91c42d32-291d-4b72-90b4-551663d60b8b</ProjectGuid>
|
|
||||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
|
|
||||||
<PropertyGroup />
|
|
||||||
<Import Project="Facebook.Yoga.Shared.projitems" Label="Shared" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
|
|
||||||
</Project>
|
|
@@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public delegate void Logger(
|
|
||||||
YogaConfig config,
|
|
||||||
YogaNode node,
|
|
||||||
YogaLogLevel level,
|
|
||||||
string message);
|
|
||||||
}
|
|
@@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public delegate YogaSize MeasureFunction(
|
|
||||||
YogaNode node,
|
|
||||||
float width,
|
|
||||||
YogaMeasureMode widthMode,
|
|
||||||
float height,
|
|
||||||
YogaMeasureMode heightMode);
|
|
||||||
}
|
|
@@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public class MeasureOutput
|
|
||||||
{
|
|
||||||
public static YogaSize Make(float width, float height)
|
|
||||||
{
|
|
||||||
return new YogaSize { width = width, height = height};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,391 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
internal static class Native
|
|
||||||
{
|
|
||||||
#if (UNITY_IOS && !UNITY_EDITOR) || __IOS__
|
|
||||||
private const string DllName = "__Internal";
|
|
||||||
#else
|
|
||||||
private const string DllName = "yoga";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGInteropSetLogger(
|
|
||||||
[MarshalAs(UnmanagedType.FunctionPtr)] YogaLogger logger);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YGNodeHandle YGNodeNew();
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YGNodeHandle YGNodeNewWithConfig(YGConfigHandle config);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeFree(IntPtr node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeReset(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YGConfigHandle YGConfigGetDefault();
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YGConfigHandle YGConfigNew();
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGConfigFree(IntPtr node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern int YGConfigGetInstanceCount();
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGConfigSetExperimentalFeatureEnabled(
|
|
||||||
YGConfigHandle config,
|
|
||||||
YogaExperimentalFeature feature,
|
|
||||||
bool enabled);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern bool YGConfigIsExperimentalFeatureEnabled(
|
|
||||||
YGConfigHandle config,
|
|
||||||
YogaExperimentalFeature feature);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGConfigSetUseWebDefaults(
|
|
||||||
YGConfigHandle config,
|
|
||||||
bool useWebDefaults);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern bool YGConfigGetUseWebDefaults(YGConfigHandle config);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGConfigSetUseLegacyStretchBehaviour(
|
|
||||||
YGConfigHandle config,
|
|
||||||
bool useLegacyStretchBehavior);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern bool YGConfigGetUseLegacyStretchBehaviour(YGConfigHandle config);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGConfigSetPointScaleFactor(
|
|
||||||
YGConfigHandle config,
|
|
||||||
float pixelsInPoint);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeInsertChild(
|
|
||||||
YGNodeHandle node,
|
|
||||||
YGNodeHandle child,
|
|
||||||
uint index);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeRemoveChild(YGNodeHandle node, YGNodeHandle child);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeSetIsReferenceBaseline(
|
|
||||||
YGNodeHandle node,
|
|
||||||
bool isReferenceBaseline);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern bool YGNodeIsReferenceBaseline(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeCalculateLayout(
|
|
||||||
YGNodeHandle node,
|
|
||||||
float availableWidth,
|
|
||||||
float availableHeight,
|
|
||||||
YogaDirection parentDirection);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeMarkDirty(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
[return: MarshalAs(UnmanagedType.I1)]
|
|
||||||
public static extern bool YGNodeIsDirty(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodePrint(YGNodeHandle node, YogaPrintOptions options);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeCopyStyle(YGNodeHandle dstNode, YGNodeHandle srcNode);
|
|
||||||
|
|
||||||
#region YG_NODE_PROPERTY
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeSetMeasureFunc(
|
|
||||||
YGNodeHandle node,
|
|
||||||
[MarshalAs(UnmanagedType.FunctionPtr)] YogaMeasureFunc measureFunc);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeSetBaselineFunc(
|
|
||||||
YGNodeHandle node,
|
|
||||||
[MarshalAs(UnmanagedType.FunctionPtr)] YogaBaselineFunc baselineFunc);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeSetHasNewLayout(
|
|
||||||
YGNodeHandle node,
|
|
||||||
[MarshalAs(UnmanagedType.I1)] bool hasNewLayout);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
[return: MarshalAs(UnmanagedType.I1)]
|
|
||||||
public static extern bool YGNodeGetHasNewLayout(YGNodeHandle node);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region YG_NODE_STYLE_PROPERTY
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetDirection(YGNodeHandle node, YogaDirection direction);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaDirection YGNodeStyleGetDirection(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetFlexDirection(YGNodeHandle node, YogaFlexDirection flexDirection);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaFlexDirection YGNodeStyleGetFlexDirection(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetJustifyContent(YGNodeHandle node, YogaJustify justifyContent);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaJustify YGNodeStyleGetJustifyContent(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetAlignContent(YGNodeHandle node, YogaAlign alignContent);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaAlign YGNodeStyleGetAlignContent(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetAlignItems(YGNodeHandle node, YogaAlign alignItems);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaAlign YGNodeStyleGetAlignItems(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetAlignSelf(YGNodeHandle node, YogaAlign alignSelf);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaAlign YGNodeStyleGetAlignSelf(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetPositionType(YGNodeHandle node, YogaPositionType positionType);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaPositionType YGNodeStyleGetPositionType(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetFlexWrap(YGNodeHandle node, YogaWrap flexWrap);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaWrap YGNodeStyleGetFlexWrap(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetOverflow(YGNodeHandle node, YogaOverflow flexWrap);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaOverflow YGNodeStyleGetOverflow(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetDisplay(YGNodeHandle node, YogaDisplay display);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaDisplay YGNodeStyleGetDisplay(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetFlex(YGNodeHandle node, float flex);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetFlexGrow(YGNodeHandle node, float flexGrow);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeStyleGetFlexGrow(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetFlexShrink(YGNodeHandle node, float flexShrink);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeStyleGetFlexShrink(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetFlexBasis(YGNodeHandle node, float flexBasis);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetFlexBasisPercent(YGNodeHandle node, float flexBasis);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetFlexBasisAuto(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaValue YGNodeStyleGetFlexBasis(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetWidth(YGNodeHandle node, float width);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetWidthPercent(YGNodeHandle node, float width);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetWidthAuto(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaValue YGNodeStyleGetWidth(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetHeight(YGNodeHandle node, float height);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetHeightPercent(YGNodeHandle node, float height);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetHeightAuto(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaValue YGNodeStyleGetHeight(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetMinWidth(YGNodeHandle node, float minWidth);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetMinWidthPercent(YGNodeHandle node, float minWidth);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaValue YGNodeStyleGetMinWidth(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetMinHeight(YGNodeHandle node, float minHeight);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetMinHeightPercent(YGNodeHandle node, float minHeight);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaValue YGNodeStyleGetMinHeight(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetMaxWidth(YGNodeHandle node, float maxWidth);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetMaxWidthPercent(YGNodeHandle node, float maxWidth);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaValue YGNodeStyleGetMaxWidth(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetMaxHeight(YGNodeHandle node, float maxHeight);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetMaxHeightPercent(YGNodeHandle node, float maxHeight);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaValue YGNodeStyleGetMaxHeight(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetAspectRatio(YGNodeHandle node, float aspectRatio);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeStyleGetAspectRatio(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetGap(YGNodeHandle node, YogaGutter gutter, float gapLength);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeStyleGetGap(YGNodeHandle node, YogaGutter gutter);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region YG_NODE_STYLE_EDGE_PROPERTY
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetPosition(YGNodeHandle node, YogaEdge edge, float position);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetPositionPercent(YGNodeHandle node, YogaEdge edge, float position);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaValue YGNodeStyleGetPosition(YGNodeHandle node, YogaEdge edge);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetMargin(YGNodeHandle node, YogaEdge edge, float margin);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetMarginPercent(YGNodeHandle node, YogaEdge edge, float margin);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetMarginAuto(YGNodeHandle node, YogaEdge edge);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaValue YGNodeStyleGetMargin(YGNodeHandle node, YogaEdge edge);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetPadding(YGNodeHandle node, YogaEdge edge, float padding);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetPaddingPercent(YGNodeHandle node, YogaEdge edge, float padding);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaValue YGNodeStyleGetPadding(YGNodeHandle node, YogaEdge edge);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeStyleSetBorder(YGNodeHandle node, YogaEdge edge, float border);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeStyleGetBorder(YGNodeHandle node, YogaEdge edge);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region YG_NODE_LAYOUT_PROPERTY
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeLayoutGetLeft(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeLayoutGetTop(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeLayoutGetRight(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeLayoutGetBottom(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeLayoutGetWidth(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeLayoutGetHeight(YGNodeHandle node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeLayoutGetMargin(YGNodeHandle node, YogaEdge edge);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern float YGNodeLayoutGetPadding(YGNodeHandle node, YogaEdge edge);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern YogaDirection YGNodeLayoutGetDirection(YGNodeHandle node);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Context
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern IntPtr YGNodeGetContext(IntPtr node);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGNodeSetContext(IntPtr node, IntPtr managed);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern IntPtr YGConfigGetContext(IntPtr config);
|
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
|
||||||
public static extern void YGConfigSetContext(IntPtr config, IntPtr managed);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,82 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
internal class YGConfigHandle : SafeHandle
|
|
||||||
{
|
|
||||||
internal static readonly YGConfigHandle Default = Native.YGConfigGetDefault();
|
|
||||||
private GCHandle _managedConfigHandle;
|
|
||||||
|
|
||||||
private YGConfigHandle() : base(IntPtr.Zero, true)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool IsInvalid
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.handle == IntPtr.Zero;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool ReleaseHandle()
|
|
||||||
{
|
|
||||||
if (this.handle != Default.handle)
|
|
||||||
{
|
|
||||||
ReleaseManaged();
|
|
||||||
if (!IsInvalid)
|
|
||||||
{
|
|
||||||
Native.YGConfigFree(this.handle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
GC.KeepAlive(this);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetContext(YogaConfig config)
|
|
||||||
{
|
|
||||||
if (!_managedConfigHandle.IsAllocated)
|
|
||||||
{
|
|
||||||
#if UNITY_5_4_OR_NEWER
|
|
||||||
// Weak causes 'GCHandle value belongs to a different domain' error
|
|
||||||
_managedConfigHandle = GCHandle.Alloc(config);
|
|
||||||
#else
|
|
||||||
_managedConfigHandle = GCHandle.Alloc(config, GCHandleType.Weak);
|
|
||||||
#endif
|
|
||||||
var managedConfigPtr = GCHandle.ToIntPtr(_managedConfigHandle);
|
|
||||||
Native.YGConfigSetContext(this.handle, managedConfigPtr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ReleaseManaged()
|
|
||||||
{
|
|
||||||
if (_managedConfigHandle.IsAllocated)
|
|
||||||
{
|
|
||||||
_managedConfigHandle.Free();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static YogaConfig GetManaged(IntPtr unmanagedConfigPtr)
|
|
||||||
{
|
|
||||||
if (unmanagedConfigPtr != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
var managedConfigPtr = Native.YGConfigGetContext(unmanagedConfigPtr);
|
|
||||||
var config = GCHandle.FromIntPtr(managedConfigPtr).Target as YogaConfig;
|
|
||||||
if (config == null)
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException("YogaConfig is already deallocated");
|
|
||||||
}
|
|
||||||
return config;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,78 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
internal class YGNodeHandle : SafeHandle
|
|
||||||
{
|
|
||||||
private GCHandle _managedNodeHandle;
|
|
||||||
|
|
||||||
private YGNodeHandle() : base(IntPtr.Zero, true)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool IsInvalid
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return this.handle == IntPtr.Zero;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool ReleaseHandle()
|
|
||||||
{
|
|
||||||
ReleaseManaged();
|
|
||||||
if (!IsInvalid)
|
|
||||||
{
|
|
||||||
Native.YGNodeFree(this.handle);
|
|
||||||
GC.KeepAlive(this);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetContext(YogaNode node)
|
|
||||||
{
|
|
||||||
if (!_managedNodeHandle.IsAllocated)
|
|
||||||
{
|
|
||||||
#if UNITY_5_4_OR_NEWER
|
|
||||||
// Weak causes 'GCHandle value belongs to a different domain' error
|
|
||||||
_managedNodeHandle = GCHandle.Alloc(node);
|
|
||||||
#else
|
|
||||||
_managedNodeHandle = GCHandle.Alloc(node, GCHandleType.Weak);
|
|
||||||
#endif
|
|
||||||
var managedNodePtr = GCHandle.ToIntPtr(_managedNodeHandle);
|
|
||||||
Native.YGNodeSetContext(this.handle, managedNodePtr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ReleaseManaged()
|
|
||||||
{
|
|
||||||
if (_managedNodeHandle.IsAllocated)
|
|
||||||
{
|
|
||||||
_managedNodeHandle.Free();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static YogaNode GetManaged(IntPtr unmanagedNodePtr)
|
|
||||||
{
|
|
||||||
if (unmanagedNodePtr != IntPtr.Zero)
|
|
||||||
{
|
|
||||||
var managedNodePtr = Native.YGNodeGetContext(unmanagedNodePtr);
|
|
||||||
var node = GCHandle.FromIntPtr(managedNodePtr).Target as YogaNode;
|
|
||||||
if (node == null)
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException("YogaNode is already deallocated");
|
|
||||||
}
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaAlign
|
|
||||||
{
|
|
||||||
Auto,
|
|
||||||
FlexStart,
|
|
||||||
Center,
|
|
||||||
FlexEnd,
|
|
||||||
Stretch,
|
|
||||||
Baseline,
|
|
||||||
SpaceBetween,
|
|
||||||
SpaceAround,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
||||||
public delegate float YogaBaselineFunc(IntPtr unmanagedNodePtr, float width, float height);
|
|
||||||
}
|
|
@@ -1,151 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
#if __IOS__
|
|
||||||
using ObjCRuntime;
|
|
||||||
#endif
|
|
||||||
#if ENABLE_IL2CPP
|
|
||||||
using AOT;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public class YogaConfig
|
|
||||||
{
|
|
||||||
internal static readonly YogaConfig Default = new YogaConfig(YGConfigHandle.Default);
|
|
||||||
private static YogaLogger _managedLogger;
|
|
||||||
|
|
||||||
private YGConfigHandle _ygConfig;
|
|
||||||
private Logger _logger;
|
|
||||||
|
|
||||||
private YogaConfig(YGConfigHandle ygConfig)
|
|
||||||
{
|
|
||||||
_ygConfig = ygConfig;
|
|
||||||
if (_ygConfig.IsInvalid)
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException("Failed to allocate native memory");
|
|
||||||
}
|
|
||||||
|
|
||||||
_ygConfig.SetContext(this);
|
|
||||||
|
|
||||||
if (_ygConfig == YGConfigHandle.Default)
|
|
||||||
{
|
|
||||||
_managedLogger = LoggerInternal;
|
|
||||||
Native.YGInteropSetLogger(_managedLogger);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaConfig()
|
|
||||||
: this(Native.YGConfigNew())
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
internal YGConfigHandle Handle
|
|
||||||
{
|
|
||||||
get {
|
|
||||||
return _ygConfig;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if (UNITY_IOS && !UNITY_EDITOR) || ENABLE_IL2CPP || __IOS__
|
|
||||||
[MonoPInvokeCallback(typeof(YogaLogger))]
|
|
||||||
#endif
|
|
||||||
private static void LoggerInternal(
|
|
||||||
IntPtr unmanagedConfigPtr,
|
|
||||||
IntPtr unmanagedNodePtr,
|
|
||||||
YogaLogLevel level,
|
|
||||||
string message)
|
|
||||||
{
|
|
||||||
var config = YGConfigHandle.GetManaged(unmanagedConfigPtr);
|
|
||||||
if (config == null || config._logger == null)
|
|
||||||
{
|
|
||||||
// Default logger
|
|
||||||
System.Diagnostics.Debug.WriteLine(message);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var node = YGNodeHandle.GetManaged(unmanagedNodePtr);
|
|
||||||
config._logger(config, node, level, message);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (level == YogaLogLevel.Error || level == YogaLogLevel.Fatal)
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException(message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Logger Logger
|
|
||||||
{
|
|
||||||
get {
|
|
||||||
return _logger;
|
|
||||||
}
|
|
||||||
|
|
||||||
set {
|
|
||||||
_logger = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetExperimentalFeatureEnabled(
|
|
||||||
YogaExperimentalFeature feature,
|
|
||||||
bool enabled)
|
|
||||||
{
|
|
||||||
Native.YGConfigSetExperimentalFeatureEnabled(_ygConfig, feature, enabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsExperimentalFeatureEnabled(YogaExperimentalFeature feature)
|
|
||||||
{
|
|
||||||
return Native.YGConfigIsExperimentalFeatureEnabled(_ygConfig, feature);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool UseWebDefaults
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGConfigGetUseWebDefaults(_ygConfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGConfigSetUseWebDefaults(_ygConfig, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool UseLegacyStretchBehaviour
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGConfigGetUseLegacyStretchBehaviour(_ygConfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGConfigSetUseLegacyStretchBehaviour(_ygConfig, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float PointScaleFactor
|
|
||||||
{
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGConfigSetPointScaleFactor(_ygConfig, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int GetInstanceCount()
|
|
||||||
{
|
|
||||||
return Native.YGConfigGetInstanceCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SetDefaultLogger(Logger logger)
|
|
||||||
{
|
|
||||||
Default.Logger = logger;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public static class YogaConstants
|
|
||||||
{
|
|
||||||
public const float Undefined = float.NaN;
|
|
||||||
|
|
||||||
public static bool IsUndefined(float value)
|
|
||||||
{
|
|
||||||
return float.IsNaN(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool IsUndefined(YogaValue value)
|
|
||||||
{
|
|
||||||
return value.Unit == YogaUnit.Undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaDimension
|
|
||||||
{
|
|
||||||
Width,
|
|
||||||
Height,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaDirection
|
|
||||||
{
|
|
||||||
Inherit,
|
|
||||||
LTR,
|
|
||||||
RTL,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaDisplay
|
|
||||||
{
|
|
||||||
Flex,
|
|
||||||
None,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaEdge
|
|
||||||
{
|
|
||||||
Left,
|
|
||||||
Top,
|
|
||||||
Right,
|
|
||||||
Bottom,
|
|
||||||
Start,
|
|
||||||
End,
|
|
||||||
Horizontal,
|
|
||||||
Vertical,
|
|
||||||
All,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaExperimentalFeature
|
|
||||||
{
|
|
||||||
WebFlexBasis,
|
|
||||||
AbsolutePercentageAgainstPaddingEdge,
|
|
||||||
FixAbsoluteTrailingColumnMargin,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaFlexDirection
|
|
||||||
{
|
|
||||||
Column,
|
|
||||||
ColumnReverse,
|
|
||||||
Row,
|
|
||||||
RowReverse,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaGutter
|
|
||||||
{
|
|
||||||
Column,
|
|
||||||
Row,
|
|
||||||
All,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaJustify
|
|
||||||
{
|
|
||||||
FlexStart,
|
|
||||||
Center,
|
|
||||||
FlexEnd,
|
|
||||||
SpaceBetween,
|
|
||||||
SpaceAround,
|
|
||||||
SpaceEvenly,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaLogLevel
|
|
||||||
{
|
|
||||||
Error,
|
|
||||||
Warn,
|
|
||||||
Info,
|
|
||||||
Debug,
|
|
||||||
Verbose,
|
|
||||||
Fatal,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
||||||
public delegate void YogaLogger(
|
|
||||||
IntPtr unmanagedConfigPtr,
|
|
||||||
IntPtr unmanagedNotePtr,
|
|
||||||
YogaLogLevel level,
|
|
||||||
string message);
|
|
||||||
}
|
|
@@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
|
||||||
public delegate YogaSize YogaMeasureFunc(
|
|
||||||
IntPtr unmanagedNodePtr,
|
|
||||||
float width,
|
|
||||||
YogaMeasureMode widthMode,
|
|
||||||
float height,
|
|
||||||
YogaMeasureMode heightMode);
|
|
||||||
}
|
|
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaMeasureMode
|
|
||||||
{
|
|
||||||
Undefined,
|
|
||||||
Exactly,
|
|
||||||
AtMost,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,551 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public partial class YogaNode
|
|
||||||
{
|
|
||||||
public YogaValue Left
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Left);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePosition(YogaEdge.Left, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue Top
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Top);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePosition(YogaEdge.Top, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue Right
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Right);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePosition(YogaEdge.Right, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue Bottom
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Bottom);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePosition(YogaEdge.Bottom, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue Start
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Start);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePosition(YogaEdge.Start, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue End
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.End);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePosition(YogaEdge.End, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetStylePosition(YogaEdge edge, YogaValue value)
|
|
||||||
{
|
|
||||||
if (value.Unit == YogaUnit.Percent)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetPositionPercent(_ygNode, edge, value.Value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetPosition(_ygNode, edge, value.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MarginLeft
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Left);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStyleMargin(YogaEdge.Left, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MarginTop
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Top);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStyleMargin(YogaEdge.Top, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MarginRight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Right);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStyleMargin(YogaEdge.Right, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MarginBottom
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Bottom);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStyleMargin(YogaEdge.Bottom, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MarginStart
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Start);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStyleMargin(YogaEdge.Start, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MarginEnd
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.End);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStyleMargin(YogaEdge.End, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MarginHorizontal
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Horizontal);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStyleMargin(YogaEdge.Horizontal, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MarginVertical
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Vertical);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStyleMargin(YogaEdge.Vertical, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue Margin
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.All);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStyleMargin(YogaEdge.All, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetStyleMargin(YogaEdge edge, YogaValue value)
|
|
||||||
{
|
|
||||||
if (value.Unit == YogaUnit.Percent)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetMarginPercent(_ygNode, edge, value.Value);
|
|
||||||
}
|
|
||||||
else if (value.Unit == YogaUnit.Auto)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetMarginAuto(_ygNode, edge);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetMargin(_ygNode, edge, value.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue PaddingLeft
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Left);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePadding(YogaEdge.Left, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue PaddingTop
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Top);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePadding(YogaEdge.Top, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue PaddingRight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Right);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePadding(YogaEdge.Right, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue PaddingBottom
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Bottom);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePadding(YogaEdge.Bottom, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue PaddingStart
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Start);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePadding(YogaEdge.Start, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue PaddingEnd
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.End);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePadding(YogaEdge.End, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue PaddingHorizontal
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Horizontal);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePadding(YogaEdge.Horizontal, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue PaddingVertical
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Vertical);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePadding(YogaEdge.Vertical, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue Padding
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.All);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
SetStylePadding(YogaEdge.All, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void SetStylePadding(YogaEdge edge, YogaValue value)
|
|
||||||
{
|
|
||||||
if (value.Unit == YogaUnit.Percent)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetPaddingPercent(_ygNode, edge, value.Value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetPadding(_ygNode, edge, value.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderLeftWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetBorder(_ygNode, YogaEdge.Left);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetBorder(_ygNode, YogaEdge.Left, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderTopWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetBorder(_ygNode, YogaEdge.Top);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetBorder(_ygNode, YogaEdge.Top, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderRightWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetBorder(_ygNode, YogaEdge.Right);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetBorder(_ygNode, YogaEdge.Right, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderBottomWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetBorder(_ygNode, YogaEdge.Bottom);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetBorder(_ygNode, YogaEdge.Bottom, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderStartWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetBorder(_ygNode, YogaEdge.Start);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetBorder(_ygNode, YogaEdge.Start, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderEndWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetBorder(_ygNode, YogaEdge.End);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetBorder(_ygNode, YogaEdge.End, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetBorder(_ygNode, YogaEdge.All);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetBorder(_ygNode, YogaEdge.All, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutMarginLeft
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.Left);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutMarginTop
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.Top);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutMarginRight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.Right);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutMarginBottom
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.Bottom);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutMarginStart
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.Start);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutMarginEnd
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetMargin(_ygNode, YogaEdge.End);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutPaddingLeft
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetPadding(_ygNode, YogaEdge.Left);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutPaddingTop
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetPadding(_ygNode, YogaEdge.Top);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutPaddingRight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetPadding(_ygNode, YogaEdge.Right);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutPaddingBottom
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetPadding(_ygNode, YogaEdge.Bottom);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutPaddingStart
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetPadding(_ygNode, YogaEdge.Start);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutPaddingEnd
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetPadding(_ygNode, YogaEdge.End);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,716 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
#if __IOS__
|
|
||||||
using ObjCRuntime;
|
|
||||||
#endif
|
|
||||||
#if ENABLE_IL2CPP
|
|
||||||
using AOT;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public partial class YogaNode : IEnumerable<YogaNode>
|
|
||||||
{
|
|
||||||
private readonly YGNodeHandle _ygNode;
|
|
||||||
private readonly YogaConfig _config;
|
|
||||||
private WeakReference _parent;
|
|
||||||
private List<YogaNode> _children;
|
|
||||||
private MeasureFunction _measureFunction;
|
|
||||||
private BaselineFunction _baselineFunction;
|
|
||||||
private YogaMeasureFunc _managedMeasure;
|
|
||||||
private YogaBaselineFunc _managedBaseline;
|
|
||||||
private object _data;
|
|
||||||
|
|
||||||
public YogaNode(YogaConfig config = null)
|
|
||||||
{
|
|
||||||
_config = config == null ? YogaConfig.Default : config;
|
|
||||||
_ygNode = Native.YGNodeNewWithConfig(_config.Handle);
|
|
||||||
if (_ygNode.IsInvalid)
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException("Failed to allocate native memory");
|
|
||||||
}
|
|
||||||
|
|
||||||
_ygNode.SetContext(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaNode(YogaNode srcNode)
|
|
||||||
: this(srcNode._config)
|
|
||||||
{
|
|
||||||
CopyStyle(srcNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Reset()
|
|
||||||
{
|
|
||||||
_measureFunction = null;
|
|
||||||
_baselineFunction = null;
|
|
||||||
_data = null;
|
|
||||||
|
|
||||||
_ygNode.ReleaseManaged();
|
|
||||||
Native.YGNodeReset(_ygNode);
|
|
||||||
_ygNode.SetContext(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsDirty
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeIsDirty(_ygNode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public virtual void MarkDirty()
|
|
||||||
{
|
|
||||||
Native.YGNodeMarkDirty(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool HasNewLayout
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeGetHasNewLayout(_ygNode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void MarkHasNewLayout()
|
|
||||||
{
|
|
||||||
Native.YGNodeSetHasNewLayout(_ygNode, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaNode Parent
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _parent != null ? _parent.Target as YogaNode : null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsMeasureDefined
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _measureFunction != null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsBaselineDefined
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _baselineFunction != null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CopyStyle(YogaNode srcNode)
|
|
||||||
{
|
|
||||||
Native.YGNodeCopyStyle(_ygNode, srcNode._ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaDirection StyleDirection
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetDirection(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetDirection(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaFlexDirection FlexDirection
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetFlexDirection(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetFlexDirection(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaJustify JustifyContent
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetJustifyContent(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetJustifyContent(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaDisplay Display
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetDisplay(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetDisplay(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaAlign AlignItems
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetAlignItems(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetAlignItems(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaAlign AlignSelf
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetAlignSelf(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetAlignSelf(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaAlign AlignContent
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetAlignContent(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetAlignContent(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaPositionType PositionType
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetPositionType(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetPositionType(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaWrap Wrap
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetFlexWrap(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetFlexWrap(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Flex
|
|
||||||
{
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetFlex(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float FlexGrow
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetFlexGrow(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetFlexGrow(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float FlexShrink
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetFlexShrink(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetFlexShrink(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue FlexBasis
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetFlexBasis(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value.Unit == YogaUnit.Percent)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetFlexBasisPercent(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
else if (value.Unit == YogaUnit.Auto)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetFlexBasisAuto(_ygNode);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetFlexBasis(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue Width
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetWidth(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value.Unit == YogaUnit.Percent)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetWidthPercent(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
else if (value.Unit == YogaUnit.Auto)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetWidthAuto(_ygNode);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetWidth(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue Height
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetHeight(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value.Unit == YogaUnit.Percent)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetHeightPercent(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
else if (value.Unit == YogaUnit.Auto)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetHeightAuto(_ygNode);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetHeight(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MaxWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMaxWidth(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value.Unit == YogaUnit.Percent)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetMaxWidthPercent(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetMaxWidth(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MaxHeight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMaxHeight(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value.Unit == YogaUnit.Percent)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetMaxHeightPercent(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetMaxHeight(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MinWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMinWidth(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value.Unit == YogaUnit.Percent)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetMinWidthPercent(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetMinWidth(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaValue MinHeight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetMinHeight(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
if (value.Unit == YogaUnit.Percent)
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetMinHeightPercent(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetMinHeight(_ygNode, value.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float AspectRatio
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetAspectRatio(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetAspectRatio(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Gap
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetGap(_ygNode, YogaGutter.All);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetGap(_ygNode, YogaGutter.All, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float ColumnGap
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetGap(_ygNode, YogaGutter.Column);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetGap(_ygNode, YogaGutter.Column, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float RowGap
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetGap(_ygNode, YogaGutter.Row);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetGap(_ygNode, YogaGutter.Row, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutX
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetLeft(_ygNode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutY
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetTop(_ygNode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetWidth(_ygNode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float LayoutHeight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetHeight(_ygNode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaDirection LayoutDirection
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeLayoutGetDirection(_ygNode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaOverflow Overflow
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeStyleGetOverflow(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeStyleSetOverflow(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public object Data
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _data;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_data = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaNode this[int index]
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _children[index];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int Count
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _children != null ? _children.Count : 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void MarkLayoutSeen()
|
|
||||||
{
|
|
||||||
Native.YGNodeSetHasNewLayout(_ygNode, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsReferenceBaseline
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return Native.YGNodeIsReferenceBaseline(_ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
Native.YGNodeSetIsReferenceBaseline(_ygNode, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool ValuesEqual(float f1, float f2)
|
|
||||||
{
|
|
||||||
if (float.IsNaN(f1) || float.IsNaN(f2))
|
|
||||||
{
|
|
||||||
return float.IsNaN(f1) && float.IsNaN(f2);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Math.Abs(f2 - f1) < float.Epsilon;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Insert(int index, YogaNode node)
|
|
||||||
{
|
|
||||||
if (_children == null)
|
|
||||||
{
|
|
||||||
_children = new List<YogaNode>(4);
|
|
||||||
}
|
|
||||||
_children.Insert(index, node);
|
|
||||||
node._parent = new WeakReference(this);
|
|
||||||
Native.YGNodeInsertChild(_ygNode, node._ygNode, (uint)index);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveAt(int index)
|
|
||||||
{
|
|
||||||
var child = _children[index];
|
|
||||||
child._parent = null;
|
|
||||||
_children.RemoveAt(index);
|
|
||||||
Native.YGNodeRemoveChild(_ygNode, child._ygNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AddChild(YogaNode child)
|
|
||||||
{
|
|
||||||
Insert(Count, child);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RemoveChild(YogaNode child)
|
|
||||||
{
|
|
||||||
int index = IndexOf(child);
|
|
||||||
if (index >= 0)
|
|
||||||
{
|
|
||||||
RemoveAt(index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Clear()
|
|
||||||
{
|
|
||||||
if (_children != null)
|
|
||||||
{
|
|
||||||
while (_children.Count > 0)
|
|
||||||
{
|
|
||||||
RemoveAt(_children.Count-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int IndexOf(YogaNode node)
|
|
||||||
{
|
|
||||||
return _children != null ? _children.IndexOf(node) : -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetMeasureFunction(MeasureFunction measureFunction)
|
|
||||||
{
|
|
||||||
_measureFunction = measureFunction;
|
|
||||||
_managedMeasure = measureFunction != null ? MeasureInternal : (YogaMeasureFunc)null;
|
|
||||||
Native.YGNodeSetMeasureFunc(_ygNode, _managedMeasure);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetBaselineFunction(BaselineFunction baselineFunction)
|
|
||||||
{
|
|
||||||
_baselineFunction = baselineFunction;
|
|
||||||
_managedBaseline =
|
|
||||||
baselineFunction != null ? BaselineInternal : (YogaBaselineFunc)null;
|
|
||||||
Native.YGNodeSetBaselineFunc(_ygNode, _managedBaseline);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CalculateLayout(
|
|
||||||
float width = YogaConstants.Undefined,
|
|
||||||
float height = YogaConstants.Undefined)
|
|
||||||
{
|
|
||||||
Native.YGNodeCalculateLayout(
|
|
||||||
_ygNode,
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
Native.YGNodeStyleGetDirection(_ygNode));
|
|
||||||
}
|
|
||||||
|
|
||||||
#if (UNITY_IOS && !UNITY_EDITOR) || ENABLE_IL2CPP || __IOS__
|
|
||||||
[MonoPInvokeCallback(typeof(YogaMeasureFunc))]
|
|
||||||
#endif
|
|
||||||
private static YogaSize MeasureInternal(
|
|
||||||
IntPtr unmanagedNodePtr,
|
|
||||||
float width,
|
|
||||||
YogaMeasureMode widthMode,
|
|
||||||
float height,
|
|
||||||
YogaMeasureMode heightMode)
|
|
||||||
{
|
|
||||||
var node = YGNodeHandle.GetManaged(unmanagedNodePtr);
|
|
||||||
if (node == null || node._measureFunction == null)
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException("Measure function is not defined.");
|
|
||||||
}
|
|
||||||
return node._measureFunction(node, width, widthMode, height, heightMode);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if (UNITY_IOS && !UNITY_EDITOR) || ENABLE_IL2CPP || __IOS__
|
|
||||||
[MonoPInvokeCallback(typeof(YogaBaselineFunc))]
|
|
||||||
#endif
|
|
||||||
private static float BaselineInternal(
|
|
||||||
IntPtr unmanagedNodePtr,
|
|
||||||
float width,
|
|
||||||
float height)
|
|
||||||
{
|
|
||||||
var node = YGNodeHandle.GetManaged(unmanagedNodePtr);
|
|
||||||
if (node == null || node._baselineFunction == null)
|
|
||||||
{
|
|
||||||
throw new InvalidOperationException("Baseline function is not defined.");
|
|
||||||
}
|
|
||||||
return node._baselineFunction(node, width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Print(YogaPrintOptions options =
|
|
||||||
YogaPrintOptions.Layout|YogaPrintOptions.Style|YogaPrintOptions.Children)
|
|
||||||
{
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
Logger orig = _config.Logger;
|
|
||||||
_config.Logger = (config, node, level, message) => {sb.Append(message);};
|
|
||||||
Native.YGNodePrint(_ygNode, options);
|
|
||||||
_config.Logger = orig;
|
|
||||||
return sb.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerator<YogaNode> GetEnumerator()
|
|
||||||
{
|
|
||||||
return _children != null ? ((IEnumerable<YogaNode>)_children).GetEnumerator() :
|
|
||||||
System.Linq.Enumerable.Empty<YogaNode>().GetEnumerator();
|
|
||||||
}
|
|
||||||
|
|
||||||
IEnumerator IEnumerable.GetEnumerator()
|
|
||||||
{
|
|
||||||
return _children != null ? ((IEnumerable<YogaNode>)_children).GetEnumerator() :
|
|
||||||
System.Linq.Enumerable.Empty<YogaNode>().GetEnumerator();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaNodeType
|
|
||||||
{
|
|
||||||
Default,
|
|
||||||
Text,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaOverflow
|
|
||||||
{
|
|
||||||
Visible,
|
|
||||||
Hidden,
|
|
||||||
Scroll,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaPositionType
|
|
||||||
{
|
|
||||||
Static,
|
|
||||||
Relative,
|
|
||||||
Absolute,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
[System.Flags]
|
|
||||||
public enum YogaPrintOptions
|
|
||||||
{
|
|
||||||
Layout = 1,
|
|
||||||
Style = 2,
|
|
||||||
Children = 4,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct YogaSize
|
|
||||||
{
|
|
||||||
public float width;
|
|
||||||
public float height;
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaUnit
|
|
||||||
{
|
|
||||||
Undefined,
|
|
||||||
Point,
|
|
||||||
Percent,
|
|
||||||
Auto,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,95 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct YogaValue
|
|
||||||
{
|
|
||||||
private float value;
|
|
||||||
private YogaUnit unit;
|
|
||||||
|
|
||||||
public YogaUnit Unit
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return unit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Value
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static YogaValue Point(float value)
|
|
||||||
{
|
|
||||||
return new YogaValue
|
|
||||||
{
|
|
||||||
value = value,
|
|
||||||
unit = YogaConstants.IsUndefined(value) ? YogaUnit.Undefined : YogaUnit.Point
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Equals(YogaValue other)
|
|
||||||
{
|
|
||||||
return Unit == other.Unit && (Value.Equals(other.Value) || Unit == YogaUnit.Undefined);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool Equals(object obj)
|
|
||||||
{
|
|
||||||
if (ReferenceEquals(null, obj)) return false;
|
|
||||||
return obj is YogaValue && Equals((YogaValue) obj);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int GetHashCode()
|
|
||||||
{
|
|
||||||
unchecked
|
|
||||||
{
|
|
||||||
return (Value.GetHashCode() * 397) ^ (int) Unit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static YogaValue Undefined()
|
|
||||||
{
|
|
||||||
return new YogaValue
|
|
||||||
{
|
|
||||||
value = YogaConstants.Undefined,
|
|
||||||
unit = YogaUnit.Undefined
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public static YogaValue Auto()
|
|
||||||
{
|
|
||||||
return new YogaValue
|
|
||||||
{
|
|
||||||
value = 0f,
|
|
||||||
unit = YogaUnit.Auto
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public static YogaValue Percent(float value)
|
|
||||||
{
|
|
||||||
return new YogaValue
|
|
||||||
{
|
|
||||||
value = value,
|
|
||||||
unit = YogaConstants.IsUndefined(value) ? YogaUnit.Undefined : YogaUnit.Percent
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public static implicit operator YogaValue(float pointValue)
|
|
||||||
{
|
|
||||||
return Point(pointValue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public static class YogaValueExtensions
|
|
||||||
{
|
|
||||||
public static YogaValue Percent(this float value)
|
|
||||||
{
|
|
||||||
return YogaValue.Percent(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static YogaValue Pt(this float value)
|
|
||||||
{
|
|
||||||
return YogaValue.Point(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static YogaValue Percent(this int value)
|
|
||||||
{
|
|
||||||
return YogaValue.Percent(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static YogaValue Pt(this int value)
|
|
||||||
{
|
|
||||||
return YogaValue.Point(value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @generated by enums.py
|
|
||||||
|
|
||||||
namespace Facebook.Yoga
|
|
||||||
{
|
|
||||||
public enum YogaWrap
|
|
||||||
{
|
|
||||||
NoWrap,
|
|
||||||
Wrap,
|
|
||||||
WrapReverse,
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"language": "en",
|
|
||||||
"version": "3.0.0-*",
|
|
||||||
|
|
||||||
"dependencies": {
|
|
||||||
"NETStandard.Library": "1.6.0",
|
|
||||||
"System.Runtime.Handles": "4.3.0"
|
|
||||||
},
|
|
||||||
|
|
||||||
"frameworks": {
|
|
||||||
"netstandard1.6": {
|
|
||||||
"imports": "dnxcore50"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<ProjectGuid>{A24B3BA6-3143-4FFF-B8B8-1EDF166F5F4A}</ProjectGuid>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
|
|
||||||
<Import Project="Facebook.YogaKit.projitems" Label="Shared" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
|
|
||||||
</Project>
|
|
@@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
|
||||||
<HasSharedItems>true</HasSharedItems>
|
|
||||||
<SharedGUID>{A24B3BA6-3143-4FFF-B8B8-1EDF166F5F4A}</SharedGUID>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Label="Configuration">
|
|
||||||
<Import_RootNamespace>Facebook.YogaKit</Import_RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaLayout.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)IYogaLayout.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)YogaKit.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
@@ -1,92 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Drawing;
|
|
||||||
using Facebook.Yoga;
|
|
||||||
|
|
||||||
namespace Facebook.YogaKit
|
|
||||||
{
|
|
||||||
public interface IYogaLayout : IDisposable
|
|
||||||
{
|
|
||||||
bool IsEnabled { get; set; }
|
|
||||||
bool IsIncludeInLayout { get; set; }
|
|
||||||
|
|
||||||
//YogaDirection Direction { get; set; }
|
|
||||||
YogaFlexDirection FlexDirection { get; set; }
|
|
||||||
YogaJustify JustifyContent { get; set; }
|
|
||||||
YogaAlign AlignContent { get; set; }
|
|
||||||
YogaAlign AlignSelf { get; set; }
|
|
||||||
YogaAlign AlignItems { get; set; }
|
|
||||||
YogaPositionType Position { get; set; }
|
|
||||||
YogaWrap FlexWrap { get; set; }
|
|
||||||
YogaOverflow Overflow { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
float FlexGrow { get; set; }
|
|
||||||
float FlexShrink { get; set; }
|
|
||||||
float FlexBasis { get; set; }
|
|
||||||
|
|
||||||
float Left { get; set; }
|
|
||||||
float Top { get; set; }
|
|
||||||
float Right { get; set; }
|
|
||||||
float Bottom { get; set; }
|
|
||||||
float Start { get; set; }
|
|
||||||
float End { get; set; }
|
|
||||||
|
|
||||||
float MarginLeft { get; set; }
|
|
||||||
float MarginTop { get; set; }
|
|
||||||
float MarginRight { get; set; }
|
|
||||||
float MarginBottom { get; set; }
|
|
||||||
float MarginStart { get; set; }
|
|
||||||
float MarginEnd { get; set; }
|
|
||||||
float MarginHorizontal { get; set; }
|
|
||||||
float MarginVertical { get; set; }
|
|
||||||
float Margin { get; set; }
|
|
||||||
|
|
||||||
float PaddingLeft { get; set; }
|
|
||||||
float PaddingTop { get; set; }
|
|
||||||
float PaddingRight { get; set; }
|
|
||||||
float PaddingBottom { get; set; }
|
|
||||||
float PaddingStart { get; set; }
|
|
||||||
float PaddingEnd { get; set; }
|
|
||||||
float PaddingHorizontal { get; set; }
|
|
||||||
float PaddingVertical { get; set; }
|
|
||||||
float Padding { get; set; }
|
|
||||||
|
|
||||||
float BorderLeftWidth { get; set; }
|
|
||||||
float BorderTopWidth { get; set; }
|
|
||||||
float BorderRightWidth { get; set; }
|
|
||||||
float BorderBottomWidth { get; set; }
|
|
||||||
float BorderStartWidth { get; set; }
|
|
||||||
float BorderEndWidth { get; set; }
|
|
||||||
float BorderWidth { get; set; }
|
|
||||||
|
|
||||||
float Width { get; set; }
|
|
||||||
float Height { get; set; }
|
|
||||||
float MinWidth { get; set; }
|
|
||||||
float MinHeight { get; set; }
|
|
||||||
float MaxWidth { get; set; }
|
|
||||||
float MaxHeight { get; set; }
|
|
||||||
|
|
||||||
// Yoga specific properties, not compatible with flexbox specification
|
|
||||||
|
|
||||||
// Returns the size of the view if no constraints were given. This could equivalent to calling [self sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)];
|
|
||||||
SizeF IntrinsicSize { get; }
|
|
||||||
float AspectRatio { get; set; }
|
|
||||||
// Get the resolved direction of this node. This won't be YGDirectionInherit
|
|
||||||
YogaDirection ResolvedDirection { get; }
|
|
||||||
// Returns the number of children that are using Flexbox.
|
|
||||||
int NumberOfChildren { get; }
|
|
||||||
// Return a BOOL indiciating whether or not we this node contains any subviews that are included in Yoga's layout.
|
|
||||||
bool IsLeaf { get; }
|
|
||||||
// Perform a layout calculation and update the frames of the views in the hierarchy with the results
|
|
||||||
void ApplyLayout();
|
|
||||||
// Mark that a view's layout needs to be recalculated. Only works for leaf views.
|
|
||||||
void MarkDirty();
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,17 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Facebook.Yoga;
|
|
||||||
|
|
||||||
namespace Facebook.YogaKit
|
|
||||||
{
|
|
||||||
public static partial class YogaKit
|
|
||||||
{
|
|
||||||
internal static Dictionary<YogaNode, object> Bridges = new Dictionary<YogaNode, object>();
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,905 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using Facebook.Yoga;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
|
||||||
#if __IOS__
|
|
||||||
using NativeView = UIKit.UIView;
|
|
||||||
using NativeScrollView = UIKit.UIScrollView;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace Facebook.YogaKit
|
|
||||||
{
|
|
||||||
public partial class YogaLayout : IYogaLayout
|
|
||||||
{
|
|
||||||
WeakReference<NativeView> _viewRef;
|
|
||||||
YogaNode _node;
|
|
||||||
|
|
||||||
internal YogaLayout(NativeView view)
|
|
||||||
{
|
|
||||||
_viewRef = new WeakReference<NativeView>(view);
|
|
||||||
_node = new YogaNode();
|
|
||||||
YogaKit.Bridges.Add(_node, view);
|
|
||||||
|
|
||||||
IsEnabled = false;
|
|
||||||
IsIncludeInLayout = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public new void MarkDirty()
|
|
||||||
{
|
|
||||||
if (IsLeaf)
|
|
||||||
_node.MarkDirty();
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsLeaf
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (IsEnabled)
|
|
||||||
{
|
|
||||||
NativeView view = null;
|
|
||||||
if (_viewRef.TryGetTarget(out view))
|
|
||||||
{
|
|
||||||
foreach (NativeView subview in GetChildren(view))
|
|
||||||
{
|
|
||||||
var layout = subview.Yoga();
|
|
||||||
if (layout.IsEnabled && layout.IsIncludeInLayout)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public bool IsEnabled
|
|
||||||
{
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsIncludeInLayout
|
|
||||||
{
|
|
||||||
get;
|
|
||||||
set;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int NumberOfChildren => _node.Count;
|
|
||||||
|
|
||||||
public YogaDirection ResolvedDirection => _node.LayoutDirection;
|
|
||||||
|
|
||||||
public YogaFlexDirection FlexDirection
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.FlexDirection;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.FlexDirection = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaAlign AlignItems
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.AlignItems;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.AlignItems = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaJustify JustifyContent
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.JustifyContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.JustifyContent = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaAlign AlignContent
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.AlignContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.AlignContent = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaAlign AlignSelf
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.AlignSelf;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.AlignSelf = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaPositionType Position
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.PositionType;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.PositionType = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaWrap FlexWrap
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.Wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.Wrap = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public YogaOverflow Overflow
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.Overflow;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.Overflow = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float FlexGrow
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.FlexGrow;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.FlexGrow = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float FlexShrink
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.FlexShrink;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.FlexShrink = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float FlexBasis
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (float)_node.FlexBasis.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.FlexBasis = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Left
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.Left.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.Left = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Top
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.Top.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.Top = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Right
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.Right.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.Right = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Bottom
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.Bottom.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.Bottom = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Start
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.Start.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.Start = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float End
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.End.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.End = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MarginLeft
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MarginLeft.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MarginLeft = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MarginTop
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MarginTop.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MarginTop = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MarginRight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MarginRight.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MarginRight = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MarginBottom
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MarginBottom.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MarginBottom = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MarginStart
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MarginStart.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MarginStart = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MarginEnd
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MarginEnd.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MarginEnd = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MarginHorizontal
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MarginHorizontal.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MarginHorizontal = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MarginVertical
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MarginVertical.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MarginVertical = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Margin
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.Margin.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.Margin = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float PaddingLeft
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.PaddingLeft.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.PaddingLeft = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float PaddingTop
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.PaddingTop.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.PaddingTop = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float PaddingRight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.PaddingRight.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.PaddingRight = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float PaddingBottom
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.PaddingBottom.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.PaddingBottom = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float PaddingStart
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.PaddingStart.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.PaddingStart = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float PaddingEnd
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.PaddingEnd.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.PaddingEnd = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float PaddingHorizontal
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.PaddingHorizontal.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.PaddingHorizontal = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float PaddingVertical
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.PaddingVertical.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.PaddingHorizontal = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Padding
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.Padding.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.Padding = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderLeftWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.BorderLeftWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.BorderLeftWidth = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderTopWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.BorderTopWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.BorderTopWidth = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderRightWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.BorderRightWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.BorderRightWidth = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderBottomWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.BorderBottomWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.BorderBottomWidth = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderStartWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.BorderStartWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.BorderStartWidth = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderEndWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.BorderEndWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.BorderEndWidth = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float BorderWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.BorderWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.BorderWidth = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Height
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.Height.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.Height = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float Width
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.Width.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.Width = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MinWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MinWidth.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MinWidth = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MinHeight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MinHeight.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MinHeight = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MaxWidth
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MaxWidth.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MaxWidth = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float MaxHeight
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.MaxHeight.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.MaxHeight = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float AspectRatio
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _node.AspectRatio;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_node.AspectRatio = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ApplyLayout()
|
|
||||||
{
|
|
||||||
NativeView view = null;
|
|
||||||
if (_viewRef.TryGetTarget(out view))
|
|
||||||
{
|
|
||||||
float width = 0;
|
|
||||||
float height = 0;
|
|
||||||
GetWidthHeightOfNativeView(view, out width, out height);
|
|
||||||
if (view is NativeScrollView)
|
|
||||||
{
|
|
||||||
if (FlexDirection == YogaFlexDirection.Column || FlexDirection == YogaFlexDirection.ColumnReverse)
|
|
||||||
{
|
|
||||||
height = float.NaN;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
width = float.NaN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CalculateLayoutWithSize(this, width, height);
|
|
||||||
ApplyLayoutToViewHierarchy(view);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public SizeF IntrinsicSize
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return CalculateLayoutWithSize(this, float.NaN, float.NaN);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SizeF CalculateLayoutWithSize(YogaLayout layout, float width, float height)
|
|
||||||
{
|
|
||||||
//TODO : Check thread access
|
|
||||||
if (!layout.IsEnabled)
|
|
||||||
{
|
|
||||||
System.Diagnostics.Debug.WriteLine("Doesn't use Yoga");
|
|
||||||
}
|
|
||||||
NativeView view = null;
|
|
||||||
if (_viewRef.TryGetTarget(out view))
|
|
||||||
{
|
|
||||||
AttachNodesFromViewHierachy(view);
|
|
||||||
}
|
|
||||||
|
|
||||||
var node = layout._node;
|
|
||||||
|
|
||||||
node.CalculateLayout(width, height);
|
|
||||||
|
|
||||||
return new SizeF { Width = node.LayoutWidth, Height = node.LayoutHeight };
|
|
||||||
}
|
|
||||||
|
|
||||||
static YogaSize MeasureView(YogaNode node, float width, YogaMeasureMode widthMode, float height, YogaMeasureMode heightMode)
|
|
||||||
{
|
|
||||||
var constrainedWidth = (widthMode == YogaMeasureMode.Undefined) ? float.MaxValue : width;
|
|
||||||
var constrainedHeight = (heightMode == YogaMeasureMode.Undefined) ? float.MaxValue : height;
|
|
||||||
|
|
||||||
NativeView view = null;
|
|
||||||
if (YogaKit.Bridges.ContainsKey(node))
|
|
||||||
view = YogaKit.Bridges[node] as NativeView;
|
|
||||||
|
|
||||||
float sizeThatFitsWidth = 0;
|
|
||||||
float sizeThatFitsHeight = 0;
|
|
||||||
|
|
||||||
MeasureNativeView(view, constrainedWidth, constrainedHeight, out sizeThatFitsWidth, out sizeThatFitsHeight);
|
|
||||||
|
|
||||||
var finalWidth = SanitizeMeasurement(constrainedWidth, sizeThatFitsWidth, widthMode);
|
|
||||||
var finalHeight = SanitizeMeasurement(constrainedHeight, sizeThatFitsHeight, heightMode);
|
|
||||||
|
|
||||||
return MeasureOutput.Make(finalWidth, finalHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
static float SanitizeMeasurement(float constrainedSize, float measuredSize, YogaMeasureMode measureMode)
|
|
||||||
{
|
|
||||||
float result;
|
|
||||||
if (measureMode == YogaMeasureMode.Exactly)
|
|
||||||
{
|
|
||||||
result = constrainedSize;
|
|
||||||
}
|
|
||||||
else if (measureMode == YogaMeasureMode.AtMost)
|
|
||||||
{
|
|
||||||
result = Math.Min(constrainedSize, measuredSize);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
result = measuredSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool NodeHasExactSameChildren(YogaNode node, NativeView[] subviews)
|
|
||||||
{
|
|
||||||
if (node.Count != subviews.Length)
|
|
||||||
return false;
|
|
||||||
for (int i = 0; i < subviews.Length; i++)
|
|
||||||
{
|
|
||||||
YogaLayout yoga = subviews[i].Yoga() as YogaLayout;
|
|
||||||
if (node[i] != yoga._node)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void AttachNodesFromViewHierachy(NativeView view)
|
|
||||||
{
|
|
||||||
YogaLayout yoga = view.Yoga() as YogaLayout;
|
|
||||||
var node = yoga._node;
|
|
||||||
// Only leaf nodes should have a measure function
|
|
||||||
if (yoga.IsLeaf)
|
|
||||||
{
|
|
||||||
RemoveAllChildren(node);
|
|
||||||
node.SetMeasureFunction(MeasureView);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
node.SetMeasureFunction(null);
|
|
||||||
// Create a list of all the subviews that we are going to use for layout.
|
|
||||||
var subviewsToInclude = new List<NativeView>();
|
|
||||||
foreach (var subview in view.Subviews)
|
|
||||||
{
|
|
||||||
if (subview.Yoga().IsEnabled && subview.Yoga().IsIncludeInLayout)
|
|
||||||
{
|
|
||||||
subviewsToInclude.Add(subview);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!NodeHasExactSameChildren(node, subviewsToInclude.ToArray()))
|
|
||||||
{
|
|
||||||
RemoveAllChildren(node);
|
|
||||||
for (int i = 0; i < subviewsToInclude.Count; i++)
|
|
||||||
{
|
|
||||||
YogaLayout yogaSubview = subviewsToInclude[i].Yoga() as YogaLayout;
|
|
||||||
node.Insert(i, yogaSubview._node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var subView in subviewsToInclude)
|
|
||||||
{
|
|
||||||
AttachNodesFromViewHierachy(subView);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void RemoveAllChildren(YogaNode node)
|
|
||||||
{
|
|
||||||
if (node == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (node.Count > 0)
|
|
||||||
{
|
|
||||||
node.Clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static double RoundPointValue(float value)
|
|
||||||
{
|
|
||||||
float scale = NativePixelScale;
|
|
||||||
|
|
||||||
return Math.Round(value * scale) / scale;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ApplyLayoutToViewHierarchy(NativeView view)
|
|
||||||
{
|
|
||||||
//TODO : "Framesetting should only be done on the main thread."
|
|
||||||
YogaLayout yoga = view.Yoga() as YogaLayout;
|
|
||||||
|
|
||||||
if (!yoga.IsIncludeInLayout)
|
|
||||||
return;
|
|
||||||
|
|
||||||
var node = yoga._node;
|
|
||||||
|
|
||||||
ApplyLayoutToNativeView(view, node);
|
|
||||||
|
|
||||||
if (!yoga.IsLeaf)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < view.Subviews.Length; i++)
|
|
||||||
{
|
|
||||||
ApplyLayoutToViewHierarchy(view.Subviews[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
2
csharp/Mac/.gitignore
vendored
2
csharp/Mac/.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
libyoga.dylib
|
|
||||||
*.userprefs
|
|
@@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using System;
|
|
||||||
|
|
||||||
using AppKit;
|
|
||||||
using Foundation;
|
|
||||||
using ObjCRuntime;
|
|
||||||
using CoreGraphics;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga.Mac
|
|
||||||
{
|
|
||||||
// Xamarin.Mac binding projects allow you to include native libraries inside C# DLLs for easy consumption
|
|
||||||
// later. However, the binding project build files currently assume you are binding some objective-c API
|
|
||||||
// and that you need an ApiDefinition.cs for that. yoga is all C APIs, so just include this "blank" file so
|
|
||||||
// the dylib gets packaged
|
|
||||||
}
|
|
@@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<CompileDependsOn>NativeLibrary;$(CompileDependsOn)</CompileDependsOn>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Target Name="NativeLibrary" Outputs="$(ProjectDir)libyoga.dylib">
|
|
||||||
<Exec WorkingDirectory="$(ProjectDir)" Command="$(ProjectDir)../build-native.sh" />
|
|
||||||
<Copy SourceFiles="$(ProjectDir)..\..\buck-out\gen\csharp\yoganet-macosx\libyoga.dylib" DestinationFiles="$(ProjectDir)libyoga.dylib" SkipUnchangedFiles="true" />
|
|
||||||
</Target>
|
|
||||||
</Project>
|
|
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using AppKit;
|
|
||||||
using Foundation;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga.Mac.Sample
|
|
||||||
{
|
|
||||||
[Register("AppDelegate")]
|
|
||||||
public class AppDelegate : NSApplicationDelegate
|
|
||||||
{
|
|
||||||
public AppDelegate()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void DidFinishLaunching(NSNotification notification)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void WillTerminate(NSNotification notification)
|
|
||||||
{
|
|
||||||
// Insert code here to tear down your application
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
@@ -1,84 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{64E0AB97-A904-4607-A535-EEA5A966C09E}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<RootNamespace>Facebook.Yoga.Mac.Sample</RootNamespace>
|
|
||||||
<AssemblyName>Facebook.Yoga.Mac.Sample</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
|
||||||
<TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier>
|
|
||||||
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<EnableCodeSigning>false</EnableCodeSigning>
|
|
||||||
<CodeSigningKey>Mac Developer</CodeSigningKey>
|
|
||||||
<CreatePackage>false</CreatePackage>
|
|
||||||
<EnablePackageSigning>false</EnablePackageSigning>
|
|
||||||
<IncludeMonoRuntime>false</IncludeMonoRuntime>
|
|
||||||
<UseSGen>true</UseSGen>
|
|
||||||
<UseRefCounting>true</UseRefCounting>
|
|
||||||
<Profiling>true</Profiling>
|
|
||||||
<HttpClientHandler>HttpClientHandler</HttpClientHandler>
|
|
||||||
<TlsProvider>Default</TlsProvider>
|
|
||||||
<LinkMode>None</LinkMode>
|
|
||||||
<XamMacArch>x86_64</XamMacArch>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release</OutputPath>
|
|
||||||
<DefineConstants></DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<EnableCodeSigning>false</EnableCodeSigning>
|
|
||||||
<CreatePackage>true</CreatePackage>
|
|
||||||
<EnablePackageSigning>false</EnablePackageSigning>
|
|
||||||
<IncludeMonoRuntime>true</IncludeMonoRuntime>
|
|
||||||
<UseSGen>true</UseSGen>
|
|
||||||
<UseRefCounting>true</UseRefCounting>
|
|
||||||
<LinkMode>SdkOnly</LinkMode>
|
|
||||||
<HttpClientHandler>HttpClientHandler</HttpClientHandler>
|
|
||||||
<TlsProvider>Default</TlsProvider>
|
|
||||||
<XamMacArch></XamMacArch>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="Xamarin.Mac" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Resources\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Info.plist" />
|
|
||||||
<None Include="Entitlements.plist" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Main.cs" />
|
|
||||||
<Compile Include="AppDelegate.cs" />
|
|
||||||
<Compile Include="ViewController.cs" />
|
|
||||||
<Compile Include="ViewController.designer.cs">
|
|
||||||
<DependentUpon>ViewController.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<InterfaceDefinition Include="Main.storyboard" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Facebook.Yoga.Mac.csproj">
|
|
||||||
<Project>{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}</Project>
|
|
||||||
<Name>Facebook.Yoga.Mac</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
|
|
||||||
</Project>
|
|
@@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>Facebook.Yoga.Mac.Sample</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>com.facebook.facebook-yoga-mac-sample</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1</string>
|
|
||||||
<key>LSMinimumSystemVersion</key>
|
|
||||||
<string>10.11</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>en</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>NSHumanReadableCopyright</key>
|
|
||||||
<string>${AuthorCopyright}</string>
|
|
||||||
<key>NSPrincipalClass</key>
|
|
||||||
<string>NSApplication</string>
|
|
||||||
<key>NSMainStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
@@ -1,20 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
using AppKit;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga.Mac.Sample
|
|
||||||
{
|
|
||||||
static class MainClass
|
|
||||||
{
|
|
||||||
static void Main(string[] args)
|
|
||||||
{
|
|
||||||
NSApplication.Init();
|
|
||||||
NSApplication.Main(args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,681 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="6198" systemVersion="14A297b" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
|
|
||||||
<dependencies>
|
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6198" />
|
|
||||||
</dependencies>
|
|
||||||
<scenes>
|
|
||||||
<!--Application-->
|
|
||||||
<scene sceneID="JPo-4y-FX3">
|
|
||||||
<objects>
|
|
||||||
<application id="hnw-xV-0zn" sceneMemberID="viewController">
|
|
||||||
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Facebook.Yoga.Mac.Sample" id="1Xt-HY-uBw">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Facebook.Yoga.Mac.Sample" systemMenu="apple" id="uQy-DD-JDr">
|
|
||||||
<items>
|
|
||||||
<menuItem title="About Facebook.Yoga.Mac.Sample" id="5kV-Vb-QxS">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH" />
|
|
||||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW" />
|
|
||||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ" />
|
|
||||||
<menuItem title="Services" id="NMo-om-nkz">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5" />
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R" />
|
|
||||||
<menuItem title="Hide Facebook.Yoga.Mac.Sample" keyEquivalent="h" id="Olw-nP-bQN">
|
|
||||||
<connections>
|
|
||||||
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES" />
|
|
||||||
<connections>
|
|
||||||
<action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT" />
|
|
||||||
<menuItem title="Quit Facebook.Yoga.Mac.Sample" keyEquivalent="q" id="4sb-4s-VLi">
|
|
||||||
<connections>
|
|
||||||
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="File" id="dMs-cI-mzQ">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="File" id="bib-Uj-vzu">
|
|
||||||
<items>
|
|
||||||
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
|
|
||||||
<connections>
|
|
||||||
<action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
|
|
||||||
<connections>
|
|
||||||
<action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Open Recent" id="tXI-mr-wws">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Clear Menu" id="vNY-rz-j42">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE" />
|
|
||||||
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
|
|
||||||
<connections>
|
|
||||||
<action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
|
|
||||||
<connections>
|
|
||||||
<action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
|
|
||||||
<connections>
|
|
||||||
<action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Revert to Saved" id="KaW-ft-85H">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="aJh-i4-bef" />
|
|
||||||
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES" />
|
|
||||||
<connections>
|
|
||||||
<action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
|
|
||||||
<connections>
|
|
||||||
<action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Edit" id="5QF-Oa-p0T">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
|
||||||
<connections>
|
|
||||||
<action selector="undo:" target="Ady-hI-5gd" id="M6e-cu-g7V" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
|
||||||
<connections>
|
|
||||||
<action selector="redo:" target="Ady-hI-5gd" id="oIA-Rs-6OD" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz" />
|
|
||||||
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
|
||||||
<connections>
|
|
||||||
<action selector="cut:" target="Ady-hI-5gd" id="YJe-68-I9s" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
|
||||||
<connections>
|
|
||||||
<action selector="copy:" target="Ady-hI-5gd" id="G1f-GL-Joy" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
|
||||||
<connections>
|
|
||||||
<action selector="paste:" target="Ady-hI-5gd" id="UvS-8e-Qdg" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES" />
|
|
||||||
<connections>
|
|
||||||
<action selector="pasteAsPlainText:" target="Ady-hI-5gd" id="cEh-KX-wJQ" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Delete" id="pa3-QI-u2k">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="delete:" target="Ady-hI-5gd" id="0Mk-Ml-PaM" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
|
||||||
<connections>
|
|
||||||
<action selector="selectAll:" target="Ady-hI-5gd" id="VNm-Mi-diN" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2" />
|
|
||||||
<menuItem title="Find" id="4EN-yA-p0u">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Find" id="1b7-l0-nxx">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
|
|
||||||
<connections>
|
|
||||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="cD7-Qs-BN4" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES" />
|
|
||||||
<connections>
|
|
||||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="WD3-Gg-5AJ" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
|
|
||||||
<connections>
|
|
||||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="NDo-RZ-v9R" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
|
|
||||||
<connections>
|
|
||||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="HOh-sY-3ay" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
|
|
||||||
<connections>
|
|
||||||
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="U76-nv-p5D" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
|
|
||||||
<connections>
|
|
||||||
<action selector="centerSelectionInVisibleArea:" target="Ady-hI-5gd" id="IOG-6D-g5B" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
|
|
||||||
<connections>
|
|
||||||
<action selector="showGuessPanel:" target="Ady-hI-5gd" id="vFj-Ks-hy3" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
|
|
||||||
<connections>
|
|
||||||
<action selector="checkSpelling:" target="Ady-hI-5gd" id="fz7-VC-reM" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="bNw-od-mp5" />
|
|
||||||
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleContinuousSpellChecking:" target="Ady-hI-5gd" id="7w6-Qz-0kB" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleGrammarChecking:" target="Ady-hI-5gd" id="muD-Qn-j4w" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleAutomaticSpellingCorrection:" target="Ady-hI-5gd" id="2lM-Qi-WAP" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Substitutions" id="9ic-FL-obx">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="orderFrontSubstitutionsPanel:" target="Ady-hI-5gd" id="oku-mr-iSq" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO" />
|
|
||||||
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleSmartInsertDelete:" target="Ady-hI-5gd" id="3IJ-Se-DZD" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleAutomaticQuoteSubstitution:" target="Ady-hI-5gd" id="ptq-xd-QOA" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleAutomaticDashSubstitution:" target="Ady-hI-5gd" id="oCt-pO-9gS" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Smart Links" id="cwL-P1-jid">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleAutomaticLinkDetection:" target="Ady-hI-5gd" id="Gip-E3-Fov" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Data Detectors" id="tRr-pd-1PS">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleAutomaticDataDetection:" target="Ady-hI-5gd" id="R1I-Nq-Kbl" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleAutomaticTextReplacement:" target="Ady-hI-5gd" id="DvP-Fe-Py6" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Transformations" id="2oI-Rn-ZJC">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="uppercaseWord:" target="Ady-hI-5gd" id="sPh-Tk-edu" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="lowercaseWord:" target="Ady-hI-5gd" id="iUZ-b5-hil" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="capitalizeWord:" target="Ady-hI-5gd" id="26H-TL-nsh" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Speech" id="xrE-MZ-jX0">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="startSpeaking:" target="Ady-hI-5gd" id="654-Ng-kyl" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="stopSpeaking:" target="Ady-hI-5gd" id="dX8-6p-jy9" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Format" id="jxT-CU-nIS">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Font" id="Gi5-1S-RQB">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq" />
|
|
||||||
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27" />
|
|
||||||
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq" />
|
|
||||||
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
|
|
||||||
<connections>
|
|
||||||
<action selector="underline:" target="Ady-hI-5gd" id="FYS-2b-JAY" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO" />
|
|
||||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL" />
|
|
||||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST" />
|
|
||||||
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B" />
|
|
||||||
<menuItem title="Kern" id="jBQ-r6-VK2">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Use Default" id="GUa-eO-cwY">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="useStandardKerning:" target="Ady-hI-5gd" id="6dk-9l-Ckg" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Use None" id="cDB-IK-hbR">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="turnOffKerning:" target="Ady-hI-5gd" id="U8a-gz-Maa" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Tighten" id="46P-cB-AYj">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="tightenKerning:" target="Ady-hI-5gd" id="hr7-Nz-8ro" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Loosen" id="ogc-rX-tC1">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="loosenKerning:" target="Ady-hI-5gd" id="8i4-f9-FKE" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Ligatures" id="o6e-r0-MWq">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Use Default" id="agt-UL-0e3">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="useStandardLigatures:" target="Ady-hI-5gd" id="7uR-wd-Dx6" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Use None" id="J7y-lM-qPV">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="turnOffLigatures:" target="Ady-hI-5gd" id="iX2-gA-Ilz" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Use All" id="xQD-1f-W4t">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="useAllLigatures:" target="Ady-hI-5gd" id="KcB-kA-TuK" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Baseline" id="OaQ-X3-Vso">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Use Default" id="3Om-Ey-2VK">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="unscript:" target="Ady-hI-5gd" id="0vZ-95-Ywn" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Superscript" id="Rqc-34-cIF">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="superscript:" target="Ady-hI-5gd" id="3qV-fo-wpU" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Subscript" id="I0S-gh-46l">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="subscript:" target="Ady-hI-5gd" id="Q6W-4W-IGz" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Raise" id="2h7-ER-AoG">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="raiseBaseline:" target="Ady-hI-5gd" id="4sk-31-7Q9" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Lower" id="1tx-W0-xDw">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="lowerBaseline:" target="Ady-hI-5gd" id="OF1-bc-KW4" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq" />
|
|
||||||
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
|
|
||||||
<connections>
|
|
||||||
<action selector="orderFrontColorPanel:" target="Ady-hI-5gd" id="mSX-Xz-DV3" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ" />
|
|
||||||
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES" />
|
|
||||||
<connections>
|
|
||||||
<action selector="copyFont:" target="Ady-hI-5gd" id="GJO-xA-L4q" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES" />
|
|
||||||
<connections>
|
|
||||||
<action selector="pasteFont:" target="Ady-hI-5gd" id="JfD-CL-leO" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Text" id="Fal-I4-PZk">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Text" id="d9c-me-L2H">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
|
|
||||||
<connections>
|
|
||||||
<action selector="alignLeft:" target="Ady-hI-5gd" id="zUv-R1-uAa" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
|
|
||||||
<connections>
|
|
||||||
<action selector="alignCenter:" target="Ady-hI-5gd" id="spX-mk-kcS" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Justify" id="J5U-5w-g23">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="alignJustified:" target="Ady-hI-5gd" id="ljL-7U-jND" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
|
|
||||||
<connections>
|
|
||||||
<action selector="alignRight:" target="Ady-hI-5gd" id="r48-bG-YeY" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK" />
|
|
||||||
<menuItem title="Writing Direction" id="H1b-Si-o9J">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="YGs-j5-SAR">
|
|
||||||
<string key="title"> Default</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="makeBaseWritingDirectionNatural:" target="Ady-hI-5gd" id="qtV-5e-UBP" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="Lbh-J2-qVU">
|
|
||||||
<string key="title"> Left to Right</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="makeBaseWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="S0X-9S-QSf" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="jFq-tB-4Kx">
|
|
||||||
<string key="title"> Right to Left</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="makeBaseWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="5fk-qB-AqJ" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="swp-gr-a21" />
|
|
||||||
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="Nop-cj-93Q">
|
|
||||||
<string key="title"> Default</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="makeTextWritingDirectionNatural:" target="Ady-hI-5gd" id="lPI-Se-ZHp" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="BgM-ve-c93">
|
|
||||||
<string key="title"> Left to Right</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="makeTextWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="caW-Bv-w94" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem id="RB4-Sm-HuC">
|
|
||||||
<string key="title"> Right to Left</string>
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="makeTextWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="EXD-6r-ZUu" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm" />
|
|
||||||
<menuItem title="Show Ruler" id="vLm-3I-IUL">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleRuler:" target="Ady-hI-5gd" id="FOx-HJ-KwY" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES" />
|
|
||||||
<connections>
|
|
||||||
<action selector="copyRuler:" target="Ady-hI-5gd" id="71i-fW-3W2" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES" />
|
|
||||||
<connections>
|
|
||||||
<action selector="pasteRuler:" target="Ady-hI-5gd" id="cSh-wd-qM2" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="View" id="H8h-7b-M4v">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES" />
|
|
||||||
<connections>
|
|
||||||
<action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Window" id="aUF-d1-5bR">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
|
||||||
<connections>
|
|
||||||
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM" />
|
|
||||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<connections>
|
|
||||||
<action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
|
||||||
<modifierMask key="keyEquivalentModifierMask" />
|
|
||||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
|
||||||
<items>
|
|
||||||
<menuItem title="Facebook.Yoga.Mac.Sample Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
|
||||||
<connections>
|
|
||||||
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no" />
|
|
||||||
</connections>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
</menuItem>
|
|
||||||
</items>
|
|
||||||
</menu>
|
|
||||||
<connections>
|
|
||||||
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m" />
|
|
||||||
</connections>
|
|
||||||
</application>
|
|
||||||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModuleProvider="" />
|
|
||||||
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder" />
|
|
||||||
</objects>
|
|
||||||
<point key="canvasLocation" x="75" y="0.0" />
|
|
||||||
</scene>
|
|
||||||
<!--Window Controller - Window-->
|
|
||||||
<scene sceneID="R2V-B0-nI4">
|
|
||||||
<objects>
|
|
||||||
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
|
|
||||||
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
|
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" />
|
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES" />
|
|
||||||
<rect key="contentRect" x="196" y="240" width="480" height="270" />
|
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027" />
|
|
||||||
</window>
|
|
||||||
<connections>
|
|
||||||
<segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM" />
|
|
||||||
</connections>
|
|
||||||
</windowController>
|
|
||||||
<customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder" />
|
|
||||||
</objects>
|
|
||||||
<point key="canvasLocation" x="75" y="250" />
|
|
||||||
</scene>
|
|
||||||
<!--View Controller-->
|
|
||||||
<scene sceneID="hIz-AP-VOD">
|
|
||||||
<objects>
|
|
||||||
<viewController id="XfG-lQ-9wD" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
|
|
||||||
<view key="view" id="m2S-Jp-Qdl">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="480" height="270" />
|
|
||||||
<autoresizingMask key="autoresizingMask" />
|
|
||||||
</view>
|
|
||||||
</viewController>
|
|
||||||
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder" />
|
|
||||||
</objects>
|
|
||||||
<point key="canvasLocation" x="75" y="655" />
|
|
||||||
</scene>
|
|
||||||
</scenes>
|
|
||||||
</document>
|
|
@@ -1,136 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//#define DEBUG_LAYOUT
|
|
||||||
using System;
|
|
||||||
|
|
||||||
using AppKit;
|
|
||||||
using Foundation;
|
|
||||||
using CoreGraphics;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga.Mac.Sample
|
|
||||||
{
|
|
||||||
public static class NSViewYogaExtensions
|
|
||||||
{
|
|
||||||
public static void ApplyYogaLayout (this NSView view, YogaNode n, bool root = true)
|
|
||||||
{
|
|
||||||
#if DEBUG_LAYOUT
|
|
||||||
Console.WriteLine ($"ApplyYogaLayout {view.ToolTip}, {n.LayoutX}, {n.LayoutY}, {n.LayoutWidth}, {n.LayoutHeight}");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// A bit of gross special casing
|
|
||||||
// This really should mostly go away if/when the UIView+Yoga.m magic gets ported to AppKit
|
|
||||||
if (root)
|
|
||||||
view.Frame = new CGRect (n.LayoutX, n.LayoutY, n.LayoutWidth, n.LayoutHeight);
|
|
||||||
#if DEBUG_LAYOUT
|
|
||||||
Console.WriteLine ($"Setting {view.ToolTip} frame to {view.Frame}");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// This assumes your YogaNode and NSView children were inserted in same order
|
|
||||||
for (int i = 0; i < n.Count; ++i) {
|
|
||||||
YogaNode childNode = n[i];
|
|
||||||
// Cocoa coord space is from bottom left not top left
|
|
||||||
view.Subviews[i].Frame = new CGRect (childNode.LayoutX, n.LayoutHeight - childNode.LayoutY - childNode.LayoutHeight, childNode.LayoutWidth, childNode.LayoutHeight);
|
|
||||||
#if DEBUG_LAYOUT
|
|
||||||
Console.WriteLine ($"Setting {view.Subviews[i].ToolTip} frame to {view.Subviews[i].Frame}");
|
|
||||||
#endif
|
|
||||||
if (childNode.Count > 0){
|
|
||||||
#if DEBUG_LAYOUT
|
|
||||||
Console.WriteLine ($"Calling ApplyYogaLayout recursively on {view.Subviews[i].ToolTip}");
|
|
||||||
#endif
|
|
||||||
ApplyYogaLayout (view.Subviews[i], childNode, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public partial class ViewController : NSViewController
|
|
||||||
{
|
|
||||||
public ViewController(IntPtr handle) : base(handle)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void ViewDidLoad()
|
|
||||||
{
|
|
||||||
base.ViewDidLoad ();
|
|
||||||
|
|
||||||
NSImage image = NSImage.ImageNamed (NSImageName.TrashFull);
|
|
||||||
|
|
||||||
NSView root = CreateViewHierarchy (image);
|
|
||||||
var rootNode = CalculateLayout (View.Frame, image.Size);
|
|
||||||
|
|
||||||
root.ApplyYogaLayout (rootNode);
|
|
||||||
|
|
||||||
View.AddSubview (root);
|
|
||||||
}
|
|
||||||
|
|
||||||
static NSView CreateViewHierarchy (NSImage image)
|
|
||||||
{
|
|
||||||
var root = new NSView () {
|
|
||||||
WantsLayer = true,
|
|
||||||
ToolTip = "Root"
|
|
||||||
};
|
|
||||||
root.Layer.BackgroundColor = NSColor.Red.CGColor;
|
|
||||||
|
|
||||||
NSView child1 = new NSView () {
|
|
||||||
WantsLayer = true,
|
|
||||||
ToolTip = "Child 1"
|
|
||||||
};
|
|
||||||
child1.Layer.BackgroundColor = NSColor.Blue.CGColor;
|
|
||||||
|
|
||||||
NSView child2 = new NSView () {
|
|
||||||
WantsLayer = true,
|
|
||||||
ToolTip = "Child 2"
|
|
||||||
};
|
|
||||||
child2.Layer.BackgroundColor = NSColor.Green.CGColor;
|
|
||||||
|
|
||||||
NSView child3 = new NSView () {
|
|
||||||
WantsLayer = true,
|
|
||||||
ToolTip = "Child 3"
|
|
||||||
};
|
|
||||||
child3.Layer.BackgroundColor = NSColor.Yellow.CGColor;
|
|
||||||
|
|
||||||
root.AddSubview (child1);
|
|
||||||
root.AddSubview (child2);
|
|
||||||
child2.AddSubview (child3);
|
|
||||||
|
|
||||||
return root;
|
|
||||||
}
|
|
||||||
|
|
||||||
static YogaNode CalculateLayout (CGRect rootFrame, CGSize imageSize)
|
|
||||||
{
|
|
||||||
var rootNode = new YogaNode () {
|
|
||||||
Width = (float)rootFrame.Width,
|
|
||||||
Height = (float)rootFrame.Height,
|
|
||||||
AlignItems = YogaAlign.Center,
|
|
||||||
JustifyContent = YogaJustify.Center
|
|
||||||
};
|
|
||||||
|
|
||||||
var child1Node = new YogaNode () {
|
|
||||||
Width = 100,
|
|
||||||
Height = 100
|
|
||||||
};
|
|
||||||
|
|
||||||
var child2Node = new YogaNode () {
|
|
||||||
Width = 200,
|
|
||||||
Height = 100
|
|
||||||
};
|
|
||||||
|
|
||||||
var child3Node = new YogaNode () {
|
|
||||||
Width = 100,
|
|
||||||
Height = 100
|
|
||||||
};
|
|
||||||
|
|
||||||
rootNode.Insert (0, child1Node);
|
|
||||||
rootNode.Insert (1, child2Node);
|
|
||||||
child2Node.Insert (0, child3Node);
|
|
||||||
rootNode.CalculateLayout ();
|
|
||||||
|
|
||||||
return rootNode;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,25 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// WARNING
|
|
||||||
//
|
|
||||||
// This file has been generated automatically by Xamarin Studio to store outlets and
|
|
||||||
// actions made in the UI designer. If it is removed, they will be lost.
|
|
||||||
// Manual changes to this file may not be handled correctly.
|
|
||||||
//
|
|
||||||
using Foundation;
|
|
||||||
|
|
||||||
namespace Facebook.Yoga.Mac.Sample
|
|
||||||
{
|
|
||||||
[Register("ViewController")]
|
|
||||||
partial class ViewController
|
|
||||||
{
|
|
||||||
void ReleaseDesignerOutlets()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
@@ -1,78 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{9FCB6149-DFA8-4EAA-B4DB-2E91A5D8FF77}</ProjectGuid>
|
|
||||||
<ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<RootNamespace>Facebook.Yoga.Mac.Tests</RootNamespace>
|
|
||||||
<AssemblyName>Facebook.Yoga.Mac.Tests</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
|
||||||
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
|
|
||||||
<UseXamMacFullFramework>true</UseXamMacFullFramework>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
<OutputPath>bin\Debug</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<EnableCodeSigning>false</EnableCodeSigning>
|
|
||||||
<CodeSigningKey>Mac Developer</CodeSigningKey>
|
|
||||||
<CreatePackage>false</CreatePackage>
|
|
||||||
<EnablePackageSigning>false</EnablePackageSigning>
|
|
||||||
<IncludeMonoRuntime>false</IncludeMonoRuntime>
|
|
||||||
<UseSGen>true</UseSGen>
|
|
||||||
<UseRefCounting>true</UseRefCounting>
|
|
||||||
<Profiling>true</Profiling>
|
|
||||||
<HttpClientHandler>HttpClientHandler</HttpClientHandler>
|
|
||||||
<TlsProvider>Default</TlsProvider>
|
|
||||||
<LinkMode>None</LinkMode>
|
|
||||||
<XamMacArch>x86_64</XamMacArch>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<OutputPath>bin\Release</OutputPath>
|
|
||||||
<DefineConstants>
|
|
||||||
</DefineConstants>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<EnableCodeSigning>false</EnableCodeSigning>
|
|
||||||
<CreatePackage>true</CreatePackage>
|
|
||||||
<EnablePackageSigning>false</EnablePackageSigning>
|
|
||||||
<IncludeMonoRuntime>true</IncludeMonoRuntime>
|
|
||||||
<UseSGen>true</UseSGen>
|
|
||||||
<UseRefCounting>true</UseRefCounting>
|
|
||||||
<LinkMode>None</LinkMode>
|
|
||||||
<HttpClientHandler>HttpClientHandler</HttpClientHandler>
|
|
||||||
<TlsProvider>Default</TlsProvider>
|
|
||||||
<XamMacArch>
|
|
||||||
</XamMacArch>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="Xamarin.Mac" />
|
|
||||||
<Reference Include="GuiUnit">
|
|
||||||
<HintPath>..\..\packages\MonoDevelop.Addins.GuiUnit.0.1.1\lib\net45\GuiUnit.exe</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="Info.plist" />
|
|
||||||
<None Include="Entitlements.plist" />
|
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Main.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\Facebook.Yoga.Mac.csproj">
|
|
||||||
<Project>{19A1C7D7-C9CC-476A-B604-DF6A3DE1BA71}</Project>
|
|
||||||
<Name>Facebook.Yoga.Mac</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="..\..\tests\Facebook.Yoga\Facebook.Yoga.Shared.Tests.projitems" Label="Shared" Condition="Exists('..\..\tests\Facebook.Yoga\Facebook.Yoga.Shared.Tests.projitems')" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
|
|
||||||
</Project>
|
|
@@ -1,30 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>Facebook.Yoga.Mac.Tests</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>com.facebook.facebook-yoga-mac-tests</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>1.0</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>1</string>
|
|
||||||
<key>LSMinimumSystemVersion</key>
|
|
||||||
<string>10.11</string>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>en</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>NSHumanReadableCopyright</key>
|
|
||||||
<string>${AuthorCopyright}</string>
|
|
||||||
<key>NSPrincipalClass</key>
|
|
||||||
<string>NSApplication</string>
|
|
||||||
<key>NSMainStoryboardFile</key>
|
|
||||||
<string>Main</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user