Compare commits
176 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5f92ba49a7 | ||
|
2e564c21cd | ||
|
ca7d4d1633 | ||
|
3645f43cea | ||
|
9378a7a439 | ||
|
d3e02b15fa | ||
|
80d527814e | ||
|
5121fef5d8 | ||
|
0d026bd1a0 | ||
|
719fa3cca3 | ||
|
307cf09434 | ||
|
8691cdaed6 | ||
|
4a6b1e19b8 | ||
|
31ce3ab866 | ||
|
0846439c8e | ||
|
000d1436b4 | ||
|
1bc97a5e48 | ||
|
68f7001ed4 | ||
|
59446294b3 | ||
|
460370b7d3 | ||
|
cbea5d44b8 | ||
|
b4b009c2d8 | ||
|
74dd627495 | ||
|
58f0cca7c7 | ||
|
3de3575ac4 | ||
|
390fade8c0 | ||
|
96dfe068ee | ||
|
e0eb37fce0 | ||
|
79355ab72d | ||
|
5a9f29debb | ||
|
8b8932811e | ||
|
604a9a98a9 | ||
|
71321f763a | ||
|
7fa0816d81 | ||
|
4840495d3f | ||
|
866bf101b2 | ||
|
3467308874 | ||
|
ef2c693b05 | ||
|
efac22a508 | ||
|
4b97375524 | ||
|
ab9d06abf5 | ||
|
5ee32fbefc | ||
|
899664dddd | ||
|
b66642cb86 | ||
|
b9ae948ce9 | ||
|
138521ccc2 | ||
|
5514722ce2 | ||
|
56e133ab4c | ||
|
f6415889ca | ||
|
885b4cbdfb | ||
|
8461aeaef0 | ||
|
3df41aefdb | ||
|
8bc89651d6 | ||
|
c5f2444048 | ||
|
130a9a2aa2 | ||
|
dd97fcc968 | ||
|
4f51871fa8 | ||
|
e96d14395c | ||
|
852db1d885 | ||
|
3f79439718 | ||
|
96d93f2982 | ||
|
236bcc1a39 | ||
|
4b5ae211da | ||
|
aaa018bbea | ||
|
6bdd39d0ed | ||
|
da678ef971 | ||
|
e9078374c9 | ||
|
f23a669ed0 | ||
|
9ddda3c630 | ||
|
8ab01fde6e | ||
|
440c719190 | ||
|
e522b2dee4 | ||
|
b26e637c81 | ||
|
6b7f6980f9 | ||
|
4248fd9d4c | ||
|
5a65261a55 | ||
|
5719132f58 | ||
|
10b316f315 | ||
|
b6498987fa | ||
|
9680ae98a6 | ||
|
59755d2874 | ||
|
64c37767c2 | ||
|
50ec35575f | ||
|
ed3b54b603 | ||
|
ed5c5a799f | ||
|
d19da9e528 | ||
|
0962c5220c | ||
|
b9972cee6e | ||
|
98c1c180af | ||
|
6f6e0ce339 | ||
|
bdae838516 | ||
|
6d8ee77791 | ||
|
9725d5b21b | ||
|
8e48edaa0b | ||
|
89394a2dd6 | ||
|
02a2309b2a | ||
|
8f181c7259 | ||
|
339c5574b8 | ||
|
8d5bbecd3d | ||
|
dd12907632 | ||
|
7d7d9a7ef0 | ||
|
63570613d3 | ||
|
4e2011c381 | ||
|
7a60399b2b | ||
|
a0b3586fb3 | ||
|
a2ef8978cd | ||
|
d02f4a94de | ||
|
b7890fa2a8 | ||
|
1e4d0abc66 | ||
|
eb2aeb3adb | ||
|
fad2ee1a64 | ||
|
ba9bd4eae3 | ||
|
e12b78f99b | ||
|
5d1cee2bf0 | ||
|
5c711a7076 | ||
|
838ef47847 | ||
|
786ccddd7b | ||
|
b747286c1d | ||
|
bb3c2b2498 | ||
|
36e732aabd | ||
|
d6517ae288 | ||
|
93d327acfb | ||
|
01c6c79efb | ||
|
357ca78f9f | ||
|
6e46eec58f | ||
|
554d8cdf76 | ||
|
328ec7dc4d | ||
|
2e66f8d828 | ||
|
e224a29d1c | ||
|
238d7ba98f | ||
|
d6ba8326d1 | ||
|
f7df575746 | ||
|
2b52c73d70 | ||
|
7a45fb39bf | ||
|
1080cf22e3 | ||
|
1d09227374 | ||
|
85031baaf2 | ||
|
7f71cac3b0 | ||
|
48a8f883ba | ||
|
6132a59772 | ||
|
8309cfc976 | ||
|
abc9fdb37c | ||
|
b872751d68 | ||
|
8368338c93 | ||
|
45c44d293c | ||
|
b4a889553c | ||
|
78cdf3cadc | ||
|
be78bfbd8c | ||
|
c5d4485db3 | ||
|
71f1d99494 | ||
|
0e99980206 | ||
|
292bfed102 | ||
|
78d6988461 | ||
|
3499e2e0ef | ||
|
b1821ab4cd | ||
|
006f6460a9 | ||
|
db5bc092aa | ||
|
9fe20fd2fc | ||
|
7b87ded288 | ||
|
eaaf0fdfe2 | ||
|
4caed8feb5 | ||
|
4be229059c | ||
|
389f2fd85d | ||
|
f95e3b49e9 | ||
|
f172d5d41c | ||
|
7be9fd1a79 | ||
|
5e1796505d | ||
|
51a4601e18 | ||
|
0bc4d23e2e | ||
|
4c47dcbd0f | ||
|
c1a9f6120a | ||
|
1b32c4f054 | ||
|
896cfbdfde | ||
|
910aa77c01 | ||
|
2562c029b1 | ||
|
0b1780a081 |
56
.clang-format
Normal file
56
.clang-format
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
Language: Cpp
|
||||||
|
AccessModifierOffset: -2
|
||||||
|
AlignAfterOpenBracket: AlwaysBreak
|
||||||
|
AlignConsecutiveAssignments: false
|
||||||
|
AlignConsecutiveDeclarations: false
|
||||||
|
AlignEscapedNewlines: Left
|
||||||
|
AlignOperands: false
|
||||||
|
AlignTrailingComments: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
AllowShortBlocksOnASingleLine: false
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: Empty
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
AllowShortLoopsOnASingleLine: true
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: true
|
||||||
|
AlwaysBreakTemplateDeclarations: Yes
|
||||||
|
BinPackArguments: false
|
||||||
|
BinPackParameters: false
|
||||||
|
BreakBeforeBinaryOperators: false
|
||||||
|
BreakBeforeBraces: Attach
|
||||||
|
BreakBeforeTernaryOperators: true
|
||||||
|
BreakConstructorInitializers: BeforeColon
|
||||||
|
BreakInheritanceList: BeforeColon
|
||||||
|
BreakStringLiterals: true
|
||||||
|
ColumnLimit: 80
|
||||||
|
CompactNamespaces: false
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
FixNamespaceComments: true
|
||||||
|
IndentCaseLabels: true
|
||||||
|
IndentPPDirectives: None
|
||||||
|
IndentWidth: 2
|
||||||
|
IndentWrappedFunctionNames: false
|
||||||
|
MaxEmptyLinesToKeep: 1
|
||||||
|
NamespaceIndentation: None
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 2000
|
||||||
|
PointerAlignment: Left
|
||||||
|
ReflowComments: true
|
||||||
|
SortIncludes: false
|
||||||
|
SortUsingDeclarations: true
|
||||||
|
SpaceAfterCStyleCast: true
|
||||||
|
SpaceAfterTemplateKeyword: true
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeCpp11BracedList: false
|
||||||
|
SpaceBeforeCtorInitializerColon: true
|
||||||
|
SpaceBeforeInheritanceColon: true
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesBeforeTrailingComments: 1
|
||||||
|
Standard: Cpp11
|
||||||
|
UseTab: Never
|
1
.clang-format-ignore
Normal file
1
.clang-format-ignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
^lib/.*
|
@@ -1,4 +1,12 @@
|
|||||||
language: java
|
language: java
|
||||||
|
os: linux
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- llvm-toolchain-trusty-6.0
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- clang-6.0
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- TARGET: website
|
- TARGET: website
|
||||||
|
6
BUCK
6
BUCK
@@ -1,8 +1,8 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) Facebook, Inc. and its 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.
|
||||||
load("//:yoga_defs.bzl", "BASE_COMPILER_FLAGS", "GTEST_TARGET", "LIBRARY_COMPILER_FLAGS", "subdir_glob", "yoga_cxx_library", "yoga_cxx_test", "yoga_dep")
|
load("//tools/build_defs/oss:yoga_defs.bzl", "BASE_COMPILER_FLAGS", "GTEST_TARGET", "LIBRARY_COMPILER_FLAGS", "subdir_glob", "yoga_cxx_library", "yoga_cxx_test", "yoga_dep")
|
||||||
|
|
||||||
GMOCK_OVERRIDE_FLAGS = [
|
GMOCK_OVERRIDE_FLAGS = [
|
||||||
# gmock does not mark mocked methods as override, ignore the warnings in tests
|
# gmock does not mark mocked methods as override, ignore the warnings in tests
|
||||||
@@ -20,6 +20,7 @@ TEST_COMPILER_FLAGS = BASE_COMPILER_FLAGS + GMOCK_OVERRIDE_FLAGS + [
|
|||||||
yoga_cxx_library(
|
yoga_cxx_library(
|
||||||
name = "yoga",
|
name = "yoga",
|
||||||
srcs = glob(["yoga/*.cpp"]),
|
srcs = glob(["yoga/*.cpp"]),
|
||||||
|
headers = subdir_glob([("", "yoga/**/*.h")]),
|
||||||
header_namespace = "",
|
header_namespace = "",
|
||||||
exported_headers = subdir_glob([("", "yoga/*.h")]),
|
exported_headers = subdir_glob([("", "yoga/*.h")]),
|
||||||
compiler_flags = COMPILER_FLAGS,
|
compiler_flags = COMPILER_FLAGS,
|
||||||
@@ -34,6 +35,7 @@ yoga_cxx_library(
|
|||||||
yoga_cxx_test(
|
yoga_cxx_test(
|
||||||
name = "YogaTests",
|
name = "YogaTests",
|
||||||
srcs = glob(["tests/*.cpp"]),
|
srcs = glob(["tests/*.cpp"]),
|
||||||
|
headers = subdir_glob([("", "yoga/**/*.h")]),
|
||||||
compiler_flags = TEST_COMPILER_FLAGS,
|
compiler_flags = TEST_COMPILER_FLAGS,
|
||||||
contacts = ["emilsj@fb.com"],
|
contacts = ["emilsj@fb.com"],
|
||||||
visibility = ["PUBLIC"],
|
visibility = ["PUBLIC"],
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
# Code of Conduct
|
# Code of Conduct
|
||||||
|
|
||||||
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/pages/876921332402685/open-source-code-of-conduct) so that you can understand what actions will and will not be tolerated.
|
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.fb.com/codeofconduct/) so that you can understand what actions will and will not be tolerated.
|
||||||
|
@@ -4,7 +4,7 @@ possible.
|
|||||||
|
|
||||||
## Code of Conduct
|
## Code of Conduct
|
||||||
|
|
||||||
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/pages/876921332402685/open-source-code-of-conduct) so that you can understand what actions will and will not be tolerated.
|
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.fb.com/codeofconduct/) so that you can understand what actions will and will not be tolerated.
|
||||||
|
|
||||||
## Pull Requests
|
## Pull Requests
|
||||||
We actively welcome your pull requests.
|
We actively welcome your pull requests.
|
||||||
|
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2014-present, Facebook, Inc.
|
Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@@ -8,7 +8,7 @@ For testing we rely on [gtest](https://github.com/google/googletest) as a submod
|
|||||||
|
|
||||||
For any changes you make you should ensure that all the tests are passing. In case you make any fixes or additions to the library please also add tests for that change to ensure we don't break anything in the future. Tests are located in the `tests` directory. Run the tests by executing `buck test //:yoga`.
|
For any changes you make you should ensure that all the tests are passing. In case you make any fixes or additions to the library please also add tests for that change to ensure we don't break anything in the future. Tests are located in the `tests` directory. Run the tests by executing `buck test //:yoga`.
|
||||||
|
|
||||||
Instead of manually writing a test which ensures parity with web implementations of Flexbox you can run `gentest/gentest.rb` to generated a test for you. You can write html which you want to verify in Yoga, in `gentest/fixtures` folder, such as the following.
|
Instead of manually writing a test which ensures parity with web implementations of Flexbox you can run `gentest/gentest.rb` to generate a test for you. You can write html which you want to verify in Yoga, in `gentest/fixtures` folder, such as the following.
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<div id="my_test" style="width: 100px; height: 100px; align-items: center;">
|
<div id="my_test" style="width: 100px; height: 100px; align-items: center;">
|
||||||
|
10
Yoga.podspec
10
Yoga.podspec
@@ -1,3 +1,9 @@
|
|||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
Pod::Spec.new do |spec|
|
Pod::Spec.new do |spec|
|
||||||
spec.name = 'Yoga'
|
spec.name = 'Yoga'
|
||||||
spec.version = '1.9.0'
|
spec.version = '1.9.0'
|
||||||
@@ -13,7 +19,7 @@ Pod::Spec.new do |spec|
|
|||||||
:git => 'https://github.com/facebook/yoga.git',
|
:git => 'https://github.com/facebook/yoga.git',
|
||||||
:tag => spec.version.to_s,
|
:tag => spec.version.to_s,
|
||||||
}
|
}
|
||||||
spec.platforms = { :ios => "8.0", :tvos => "10.0" }
|
spec.platforms = { :ios => "4.3", :osx => "10.7", :tvos => "10.0", :watchos => "2.0" }
|
||||||
spec.module_name = 'yoga'
|
spec.module_name = 'yoga'
|
||||||
spec.requires_arc = false
|
spec.requires_arc = false
|
||||||
spec.pod_target_xcconfig = {
|
spec.pod_target_xcconfig = {
|
||||||
@@ -28,6 +34,6 @@ Pod::Spec.new do |spec|
|
|||||||
'-fPIC'
|
'-fPIC'
|
||||||
]
|
]
|
||||||
spec.source_files = 'yoga/**/*.{c,h,cpp}'
|
spec.source_files = 'yoga/**/*.{c,h,cpp}'
|
||||||
spec.public_header_files = 'yoga/{Yoga,YGEnums,YGMacros}.h'
|
spec.public_header_files = 'yoga/{Yoga,YGEnums,YGMacros,YGValue}.h'
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@@ -1,6 +1,12 @@
|
|||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
podspec = Pod::Spec.new do |spec|
|
podspec = Pod::Spec.new do |spec|
|
||||||
spec.name = 'YogaKit'
|
spec.name = 'YogaKit'
|
||||||
spec.version = '1.9.0'
|
spec.version = '1.10.0'
|
||||||
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
spec.license = { :type => 'MIT', :file => "LICENSE" }
|
||||||
spec.homepage = 'https://facebook.github.io/yoga/'
|
spec.homepage = 'https://facebook.github.io/yoga/'
|
||||||
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/yogakit/'
|
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/yogakit/'
|
||||||
@@ -22,6 +28,7 @@ podspec = Pod::Spec.new do |spec|
|
|||||||
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'
|
||||||
|
spec.swift_version = '3.0'
|
||||||
end
|
end
|
||||||
|
|
||||||
# See https://github.com/facebook/yoga/pull/366
|
# See https://github.com/facebook/yoga/pull/366
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) Facebook, Inc. and its 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.
|
||||||
load("//:yoga_defs.bzl", "subdir_glob", "yoga_apple_library", "yoga_apple_test", "yoga_dep")
|
load("//tools/build_defs/oss:yoga_defs.bzl", "subdir_glob", "yoga_apple_library", "yoga_apple_test", "yoga_dep")
|
||||||
|
|
||||||
COMPILER_FLAGS = [
|
COMPILER_FLAGS = [
|
||||||
"-fobjc-arc",
|
"-fobjc-arc",
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "YGLayout.h"
|
#import "YGLayout.h"
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "YGLayout.h"
|
#import "YGLayout.h"
|
||||||
#import <yoga/Yoga.h>
|
#import <yoga/Yoga.h>
|
||||||
|
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import <yoga/YGEnums.h>
|
#import <yoga/YGEnums.h>
|
||||||
#import <yoga/Yoga.h>
|
#import <yoga/Yoga.h>
|
||||||
@@ -33,6 +32,13 @@ typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) {
|
|||||||
- (instancetype)init
|
- (instancetype)init
|
||||||
__attribute__((unavailable("you are not meant to initialise YGLayout")));
|
__attribute__((unavailable("you are not meant to initialise YGLayout")));
|
||||||
|
|
||||||
|
/**
|
||||||
|
Make default init unavailable, as it will not initialise YGNode which is
|
||||||
|
required for the setters and getters of YGLayout's properties to work properly.
|
||||||
|
*/
|
||||||
|
+ (instancetype)new
|
||||||
|
__attribute__((unavailable("you are not meant to initialise YGLayout")));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The property that decides if we should include this view when calculating
|
The property that decides if we should include this view when calculating
|
||||||
layout. Defaults to YES.
|
layout. Defaults to YES.
|
||||||
@@ -56,6 +62,7 @@ typedef NS_OPTIONS(NSInteger, YGDimensionFlexibility) {
|
|||||||
@property (nonatomic, readwrite, assign) YGOverflow overflow;
|
@property (nonatomic, readwrite, assign) YGOverflow overflow;
|
||||||
@property (nonatomic, readwrite, assign) YGDisplay display;
|
@property (nonatomic, readwrite, assign) YGDisplay display;
|
||||||
|
|
||||||
|
@property (nonatomic, readwrite, assign) CGFloat flex;
|
||||||
@property (nonatomic, readwrite, assign) CGFloat flexGrow;
|
@property (nonatomic, readwrite, assign) CGFloat flexGrow;
|
||||||
@property (nonatomic, readwrite, assign) CGFloat flexShrink;
|
@property (nonatomic, readwrite, assign) CGFloat flexShrink;
|
||||||
@property (nonatomic, readwrite, assign) YGValue flexBasis;
|
@property (nonatomic, readwrite, assign) YGValue flexBasis;
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
@@ -129,6 +129,7 @@ static YGConfigRef globalConfig;
|
|||||||
@interface YGLayout ()
|
@interface YGLayout ()
|
||||||
|
|
||||||
@property (nonatomic, weak, readonly) UIView *view;
|
@property (nonatomic, weak, readonly) UIView *view;
|
||||||
|
@property(nonatomic, assign, readonly) BOOL isUIView;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@@ -153,6 +154,7 @@ static YGConfigRef globalConfig;
|
|||||||
YGNodeSetContext(_node, (__bridge void *) view);
|
YGNodeSetContext(_node, (__bridge void *) view);
|
||||||
_isEnabled = NO;
|
_isEnabled = NO;
|
||||||
_isIncludedInLayout = YES;
|
_isIncludedInLayout = YES;
|
||||||
|
_isUIView = [view isMemberOfClass:[UIView class]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
@@ -227,6 +229,7 @@ YG_PROPERTY(YGWrap, flexWrap, FlexWrap)
|
|||||||
YG_PROPERTY(YGOverflow, overflow, Overflow)
|
YG_PROPERTY(YGOverflow, overflow, Overflow)
|
||||||
YG_PROPERTY(YGDisplay, display, Display)
|
YG_PROPERTY(YGDisplay, display, Display)
|
||||||
|
|
||||||
|
YG_PROPERTY(CGFloat, flex, Flex)
|
||||||
YG_PROPERTY(CGFloat, flexGrow, FlexGrow)
|
YG_PROPERTY(CGFloat, flexGrow, FlexGrow)
|
||||||
YG_PROPERTY(CGFloat, flexShrink, FlexShrink)
|
YG_PROPERTY(CGFloat, flexShrink, FlexShrink)
|
||||||
YG_AUTO_VALUE_PROPERTY(flexBasis, FlexBasis)
|
YG_AUTO_VALUE_PROPERTY(flexBasis, FlexBasis)
|
||||||
@@ -331,10 +334,20 @@ static YGSize YGMeasureView(
|
|||||||
const CGFloat constrainedHeight = (heightMode == YGMeasureModeUndefined) ? CGFLOAT_MAX: height;
|
const CGFloat constrainedHeight = (heightMode == YGMeasureModeUndefined) ? CGFLOAT_MAX: height;
|
||||||
|
|
||||||
UIView *view = (__bridge UIView*) YGNodeGetContext(node);
|
UIView *view = (__bridge UIView*) YGNodeGetContext(node);
|
||||||
const CGSize sizeThatFits = [view sizeThatFits:(CGSize) {
|
CGSize sizeThatFits = CGSizeZero;
|
||||||
.width = constrainedWidth,
|
|
||||||
.height = constrainedHeight,
|
// The default implementation of sizeThatFits: returns the existing size of
|
||||||
}];
|
// the view. That means that if we want to layout an empty UIView, which
|
||||||
|
// already has got a frame set, its measured size should be CGSizeZero, but
|
||||||
|
// UIKit returns the existing size.
|
||||||
|
//
|
||||||
|
// See https://github.com/facebook/yoga/issues/606 for more information.
|
||||||
|
if (!view.yoga.isUIView || [view.subviews count] > 0) {
|
||||||
|
sizeThatFits = [view sizeThatFits:(CGSize){
|
||||||
|
.width = constrainedWidth,
|
||||||
|
.height = constrainedHeight,
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
return (YGSize) {
|
return (YGSize) {
|
||||||
.width = YGSanitizeMeasurement(constrainedWidth, sizeThatFits.width, widthMode),
|
.width = YGSanitizeMeasurement(constrainedWidth, sizeThatFits.width, widthMode),
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
@@ -127,6 +127,15 @@
|
|||||||
XCTAssertEqual(longTextLabelSize.width + textBadgeView.yoga.intrinsicSize.width, containerSize.width);
|
XCTAssertEqual(longTextLabelSize.width + textBadgeView.yoga.intrinsicSize.width, containerSize.width);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)testSizeThatFitsEmptyView {
|
||||||
|
UIView* view = [[UIView alloc] initWithFrame:CGRectMake(10, 10, 200, 200)];
|
||||||
|
view.yoga.isEnabled = YES;
|
||||||
|
|
||||||
|
const CGSize viewSize = view.yoga.intrinsicSize;
|
||||||
|
XCTAssertEqual(viewSize.height, 0);
|
||||||
|
XCTAssertEqual(viewSize.width, 0);
|
||||||
|
}
|
||||||
|
|
||||||
- (void)testPreservingOrigin
|
- (void)testPreservingOrigin
|
||||||
{
|
{
|
||||||
UIView *container = [[UIView alloc] initWithFrame:CGRectMake(0,0,50,75)];
|
UIView *container = [[UIView alloc] initWithFrame:CGRectMake(0,0,50,75)];
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Workspace
|
<Workspace
|
||||||
version = "1.0">
|
version = "1.0">
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
<!--
|
||||||
|
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.
|
||||||
|
-->
|
||||||
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Workspace
|
<Workspace
|
||||||
version = "1.0">
|
version = "1.0">
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
|
||||||
load("//:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "PROGRUARD_ANNOTATIONS_TARGET", "yoga_android_aar", "yoga_android_resource")
|
load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "PROGRUARD_ANNOTATIONS_TARGET", "yoga_android_aar", "yoga_android_resource")
|
||||||
|
|
||||||
yoga_android_aar(
|
yoga_android_aar(
|
||||||
name = "android",
|
name = "android",
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
apply plugin: 'com.jfrog.bintray'
|
apply plugin: 'com.jfrog.bintray'
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'com.github.dcendents.android-maven'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
#
|
||||||
|
# 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
|
GROUP=com.facebook.yoga.android
|
||||||
POM_NAME=YogaLayout
|
POM_NAME=YogaLayout
|
||||||
POM_DESCRIPTION=YogaLayout
|
POM_DESCRIPTION=YogaLayout
|
||||||
|
@@ -4,7 +4,8 @@
|
|||||||
# This source code is licensed under the license found in the
|
# This source code is licensed under the license found in the
|
||||||
# LICENSE-examples file in the root directory of this source tree.
|
# LICENSE-examples file in the root directory of this source tree.
|
||||||
|
|
||||||
load("//:yoga_defs.bzl", "ANDROID_RES_TARGET", "ANDROID_SAMPLE_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "yoga_android_binary", "yoga_android_resource")
|
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
|
||||||
|
load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID_RES_TARGET", "ANDROID_SAMPLE_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "yoga_android_binary", "yoga_android_resource")
|
||||||
|
|
||||||
yoga_android_binary(
|
yoga_android_binary(
|
||||||
name = "sample",
|
name = "sample",
|
||||||
@@ -28,7 +29,7 @@ yoga_android_resource(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
keystore(
|
fb_native.keystore(
|
||||||
name = "debug_keystore",
|
name = "debug_keystore",
|
||||||
properties = "debug.keystore.properties",
|
properties = "debug.keystore.properties",
|
||||||
store = "debug.keystore",
|
store = "debug.keystore",
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
#
|
#
|
||||||
# This source code is licensed under the license found in the
|
# This source code is licensed under the license found in the
|
||||||
# LICENSE-examples file in the root directory of this source tree.
|
# LICENSE-examples file in the root directory of this source tree.
|
||||||
|
|
||||||
load("//:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "ANDROID_SUPPORT_TARGET", "APPCOMPAT_TARGET", "SOLOADER_TARGET", "yoga_android_library")
|
load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID_JAVA_TARGET", "ANDROID_SAMPLE_RES_TARGET", "ANDROID_SUPPORT_TARGET", "APPCOMPAT_TARGET", "SOLOADER_TARGET", "yoga_android_library")
|
||||||
|
|
||||||
yoga_android_library(
|
yoga_android_library(
|
||||||
name = "yoga",
|
name = "yoga",
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2014-present, Facebook, Inc.
|
Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
|
||||||
load("//:yoga_defs.bzl", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "JSR_305_TARGET", "SOLOADER_TARGET", "yoga_android_library")
|
load("//tools/build_defs/oss:yoga_defs.bzl", "ANDROID_RES_TARGET", "INFER_ANNOTATIONS_TARGET", "JAVA_TARGET", "JSR_305_TARGET", "SOLOADER_TARGET", "yoga_android_library")
|
||||||
|
|
||||||
yoga_android_library(
|
yoga_android_library(
|
||||||
name = "android",
|
name = "android",
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Copyright (c) 2014-present, Facebook, Inc.
|
Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) Facebook, Inc. and its 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.
|
||||||
load("//:yoga_defs.bzl", "subdir_glob", "yoga_cxx_binary", "yoga_dep")
|
load("//tools/build_defs/oss:yoga_defs.bzl", "subdir_glob", "yoga_cxx_binary", "yoga_dep")
|
||||||
|
|
||||||
yoga_cxx_binary(
|
yoga_cxx_binary(
|
||||||
name = "benchmark",
|
name = "benchmark",
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -16,7 +15,7 @@
|
|||||||
#define NUM_REPETITIONS 1000
|
#define NUM_REPETITIONS 1000
|
||||||
|
|
||||||
#define YGBENCHMARKS(BLOCK) \
|
#define YGBENCHMARKS(BLOCK) \
|
||||||
int main(int argc, char const *argv[]) { \
|
int main(int argc, char const* argv[]) { \
|
||||||
clock_t __start; \
|
clock_t __start; \
|
||||||
clock_t __endTimes[NUM_REPETITIONS]; \
|
clock_t __endTimes[NUM_REPETITIONS]; \
|
||||||
{ BLOCK } \
|
{ BLOCK } \
|
||||||
@@ -26,14 +25,13 @@
|
|||||||
#define YGBENCHMARK(NAME, BLOCK) \
|
#define YGBENCHMARK(NAME, BLOCK) \
|
||||||
__start = clock(); \
|
__start = clock(); \
|
||||||
for (uint32_t __i = 0; __i < NUM_REPETITIONS; __i++) { \
|
for (uint32_t __i = 0; __i < NUM_REPETITIONS; __i++) { \
|
||||||
{ BLOCK } \
|
{BLOCK} __endTimes[__i] = clock(); \
|
||||||
__endTimes[__i] = clock(); \
|
|
||||||
} \
|
} \
|
||||||
__printBenchmarkResult(NAME, __start, __endTimes);
|
__printBenchmarkResult(NAME, __start, __endTimes);
|
||||||
|
|
||||||
static int __compareDoubles(const void *a, const void *b) {
|
static int __compareDoubles(const void* a, const void* b) {
|
||||||
double arg1 = *(const double *) a;
|
double arg1 = *(const double*) a;
|
||||||
double arg2 = *(const double *) b;
|
double arg2 = *(const double*) b;
|
||||||
|
|
||||||
if (arg1 < arg2) {
|
if (arg1 < arg2) {
|
||||||
return -1;
|
return -1;
|
||||||
@@ -46,7 +44,10 @@ static int __compareDoubles(const void *a, const void *b) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __printBenchmarkResult(char *name, clock_t start, clock_t *endTimes) {
|
static void __printBenchmarkResult(
|
||||||
|
char* name,
|
||||||
|
clock_t start,
|
||||||
|
clock_t* endTimes) {
|
||||||
double timesInMs[NUM_REPETITIONS];
|
double timesInMs[NUM_REPETITIONS];
|
||||||
double mean = 0;
|
double mean = 0;
|
||||||
clock_t lastEnd = start;
|
clock_t lastEnd = start;
|
||||||
@@ -70,12 +71,12 @@ static void __printBenchmarkResult(char *name, clock_t start, clock_t *endTimes)
|
|||||||
printf("%s: median: %lf ms, stddev: %lf ms\n", name, median, stddev);
|
printf("%s: median: %lf ms, stddev: %lf ms\n", name, median, stddev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static YGSize _measure(
|
||||||
static YGSize _measure(YGNodeRef node,
|
YGNodeRef node,
|
||||||
float width,
|
float width,
|
||||||
YGMeasureMode widthMode,
|
YGMeasureMode widthMode,
|
||||||
float height,
|
float height,
|
||||||
YGMeasureMode heightMode) {
|
YGMeasureMode heightMode) {
|
||||||
return (YGSize){
|
return (YGSize){
|
||||||
.width = widthMode == YGMeasureModeUndefined ? 10 : width,
|
.width = widthMode == YGMeasureModeUndefined ? 10 : width,
|
||||||
.height = heightMode == YGMeasureModeUndefined ? 10 : width,
|
.height = heightMode == YGMeasureModeUndefined ? 10 : width,
|
||||||
@@ -83,7 +84,6 @@ static YGSize _measure(YGNodeRef node,
|
|||||||
}
|
}
|
||||||
|
|
||||||
YGBENCHMARKS({
|
YGBENCHMARKS({
|
||||||
|
|
||||||
YGBENCHMARK("Stack with flex", {
|
YGBENCHMARK("Stack with flex", {
|
||||||
const YGNodeRef root = YGNodeNew();
|
const YGNodeRef root = YGNodeNew();
|
||||||
YGNodeStyleSetWidth(root, 100);
|
YGNodeStyleSetWidth(root, 100);
|
||||||
@@ -161,7 +161,8 @@ YGBENCHMARKS({
|
|||||||
|
|
||||||
for (uint32_t iiii = 0; iiii < 10; iiii++) {
|
for (uint32_t iiii = 0; iiii < 10; iiii++) {
|
||||||
const YGNodeRef grandGrandGrandChild = YGNodeNew();
|
const YGNodeRef grandGrandGrandChild = YGNodeNew();
|
||||||
YGNodeStyleSetFlexDirection(grandGrandGrandChild, YGFlexDirectionRow);
|
YGNodeStyleSetFlexDirection(
|
||||||
|
grandGrandGrandChild, YGFlexDirectionRow);
|
||||||
YGNodeStyleSetFlexGrow(grandGrandGrandChild, 1);
|
YGNodeStyleSetFlexGrow(grandGrandGrandChild, 1);
|
||||||
YGNodeStyleSetWidth(grandGrandGrandChild, 10);
|
YGNodeStyleSetWidth(grandGrandGrandChild, 10);
|
||||||
YGNodeStyleSetHeight(grandGrandGrandChild, 10);
|
YGNodeStyleSetHeight(grandGrandGrandChild, 10);
|
||||||
@@ -174,5 +175,4 @@ YGBENCHMARKS({
|
|||||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||||
YGNodeFreeRecursive(root);
|
YGNodeFreeRecursive(root);
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -1,3 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
56
csharp/BUCK
56
csharp/BUCK
@@ -1,20 +1,27 @@
|
|||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
|
||||||
load("//:yoga_defs.bzl", "BASE_COMPILER_FLAGS", "is_apple_platform", "yoga_cxx_library", "yoga_dep")
|
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
|
||||||
|
load(
|
||||||
|
"//tools/build_defs/oss:yoga_defs.bzl",
|
||||||
|
"BASE_COMPILER_FLAGS",
|
||||||
|
"yoga_apple_binary",
|
||||||
|
"yoga_cxx_library",
|
||||||
|
"yoga_dep",
|
||||||
|
)
|
||||||
|
|
||||||
COMPILER_FLAGS = BASE_COMPILER_FLAGS + ["-std=c++11"]
|
COMPILER_FLAGS = BASE_COMPILER_FLAGS + ["-std=c++11"]
|
||||||
|
|
||||||
csharp_library(
|
fb_native.csharp_library(
|
||||||
name = "yogalibnet46",
|
name = "yogalibnet46",
|
||||||
srcs = glob(["**/*.cs"]),
|
srcs = glob(["**/*.cs"]),
|
||||||
dll_name = "Facebook.Yoga.dll",
|
dll_name = "Facebook.Yoga.dll",
|
||||||
framework_ver = "net46",
|
framework_ver = "net46",
|
||||||
)
|
)
|
||||||
|
|
||||||
csharp_library(
|
fb_native.csharp_library(
|
||||||
name = "yogalibnet45",
|
name = "yogalibnet45",
|
||||||
srcs = glob(["**/*.cs"]),
|
srcs = glob(["**/*.cs"]),
|
||||||
dll_name = "Facebook.Yoga.dll",
|
dll_name = "Facebook.Yoga.dll",
|
||||||
@@ -23,7 +30,7 @@ csharp_library(
|
|||||||
|
|
||||||
yoga_cxx_library(
|
yoga_cxx_library(
|
||||||
name = "yoganet",
|
name = "yoganet",
|
||||||
srcs = glob(["Yoga/YGInterop.cpp"]),
|
srcs = ["Yoga/YGInterop.cpp"],
|
||||||
compiler_flags = COMPILER_FLAGS,
|
compiler_flags = COMPILER_FLAGS,
|
||||||
link_style = "static",
|
link_style = "static",
|
||||||
link_whole = True,
|
link_whole = True,
|
||||||
@@ -32,41 +39,4 @@ yoga_cxx_library(
|
|||||||
deps = [yoga_dep(":yoga")],
|
deps = [yoga_dep(":yoga")],
|
||||||
)
|
)
|
||||||
|
|
||||||
if is_apple_platform():
|
yoga_apple_binary()
|
||||||
yoganet_ios_srcs = []
|
|
||||||
for arch in [
|
|
||||||
"iphonesimulator-x86_64",
|
|
||||||
"iphoneos-arm64",
|
|
||||||
]:
|
|
||||||
name = "yoganet-" + arch
|
|
||||||
yoganet_ios_srcs.append(":" + name)
|
|
||||||
genrule(
|
|
||||||
name = name,
|
|
||||||
srcs = [
|
|
||||||
yoga_dep(":yogaApple#%s,static" % arch),
|
|
||||||
yoga_dep("YogaKit:YogaKitApple#%s,static" % arch),
|
|
||||||
yoga_dep("csharp:yoganetApple#%s,static" % arch),
|
|
||||||
],
|
|
||||||
out = "libyoga-%s.a" % arch,
|
|
||||||
cmd = "libtool -static -o $OUT $SRCS",
|
|
||||||
visibility = [yoga_dep("csharp:yoganet-ios")],
|
|
||||||
)
|
|
||||||
|
|
||||||
genrule(
|
|
||||||
name = "yoganet-ios",
|
|
||||||
srcs = yoganet_ios_srcs,
|
|
||||||
out = "libyoga.a",
|
|
||||||
cmd = "lipo $SRCS -create -output $OUT",
|
|
||||||
visibility = ["PUBLIC"],
|
|
||||||
)
|
|
||||||
|
|
||||||
yoganet_macosx_target = "csharp:yoganetAppleMac#macosx-%s,dynamic"
|
|
||||||
genrule(
|
|
||||||
name = "yoganet-macosx",
|
|
||||||
srcs = [
|
|
||||||
yoga_dep(yoganet_macosx_target % "x86_64"),
|
|
||||||
],
|
|
||||||
out = "libyoga.dylib",
|
|
||||||
cmd = "lipo $SRCS -create -output $OUT",
|
|
||||||
visibility = ["PUBLIC"],
|
|
||||||
)
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
@@ -10,12 +10,6 @@ using System.Runtime.InteropServices;
|
|||||||
|
|
||||||
namespace Facebook.Yoga
|
namespace Facebook.Yoga
|
||||||
{
|
{
|
||||||
#if WINDOWS_UWP_ARM
|
|
||||||
using YogaValueType = IntPtr;
|
|
||||||
#else
|
|
||||||
using YogaValueType = YogaValue;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
internal static class Native
|
internal static class Native
|
||||||
{
|
{
|
||||||
#if (UNITY_IOS && !UNITY_EDITOR) || __IOS__
|
#if (UNITY_IOS && !UNITY_EDITOR) || __IOS__
|
||||||
@@ -74,6 +68,14 @@ namespace Facebook.Yoga
|
|||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern bool YGConfigGetUseWebDefaults(YGConfigHandle config);
|
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)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGConfigSetPointScaleFactor(
|
public static extern void YGConfigSetPointScaleFactor(
|
||||||
YGConfigHandle config,
|
YGConfigHandle config,
|
||||||
@@ -88,6 +90,14 @@ namespace Facebook.Yoga
|
|||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeRemoveChild(YGNodeHandle node, YGNodeHandle child);
|
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)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeCalculateLayout(
|
public static extern void YGNodeCalculateLayout(
|
||||||
YGNodeHandle node,
|
YGNodeHandle node,
|
||||||
@@ -218,7 +228,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetFlexBasisAuto(YGNodeHandle node);
|
public static extern void YGNodeStyleSetFlexBasisAuto(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetFlexBasis(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetFlexBasis(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetWidth(YGNodeHandle node, float width);
|
public static extern void YGNodeStyleSetWidth(YGNodeHandle node, float width);
|
||||||
@@ -230,7 +240,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetWidthAuto(YGNodeHandle node);
|
public static extern void YGNodeStyleSetWidthAuto(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetWidth(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetWidth(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetHeight(YGNodeHandle node, float height);
|
public static extern void YGNodeStyleSetHeight(YGNodeHandle node, float height);
|
||||||
@@ -242,7 +252,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetHeightAuto(YGNodeHandle node);
|
public static extern void YGNodeStyleSetHeightAuto(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetHeight(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetHeight(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetMinWidth(YGNodeHandle node, float minWidth);
|
public static extern void YGNodeStyleSetMinWidth(YGNodeHandle node, float minWidth);
|
||||||
@@ -251,7 +261,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetMinWidthPercent(YGNodeHandle node, float minWidth);
|
public static extern void YGNodeStyleSetMinWidthPercent(YGNodeHandle node, float minWidth);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetMinWidth(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetMinWidth(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetMinHeight(YGNodeHandle node, float minHeight);
|
public static extern void YGNodeStyleSetMinHeight(YGNodeHandle node, float minHeight);
|
||||||
@@ -260,7 +270,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetMinHeightPercent(YGNodeHandle node, float minHeight);
|
public static extern void YGNodeStyleSetMinHeightPercent(YGNodeHandle node, float minHeight);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetMinHeight(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetMinHeight(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetMaxWidth(YGNodeHandle node, float maxWidth);
|
public static extern void YGNodeStyleSetMaxWidth(YGNodeHandle node, float maxWidth);
|
||||||
@@ -269,7 +279,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetMaxWidthPercent(YGNodeHandle node, float maxWidth);
|
public static extern void YGNodeStyleSetMaxWidthPercent(YGNodeHandle node, float maxWidth);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetMaxWidth(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetMaxWidth(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetMaxHeight(YGNodeHandle node, float maxHeight);
|
public static extern void YGNodeStyleSetMaxHeight(YGNodeHandle node, float maxHeight);
|
||||||
@@ -278,7 +288,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetMaxHeightPercent(YGNodeHandle node, float maxHeight);
|
public static extern void YGNodeStyleSetMaxHeightPercent(YGNodeHandle node, float maxHeight);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetMaxHeight(YGNodeHandle node);
|
public static extern YogaValue YGNodeStyleGetMaxHeight(YGNodeHandle node);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetAspectRatio(YGNodeHandle node, float aspectRatio);
|
public static extern void YGNodeStyleSetAspectRatio(YGNodeHandle node, float aspectRatio);
|
||||||
@@ -297,7 +307,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetPositionPercent(YGNodeHandle node, YogaEdge edge, float position);
|
public static extern void YGNodeStyleSetPositionPercent(YGNodeHandle node, YogaEdge edge, float position);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetPosition(YGNodeHandle node, YogaEdge edge);
|
public static extern YogaValue YGNodeStyleGetPosition(YGNodeHandle node, YogaEdge edge);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetMargin(YGNodeHandle node, YogaEdge edge, float margin);
|
public static extern void YGNodeStyleSetMargin(YGNodeHandle node, YogaEdge edge, float margin);
|
||||||
@@ -309,7 +319,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetMarginAuto(YGNodeHandle node, YogaEdge edge);
|
public static extern void YGNodeStyleSetMarginAuto(YGNodeHandle node, YogaEdge edge);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetMargin(YGNodeHandle node, YogaEdge edge);
|
public static extern YogaValue YGNodeStyleGetMargin(YGNodeHandle node, YogaEdge edge);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetPadding(YGNodeHandle node, YogaEdge edge, float padding);
|
public static extern void YGNodeStyleSetPadding(YGNodeHandle node, YogaEdge edge, float padding);
|
||||||
@@ -318,7 +328,7 @@ namespace Facebook.Yoga
|
|||||||
public static extern void YGNodeStyleSetPaddingPercent(YGNodeHandle node, YogaEdge edge, float padding);
|
public static extern void YGNodeStyleSetPaddingPercent(YGNodeHandle node, YogaEdge edge, float padding);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern YogaValueType YGNodeStyleGetPadding(YGNodeHandle node, YogaEdge edge);
|
public static extern YogaValue YGNodeStyleGetPadding(YGNodeHandle node, YogaEdge edge);
|
||||||
|
|
||||||
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void YGNodeStyleSetBorder(YGNodeHandle node, YogaEdge edge, float border);
|
public static extern void YGNodeStyleSetBorder(YGNodeHandle node, YogaEdge edge, float border);
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
@@ -117,6 +117,19 @@ namespace Facebook.Yoga
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool UseLegacyStretchBehaviour
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Native.YGConfigGetUseLegacyStretchBehaviour(_ygConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Native.YGConfigSetUseLegacyStretchBehaviour(_ygConfig, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public float PointScaleFactor
|
public float PointScaleFactor
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
@@ -13,7 +13,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Left));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Left);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -26,7 +26,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Top));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Top);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -39,7 +39,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Right));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Right);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -52,7 +52,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Bottom));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -65,7 +65,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Start));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.Start);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -78,7 +78,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.End));
|
return Native.YGNodeStyleGetPosition(_ygNode, YogaEdge.End);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -103,7 +103,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Left));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Left);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -116,7 +116,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Top));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Top);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -129,7 +129,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Right));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Right);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -142,7 +142,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Bottom));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -155,7 +155,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Start));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Start);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -168,7 +168,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.End));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.End);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -181,7 +181,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Horizontal));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Horizontal);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -194,7 +194,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Vertical));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.Vertical);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -207,7 +207,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.All));
|
return Native.YGNodeStyleGetMargin(_ygNode, YogaEdge.All);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -236,7 +236,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Left));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Left);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -249,7 +249,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Top));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Top);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -262,7 +262,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Right));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Right);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -275,7 +275,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Bottom));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -288,7 +288,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Start));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Start);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -301,7 +301,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.End));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.End);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -314,7 +314,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Horizontal));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Horizontal);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -327,7 +327,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Vertical));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.Vertical);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -340,7 +340,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.All));
|
return Native.YGNodeStyleGetPadding(_ygNode, YogaEdge.All);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
@@ -271,7 +271,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetFlexBasis(_ygNode));
|
return Native.YGNodeStyleGetFlexBasis(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -295,7 +295,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetWidth(_ygNode));
|
return Native.YGNodeStyleGetWidth(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -319,7 +319,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetHeight(_ygNode));
|
return Native.YGNodeStyleGetHeight(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -343,7 +343,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMaxWidth(_ygNode));
|
return Native.YGNodeStyleGetMaxWidth(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -363,7 +363,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMaxHeight(_ygNode));
|
return Native.YGNodeStyleGetMaxHeight(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -383,7 +383,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMinWidth(_ygNode));
|
return Native.YGNodeStyleGetMinWidth(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -403,7 +403,7 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return YogaValue.MarshalValue(Native.YGNodeStyleGetMinHeight(_ygNode));
|
return Native.YGNodeStyleGetMinHeight(_ygNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
@@ -519,6 +519,19 @@ namespace Facebook.Yoga
|
|||||||
Native.YGNodeSetHasNewLayout(_ygNode, false);
|
Native.YGNodeSetHasNewLayout(_ygNode, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool IsReferenceBaseline
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Native.YGNodeIsReferenceBaseline(_ygNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
Native.YGNodeSetIsReferenceBaseline(_ygNode, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool ValuesEqual(float f1, float f2)
|
public bool ValuesEqual(float f1, float f2)
|
||||||
{
|
{
|
||||||
if (float.IsNaN(f1) || float.IsNaN(f2))
|
if (float.IsNaN(f1) || float.IsNaN(f2))
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
@@ -91,17 +91,5 @@ namespace Facebook.Yoga
|
|||||||
{
|
{
|
||||||
return Point(pointValue);
|
return Point(pointValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WINDOWS_UWP_ARM
|
|
||||||
internal static YogaValue MarshalValue(IntPtr ptr)
|
|
||||||
{
|
|
||||||
return Marshal.PtrToStructure<YogaValue>(ptr);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
internal static YogaValue MarshalValue(YogaValue value)
|
|
||||||
{
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,2 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
./csharp/Mac/Facebook.Yoga.Mac.Tests/bin/Release/Facebook.Yoga.Mac.Tests.app/Contents/MacOS/Facebook.Yoga.Mac.Tests
|
./csharp/Mac/Facebook.Yoga.Mac.Tests/bin/Release/Facebook.Yoga.Mac.Tests.app/Contents/MacOS/Facebook.Yoga.Mac.Tests
|
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (c) 2014-present, Facebook, Inc.
|
# Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
|
||||||
using Facebook.Yoga;
|
using Facebook.Yoga;
|
||||||
|
|
||||||
@@ -206,8 +206,8 @@ namespace Facebook.Yoga.Universal.Tests
|
|||||||
return MeasureOutput.Make(123.4f, 81.7f);
|
return MeasureOutput.Make(123.4f, 81.7f);
|
||||||
});
|
});
|
||||||
node.CalculateLayout();
|
node.CalculateLayout();
|
||||||
Assert.AreEqual(123, node.LayoutWidth);
|
Assert.AreEqual(124, node.LayoutWidth);
|
||||||
Assert.AreEqual(81, node.LayoutHeight);
|
Assert.AreEqual(82, node.LayoutHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
@@ -268,7 +268,12 @@ namespace Facebook.Yoga.Universal.Tests
|
|||||||
parent.Insert(0, child0);
|
parent.Insert(0, child0);
|
||||||
parent.Insert(0, child1);
|
parent.Insert(0, child1);
|
||||||
parent.CalculateLayout();
|
parent.CalculateLayout();
|
||||||
Assert.AreEqual(parent.Print(), "{layout: {width: 100, height: 120, top: 0, left: 0}, flexDirection: 'column', alignItems: 'stretch', flexGrow: 0, flexShrink: 0, overflow: 'visible', width: 100, height: 120, children: [\n {layout: {width: 35, height: 45, top: 0, left: 0}, flexDirection: 'column', alignItems: 'stretch', flexGrow: 0, flexShrink: 0, overflow: 'visible', width: 35, height: 45, },\n {layout: {width: 30, height: 40, top: 45, left: 0}, flexDirection: 'column', alignItems: 'stretch', flexGrow: 0, flexShrink: 0, overflow: 'visible', width: 30, height: 40, },\n]},\n");
|
Assert.AreEqual(parent.Print(),
|
||||||
|
"<div layout=\"width: 100; height: 120; top: 0; left: 0;\" style=\"width: 100px; height: 120px; \" >\n" +
|
||||||
|
" <div layout=\"width: 35; height: 45; top: 0; left: 0;\" style=\"width: 35px; height: 45px; \" ></div>\n" +
|
||||||
|
" <div layout=\"width: 30; height: 40; top: 45; left: 0;\" style=\"width: 30px; height: 40px; \" ></div>\n" +
|
||||||
|
"</div>"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "YGInterop.h"
|
#include "YGInterop.h"
|
||||||
|
|
||||||
static YGInteropLogger gManagedLogger;
|
static YGInteropLogger gManagedLogger;
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <yoga/Yoga.h>
|
#include <yoga/Yoga.h>
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|ARM">
|
<ProjectConfiguration Include="Debug|ARM">
|
||||||
@@ -33,47 +33,47 @@
|
|||||||
<RootNamespace>Yoga</RootNamespace>
|
<RootNamespace>Yoga</RootNamespace>
|
||||||
<AppContainerApplication>true</AppContainerApplication>
|
<AppContainerApplication>true</AppContainerApplication>
|
||||||
<ApplicationType>Windows Store</ApplicationType>
|
<ApplicationType>Windows Store</ApplicationType>
|
||||||
<WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
|
||||||
<WindowsTargetPlatformMinVersion>10.0.10240.0</WindowsTargetPlatformMinVersion>
|
<WindowsTargetPlatformMinVersion>10.0.14393.0</WindowsTargetPlatformMinVersion>
|
||||||
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
<OutDir>bin\Universal\$(PlatformTarget)\$(Configuration)\</OutDir>
|
<OutDir>bin\Universal\$(PlatformTarget)\$(Configuration)\</OutDir>
|
||||||
<IntDir>obj\$(PlatformTarget)\$(Configuration)\</IntDir>
|
<IntDir>obj\Universal\$(PlatformTarget)\$(Configuration)\</IntDir>
|
||||||
<TargetName>yoga</TargetName>
|
<TargetName>yoga</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
@@ -242,19 +242,31 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClInclude Include="..\..\yoga\Utils.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\YGConfig.h" />
|
||||||
<ClInclude Include="..\..\yoga\YGEnums.h" />
|
<ClInclude Include="..\..\yoga\YGEnums.h" />
|
||||||
<ClInclude Include="..\..\yoga\Yoga.h" />
|
<ClInclude Include="..\..\yoga\YGFloatOptional.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\YGLayout.h" />
|
||||||
<ClInclude Include="..\..\yoga\YGMacros.h" />
|
<ClInclude Include="..\..\yoga\YGMacros.h" />
|
||||||
<ClInclude Include="..\..\yoga\YGNodeList.h" />
|
<ClInclude Include="..\..\yoga\YGNode.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\YGNodePrint.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\YGStyle.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\Yoga-internal.h" />
|
||||||
|
<ClInclude Include="..\..\yoga\Yoga.h" />
|
||||||
<ClInclude Include="resource.h" />
|
<ClInclude Include="resource.h" />
|
||||||
<ClInclude Include="YGInterop.h" />
|
|
||||||
<ClInclude Include="stdafx.h" />
|
<ClInclude Include="stdafx.h" />
|
||||||
<ClInclude Include="targetver.h" />
|
<ClInclude Include="targetver.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="..\..\yoga\YGEnums.c" />
|
<ClCompile Include="..\..\yoga\Utils.cpp" />
|
||||||
<ClCompile Include="..\..\yoga\Yoga.c" />
|
<ClCompile Include="..\..\yoga\YGConfig.cpp" />
|
||||||
<ClCompile Include="..\..\yoga\YGNodeList.c" />
|
<ClCompile Include="..\..\yoga\YGEnums.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\YGFloatOptional.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\YGLayout.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\YGNode.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\YGNodePrint.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\YGStyle.cpp" />
|
||||||
|
<ClCompile Include="..\..\yoga\Yoga.cpp" />
|
||||||
<ClCompile Include="YGInterop.cpp" />
|
<ClCompile Include="YGInterop.cpp" />
|
||||||
<ClCompile Include="dllmain.cpp">
|
<ClCompile Include="dllmain.cpp">
|
||||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
||||||
|
@@ -21,22 +21,40 @@
|
|||||||
<ClInclude Include="targetver.h">
|
<ClInclude Include="targetver.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\yoga\Yoga.h">
|
<ClInclude Include="resource.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\Utils.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\YGEnums.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\YGFloatOptional.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\YGLayout.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\yoga\YGMacros.h">
|
<ClInclude Include="..\..\yoga\YGMacros.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\yoga\YGNodeList.h">
|
<ClInclude Include="..\..\yoga\YGNode.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="YGInterop.h">
|
<ClInclude Include="..\..\yoga\YGNodePrint.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="resource.h">
|
<ClInclude Include="..\..\yoga\YGStyle.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\yoga\YGEnums.h">
|
<ClInclude Include="..\..\yoga\Yoga.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\Yoga-internal.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\yoga\YGConfig.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -47,16 +65,34 @@
|
|||||||
<ClCompile Include="dllmain.cpp">
|
<ClCompile Include="dllmain.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\yoga\Yoga.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\yoga\YGNodeList.c">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="YGInterop.cpp">
|
<ClCompile Include="YGInterop.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\yoga\YGEnums.c">
|
<ClCompile Include="..\..\yoga\Utils.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGEnums.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGFloatOptional.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGLayout.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGNode.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGNodePrint.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGStyle.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\Yoga.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\yoga\YGConfig.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@@ -38,39 +38,39 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PlatformToolset>v140</PlatformToolset>
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
|
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// stdafx.cpp : source file that includes just the standard includes
|
// stdafx.cpp : source file that includes just the standard includes
|
||||||
// Yoga.pch will be the pre-compiled header
|
// Yoga.pch will be the pre-compiled header
|
||||||
// stdafx.obj will contain the pre-compiled type information
|
// stdafx.obj will contain the pre-compiled type information
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// stdafx.h : include file for standard system include files,
|
// stdafx.h : include file for standard system include files,
|
||||||
// or project specific include files that are used frequently, but
|
// or project specific include files that are used frequently, but
|
||||||
// are changed infrequently
|
// are changed infrequently
|
||||||
|
@@ -1,10 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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
|
||||||
* LICENSE file in the root directory of this source tree.
|
* file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Including SDKDDKVer.h defines the highest available Windows platform.
|
// Including SDKDDKVer.h defines the highest available Windows platform.
|
||||||
|
@@ -1,4 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
cd `dirname "$0"`
|
cd `dirname "$0"`
|
||||||
echo $ANDROID_SDK
|
echo $ANDROID_SDK
|
||||||
BUCK_RELEASE=2018.02.16.01
|
BUCK_RELEASE=2018.02.16.01
|
||||||
@@ -22,4 +30,3 @@ $BUCK build \
|
|||||||
//csharp:yoganet-macosx \
|
//csharp:yoganet-macosx \
|
||||||
//csharp:yoganet#android-armv7,shared \
|
//csharp:yoganet#android-armv7,shared \
|
||||||
//csharp:yoganet#android-x86,shared
|
//csharp:yoganet#android-x86,shared
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
104
csharp/tests/Facebook.Yoga/YGAlignBaselineTest.cs
Normal file
104
csharp/tests/Facebook.Yoga/YGAlignBaselineTest.cs
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using NUnit.Framework;
|
||||||
|
|
||||||
|
namespace Facebook.Yoga
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class YGAlignBaselineTest
|
||||||
|
{
|
||||||
|
[Test]
|
||||||
|
public void Test_align_baseline_parent_using_child_in_column_as_reference()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
YogaNode root = createYGNode(config, YogaFlexDirection.Row, 1000, 1000, true);
|
||||||
|
|
||||||
|
YogaNode root_child0 = createYGNode(config, YogaFlexDirection.Column, 500, 600, false);
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child1 = createYGNode(config, YogaFlexDirection.Column, 500, 800, false);
|
||||||
|
root.Insert(1, root_child1);
|
||||||
|
|
||||||
|
YogaNode root_child1_child0 = createYGNode(config, YogaFlexDirection.Column, 500, 300, false);
|
||||||
|
root_child1.Insert(0, root_child1_child0);
|
||||||
|
|
||||||
|
YogaNode root_child1_child1 = createYGNode(config, YogaFlexDirection.Column, 500, 400, false);
|
||||||
|
root_child1_child1.SetBaselineFunction((_, width, height) => {
|
||||||
|
return height / 2;
|
||||||
|
});
|
||||||
|
root_child1_child1.IsReferenceBaseline = true;
|
||||||
|
root_child1.Insert(1, root_child1_child1);
|
||||||
|
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(500f, root_child1.LayoutX);
|
||||||
|
Assert.AreEqual(100f, root_child1.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child1_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child1_child0.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child1_child1.LayoutX);
|
||||||
|
Assert.AreEqual(300f, root_child1_child1.LayoutY);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void Test_align_baseline_parent_using_child_in_row_as_reference()
|
||||||
|
{
|
||||||
|
YogaConfig config = new YogaConfig();
|
||||||
|
|
||||||
|
YogaNode root = createYGNode(config, YogaFlexDirection.Row, 1000, 1000, true);
|
||||||
|
|
||||||
|
YogaNode root_child0 = createYGNode(config, YogaFlexDirection.Column, 500, 600, false);
|
||||||
|
root.Insert(0, root_child0);
|
||||||
|
|
||||||
|
YogaNode root_child1 = createYGNode(config, YogaFlexDirection.Row, 500, 800, true);
|
||||||
|
root.Insert(1, root_child1);
|
||||||
|
|
||||||
|
YogaNode root_child1_child0 = createYGNode(config, YogaFlexDirection.Row, 500, 500, false);
|
||||||
|
root_child1.Insert(0, root_child1_child0);
|
||||||
|
|
||||||
|
YogaNode root_child1_child1 = createYGNode(config, YogaFlexDirection.Row, 500, 400, false);
|
||||||
|
root_child1_child1.SetBaselineFunction((_, width, height) => {
|
||||||
|
return height / 2;
|
||||||
|
});
|
||||||
|
root_child1_child1.IsReferenceBaseline = true;
|
||||||
|
root_child1.Insert(1, root_child1_child1);
|
||||||
|
|
||||||
|
root.StyleDirection = YogaDirection.LTR;
|
||||||
|
|
||||||
|
root.CalculateLayout();
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child0.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(500f, root_child1.LayoutX);
|
||||||
|
Assert.AreEqual(100f, root_child1.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(0f, root_child1_child0.LayoutX);
|
||||||
|
Assert.AreEqual(0f, root_child1_child0.LayoutY);
|
||||||
|
|
||||||
|
Assert.AreEqual(500f, root_child1_child1.LayoutX);
|
||||||
|
Assert.AreEqual(300f, root_child1_child1.LayoutY);
|
||||||
|
}
|
||||||
|
|
||||||
|
private YogaNode createYGNode(YogaConfig config, YogaFlexDirection flexDirection, int width, int height, bool alignBaseline) {
|
||||||
|
YogaNode node = new YogaNode(config);
|
||||||
|
node.FlexDirection = flexDirection;
|
||||||
|
node.Width = width;
|
||||||
|
node.Height = height;
|
||||||
|
if (alignBaseline) {
|
||||||
|
node.AlignItems = YogaAlign.Baseline;
|
||||||
|
}
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-present, Facebook, Inc.
|
* Copyright (c) Facebook, Inc. and its 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.
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user