* Revert "Drop StdCall in favor of Cdecl for x86. (#4115)"
This reverts commit 0a432a1c84
.
The change has led to some breakage, and there is new information about
Office's needs for the change. Revert this change in master until we
have something fully working.
* Change files
This commit is contained in:
Родитель
babceecf44
Коммит
d89f2cb060
|
@ -24,7 +24,7 @@ jobs:
|
|||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
submodules: true
|
||||
submodules: false
|
||||
persistCredentials: true
|
||||
|
||||
- template: templates/configure-git.yml
|
||||
|
|
|
@ -28,7 +28,7 @@ jobs:
|
|||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1 # the depth of commits to ask Git to fetch
|
||||
submodules: true
|
||||
submodules: false
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: List disksize after checkout
|
||||
|
|
|
@ -12,7 +12,7 @@ steps:
|
|||
clean: true # whether to fetch clean each time
|
||||
# fetchDepth: 2 # the depth of commits to ask Git to fetch
|
||||
lfs: false # whether to download Git-LFS files
|
||||
submodules: true # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
|
||||
submodules: false # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
|
||||
persistCredentials: false # set to 'true' to leave the OAuth token in the Git config after the initial fetch
|
||||
|
||||
# First do a build of the local package, since we point the cli at the local files, it needs to be pre-built
|
||||
|
@ -106,7 +106,6 @@ steps:
|
|||
/p:PreferredToolArchitecture=$(MSBuildPreferredToolArchitecture)
|
||||
/p:PlatformToolset=$(MSBuildPlatformToolset)
|
||||
/p:BaseIntDir=$(BaseIntDir)
|
||||
/p:FollyDir=$(Build.SourcesDirectory)\GitModules\folly
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
condition: succeededOrFailed()
|
||||
|
|
|
@ -69,7 +69,7 @@ jobs:
|
|||
steps:
|
||||
- checkout: self
|
||||
clean: false
|
||||
submodules: true
|
||||
submodules: false
|
||||
|
||||
- task: VisualStudioTestPlatformInstaller@1
|
||||
inputs:
|
||||
|
@ -129,7 +129,7 @@ jobs:
|
|||
steps:
|
||||
- checkout: self
|
||||
clean: false
|
||||
submodules: true
|
||||
submodules: false
|
||||
|
||||
- template: templates/prepare-env.yml
|
||||
parameters:
|
||||
|
@ -252,7 +252,7 @@ jobs:
|
|||
steps:
|
||||
- checkout: self
|
||||
clean: false
|
||||
submodules: true
|
||||
submodules: false
|
||||
|
||||
- task: VisualStudioTestPlatformInstaller@1
|
||||
inputs:
|
||||
|
@ -410,7 +410,7 @@ jobs:
|
|||
clean: true # whether to fetch clean each time
|
||||
fetchDepth: 2 # the depth of commits to ask Git to fetch
|
||||
lfs: false # whether to download Git-LFS files
|
||||
submodules: true # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
|
||||
submodules: false # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
|
||||
persistCredentials: false # set to 'true' to leave the OAuth token in the Git config after the initial fetch
|
||||
|
||||
- task: CmdLine@2
|
||||
|
|
|
@ -39,7 +39,3 @@ end_of_line = crlf
|
|||
# Shell scripts
|
||||
[*.{cmd,bat,ps1}]
|
||||
end_of_line = crlf
|
||||
|
||||
# Git files
|
||||
[.gitmodules]
|
||||
insert_final_newline = false
|
||||
|
|
|
@ -4,8 +4,3 @@
|
|||
[submodule "Yoga"]
|
||||
path = current/Yoga
|
||||
url = https://github.com/ReactWindows/yoga
|
||||
[submodule "folly"]
|
||||
path = GitModules/folly
|
||||
url = https://github.com/jurocha-ms/folly.git
|
||||
branch = cdecl
|
||||
shallow = true
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit d0e9b7b3b317369250052df809508525b5a2341f
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"type": "prerelease",
|
||||
"comment": "Revert \"Drop StdCall in favor of Cdecl for x86. (#4115)\"",
|
||||
"packageName": "react-native-windows",
|
||||
"email": "ngerlem@microsoft.com",
|
||||
"commit": "8d4b9fee0e66327b5e25d996c4105c7adbf0d283",
|
||||
"dependentChangeType": "patch",
|
||||
"date": "2020-02-19T21:46:15.592Z"
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<config>
|
||||
<add key="repositoryPath" value="packages" />
|
||||
</config>
|
||||
</configuration>
|
|
@ -300,7 +300,7 @@ void addNativeTracingHooks() {
|
|||
|
||||
#endif
|
||||
|
||||
void __cdecl InitializeTracing(INativeTraceHandler *handler) {
|
||||
void InitializeTracing(INativeTraceHandler *handler) {
|
||||
g_nativeTracingHook = handler;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace Microsoft::Common::Unicode {
|
|||
// The implementations of the following functions heavily reference the MSDN
|
||||
// article at https://msdn.microsoft.com/en-us/magazine/mt763237.aspx.
|
||||
|
||||
std::wstring __cdecl Utf8ToUtf16(const char *utf8, size_t utf8Len) {
|
||||
std::wstring Utf8ToUtf16(const char *utf8, size_t utf8Len) {
|
||||
std::wstring utf16{};
|
||||
|
||||
// A small optimization.
|
||||
|
@ -85,21 +85,21 @@ std::wstring __cdecl Utf8ToUtf16(const char *utf8, size_t utf8Len) {
|
|||
return utf16;
|
||||
}
|
||||
|
||||
std::wstring __cdecl Utf8ToUtf16(const char *utf8) {
|
||||
std::wstring Utf8ToUtf16(const char *utf8) {
|
||||
return Utf8ToUtf16(utf8, strlen(utf8));
|
||||
}
|
||||
|
||||
std::wstring __cdecl Utf8ToUtf16(const std::string &utf8) {
|
||||
std::wstring Utf8ToUtf16(const std::string &utf8) {
|
||||
return Utf8ToUtf16(utf8.c_str(), utf8.length());
|
||||
}
|
||||
|
||||
#if _HAS_CXX17
|
||||
std::wstring __cdecl Utf8ToUtf16(const std::string_view &utf8) {
|
||||
std::wstring Utf8ToUtf16(const std::string_view &utf8) {
|
||||
return Utf8ToUtf16(utf8.data(), utf8.length());
|
||||
}
|
||||
#endif
|
||||
|
||||
std::string __cdecl Utf16ToUtf8(const wchar_t *utf16, size_t utf16Len) {
|
||||
std::string Utf16ToUtf8(const wchar_t *utf16, size_t utf16Len) {
|
||||
std::string utf8{};
|
||||
|
||||
// A small optimization.
|
||||
|
@ -170,32 +170,32 @@ std::string __cdecl Utf16ToUtf8(const wchar_t *utf16, size_t utf16Len) {
|
|||
return utf8;
|
||||
}
|
||||
|
||||
std::string __cdecl Utf16ToUtf8(const char16_t *utf16, size_t utf16Len) {
|
||||
std::string Utf16ToUtf8(const char16_t *utf16, size_t utf16Len) {
|
||||
return Utf16ToUtf8(Utilities::CheckedReinterpretCast<const wchar_t *>(utf16), utf16Len);
|
||||
}
|
||||
|
||||
std::string __cdecl Utf16ToUtf8(const wchar_t *utf16) {
|
||||
std::string Utf16ToUtf8(const wchar_t *utf16) {
|
||||
return Utf16ToUtf8(utf16, wcslen(utf16));
|
||||
}
|
||||
|
||||
std::string __cdecl Utf16ToUtf8(const char16_t *utf16) {
|
||||
std::string Utf16ToUtf8(const char16_t *utf16) {
|
||||
return Utf16ToUtf8(utf16, std::char_traits<char16_t>::length(utf16));
|
||||
}
|
||||
|
||||
std::string __cdecl Utf16ToUtf8(const std::wstring &utf16) {
|
||||
std::string Utf16ToUtf8(const std::wstring &utf16) {
|
||||
return Utf16ToUtf8(utf16.c_str(), utf16.length());
|
||||
}
|
||||
|
||||
std::string __cdecl Utf16ToUtf8(const std::u16string &utf16) {
|
||||
std::string Utf16ToUtf8(const std::u16string &utf16) {
|
||||
return Utf16ToUtf8(Utilities::CheckedReinterpretCast<const wchar_t *>(utf16.c_str()), utf16.length());
|
||||
}
|
||||
|
||||
#if _HAS_CXX17
|
||||
std::string __cdecl Utf16ToUtf8(const std::wstring_view &utf16) {
|
||||
std::string Utf16ToUtf8(const std::wstring_view &utf16) {
|
||||
return Utf16ToUtf8(utf16.data(), utf16.length());
|
||||
}
|
||||
|
||||
std::string __cdecl Utf16ToUtf8(const std::u16string_view &utf16) {
|
||||
std::string Utf16ToUtf8(const std::u16string_view &utf16) {
|
||||
return Utf16ToUtf8(Utilities::CheckedReinterpretCast<const wchar_t *>(utf16.data()), utf16.length());
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -48,11 +48,11 @@ class UnicodeConversionException : public std::runtime_error {
|
|||
//
|
||||
// For (2), utf8 must be null terminated. The behavior is undefined otherwise.
|
||||
//
|
||||
/* (1) */ std::wstring __cdecl Utf8ToUtf16(const char *utf8, size_t utf8Len);
|
||||
/* (2) */ std::wstring __cdecl Utf8ToUtf16(const char *utf8);
|
||||
/* (3) */ std::wstring __cdecl Utf8ToUtf16(const std::string &utf8);
|
||||
/* (1) */ std::wstring Utf8ToUtf16(const char *utf8, size_t utf8Len);
|
||||
/* (2) */ std::wstring Utf8ToUtf16(const char *utf8);
|
||||
/* (3) */ std::wstring Utf8ToUtf16(const std::string &utf8);
|
||||
#if _HAS_CXX17
|
||||
/* (4) */ std::wstring __cdecl Utf8ToUtf16(const std::string_view &utf8);
|
||||
/* (4) */ std::wstring Utf8ToUtf16(const std::string_view &utf8);
|
||||
#endif
|
||||
|
||||
// The following functions convert UTF-16BE strings to UTF-8 strings. Their
|
||||
|
@ -65,15 +65,15 @@ class UnicodeConversionException : public std::runtime_error {
|
|||
// For (3) and (4), utf16 must be null terminated. The behavior is undefined
|
||||
// otherwise.
|
||||
//
|
||||
/* (1) */ std::string __cdecl Utf16ToUtf8(const wchar_t *utf16, size_t utf16Len);
|
||||
/* (2) */ std::string __cdecl Utf16ToUtf8(const char16_t *utf16, size_t utf16Len);
|
||||
/* (3) */ std::string __cdecl Utf16ToUtf8(const wchar_t *utf16);
|
||||
/* (4) */ std::string __cdecl Utf16ToUtf8(const char16_t *utf16);
|
||||
/* (5) */ std::string __cdecl Utf16ToUtf8(const std::wstring &utf16);
|
||||
/* (6) */ std::string __cdecl Utf16ToUtf8(const std::u16string &utf16);
|
||||
/* (1) */ std::string Utf16ToUtf8(const wchar_t *utf16, size_t utf16Len);
|
||||
/* (2) */ std::string Utf16ToUtf8(const char16_t *utf16, size_t utf16Len);
|
||||
/* (3) */ std::string Utf16ToUtf8(const wchar_t *utf16);
|
||||
/* (4) */ std::string Utf16ToUtf8(const char16_t *utf16);
|
||||
/* (5) */ std::string Utf16ToUtf8(const std::wstring &utf16);
|
||||
/* (6) */ std::string Utf16ToUtf8(const std::u16string &utf16);
|
||||
#if _HAS_CXX17
|
||||
/* (7) */ std::string __cdecl Utf16ToUtf8(const std::wstring_view &utf16);
|
||||
/* (8) */ std::string __cdecl Utf16ToUtf8(const std::u16string_view &utf16);
|
||||
/* (7) */ std::string Utf16ToUtf8(const std::wstring_view &utf16);
|
||||
/* (8) */ std::string Utf16ToUtf8(const std::u16string_view &utf16);
|
||||
#endif
|
||||
|
||||
} // namespace Microsoft::Common::Unicode
|
||||
|
|
|
@ -1,144 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <yoga/YGEnums.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
|
||||
namespace detail {
|
||||
|
||||
constexpr size_t __cdecl log2ceil(size_t n) {
|
||||
return n < 1 ? 0 : (1 + log2ceil(n / 2));
|
||||
}
|
||||
|
||||
// The number of bits necessary to represent enums defined with YG_ENUM_SEQ_DECL
|
||||
template <typename Enum>
|
||||
constexpr size_t __cdecl bitWidth() {
|
||||
static_assert(
|
||||
enums::count<Enum>() > 0, "Enums must have at least one entries");
|
||||
return log2ceil(enums::count<Enum>() - 1);
|
||||
}
|
||||
|
||||
// Number of bits needed for a boolean
|
||||
template <>
|
||||
constexpr size_t __cdecl bitWidth<bool>() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
template <typename U, typename... Ts>
|
||||
struct BitTraits {};
|
||||
|
||||
template <typename U>
|
||||
struct BitTraits<U> {
|
||||
// Base cases
|
||||
static constexpr size_t __cdecl width(size_t) { return 0; }
|
||||
static constexpr size_t __cdecl shift(size_t) { return 0; }
|
||||
};
|
||||
|
||||
template <typename U, typename T, typename... Ts>
|
||||
struct BitTraits<U, T, Ts...> {
|
||||
using Rest = BitTraits<U, Ts...>;
|
||||
|
||||
static constexpr size_t __cdecl width(size_t idx) {
|
||||
return idx == 0 ? bitWidth<T>() : Rest::width(idx - 1);
|
||||
}
|
||||
|
||||
static constexpr size_t __cdecl shift(size_t idx) {
|
||||
return idx == 0 ? Rest::width(0) + Rest::shift(0) : Rest::shift(idx - 1);
|
||||
}
|
||||
|
||||
static constexpr U __cdecl mask(size_t idx) {
|
||||
return ((U{1} << width(idx)) - 1) << shift(idx);
|
||||
}
|
||||
};
|
||||
|
||||
template <size_t Idx, typename T, typename... Ts>
|
||||
struct IndexedType {
|
||||
using Type = typename IndexedType<Idx - 1, Ts...>::Type;
|
||||
};
|
||||
|
||||
template <typename T, typename... Ts>
|
||||
struct IndexedType<0, T, Ts...> {
|
||||
using Type = T;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <typename Storage, typename... Fields>
|
||||
class Bitfield {
|
||||
static_assert(
|
||||
std::is_integral<Storage>::value,
|
||||
"Bitfield needs an integral storage type");
|
||||
static_assert(
|
||||
std::is_unsigned<Storage>::value,
|
||||
"Bitfield needs an unsigned storage type");
|
||||
static_assert(sizeof...(Fields) > 0, "Bitfield needs at least one member");
|
||||
|
||||
using BitTraits = detail::BitTraits<Storage, Fields...>;
|
||||
|
||||
#if !defined(_MSC_VER) || _MSC_VER > 1914
|
||||
static_assert(
|
||||
BitTraits::shift(0) + BitTraits::width(0) <=
|
||||
std::numeric_limits<Storage>::digits,
|
||||
"Specified storage type is too narrow to hold all types");
|
||||
#endif
|
||||
|
||||
template <size_t Idx>
|
||||
using TypeAt = typename detail::IndexedType<Idx, Fields...>::Type;
|
||||
|
||||
template <size_t Idx, typename Value, typename... Values>
|
||||
static constexpr Storage __cdecl initStorage(Value value, Values... values) {
|
||||
return ((value << BitTraits::shift(Idx)) & BitTraits::mask(Idx)) |
|
||||
initStorage<Idx + 1, Values...>(values...);
|
||||
}
|
||||
|
||||
template <size_t Idx>
|
||||
static constexpr Storage __cdecl initStorage() {
|
||||
return Storage{0};
|
||||
}
|
||||
|
||||
Storage storage_ = 0;
|
||||
|
||||
public:
|
||||
template <size_t Idx>
|
||||
class Ref {
|
||||
Bitfield& bitfield_;
|
||||
|
||||
public:
|
||||
Ref(Bitfield& bitfield) : bitfield_(bitfield) {}
|
||||
Ref& operator=(TypeAt<Idx> value) {
|
||||
bitfield_.storage_ = (bitfield_.storage_ & ~BitTraits::mask(Idx)) |
|
||||
((value << BitTraits::shift(Idx)) & BitTraits::mask(Idx));
|
||||
return *this;
|
||||
}
|
||||
operator TypeAt<Idx>() const {
|
||||
return const_cast<const Bitfield&>(bitfield_).at<Idx>();
|
||||
}
|
||||
};
|
||||
|
||||
constexpr Bitfield() = default;
|
||||
constexpr Bitfield(Fields... values) : storage_{initStorage<0>(values...)} {}
|
||||
|
||||
template <size_t Idx>
|
||||
constexpr TypeAt<Idx> __cdecl at() const {
|
||||
return static_cast<TypeAt<Idx>>(
|
||||
(storage_ & BitTraits::mask(Idx)) >> BitTraits::shift(Idx));
|
||||
}
|
||||
|
||||
template <size_t Idx>
|
||||
Ref<Idx> __cdecl at() {
|
||||
return {*this};
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
|
@ -1,183 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "YGValue.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
static_assert(
|
||||
std::numeric_limits<float>::is_iec559,
|
||||
"facebook::yoga::detail::CompactValue only works with IEEE754 floats");
|
||||
|
||||
#ifdef YOGA_COMPACT_VALUE_TEST
|
||||
#define VISIBLE_FOR_TESTING public:
|
||||
#else
|
||||
#define VISIBLE_FOR_TESTING private:
|
||||
#endif
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
namespace detail {
|
||||
|
||||
// This class stores YGValue in 32 bits.
|
||||
// - The value does not matter for Undefined and Auto. NaNs are used for their
|
||||
// representation.
|
||||
// - To differentiate between Point and Percent, one exponent bit is used.
|
||||
// Supported the range [0x40, 0xbf] (0xbf is inclusive for point, but
|
||||
// exclusive for percent).
|
||||
// - Value ranges:
|
||||
// points: 1.08420217e-19f to 36893485948395847680
|
||||
// 0x00000000 0x3fffffff
|
||||
// percent: 1.08420217e-19f to 18446742974197923840
|
||||
// 0x40000000 0x7f7fffff
|
||||
// - Zero is supported, negative zero is not
|
||||
// - values outside of the representable range are clamped
|
||||
class CompactValue {
|
||||
friend constexpr bool operator==(CompactValue, CompactValue) noexcept;
|
||||
|
||||
public:
|
||||
static constexpr auto LOWER_BOUND = 1.08420217e-19f;
|
||||
static constexpr auto UPPER_BOUND_POINT = 36893485948395847680.0f;
|
||||
static constexpr auto UPPER_BOUND_PERCENT = 18446742974197923840.0f;
|
||||
|
||||
template <YGUnit Unit>
|
||||
static CompactValue __cdecl of(float value) noexcept {
|
||||
if (value == 0.0f || (value < LOWER_BOUND && value > -LOWER_BOUND)) {
|
||||
constexpr auto zero =
|
||||
Unit == YGUnitPercent ? ZERO_BITS_PERCENT : ZERO_BITS_POINT;
|
||||
return {Payload{zero}};
|
||||
}
|
||||
|
||||
constexpr auto upperBound =
|
||||
Unit == YGUnitPercent ? UPPER_BOUND_PERCENT : UPPER_BOUND_POINT;
|
||||
if (value > upperBound || value < -upperBound) {
|
||||
value = copysignf(upperBound, value);
|
||||
}
|
||||
|
||||
uint32_t unitBit = Unit == YGUnitPercent ? PERCENT_BIT : 0;
|
||||
auto data = Payload{value};
|
||||
data.repr -= BIAS;
|
||||
data.repr |= unitBit;
|
||||
return {data};
|
||||
}
|
||||
|
||||
template <YGUnit Unit>
|
||||
static CompactValue __cdecl ofMaybe(float value) noexcept {
|
||||
return std::isnan(value) || std::isinf(value) ? ofUndefined()
|
||||
: of<Unit>(value);
|
||||
}
|
||||
|
||||
static constexpr CompactValue __cdecl ofZero() noexcept {
|
||||
return CompactValue{Payload{ZERO_BITS_POINT}};
|
||||
}
|
||||
|
||||
static constexpr CompactValue __cdecl ofUndefined() noexcept {
|
||||
return CompactValue{};
|
||||
}
|
||||
|
||||
static constexpr CompactValue __cdecl ofAuto() noexcept {
|
||||
return CompactValue{Payload{AUTO_BITS}};
|
||||
}
|
||||
|
||||
constexpr CompactValue() noexcept
|
||||
: payload_(std::numeric_limits<float>::quiet_NaN()) {}
|
||||
|
||||
CompactValue(const YGValue& x) noexcept : payload_(uint32_t{0}) {
|
||||
switch (x.unit) {
|
||||
case YGUnitUndefined:
|
||||
*this = ofUndefined();
|
||||
break;
|
||||
case YGUnitAuto:
|
||||
*this = ofAuto();
|
||||
break;
|
||||
case YGUnitPoint:
|
||||
*this = of<YGUnitPoint>(x.value);
|
||||
break;
|
||||
case YGUnitPercent:
|
||||
*this = of<YGUnitPercent>(x.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
operator YGValue() const noexcept {
|
||||
switch (payload_.repr) {
|
||||
case AUTO_BITS:
|
||||
return YGValueAuto;
|
||||
case ZERO_BITS_POINT:
|
||||
return YGValue{0.0f, YGUnitPoint};
|
||||
case ZERO_BITS_PERCENT:
|
||||
return YGValue{0.0f, YGUnitPercent};
|
||||
}
|
||||
|
||||
if (std::isnan(payload_.value)) {
|
||||
return YGValueUndefined;
|
||||
}
|
||||
|
||||
auto data = payload_;
|
||||
data.repr &= ~PERCENT_BIT;
|
||||
data.repr += BIAS;
|
||||
|
||||
return YGValue{data.value,
|
||||
payload_.repr & 0x40000000 ? YGUnitPercent : YGUnitPoint};
|
||||
}
|
||||
|
||||
bool __cdecl isUndefined() const noexcept {
|
||||
return (
|
||||
payload_.repr != AUTO_BITS && payload_.repr != ZERO_BITS_POINT &&
|
||||
payload_.repr != ZERO_BITS_PERCENT && std::isnan(payload_.value));
|
||||
}
|
||||
|
||||
bool __cdecl isAuto() const noexcept { return payload_.repr == AUTO_BITS; }
|
||||
|
||||
private:
|
||||
union Payload {
|
||||
float value;
|
||||
uint32_t repr;
|
||||
Payload() = delete;
|
||||
constexpr Payload(uint32_t r) : repr(r) {}
|
||||
constexpr Payload(float v) : value(v) {}
|
||||
};
|
||||
|
||||
static constexpr uint32_t BIAS = 0x20000000;
|
||||
static constexpr uint32_t PERCENT_BIT = 0x40000000;
|
||||
|
||||
// these are signaling NaNs with specific bit pattern as payload they will be
|
||||
// silenced whenever going through an FPU operation on ARM + x86
|
||||
static constexpr uint32_t AUTO_BITS = 0x7faaaaaa;
|
||||
static constexpr uint32_t ZERO_BITS_POINT = 0x7f8f0f0f;
|
||||
static constexpr uint32_t ZERO_BITS_PERCENT = 0x7f80f0f0;
|
||||
|
||||
constexpr CompactValue(Payload data) noexcept : payload_(data) {}
|
||||
|
||||
Payload payload_;
|
||||
|
||||
VISIBLE_FOR_TESTING uint32_t repr() { return payload_.repr; }
|
||||
};
|
||||
|
||||
template <>
|
||||
CompactValue __cdecl CompactValue::of<YGUnitUndefined>(float) noexcept = delete;
|
||||
template <>
|
||||
CompactValue __cdecl CompactValue::of<YGUnitAuto>(float) noexcept = delete;
|
||||
template <>
|
||||
CompactValue __cdecl CompactValue::ofMaybe<YGUnitUndefined>(float) noexcept = delete;
|
||||
template <>
|
||||
CompactValue __cdecl CompactValue::ofMaybe<YGUnitAuto>(float) noexcept = delete;
|
||||
|
||||
constexpr bool operator==(CompactValue a, CompactValue b) noexcept {
|
||||
return a.payload_.repr == b.payload_.repr;
|
||||
}
|
||||
|
||||
constexpr bool operator!=(CompactValue a, CompactValue b) noexcept {
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#include "Utils.h"
|
||||
|
||||
using namespace facebook;
|
||||
|
||||
YGFlexDirection __cdecl YGFlexDirectionCross(
|
||||
const YGFlexDirection flexDirection,
|
||||
const YGDirection direction) {
|
||||
return YGFlexDirectionIsColumn(flexDirection)
|
||||
? YGResolveFlexDirection(YGFlexDirectionRow, direction)
|
||||
: YGFlexDirectionColumn;
|
||||
}
|
||||
|
||||
float __cdecl YGFloatMax(const float a, const float b) {
|
||||
if (!yoga::isUndefined(a) && !yoga::isUndefined(b)) {
|
||||
return fmaxf(a, b);
|
||||
}
|
||||
return yoga::isUndefined(a) ? b : a;
|
||||
}
|
||||
|
||||
float __cdecl YGFloatMin(const float a, const float b) {
|
||||
if (!yoga::isUndefined(a) && !yoga::isUndefined(b)) {
|
||||
return fminf(a, b);
|
||||
}
|
||||
|
||||
return yoga::isUndefined(a) ? b : a;
|
||||
}
|
||||
|
||||
bool __cdecl YGValueEqual(const YGValue& a, const YGValue& b) {
|
||||
if (a.unit != b.unit) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (a.unit == YGUnitUndefined ||
|
||||
(yoga::isUndefined(a.value) && yoga::isUndefined(b.value))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return fabs(a.value - b.value) < 0.0001f;
|
||||
}
|
||||
|
||||
bool __cdecl YGFloatsEqual(const float a, const float b) {
|
||||
if (!yoga::isUndefined(a) && !yoga::isUndefined(b)) {
|
||||
return fabs(a - b) < 0.0001f;
|
||||
}
|
||||
return yoga::isUndefined(a) && yoga::isUndefined(b);
|
||||
}
|
||||
|
||||
float __cdecl YGFloatSanitize(const float val) {
|
||||
return yoga::isUndefined(val) ? 0 : val;
|
||||
}
|
||||
|
||||
YGFloatOptional __cdecl YGFloatOptionalMax(YGFloatOptional op1, YGFloatOptional op2) {
|
||||
if (op1 >= op2) {
|
||||
return op1;
|
||||
}
|
||||
if (op2 > op1) {
|
||||
return op2;
|
||||
}
|
||||
return op1.isUndefined() ? op2 : op1;
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
#include "YGNode.h"
|
||||
#include "Yoga-internal.h"
|
||||
#include "CompactValue.h"
|
||||
|
||||
// This struct is an helper model to hold the data for step 4 of flexbox algo,
|
||||
// which is collecting the flex items in a line.
|
||||
//
|
||||
// - itemsOnLine: Number of items which can fit in a line considering the
|
||||
// available Inner dimension, the flex items computed flexbasis and their
|
||||
// margin. It may be different than the difference between start and end
|
||||
// indicates because we skip over absolute-positioned items.
|
||||
//
|
||||
// - sizeConsumedOnCurrentLine: It is accumulation of the dimensions and margin
|
||||
// of all the children on the current line. This will be used in order to
|
||||
// either set the dimensions of the node if none already exist or to compute
|
||||
// the remaining space left for the flexible children.
|
||||
//
|
||||
// - totalFlexGrowFactors: total flex grow factors of flex items which are to be
|
||||
// layed in the current line
|
||||
//
|
||||
// - totalFlexShrinkFactors: total flex shrink factors of flex items which are
|
||||
// to be layed in the current line
|
||||
//
|
||||
// - endOfLineIndex: Its the end index of the last flex item which was examined
|
||||
// and it may or may not be part of the current line(as it may be absolutely
|
||||
// positioned or including it may have caused to overshoot availableInnerDim)
|
||||
//
|
||||
// - relativeChildren: Maintain a vector of the child nodes that can shrink
|
||||
// and/or grow.
|
||||
|
||||
struct YGCollectFlexItemsRowValues {
|
||||
uint32_t itemsOnLine;
|
||||
float sizeConsumedOnCurrentLine;
|
||||
float totalFlexGrowFactors;
|
||||
float totalFlexShrinkScaledFactors;
|
||||
uint32_t endOfLineIndex;
|
||||
std::vector<YGNodeRef> relativeChildren;
|
||||
float remainingFreeSpace;
|
||||
// The size of the mainDim for the row after considering size, padding, margin
|
||||
// and border of flex items. This is used to calculate maxLineDim after going
|
||||
// through all the rows to decide on the main axis size of owner.
|
||||
float mainDim;
|
||||
// The size of the crossDim for the row after considering size, padding,
|
||||
// margin and border of flex items. Used for calculating containers crossSize.
|
||||
float crossDim;
|
||||
};
|
||||
|
||||
bool __cdecl YGValueEqual(const YGValue& a, const YGValue& b);
|
||||
inline bool __cdecl YGValueEqual(
|
||||
facebook::yoga::detail::CompactValue a,
|
||||
facebook::yoga::detail::CompactValue b) {
|
||||
return YGValueEqual((YGValue) a, (YGValue) b);
|
||||
}
|
||||
|
||||
// This custom float equality function returns true if either absolute
|
||||
// difference between two floats is less than 0.0001f or both are undefined.
|
||||
bool __cdecl YGFloatsEqual(const float a, const float b);
|
||||
|
||||
float __cdecl YGFloatMax(const float a, const float b);
|
||||
|
||||
YGFloatOptional __cdecl YGFloatOptionalMax(
|
||||
const YGFloatOptional op1,
|
||||
const YGFloatOptional op2);
|
||||
|
||||
float __cdecl YGFloatMin(const float a, const float b);
|
||||
|
||||
// This custom float comparison function compares the array of float with
|
||||
// YGFloatsEqual, as the default float comparison operator will not work(Look
|
||||
// at the comments of YGFloatsEqual function).
|
||||
template <std::size_t size>
|
||||
bool __cdecl YGFloatArrayEqual(
|
||||
const std::array<float, size>& val1,
|
||||
const std::array<float, size>& val2) {
|
||||
bool areEqual = true;
|
||||
for (std::size_t i = 0; i < size && areEqual; ++i) {
|
||||
areEqual = YGFloatsEqual(val1[i], val2[i]);
|
||||
}
|
||||
return areEqual;
|
||||
}
|
||||
|
||||
// This function returns 0 if YGFloatIsUndefined(val) is true and val otherwise
|
||||
float __cdecl YGFloatSanitize(const float val);
|
||||
|
||||
YGFlexDirection __cdecl YGFlexDirectionCross(
|
||||
const YGFlexDirection flexDirection,
|
||||
const YGDirection direction);
|
||||
|
||||
inline bool __cdecl YGFlexDirectionIsRow(const YGFlexDirection flexDirection) {
|
||||
return flexDirection == YGFlexDirectionRow ||
|
||||
flexDirection == YGFlexDirectionRowReverse;
|
||||
}
|
||||
|
||||
inline YGFloatOptional __cdecl YGResolveValue(
|
||||
const YGValue value,
|
||||
const float ownerSize) {
|
||||
switch (value.unit) {
|
||||
case YGUnitPoint:
|
||||
return YGFloatOptional{value.value};
|
||||
case YGUnitPercent:
|
||||
return YGFloatOptional{value.value * ownerSize * 0.01f};
|
||||
default:
|
||||
return YGFloatOptional{};
|
||||
}
|
||||
}
|
||||
|
||||
inline YGFloatOptional __cdecl YGResolveValue(
|
||||
yoga::detail::CompactValue value,
|
||||
float ownerSize) {
|
||||
return YGResolveValue((YGValue) value, ownerSize);
|
||||
}
|
||||
|
||||
inline bool __cdecl YGFlexDirectionIsColumn(const YGFlexDirection flexDirection) {
|
||||
return flexDirection == YGFlexDirectionColumn ||
|
||||
flexDirection == YGFlexDirectionColumnReverse;
|
||||
}
|
||||
|
||||
inline YGFlexDirection __cdecl YGResolveFlexDirection(
|
||||
const YGFlexDirection flexDirection,
|
||||
const YGDirection direction) {
|
||||
if (direction == YGDirectionRTL) {
|
||||
if (flexDirection == YGFlexDirectionRow) {
|
||||
return YGFlexDirectionRowReverse;
|
||||
} else if (flexDirection == YGFlexDirectionRowReverse) {
|
||||
return YGFlexDirectionRow;
|
||||
}
|
||||
}
|
||||
|
||||
return flexDirection;
|
||||
}
|
||||
|
||||
inline YGFloatOptional __cdecl YGResolveValueMargin(
|
||||
yoga::detail::CompactValue value,
|
||||
const float ownerSize) {
|
||||
return value.isAuto() ? YGFloatOptional{0} : YGResolveValue(value, ownerSize);
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
#include "Yoga-internal.h"
|
||||
#include "Yoga.h"
|
||||
|
||||
struct YGConfig {
|
||||
using LogWithContextFn = int (__cdecl *)(
|
||||
YGConfigRef config,
|
||||
YGNodeRef node,
|
||||
YGLogLevel level,
|
||||
void* context,
|
||||
const char* format,
|
||||
va_list args);
|
||||
using CloneWithContextFn = YGNodeRef (__cdecl *)(
|
||||
YGNodeRef node,
|
||||
YGNodeRef owner,
|
||||
int childIndex,
|
||||
void* cloneContext);
|
||||
|
||||
private:
|
||||
union {
|
||||
CloneWithContextFn withContext;
|
||||
YGCloneNodeFunc noContext;
|
||||
} cloneNodeCallback_;
|
||||
union {
|
||||
LogWithContextFn withContext;
|
||||
YGLogger noContext;
|
||||
} logger_;
|
||||
bool cloneNodeUsesContext_;
|
||||
bool loggerUsesContext_;
|
||||
|
||||
public:
|
||||
bool useWebDefaults = false;
|
||||
bool useLegacyStretchBehaviour = false;
|
||||
bool shouldDiffLayoutWithoutLegacyStretchBehaviour = false;
|
||||
bool printTree = false;
|
||||
float pointScaleFactor = 1.0f;
|
||||
std::array<bool, facebook::yoga::enums::count<YGExperimentalFeature>()>
|
||||
experimentalFeatures = {};
|
||||
void* context = nullptr;
|
||||
|
||||
YGConfig(YGLogger logger);
|
||||
void __cdecl log(YGConfig*, YGNode*, YGLogLevel, void*, const char*, va_list);
|
||||
void __cdecl setLogger(YGLogger logger) {
|
||||
logger_.noContext = logger;
|
||||
loggerUsesContext_ = false;
|
||||
}
|
||||
void __cdecl setLogger(LogWithContextFn logger) {
|
||||
logger_.withContext = logger;
|
||||
loggerUsesContext_ = true;
|
||||
}
|
||||
void __cdecl setLogger(std::nullptr_t) { setLogger(YGLogger{nullptr}); }
|
||||
|
||||
YGNodeRef __cdecl cloneNode(
|
||||
YGNodeRef node,
|
||||
YGNodeRef owner,
|
||||
int childIndex,
|
||||
void* cloneContext);
|
||||
void __cdecl setCloneNodeCallback(YGCloneNodeFunc cloneNode) {
|
||||
cloneNodeCallback_.noContext = cloneNode;
|
||||
cloneNodeUsesContext_ = false;
|
||||
}
|
||||
void __cdecl setCloneNodeCallback(CloneWithContextFn cloneNode) {
|
||||
cloneNodeCallback_.withContext = cloneNode;
|
||||
cloneNodeUsesContext_ = true;
|
||||
}
|
||||
void __cdecl setCloneNodeCallback(std::nullptr_t) {
|
||||
setCloneNodeCallback(YGCloneNodeFunc{nullptr});
|
||||
}
|
||||
};
|
|
@ -1,225 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#include "YGEnums.h"
|
||||
|
||||
const char* __cdecl YGAlignToString(const YGAlign value) {
|
||||
switch (value) {
|
||||
case YGAlignAuto:
|
||||
return "auto";
|
||||
case YGAlignFlexStart:
|
||||
return "flex-start";
|
||||
case YGAlignCenter:
|
||||
return "center";
|
||||
case YGAlignFlexEnd:
|
||||
return "flex-end";
|
||||
case YGAlignStretch:
|
||||
return "stretch";
|
||||
case YGAlignBaseline:
|
||||
return "baseline";
|
||||
case YGAlignSpaceBetween:
|
||||
return "space-between";
|
||||
case YGAlignSpaceAround:
|
||||
return "space-around";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGDimensionToString(const YGDimension value) {
|
||||
switch (value) {
|
||||
case YGDimensionWidth:
|
||||
return "width";
|
||||
case YGDimensionHeight:
|
||||
return "height";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGDirectionToString(const YGDirection value) {
|
||||
switch (value) {
|
||||
case YGDirectionInherit:
|
||||
return "inherit";
|
||||
case YGDirectionLTR:
|
||||
return "ltr";
|
||||
case YGDirectionRTL:
|
||||
return "rtl";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGDisplayToString(const YGDisplay value) {
|
||||
switch (value) {
|
||||
case YGDisplayFlex:
|
||||
return "flex";
|
||||
case YGDisplayNone:
|
||||
return "none";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGEdgeToString(const YGEdge value) {
|
||||
switch (value) {
|
||||
case YGEdgeLeft:
|
||||
return "left";
|
||||
case YGEdgeTop:
|
||||
return "top";
|
||||
case YGEdgeRight:
|
||||
return "right";
|
||||
case YGEdgeBottom:
|
||||
return "bottom";
|
||||
case YGEdgeStart:
|
||||
return "start";
|
||||
case YGEdgeEnd:
|
||||
return "end";
|
||||
case YGEdgeHorizontal:
|
||||
return "horizontal";
|
||||
case YGEdgeVertical:
|
||||
return "vertical";
|
||||
case YGEdgeAll:
|
||||
return "all";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGExperimentalFeatureToString(const YGExperimentalFeature value) {
|
||||
switch (value) {
|
||||
case YGExperimentalFeatureWebFlexBasis:
|
||||
return "web-flex-basis";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGFlexDirectionToString(const YGFlexDirection value) {
|
||||
switch (value) {
|
||||
case YGFlexDirectionColumn:
|
||||
return "column";
|
||||
case YGFlexDirectionColumnReverse:
|
||||
return "column-reverse";
|
||||
case YGFlexDirectionRow:
|
||||
return "row";
|
||||
case YGFlexDirectionRowReverse:
|
||||
return "row-reverse";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGJustifyToString(const YGJustify value) {
|
||||
switch (value) {
|
||||
case YGJustifyFlexStart:
|
||||
return "flex-start";
|
||||
case YGJustifyCenter:
|
||||
return "center";
|
||||
case YGJustifyFlexEnd:
|
||||
return "flex-end";
|
||||
case YGJustifySpaceBetween:
|
||||
return "space-between";
|
||||
case YGJustifySpaceAround:
|
||||
return "space-around";
|
||||
case YGJustifySpaceEvenly:
|
||||
return "space-evenly";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGLogLevelToString(const YGLogLevel value) {
|
||||
switch (value) {
|
||||
case YGLogLevelError:
|
||||
return "error";
|
||||
case YGLogLevelWarn:
|
||||
return "warn";
|
||||
case YGLogLevelInfo:
|
||||
return "info";
|
||||
case YGLogLevelDebug:
|
||||
return "debug";
|
||||
case YGLogLevelVerbose:
|
||||
return "verbose";
|
||||
case YGLogLevelFatal:
|
||||
return "fatal";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGMeasureModeToString(const YGMeasureMode value) {
|
||||
switch (value) {
|
||||
case YGMeasureModeUndefined:
|
||||
return "undefined";
|
||||
case YGMeasureModeExactly:
|
||||
return "exactly";
|
||||
case YGMeasureModeAtMost:
|
||||
return "at-most";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGNodeTypeToString(const YGNodeType value) {
|
||||
switch (value) {
|
||||
case YGNodeTypeDefault:
|
||||
return "default";
|
||||
case YGNodeTypeText:
|
||||
return "text";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGOverflowToString(const YGOverflow value) {
|
||||
switch (value) {
|
||||
case YGOverflowVisible:
|
||||
return "visible";
|
||||
case YGOverflowHidden:
|
||||
return "hidden";
|
||||
case YGOverflowScroll:
|
||||
return "scroll";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGPositionTypeToString(const YGPositionType value) {
|
||||
switch (value) {
|
||||
case YGPositionTypeRelative:
|
||||
return "relative";
|
||||
case YGPositionTypeAbsolute:
|
||||
return "absolute";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGPrintOptionsToString(const YGPrintOptions value) {
|
||||
switch (value) {
|
||||
case YGPrintOptionsLayout:
|
||||
return "layout";
|
||||
case YGPrintOptionsStyle:
|
||||
return "style";
|
||||
case YGPrintOptionsChildren:
|
||||
return "children";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGUnitToString(const YGUnit value) {
|
||||
switch (value) {
|
||||
case YGUnitUndefined:
|
||||
return "undefined";
|
||||
case YGUnitPoint:
|
||||
return "point";
|
||||
case YGUnitPercent:
|
||||
return "percent";
|
||||
case YGUnitAuto:
|
||||
return "auto";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
const char* __cdecl YGWrapToString(const YGWrap value) {
|
||||
switch (value) {
|
||||
case YGWrapNoWrap:
|
||||
return "no-wrap";
|
||||
case YGWrapWrap:
|
||||
return "wrap";
|
||||
case YGWrapWrapReverse:
|
||||
return "wrap-reverse";
|
||||
}
|
||||
return "unknown";
|
||||
}
|
|
@ -1,150 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "YGMacros.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
namespace enums {
|
||||
|
||||
template <typename T>
|
||||
constexpr int __cdecl count(); // can't use `= delete` due to a defect in clang < 3.9
|
||||
|
||||
namespace detail {
|
||||
template <int... xs>
|
||||
constexpr int n() {
|
||||
return sizeof...(xs);
|
||||
}
|
||||
} // namespace detail
|
||||
|
||||
} // namespace enums
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
||||
#endif
|
||||
|
||||
#define YG_ENUM_DECL(NAME, ...) \
|
||||
typedef YG_ENUM_BEGIN(NAME){__VA_ARGS__} YG_ENUM_END(NAME); \
|
||||
WIN_EXPORT const char* __cdecl NAME##ToString(NAME);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define YG_ENUM_SEQ_DECL(NAME, ...) \
|
||||
YG_ENUM_DECL(NAME, __VA_ARGS__) \
|
||||
YG_EXTERN_C_END \
|
||||
namespace facebook { \
|
||||
namespace yoga { \
|
||||
namespace enums { \
|
||||
template <> \
|
||||
constexpr int count<NAME>() { \
|
||||
return detail::n<__VA_ARGS__>(); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
YG_EXTERN_C_BEGIN
|
||||
#else
|
||||
#define YG_ENUM_SEQ_DECL YG_ENUM_DECL
|
||||
#endif
|
||||
|
||||
YG_EXTERN_C_BEGIN
|
||||
|
||||
YG_ENUM_SEQ_DECL(
|
||||
YGAlign,
|
||||
YGAlignAuto,
|
||||
YGAlignFlexStart,
|
||||
YGAlignCenter,
|
||||
YGAlignFlexEnd,
|
||||
YGAlignStretch,
|
||||
YGAlignBaseline,
|
||||
YGAlignSpaceBetween,
|
||||
YGAlignSpaceAround);
|
||||
|
||||
YG_ENUM_SEQ_DECL(YGDimension, YGDimensionWidth, YGDimensionHeight)
|
||||
|
||||
YG_ENUM_SEQ_DECL(
|
||||
YGDirection,
|
||||
YGDirectionInherit,
|
||||
YGDirectionLTR,
|
||||
YGDirectionRTL)
|
||||
|
||||
YG_ENUM_SEQ_DECL(YGDisplay, YGDisplayFlex, YGDisplayNone)
|
||||
|
||||
YG_ENUM_SEQ_DECL(
|
||||
YGEdge,
|
||||
YGEdgeLeft,
|
||||
YGEdgeTop,
|
||||
YGEdgeRight,
|
||||
YGEdgeBottom,
|
||||
YGEdgeStart,
|
||||
YGEdgeEnd,
|
||||
YGEdgeHorizontal,
|
||||
YGEdgeVertical,
|
||||
YGEdgeAll)
|
||||
|
||||
YG_ENUM_SEQ_DECL(YGExperimentalFeature, YGExperimentalFeatureWebFlexBasis)
|
||||
|
||||
YG_ENUM_SEQ_DECL(
|
||||
YGFlexDirection,
|
||||
YGFlexDirectionColumn,
|
||||
YGFlexDirectionColumnReverse,
|
||||
YGFlexDirectionRow,
|
||||
YGFlexDirectionRowReverse)
|
||||
|
||||
YG_ENUM_SEQ_DECL(
|
||||
YGJustify,
|
||||
YGJustifyFlexStart,
|
||||
YGJustifyCenter,
|
||||
YGJustifyFlexEnd,
|
||||
YGJustifySpaceBetween,
|
||||
YGJustifySpaceAround,
|
||||
YGJustifySpaceEvenly)
|
||||
|
||||
YG_ENUM_SEQ_DECL(
|
||||
YGLogLevel,
|
||||
YGLogLevelError,
|
||||
YGLogLevelWarn,
|
||||
YGLogLevelInfo,
|
||||
YGLogLevelDebug,
|
||||
YGLogLevelVerbose,
|
||||
YGLogLevelFatal)
|
||||
|
||||
YG_ENUM_SEQ_DECL(
|
||||
YGMeasureMode,
|
||||
YGMeasureModeUndefined,
|
||||
YGMeasureModeExactly,
|
||||
YGMeasureModeAtMost)
|
||||
|
||||
YG_ENUM_SEQ_DECL(YGNodeType, YGNodeTypeDefault, YGNodeTypeText)
|
||||
|
||||
YG_ENUM_SEQ_DECL(
|
||||
YGOverflow,
|
||||
YGOverflowVisible,
|
||||
YGOverflowHidden,
|
||||
YGOverflowScroll)
|
||||
|
||||
YG_ENUM_SEQ_DECL(YGPositionType, YGPositionTypeRelative, YGPositionTypeAbsolute)
|
||||
|
||||
YG_ENUM_DECL(
|
||||
YGPrintOptions,
|
||||
YGPrintOptionsLayout = 1,
|
||||
YGPrintOptionsStyle = 2,
|
||||
YGPrintOptionsChildren = 4)
|
||||
|
||||
YG_ENUM_SEQ_DECL(
|
||||
YGUnit,
|
||||
YGUnitUndefined,
|
||||
YGUnitPoint,
|
||||
YGUnitPercent,
|
||||
YGUnitAuto)
|
||||
|
||||
YG_ENUM_SEQ_DECL(YGWrap, YGWrapNoWrap, YGWrapWrap, YGWrapWrapReverse)
|
||||
|
||||
YG_EXTERN_C_END
|
||||
|
||||
#undef YG_ENUM_DECL
|
||||
#undef YG_ENUM_SEQ_DECL
|
|
@ -1,69 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
#include "Yoga-internal.h"
|
||||
|
||||
struct YGFloatOptional {
|
||||
private:
|
||||
float value_ = std::numeric_limits<float>::quiet_NaN();
|
||||
|
||||
public:
|
||||
explicit constexpr YGFloatOptional(float value) : value_(value) {}
|
||||
constexpr YGFloatOptional() = default;
|
||||
|
||||
// returns the wrapped value, or a value x with YGIsUndefined(x) == true
|
||||
constexpr float __cdecl unwrap() const { return value_; }
|
||||
|
||||
bool __cdecl isUndefined() const { return std::isnan(value_); }
|
||||
};
|
||||
|
||||
// operators take YGFloatOptional by value, as it is a 32bit value
|
||||
|
||||
inline bool operator==(YGFloatOptional lhs, YGFloatOptional rhs) {
|
||||
return lhs.unwrap() == rhs.unwrap() ||
|
||||
(lhs.isUndefined() && rhs.isUndefined());
|
||||
}
|
||||
inline bool operator!=(YGFloatOptional lhs, YGFloatOptional rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
inline bool operator==(YGFloatOptional lhs, float rhs) {
|
||||
return lhs == YGFloatOptional{rhs};
|
||||
}
|
||||
inline bool operator!=(YGFloatOptional lhs, float rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
inline bool operator==(float lhs, YGFloatOptional rhs) {
|
||||
return rhs == lhs;
|
||||
}
|
||||
inline bool operator!=(float lhs, YGFloatOptional rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
inline YGFloatOptional operator+(YGFloatOptional lhs, YGFloatOptional rhs) {
|
||||
return YGFloatOptional{lhs.unwrap() + rhs.unwrap()};
|
||||
}
|
||||
|
||||
inline bool operator>(YGFloatOptional lhs, YGFloatOptional rhs) {
|
||||
return lhs.unwrap() > rhs.unwrap();
|
||||
}
|
||||
|
||||
inline bool operator<(YGFloatOptional lhs, YGFloatOptional rhs) {
|
||||
return lhs.unwrap() < rhs.unwrap();
|
||||
}
|
||||
|
||||
inline bool operator>=(YGFloatOptional lhs, YGFloatOptional rhs) {
|
||||
return lhs > rhs || lhs == rhs;
|
||||
}
|
||||
|
||||
inline bool operator<=(YGFloatOptional lhs, YGFloatOptional rhs) {
|
||||
return lhs < rhs || lhs == rhs;
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
#include "Bitfield.h"
|
||||
#include "YGFloatOptional.h"
|
||||
#include "Yoga-internal.h"
|
||||
|
||||
struct YGLayout {
|
||||
std::array<float, 4> position = {};
|
||||
std::array<float, 2> dimensions = {{YGUndefined, YGUndefined}};
|
||||
std::array<float, 4> margin = {};
|
||||
std::array<float, 4> border = {};
|
||||
std::array<float, 4> padding = {};
|
||||
|
||||
private:
|
||||
static constexpr size_t directionIdx = 0;
|
||||
static constexpr size_t didUseLegacyFlagIdx = 1;
|
||||
static constexpr size_t doesLegacyStretchFlagAffectsLayoutIdx = 2;
|
||||
static constexpr size_t hadOverflowIdx = 3;
|
||||
facebook::yoga::Bitfield<uint8_t, YGDirection, bool, bool, bool> flags_ =
|
||||
{YGDirectionInherit, false, false, false};
|
||||
|
||||
public:
|
||||
uint32_t computedFlexBasisGeneration = 0;
|
||||
YGFloatOptional computedFlexBasis = {};
|
||||
|
||||
// Instead of recomputing the entire layout every single time, we cache some
|
||||
// information to break early when nothing changed
|
||||
uint32_t generationCount = 0;
|
||||
YGDirection lastOwnerDirection = (YGDirection) -1;
|
||||
|
||||
uint32_t nextCachedMeasurementsIndex = 0;
|
||||
std::array<YGCachedMeasurement, YG_MAX_CACHED_RESULT_COUNT>
|
||||
cachedMeasurements = {};
|
||||
std::array<float, 2> measuredDimensions = {{YGUndefined, YGUndefined}};
|
||||
|
||||
YGCachedMeasurement cachedLayout = YGCachedMeasurement();
|
||||
|
||||
YGDirection __cdecl direction() const { return flags_.at<directionIdx>(); }
|
||||
decltype(flags_)::Ref<directionIdx> direction() {
|
||||
return flags_.at<directionIdx>();
|
||||
}
|
||||
|
||||
bool __cdecl didUseLegacyFlag() const { return flags_.at<didUseLegacyFlagIdx>(); }
|
||||
decltype(flags_)::Ref<didUseLegacyFlagIdx> didUseLegacyFlag() {
|
||||
return flags_.at<didUseLegacyFlagIdx>();
|
||||
}
|
||||
|
||||
bool __cdecl doesLegacyStretchFlagAffectsLayout() const {
|
||||
return flags_.at<doesLegacyStretchFlagAffectsLayoutIdx>();
|
||||
}
|
||||
decltype(flags_)::Ref<doesLegacyStretchFlagAffectsLayoutIdx>
|
||||
__cdecl doesLegacyStretchFlagAffectsLayout() {
|
||||
return flags_.at<doesLegacyStretchFlagAffectsLayoutIdx>();
|
||||
}
|
||||
|
||||
bool __cdecl hadOverflow() const { return flags_.at<hadOverflowIdx>(); }
|
||||
decltype(flags_)::Ref<hadOverflowIdx> hadOverflow() {
|
||||
return flags_.at<hadOverflowIdx>();
|
||||
}
|
||||
|
||||
bool operator==(YGLayout layout) const;
|
||||
bool operator!=(YGLayout layout) const { return !(*this == layout); }
|
||||
};
|
|
@ -1,322 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <stdio.h>
|
||||
#include "Bitfield.h"
|
||||
#include "CompactValue.h"
|
||||
#include "YGConfig.h"
|
||||
#include "YGLayout.h"
|
||||
#include "YGStyle.h"
|
||||
#include "YGMacros.h"
|
||||
#include "Yoga-internal.h"
|
||||
|
||||
YGConfigRef __cdecl YGConfigGetDefault();
|
||||
|
||||
struct YGNode {
|
||||
using MeasureWithContextFn =
|
||||
YGSize (__cdecl *)(YGNode*, float, YGMeasureMode, float, YGMeasureMode, void*);
|
||||
using BaselineWithContextFn = float (__cdecl *)(YGNode*, float, float, void*);
|
||||
using PrintWithContextFn = void (__cdecl *)(YGNode*, void*);
|
||||
|
||||
private:
|
||||
static constexpr size_t hasNewLayout_ = 0;
|
||||
static constexpr size_t isReferenceBaseline_ = 1;
|
||||
static constexpr size_t isDirty_ = 2;
|
||||
static constexpr size_t nodeType_ = 3;
|
||||
static constexpr size_t measureUsesContext_ = 4;
|
||||
static constexpr size_t baselineUsesContext_ = 5;
|
||||
static constexpr size_t printUsesContext_ = 6;
|
||||
static constexpr size_t useWebDefaults_ = 7;
|
||||
|
||||
void* context_ = nullptr;
|
||||
using Flags = facebook::yoga::
|
||||
Bitfield<uint8_t, bool, bool, bool, YGNodeType, bool, bool, bool, bool>;
|
||||
Flags flags_ =
|
||||
{true, false, false, YGNodeTypeDefault, false, false, false, false};
|
||||
uint8_t reserved_ = 0;
|
||||
union {
|
||||
YGMeasureFunc noContext;
|
||||
MeasureWithContextFn withContext;
|
||||
} measure_ = {nullptr};
|
||||
union {
|
||||
YGBaselineFunc noContext;
|
||||
BaselineWithContextFn withContext;
|
||||
} baseline_ = {nullptr};
|
||||
union {
|
||||
YGPrintFunc noContext;
|
||||
PrintWithContextFn withContext;
|
||||
} print_ = {nullptr};
|
||||
YGDirtiedFunc dirtied_ = nullptr;
|
||||
YGStyle style_ = {};
|
||||
YGLayout layout_ = {};
|
||||
uint32_t lineIndex_ = 0;
|
||||
YGNodeRef owner_ = nullptr;
|
||||
YGVector children_ = {};
|
||||
YGConfigRef config_;
|
||||
std::array<YGValue, 2> resolvedDimensions_ = {
|
||||
{YGValueUndefined, YGValueUndefined}};
|
||||
|
||||
YGFloatOptional __cdecl relativePosition(
|
||||
const YGFlexDirection axis,
|
||||
const float axisSize) const;
|
||||
|
||||
void __cdecl setMeasureFunc(decltype(measure_));
|
||||
void __cdecl setBaselineFunc(decltype(baseline_));
|
||||
|
||||
void __cdecl useWebDefaults() {
|
||||
flags_.at<useWebDefaults_>() = true;
|
||||
style_.flexDirection() = YGFlexDirectionRow;
|
||||
style_.alignContent() = YGAlignStretch;
|
||||
}
|
||||
|
||||
// DANGER DANGER DANGER!
|
||||
// If the the node assigned to has children, we'd either have to deallocate
|
||||
// them (potentially incorrect) or ignore them (danger of leaks). Only ever
|
||||
// use this after checking that there are no children.
|
||||
// DO NOT CHANGE THE VISIBILITY OF THIS METHOD!
|
||||
YGNode& operator=(YGNode&&) = default;
|
||||
|
||||
using CompactValue = facebook::yoga::detail::CompactValue;
|
||||
|
||||
public:
|
||||
YGNode() : YGNode{YGConfigGetDefault()} {}
|
||||
explicit YGNode(const YGConfigRef config) : config_{config} {
|
||||
if (config->useWebDefaults) {
|
||||
useWebDefaults();
|
||||
}
|
||||
};
|
||||
~YGNode() = default; // cleanup of owner/children relationships in YGNodeFree
|
||||
|
||||
YGNode(YGNode&&);
|
||||
|
||||
// Does not expose true value semantics, as children are not cloned eagerly.
|
||||
// Should we remove this?
|
||||
YGNode(const YGNode& node) = default;
|
||||
|
||||
// for RB fabric
|
||||
YGNode(const YGNode& node, YGConfigRef config);
|
||||
|
||||
// assignment means potential leaks of existing children, or alternatively
|
||||
// freeing unowned memory, double free, or freeing stack memory.
|
||||
YGNode& operator=(const YGNode&) = delete;
|
||||
|
||||
// Getters
|
||||
void* __cdecl getContext() const { return context_; }
|
||||
|
||||
uint8_t& __cdecl reserved() { return reserved_; }
|
||||
uint8_t __cdecl reserved() const { return reserved_; }
|
||||
|
||||
void __cdecl print(void*);
|
||||
|
||||
bool __cdecl getHasNewLayout() const { return flags_.at<hasNewLayout_>(); }
|
||||
|
||||
YGNodeType __cdecl getNodeType() const { return flags_.at<nodeType_>(); }
|
||||
|
||||
bool __cdecl hasMeasureFunc() const noexcept { return measure_.noContext != nullptr; }
|
||||
|
||||
YGSize __cdecl measure(float, YGMeasureMode, float, YGMeasureMode, void*);
|
||||
|
||||
bool __cdecl hasBaselineFunc() const noexcept {
|
||||
return baseline_.noContext != nullptr;
|
||||
}
|
||||
|
||||
float __cdecl baseline(float width, float height, void* layoutContext);
|
||||
|
||||
YGDirtiedFunc __cdecl getDirtied() const { return dirtied_; }
|
||||
|
||||
// For Performance reasons passing as reference.
|
||||
YGStyle& __cdecl getStyle() { return style_; }
|
||||
|
||||
const YGStyle& __cdecl getStyle() const { return style_; }
|
||||
|
||||
// For Performance reasons passing as reference.
|
||||
YGLayout& __cdecl getLayout() { return layout_; }
|
||||
|
||||
const YGLayout& __cdecl getLayout() const { return layout_; }
|
||||
|
||||
uint32_t __cdecl getLineIndex() const { return lineIndex_; }
|
||||
|
||||
bool __cdecl isReferenceBaseline() { return flags_.at<isReferenceBaseline_>(); }
|
||||
|
||||
// returns the YGNodeRef that owns this YGNode. An owner is used to identify
|
||||
// the YogaTree that a YGNode belongs to. This method will return the parent
|
||||
// of the YGNode when a YGNode only belongs to one YogaTree or nullptr when
|
||||
// the YGNode is shared between two or more YogaTrees.
|
||||
YGNodeRef __cdecl getOwner() const { return owner_; }
|
||||
|
||||
// Deprecated, use getOwner() instead.
|
||||
YGNodeRef __cdecl getParent() const { return getOwner(); }
|
||||
|
||||
const YGVector& __cdecl getChildren() const { return children_; }
|
||||
|
||||
// Applies a callback to all children, after cloning them if they are not
|
||||
// owned.
|
||||
template <typename T>
|
||||
void __cdecl iterChildrenAfterCloningIfNeeded(T callback, void* cloneContext) {
|
||||
int i = 0;
|
||||
for (YGNodeRef& child : children_) {
|
||||
if (child->getOwner() != this) {
|
||||
child = config_->cloneNode(child, this, i, cloneContext);
|
||||
child->setOwner(this);
|
||||
}
|
||||
i += 1;
|
||||
|
||||
callback(child, cloneContext);
|
||||
}
|
||||
}
|
||||
|
||||
YGNodeRef __cdecl getChild(uint32_t index) const { return children_.at(index); }
|
||||
|
||||
YGConfigRef __cdecl getConfig() const { return config_; }
|
||||
|
||||
bool __cdecl isDirty() const { return flags_.at<isDirty_>(); }
|
||||
|
||||
std::array<YGValue, 2> __cdecl getResolvedDimensions() const {
|
||||
return resolvedDimensions_;
|
||||
}
|
||||
|
||||
YGValue __cdecl getResolvedDimension(int index) const {
|
||||
return resolvedDimensions_[index];
|
||||
}
|
||||
|
||||
// Methods related to positions, margin, padding and border
|
||||
YGFloatOptional __cdecl getLeadingPosition(
|
||||
const YGFlexDirection axis,
|
||||
const float axisSize) const;
|
||||
bool __cdecl isLeadingPositionDefined(const YGFlexDirection axis) const;
|
||||
bool __cdecl isTrailingPosDefined(const YGFlexDirection axis) const;
|
||||
YGFloatOptional __cdecl getTrailingPosition(
|
||||
const YGFlexDirection axis,
|
||||
const float axisSize) const;
|
||||
YGFloatOptional __cdecl getLeadingMargin(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
YGFloatOptional __cdecl getTrailingMargin(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
float __cdecl getLeadingBorder(const YGFlexDirection flexDirection) const;
|
||||
float __cdecl getTrailingBorder(const YGFlexDirection flexDirection) const;
|
||||
YGFloatOptional __cdecl getLeadingPadding(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
YGFloatOptional __cdecl getTrailingPadding(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
YGFloatOptional __cdecl getLeadingPaddingAndBorder(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
YGFloatOptional __cdecl getTrailingPaddingAndBorder(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
YGFloatOptional __cdecl getMarginForAxis(
|
||||
const YGFlexDirection axis,
|
||||
const float widthSize) const;
|
||||
// Setters
|
||||
|
||||
void __cdecl setContext(void* context) { context_ = context; }
|
||||
|
||||
void __cdecl setPrintFunc(YGPrintFunc printFunc) {
|
||||
print_.noContext = printFunc;
|
||||
flags_.at<printUsesContext_>() = false;
|
||||
}
|
||||
void __cdecl setPrintFunc(PrintWithContextFn printFunc) {
|
||||
print_.withContext = printFunc;
|
||||
flags_.at<printUsesContext_>() = true;
|
||||
}
|
||||
void __cdecl setPrintFunc(std::nullptr_t) { setPrintFunc(YGPrintFunc{nullptr}); }
|
||||
|
||||
void __cdecl setHasNewLayout(bool hasNewLayout) {
|
||||
flags_.at<hasNewLayout_>() = hasNewLayout;
|
||||
}
|
||||
|
||||
void __cdecl setNodeType(YGNodeType nodeType) { flags_.at<nodeType_>() = nodeType; }
|
||||
|
||||
void __cdecl setMeasureFunc(YGMeasureFunc measureFunc);
|
||||
void __cdecl setMeasureFunc(MeasureWithContextFn);
|
||||
void __cdecl setMeasureFunc(std::nullptr_t) {
|
||||
return setMeasureFunc(YGMeasureFunc{nullptr});
|
||||
}
|
||||
|
||||
void __cdecl setBaselineFunc(YGBaselineFunc baseLineFunc) {
|
||||
flags_.at<baselineUsesContext_>() = false;
|
||||
baseline_.noContext = baseLineFunc;
|
||||
}
|
||||
void __cdecl setBaselineFunc(BaselineWithContextFn baseLineFunc) {
|
||||
flags_.at<baselineUsesContext_>() = true;
|
||||
baseline_.withContext = baseLineFunc;
|
||||
}
|
||||
void __cdecl setBaselineFunc(std::nullptr_t) {
|
||||
return setBaselineFunc(YGBaselineFunc{nullptr});
|
||||
}
|
||||
|
||||
void __cdecl setDirtiedFunc(YGDirtiedFunc dirtiedFunc) { dirtied_ = dirtiedFunc; }
|
||||
|
||||
void __cdecl setStyle(const YGStyle& style) { style_ = style; }
|
||||
|
||||
void __cdecl setLayout(const YGLayout& layout) { layout_ = layout; }
|
||||
|
||||
void __cdecl setLineIndex(uint32_t lineIndex) { lineIndex_ = lineIndex; }
|
||||
|
||||
void __cdecl setIsReferenceBaseline(bool isReferenceBaseline) {
|
||||
flags_.at<isReferenceBaseline_>() = isReferenceBaseline;
|
||||
}
|
||||
|
||||
void __cdecl setOwner(YGNodeRef owner) { owner_ = owner; }
|
||||
|
||||
void __cdecl setChildren(const YGVector& children) { children_ = children; }
|
||||
|
||||
// TODO: rvalue override for setChildren
|
||||
|
||||
YG_DEPRECATED void __cdecl setConfig(YGConfigRef config) { config_ = config; }
|
||||
|
||||
void __cdecl setDirty(bool isDirty);
|
||||
void __cdecl setLayoutLastOwnerDirection(YGDirection direction);
|
||||
void __cdecl setLayoutComputedFlexBasis(const YGFloatOptional computedFlexBasis);
|
||||
void __cdecl setLayoutComputedFlexBasisGeneration(
|
||||
uint32_t computedFlexBasisGeneration);
|
||||
void __cdecl setLayoutMeasuredDimension(float measuredDimension, int index);
|
||||
void __cdecl setLayoutHadOverflow(bool hadOverflow);
|
||||
void __cdecl setLayoutDimension(float dimension, int index);
|
||||
void __cdecl setLayoutDirection(YGDirection direction);
|
||||
void __cdecl setLayoutMargin(float margin, int index);
|
||||
void __cdecl setLayoutBorder(float border, int index);
|
||||
void __cdecl setLayoutPadding(float padding, int index);
|
||||
void __cdecl setLayoutPosition(float position, int index);
|
||||
void __cdecl setPosition(
|
||||
const YGDirection direction,
|
||||
const float mainSize,
|
||||
const float crossSize,
|
||||
const float ownerWidth);
|
||||
void __cdecl setLayoutDoesLegacyFlagAffectsLayout(bool doesLegacyFlagAffectsLayout);
|
||||
void __cdecl setLayoutDidUseLegacyFlag(bool didUseLegacyFlag);
|
||||
void __cdecl markDirtyAndPropogateDownwards();
|
||||
|
||||
// Other methods
|
||||
YGValue __cdecl marginLeadingValue(const YGFlexDirection axis) const;
|
||||
YGValue __cdecl marginTrailingValue(const YGFlexDirection axis) const;
|
||||
YGValue __cdecl resolveFlexBasisPtr() const;
|
||||
void __cdecl resolveDimension();
|
||||
YGDirection __cdecl resolveDirection(const YGDirection ownerDirection);
|
||||
void __cdecl clearChildren();
|
||||
/// Replaces the occurrences of oldChild with newChild
|
||||
void __cdecl replaceChild(YGNodeRef oldChild, YGNodeRef newChild);
|
||||
void __cdecl replaceChild(YGNodeRef child, uint32_t index);
|
||||
void __cdecl insertChild(YGNodeRef child, uint32_t index);
|
||||
/// Removes the first occurrence of child
|
||||
bool __cdecl removeChild(YGNodeRef child);
|
||||
void __cdecl removeChild(uint32_t index);
|
||||
|
||||
void __cdecl cloneChildrenIfNeeded(void*);
|
||||
void __cdecl markDirtyAndPropogate();
|
||||
float __cdecl resolveFlexGrow() const;
|
||||
float __cdecl resolveFlexShrink() const;
|
||||
bool __cdecl isNodeFlexible();
|
||||
bool __cdecl didUseLegacyFlag();
|
||||
bool __cdecl isLayoutTreeEqualToNode(const YGNode& node) const;
|
||||
void __cdecl reset();
|
||||
};
|
|
@ -1,224 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
#include "YGNodePrint.h"
|
||||
#include <stdarg.h>
|
||||
#include "YGEnums.h"
|
||||
#include "YGNode.h"
|
||||
#include "Yoga-internal.h"
|
||||
#include "Utils.h"
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
typedef std::string string;
|
||||
|
||||
static void indent(string& base, uint32_t level) {
|
||||
for (uint32_t i = 0; i < level; ++i) {
|
||||
base.append(" ");
|
||||
}
|
||||
}
|
||||
|
||||
static bool areFourValuesEqual(const YGStyle::Edges& four) {
|
||||
return YGValueEqual(four[0], four[1]) && YGValueEqual(four[0], four[2]) &&
|
||||
YGValueEqual(four[0], four[3]);
|
||||
}
|
||||
|
||||
static void appendFormatedString(string& str, const char* fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
va_list argsCopy;
|
||||
va_copy(argsCopy, args);
|
||||
std::vector<char> buf(1 + vsnprintf(NULL, 0, fmt, args));
|
||||
va_end(args);
|
||||
vsnprintf(buf.data(), buf.size(), fmt, argsCopy);
|
||||
va_end(argsCopy);
|
||||
string result = string(buf.begin(), buf.end() - 1);
|
||||
str.append(result);
|
||||
}
|
||||
|
||||
static void appendFloatOptionalIfDefined(
|
||||
string& base,
|
||||
const string key,
|
||||
const YGFloatOptional num) {
|
||||
if (!num.isUndefined()) {
|
||||
appendFormatedString(base, "%s: %g; ", key.c_str(), num.unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
static void appendNumberIfNotUndefined(
|
||||
string& base,
|
||||
const string key,
|
||||
const YGValue number) {
|
||||
if (number.unit != YGUnitUndefined) {
|
||||
if (number.unit == YGUnitAuto) {
|
||||
base.append(key + ": auto; ");
|
||||
} else {
|
||||
string unit = number.unit == YGUnitPoint ? "px" : "%%";
|
||||
appendFormatedString(
|
||||
base, "%s: %g%s; ", key.c_str(), number.value, unit.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void appendNumberIfNotAuto(
|
||||
string& base,
|
||||
const string& key,
|
||||
const YGValue number) {
|
||||
if (number.unit != YGUnitAuto) {
|
||||
appendNumberIfNotUndefined(base, key, number);
|
||||
}
|
||||
}
|
||||
|
||||
static void appendNumberIfNotZero(
|
||||
string& base,
|
||||
const string& str,
|
||||
const YGValue number) {
|
||||
if (number.unit == YGUnitAuto) {
|
||||
base.append(str + ": auto; ");
|
||||
} else if (!YGFloatsEqual(number.value, 0)) {
|
||||
appendNumberIfNotUndefined(base, str, number);
|
||||
}
|
||||
}
|
||||
|
||||
static void appendEdges(
|
||||
string& base,
|
||||
const string& key,
|
||||
const YGStyle::Edges& edges) {
|
||||
if (areFourValuesEqual(edges)) {
|
||||
appendNumberIfNotZero(base, key, edges[YGEdgeLeft]);
|
||||
} else {
|
||||
for (int edge = YGEdgeLeft; edge != YGEdgeAll; ++edge) {
|
||||
string str = key + "-" + YGEdgeToString(static_cast<YGEdge>(edge));
|
||||
appendNumberIfNotZero(base, str, edges[edge]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void appendEdgeIfNotUndefined(
|
||||
string& base,
|
||||
const string& str,
|
||||
const YGStyle::Edges& edges,
|
||||
const YGEdge edge) {
|
||||
appendNumberIfNotUndefined(
|
||||
base,
|
||||
str,
|
||||
YGComputedEdgeValue(edges, edge, detail::CompactValue::ofUndefined()));
|
||||
}
|
||||
|
||||
void __cdecl YGNodeToString(
|
||||
std::string& str,
|
||||
YGNodeRef node,
|
||||
YGPrintOptions options,
|
||||
uint32_t level) {
|
||||
indent(str, level);
|
||||
appendFormatedString(str, "<div ");
|
||||
|
||||
if (options & YGPrintOptionsLayout) {
|
||||
appendFormatedString(str, "layout=\"");
|
||||
appendFormatedString(
|
||||
str, "width: %g; ", node->getLayout().dimensions[YGDimensionWidth]);
|
||||
appendFormatedString(
|
||||
str, "height: %g; ", node->getLayout().dimensions[YGDimensionHeight]);
|
||||
appendFormatedString(
|
||||
str, "top: %g; ", node->getLayout().position[YGEdgeTop]);
|
||||
appendFormatedString(
|
||||
str, "left: %g;", node->getLayout().position[YGEdgeLeft]);
|
||||
appendFormatedString(str, "\" ");
|
||||
}
|
||||
|
||||
if (options & YGPrintOptionsStyle) {
|
||||
appendFormatedString(str, "style=\"");
|
||||
const auto& style = node->getStyle();
|
||||
if (style.flexDirection() != YGNode().getStyle().flexDirection()) {
|
||||
appendFormatedString(
|
||||
str,
|
||||
"flex-direction: %s; ",
|
||||
YGFlexDirectionToString(style.flexDirection()));
|
||||
}
|
||||
if (style.justifyContent() != YGNode().getStyle().justifyContent()) {
|
||||
appendFormatedString(
|
||||
str,
|
||||
"justify-content: %s; ",
|
||||
YGJustifyToString(style.justifyContent()));
|
||||
}
|
||||
if (style.alignItems() != YGNode().getStyle().alignItems()) {
|
||||
appendFormatedString(
|
||||
str, "align-items: %s; ", YGAlignToString(style.alignItems()));
|
||||
}
|
||||
if (style.alignContent() != YGNode().getStyle().alignContent()) {
|
||||
appendFormatedString(
|
||||
str, "align-content: %s; ", YGAlignToString(style.alignContent()));
|
||||
}
|
||||
if (style.alignSelf() != YGNode().getStyle().alignSelf()) {
|
||||
appendFormatedString(
|
||||
str, "align-self: %s; ", YGAlignToString(style.alignSelf()));
|
||||
}
|
||||
appendFloatOptionalIfDefined(str, "flex-grow", style.flexGrow());
|
||||
appendFloatOptionalIfDefined(str, "flex-shrink", style.flexShrink());
|
||||
appendNumberIfNotAuto(str, "flex-basis", style.flexBasis());
|
||||
appendFloatOptionalIfDefined(str, "flex", style.flex());
|
||||
|
||||
if (style.flexWrap() != YGNode().getStyle().flexWrap()) {
|
||||
appendFormatedString(
|
||||
str, "flex-wrap: %s; ", YGWrapToString(style.flexWrap()));
|
||||
}
|
||||
|
||||
if (style.overflow() != YGNode().getStyle().overflow()) {
|
||||
appendFormatedString(
|
||||
str, "overflow: %s; ", YGOverflowToString(style.overflow()));
|
||||
}
|
||||
|
||||
if (style.display() != YGNode().getStyle().display()) {
|
||||
appendFormatedString(
|
||||
str, "display: %s; ", YGDisplayToString(style.display()));
|
||||
}
|
||||
appendEdges(str, "margin", style.margin());
|
||||
appendEdges(str, "padding", style.padding());
|
||||
appendEdges(str, "border", style.border());
|
||||
|
||||
appendNumberIfNotAuto(str, "width", style.dimensions()[YGDimensionWidth]);
|
||||
appendNumberIfNotAuto(str, "height", style.dimensions()[YGDimensionHeight]);
|
||||
appendNumberIfNotAuto(
|
||||
str, "max-width", style.maxDimensions()[YGDimensionWidth]);
|
||||
appendNumberIfNotAuto(
|
||||
str, "max-height", style.maxDimensions()[YGDimensionHeight]);
|
||||
appendNumberIfNotAuto(
|
||||
str, "min-width", style.minDimensions()[YGDimensionWidth]);
|
||||
appendNumberIfNotAuto(
|
||||
str, "min-height", style.minDimensions()[YGDimensionHeight]);
|
||||
|
||||
if (style.positionType() != YGNode().getStyle().positionType()) {
|
||||
appendFormatedString(
|
||||
str, "position: %s; ", YGPositionTypeToString(style.positionType()));
|
||||
}
|
||||
|
||||
appendEdgeIfNotUndefined(str, "left", style.position(), YGEdgeLeft);
|
||||
appendEdgeIfNotUndefined(str, "right", style.position(), YGEdgeRight);
|
||||
appendEdgeIfNotUndefined(str, "top", style.position(), YGEdgeTop);
|
||||
appendEdgeIfNotUndefined(str, "bottom", style.position(), YGEdgeBottom);
|
||||
appendFormatedString(str, "\" ");
|
||||
|
||||
if (node->hasMeasureFunc()) {
|
||||
appendFormatedString(str, "has-custom-measure=\"true\"");
|
||||
}
|
||||
}
|
||||
appendFormatedString(str, ">");
|
||||
|
||||
const uint32_t childCount = static_cast<uint32_t>(node->getChildren().size());
|
||||
if (options & YGPrintOptionsChildren && childCount > 0) {
|
||||
for (uint32_t i = 0; i < childCount; i++) {
|
||||
appendFormatedString(str, "\n");
|
||||
YGNodeToString(str, YGNodeGetChild(node, i), options, level + 1);
|
||||
}
|
||||
appendFormatedString(str, "\n");
|
||||
indent(str, level);
|
||||
}
|
||||
appendFormatedString(str, "</div>");
|
||||
}
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
||||
#endif
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
#include "Yoga.h"
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
|
||||
void __cdecl YGNodeToString(
|
||||
std::string& str,
|
||||
YGNodeRef node,
|
||||
YGPrintOptions options,
|
||||
uint32_t level);
|
||||
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
||||
#endif
|
|
@ -1,150 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
#include <vector>
|
||||
#include "CompactValue.h"
|
||||
#include "Yoga.h"
|
||||
|
||||
using YGVector = std::vector<YGNodeRef>;
|
||||
|
||||
YG_EXTERN_C_BEGIN
|
||||
|
||||
void __cdecl YGNodeCalculateLayoutWithContext(
|
||||
YGNodeRef node,
|
||||
float availableWidth,
|
||||
float availableHeight,
|
||||
YGDirection ownerDirection,
|
||||
void* layoutContext);
|
||||
|
||||
YG_EXTERN_C_END
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
|
||||
inline bool __cdecl isUndefined(float value) {
|
||||
return std::isnan(value);
|
||||
}
|
||||
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
||||
|
||||
using namespace facebook;
|
||||
|
||||
extern const std::array<YGEdge, 4> trailing;
|
||||
extern const std::array<YGEdge, 4> leading;
|
||||
extern const YGValue YGValueUndefined;
|
||||
extern const YGValue YGValueAuto;
|
||||
extern const YGValue YGValueZero;
|
||||
|
||||
struct YGCachedMeasurement {
|
||||
float availableWidth;
|
||||
float availableHeight;
|
||||
YGMeasureMode widthMeasureMode;
|
||||
YGMeasureMode heightMeasureMode;
|
||||
|
||||
float computedWidth;
|
||||
float computedHeight;
|
||||
|
||||
YGCachedMeasurement()
|
||||
: availableWidth(0),
|
||||
availableHeight(0),
|
||||
widthMeasureMode((YGMeasureMode) -1),
|
||||
heightMeasureMode((YGMeasureMode) -1),
|
||||
computedWidth(-1),
|
||||
computedHeight(-1) {}
|
||||
|
||||
bool operator==(YGCachedMeasurement measurement) const {
|
||||
bool isEqual = widthMeasureMode == measurement.widthMeasureMode &&
|
||||
heightMeasureMode == measurement.heightMeasureMode;
|
||||
|
||||
if (!yoga::isUndefined(availableWidth) ||
|
||||
!yoga::isUndefined(measurement.availableWidth)) {
|
||||
isEqual = isEqual && availableWidth == measurement.availableWidth;
|
||||
}
|
||||
if (!yoga::isUndefined(availableHeight) ||
|
||||
!yoga::isUndefined(measurement.availableHeight)) {
|
||||
isEqual = isEqual && availableHeight == measurement.availableHeight;
|
||||
}
|
||||
if (!yoga::isUndefined(computedWidth) ||
|
||||
!yoga::isUndefined(measurement.computedWidth)) {
|
||||
isEqual = isEqual && computedWidth == measurement.computedWidth;
|
||||
}
|
||||
if (!yoga::isUndefined(computedHeight) ||
|
||||
!yoga::isUndefined(measurement.computedHeight)) {
|
||||
isEqual = isEqual && computedHeight == measurement.computedHeight;
|
||||
}
|
||||
|
||||
return isEqual;
|
||||
}
|
||||
};
|
||||
|
||||
// This value was chosen based on empirical data:
|
||||
// 98% of analyzed layouts require less than 8 entries.
|
||||
#define YG_MAX_CACHED_RESULT_COUNT 8
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
namespace detail {
|
||||
|
||||
template <size_t Size>
|
||||
class Values {
|
||||
private:
|
||||
std::array<CompactValue, Size> values_;
|
||||
|
||||
public:
|
||||
Values() = default;
|
||||
explicit Values(const YGValue& defaultValue) noexcept {
|
||||
values_.fill(defaultValue);
|
||||
}
|
||||
|
||||
const CompactValue& operator[](size_t i) const noexcept { return values_[i]; }
|
||||
CompactValue& operator[](size_t i) noexcept { return values_[i]; }
|
||||
|
||||
template <size_t I>
|
||||
YGValue __cdecl get() const noexcept {
|
||||
return std::get<I>(values_);
|
||||
}
|
||||
|
||||
template <size_t I>
|
||||
void __cdecl set(YGValue& value) noexcept {
|
||||
std::get<I>(values_) = value;
|
||||
}
|
||||
|
||||
template <size_t I>
|
||||
void __cdecl set(YGValue&& value) noexcept {
|
||||
set<I>(value);
|
||||
}
|
||||
|
||||
bool operator==(const Values& other) const noexcept {
|
||||
for (size_t i = 0; i < Size; ++i) {
|
||||
if (values_[i] != other.values_[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Values& operator=(const Values& other) = default;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
||||
|
||||
static const float kDefaultFlexGrow = 0.0f;
|
||||
static const float kDefaultFlexShrink = 0.0f;
|
||||
static const float kWebDefaultFlexShrink = 1.0f;
|
||||
|
||||
extern bool __cdecl YGFloatsEqual(const float a, const float b);
|
||||
extern facebook::yoga::detail::CompactValue __cdecl YGComputedEdgeValue(
|
||||
const facebook::yoga::detail::Values<
|
||||
facebook::yoga::enums::count<YGEdge>()>& edges,
|
||||
YGEdge edge,
|
||||
facebook::yoga::detail::CompactValue defaultValue);
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,368 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef __cplusplus
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#include "YGEnums.h"
|
||||
#include "YGMacros.h"
|
||||
#include "YGValue.h"
|
||||
|
||||
YG_EXTERN_C_BEGIN
|
||||
|
||||
typedef struct YGSize {
|
||||
float width;
|
||||
float height;
|
||||
} YGSize;
|
||||
|
||||
typedef struct YGConfig* YGConfigRef;
|
||||
|
||||
typedef struct YGNode* YGNodeRef;
|
||||
typedef const struct YGNode* YGNodeConstRef;
|
||||
|
||||
typedef YGSize (__cdecl *YGMeasureFunc)(
|
||||
YGNodeRef node,
|
||||
float width,
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGMeasureMode heightMode);
|
||||
typedef float (__cdecl *YGBaselineFunc)(YGNodeRef node, float width, float height);
|
||||
typedef void (__cdecl *YGDirtiedFunc)(YGNodeRef node);
|
||||
typedef void (__cdecl *YGPrintFunc)(YGNodeRef node);
|
||||
typedef void (__cdecl *YGNodeCleanupFunc)(YGNodeRef node);
|
||||
typedef int (__cdecl *YGLogger)(
|
||||
YGConfigRef config,
|
||||
YGNodeRef node,
|
||||
YGLogLevel level,
|
||||
const char* format,
|
||||
va_list args);
|
||||
typedef YGNodeRef (
|
||||
*YGCloneNodeFunc)(YGNodeRef oldNode, YGNodeRef owner, int childIndex);
|
||||
|
||||
// YGNode
|
||||
WIN_EXPORT YGNodeRef __cdecl YGNodeNew(void);
|
||||
WIN_EXPORT YGNodeRef __cdecl YGNodeNewWithConfig(YGConfigRef config);
|
||||
WIN_EXPORT YGNodeRef __cdecl YGNodeClone(YGNodeRef node);
|
||||
WIN_EXPORT void __cdecl YGNodeFree(YGNodeRef node);
|
||||
WIN_EXPORT void __cdecl YGNodeFreeRecursiveWithCleanupFunc(
|
||||
YGNodeRef node,
|
||||
YGNodeCleanupFunc cleanup);
|
||||
WIN_EXPORT void __cdecl YGNodeFreeRecursive(YGNodeRef node);
|
||||
WIN_EXPORT void __cdecl YGNodeReset(YGNodeRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeInsertChild(
|
||||
YGNodeRef node,
|
||||
YGNodeRef child,
|
||||
uint32_t index);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeRemoveChild(YGNodeRef node, YGNodeRef child);
|
||||
WIN_EXPORT void __cdecl YGNodeRemoveAllChildren(YGNodeRef node);
|
||||
WIN_EXPORT YGNodeRef __cdecl YGNodeGetChild(YGNodeRef node, uint32_t index);
|
||||
WIN_EXPORT YGNodeRef __cdecl YGNodeGetOwner(YGNodeRef node);
|
||||
WIN_EXPORT YGNodeRef __cdecl YGNodeGetParent(YGNodeRef node);
|
||||
WIN_EXPORT uint32_t __cdecl YGNodeGetChildCount(YGNodeRef node);
|
||||
WIN_EXPORT void __cdecl YGNodeSetChildren(
|
||||
YGNodeRef owner,
|
||||
const YGNodeRef children[],
|
||||
uint32_t count);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeSetIsReferenceBaseline(
|
||||
YGNodeRef node,
|
||||
bool isReferenceBaseline);
|
||||
|
||||
WIN_EXPORT bool __cdecl YGNodeIsReferenceBaseline(YGNodeRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeCalculateLayout(
|
||||
YGNodeRef node,
|
||||
float availableWidth,
|
||||
float availableHeight,
|
||||
YGDirection ownerDirection);
|
||||
|
||||
// Mark a node as dirty. Only valid for nodes with a custom measure function
|
||||
// set.
|
||||
//
|
||||
// Yoga knows when to mark all other nodes as dirty but because nodes with
|
||||
// measure functions depend on information not known to Yoga they must perform
|
||||
// this dirty marking manually.
|
||||
WIN_EXPORT void __cdecl YGNodeMarkDirty(YGNodeRef node);
|
||||
|
||||
// Marks the current node and all its descendants as dirty.
|
||||
//
|
||||
// Intended to be used for Uoga benchmarks. Don't use in production, as calling
|
||||
// `YGCalculateLayout` will cause the recalculation of each and every node.
|
||||
WIN_EXPORT void __cdecl YGNodeMarkDirtyAndPropogateToDescendants(YGNodeRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodePrint(YGNodeRef node, YGPrintOptions options);
|
||||
|
||||
WIN_EXPORT bool __cdecl YGFloatIsUndefined(float value);
|
||||
|
||||
WIN_EXPORT bool __cdecl YGNodeCanUseCachedMeasurement(
|
||||
YGMeasureMode widthMode,
|
||||
float width,
|
||||
YGMeasureMode heightMode,
|
||||
float height,
|
||||
YGMeasureMode lastWidthMode,
|
||||
float lastWidth,
|
||||
YGMeasureMode lastHeightMode,
|
||||
float lastHeight,
|
||||
float lastComputedWidth,
|
||||
float lastComputedHeight,
|
||||
float marginRow,
|
||||
float marginColumn,
|
||||
YGConfigRef config);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeCopyStyle(YGNodeRef dstNode, YGNodeRef srcNode);
|
||||
|
||||
WIN_EXPORT void* __cdecl YGNodeGetContext(YGNodeRef node);
|
||||
WIN_EXPORT void __cdecl YGNodeSetContext(YGNodeRef node, void* context);
|
||||
void __cdecl YGConfigSetPrintTreeFlag(YGConfigRef config, bool enabled);
|
||||
bool __cdecl YGNodeHasMeasureFunc(YGNodeRef node);
|
||||
WIN_EXPORT void __cdecl YGNodeSetMeasureFunc(YGNodeRef node, YGMeasureFunc measureFunc);
|
||||
bool __cdecl YGNodeHasBaselineFunc(YGNodeRef node);
|
||||
void __cdecl YGNodeSetBaselineFunc(YGNodeRef node, YGBaselineFunc baselineFunc);
|
||||
YGDirtiedFunc __cdecl YGNodeGetDirtiedFunc(YGNodeRef node);
|
||||
void __cdecl YGNodeSetDirtiedFunc(YGNodeRef node, YGDirtiedFunc dirtiedFunc);
|
||||
void __cdecl YGNodeSetPrintFunc(YGNodeRef node, YGPrintFunc printFunc);
|
||||
WIN_EXPORT bool __cdecl YGNodeGetHasNewLayout(YGNodeRef node);
|
||||
WIN_EXPORT void __cdecl YGNodeSetHasNewLayout(YGNodeRef node, bool hasNewLayout);
|
||||
YGNodeType __cdecl YGNodeGetNodeType(YGNodeRef node);
|
||||
void __cdecl YGNodeSetNodeType(YGNodeRef node, YGNodeType nodeType);
|
||||
WIN_EXPORT bool __cdecl YGNodeIsDirty(YGNodeRef node);
|
||||
bool __cdecl YGNodeLayoutGetDidUseLegacyFlag(YGNodeRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetDirection(YGNodeRef node, YGDirection direction);
|
||||
WIN_EXPORT YGDirection __cdecl YGNodeStyleGetDirection(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetFlexDirection(
|
||||
YGNodeRef node,
|
||||
YGFlexDirection flexDirection);
|
||||
WIN_EXPORT YGFlexDirection __cdecl YGNodeStyleGetFlexDirection(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetJustifyContent(
|
||||
YGNodeRef node,
|
||||
YGJustify justifyContent);
|
||||
WIN_EXPORT YGJustify __cdecl YGNodeStyleGetJustifyContent(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetAlignContent(
|
||||
YGNodeRef node,
|
||||
YGAlign alignContent);
|
||||
WIN_EXPORT YGAlign __cdecl YGNodeStyleGetAlignContent(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetAlignItems(YGNodeRef node, YGAlign alignItems);
|
||||
WIN_EXPORT YGAlign __cdecl YGNodeStyleGetAlignItems(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetAlignSelf(YGNodeRef node, YGAlign alignSelf);
|
||||
WIN_EXPORT YGAlign __cdecl YGNodeStyleGetAlignSelf(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetPositionType(
|
||||
YGNodeRef node,
|
||||
YGPositionType positionType);
|
||||
WIN_EXPORT YGPositionType __cdecl YGNodeStyleGetPositionType(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetFlexWrap(YGNodeRef node, YGWrap flexWrap);
|
||||
WIN_EXPORT YGWrap __cdecl YGNodeStyleGetFlexWrap(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetOverflow(YGNodeRef node, YGOverflow overflow);
|
||||
WIN_EXPORT YGOverflow __cdecl YGNodeStyleGetOverflow(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetDisplay(YGNodeRef node, YGDisplay display);
|
||||
WIN_EXPORT YGDisplay __cdecl YGNodeStyleGetDisplay(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetFlex(YGNodeRef node, float flex);
|
||||
WIN_EXPORT float __cdecl YGNodeStyleGetFlex(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetFlexGrow(YGNodeRef node, float flexGrow);
|
||||
WIN_EXPORT float __cdecl YGNodeStyleGetFlexGrow(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetFlexShrink(YGNodeRef node, float flexShrink);
|
||||
WIN_EXPORT float __cdecl YGNodeStyleGetFlexShrink(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetFlexBasis(YGNodeRef node, float flexBasis);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetFlexBasisPercent(YGNodeRef node, float flexBasis);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetFlexBasisAuto(YGNodeRef node);
|
||||
WIN_EXPORT YGValue __cdecl YGNodeStyleGetFlexBasis(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetPosition(
|
||||
YGNodeRef node,
|
||||
YGEdge edge,
|
||||
float position);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetPositionPercent(
|
||||
YGNodeRef node,
|
||||
YGEdge edge,
|
||||
float position);
|
||||
WIN_EXPORT YGValue __cdecl YGNodeStyleGetPosition(YGNodeConstRef node, YGEdge edge);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetMargin(YGNodeRef node, YGEdge edge, float margin);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetMarginPercent(
|
||||
YGNodeRef node,
|
||||
YGEdge edge,
|
||||
float margin);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetMarginAuto(YGNodeRef node, YGEdge edge);
|
||||
WIN_EXPORT YGValue __cdecl YGNodeStyleGetMargin(YGNodeConstRef node, YGEdge edge);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetPadding(
|
||||
YGNodeRef node,
|
||||
YGEdge edge,
|
||||
float padding);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetPaddingPercent(
|
||||
YGNodeRef node,
|
||||
YGEdge edge,
|
||||
float padding);
|
||||
WIN_EXPORT YGValue __cdecl YGNodeStyleGetPadding(YGNodeConstRef node, YGEdge edge);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetBorder(YGNodeRef node, YGEdge edge, float border);
|
||||
WIN_EXPORT float __cdecl YGNodeStyleGetBorder(YGNodeConstRef node, YGEdge edge);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetWidth(YGNodeRef node, float width);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetWidthPercent(YGNodeRef node, float width);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetWidthAuto(YGNodeRef node);
|
||||
WIN_EXPORT YGValue __cdecl YGNodeStyleGetWidth(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetHeight(YGNodeRef node, float height);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetHeightPercent(YGNodeRef node, float height);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetHeightAuto(YGNodeRef node);
|
||||
WIN_EXPORT YGValue __cdecl YGNodeStyleGetHeight(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetMinWidth(YGNodeRef node, float minWidth);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetMinWidthPercent(YGNodeRef node, float minWidth);
|
||||
WIN_EXPORT YGValue __cdecl YGNodeStyleGetMinWidth(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetMinHeight(YGNodeRef node, float minHeight);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetMinHeightPercent(YGNodeRef node, float minHeight);
|
||||
WIN_EXPORT YGValue __cdecl YGNodeStyleGetMinHeight(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetMaxWidth(YGNodeRef node, float maxWidth);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetMaxWidthPercent(YGNodeRef node, float maxWidth);
|
||||
WIN_EXPORT YGValue __cdecl YGNodeStyleGetMaxWidth(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetMaxHeight(YGNodeRef node, float maxHeight);
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetMaxHeightPercent(YGNodeRef node, float maxHeight);
|
||||
WIN_EXPORT YGValue __cdecl YGNodeStyleGetMaxHeight(YGNodeConstRef node);
|
||||
|
||||
// Yoga specific properties, not compatible with flexbox specification Aspect
|
||||
// ratio control the size of the undefined dimension of a node. Aspect ratio is
|
||||
// encoded as a floating point value width/height. e.g. A value of 2 leads to a
|
||||
// node with a width twice the size of its height while a value of 0.5 gives the
|
||||
// opposite effect.
|
||||
//
|
||||
// - On a node with a set width/height aspect ratio control the size of the
|
||||
// unset dimension
|
||||
// - On a node with a set flex basis aspect ratio controls the size of the node
|
||||
// in the cross axis if unset
|
||||
// - On a node with a measure function aspect ratio works as though the measure
|
||||
// function measures the flex basis
|
||||
// - On a node with flex grow/shrink aspect ratio controls the size of the node
|
||||
// in the cross axis if unset
|
||||
// - Aspect ratio takes min/max dimensions into account
|
||||
WIN_EXPORT void __cdecl YGNodeStyleSetAspectRatio(YGNodeRef node, float aspectRatio);
|
||||
WIN_EXPORT float __cdecl YGNodeStyleGetAspectRatio(YGNodeConstRef node);
|
||||
|
||||
WIN_EXPORT float __cdecl YGNodeLayoutGetLeft(YGNodeRef node);
|
||||
WIN_EXPORT float __cdecl YGNodeLayoutGetTop(YGNodeRef node);
|
||||
WIN_EXPORT float __cdecl YGNodeLayoutGetRight(YGNodeRef node);
|
||||
WIN_EXPORT float __cdecl YGNodeLayoutGetBottom(YGNodeRef node);
|
||||
WIN_EXPORT float __cdecl YGNodeLayoutGetWidth(YGNodeRef node);
|
||||
WIN_EXPORT float __cdecl YGNodeLayoutGetHeight(YGNodeRef node);
|
||||
WIN_EXPORT YGDirection __cdecl YGNodeLayoutGetDirection(YGNodeRef node);
|
||||
WIN_EXPORT bool __cdecl YGNodeLayoutGetHadOverflow(YGNodeRef node);
|
||||
bool __cdecl YGNodeLayoutGetDidLegacyStretchFlagAffectLayout(YGNodeRef node);
|
||||
|
||||
// Get the computed values for these nodes after performing layout. If they were
|
||||
// set using point values then the returned value will be the same as
|
||||
// YGNodeStyleGetXXX. However if they were set using a percentage value then the
|
||||
// returned value is the computed value used during layout.
|
||||
WIN_EXPORT float __cdecl YGNodeLayoutGetMargin(YGNodeRef node, YGEdge edge);
|
||||
WIN_EXPORT float __cdecl YGNodeLayoutGetBorder(YGNodeRef node, YGEdge edge);
|
||||
WIN_EXPORT float __cdecl YGNodeLayoutGetPadding(YGNodeRef node, YGEdge edge);
|
||||
|
||||
WIN_EXPORT void __cdecl YGConfigSetLogger(YGConfigRef config, YGLogger logger);
|
||||
WIN_EXPORT void __cdecl YGAssert(bool condition, const char* message);
|
||||
WIN_EXPORT void __cdecl YGAssertWithNode(
|
||||
YGNodeRef node,
|
||||
bool condition,
|
||||
const char* message);
|
||||
WIN_EXPORT void __cdecl YGAssertWithConfig(
|
||||
YGConfigRef config,
|
||||
bool condition,
|
||||
const char* message);
|
||||
// Set this to number of pixels in 1 point to round calculation results If you
|
||||
// want to avoid rounding - set PointScaleFactor to 0
|
||||
WIN_EXPORT void __cdecl YGConfigSetPointScaleFactor(
|
||||
YGConfigRef config,
|
||||
float pixelsInPoint);
|
||||
void __cdecl YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour(
|
||||
YGConfigRef config,
|
||||
bool shouldDiffLayout);
|
||||
|
||||
// Yoga previously had an error where containers would take the maximum space
|
||||
// possible instead of the minimum like they are supposed to. In practice this
|
||||
// resulted in implicit behaviour similar to align-self: stretch; Because this
|
||||
// was such a long-standing bug we must allow legacy users to switch back to
|
||||
// this behaviour.
|
||||
WIN_EXPORT void __cdecl YGConfigSetUseLegacyStretchBehaviour(
|
||||
YGConfigRef config,
|
||||
bool useLegacyStretchBehaviour);
|
||||
|
||||
// YGConfig
|
||||
WIN_EXPORT YGConfigRef __cdecl YGConfigNew(void);
|
||||
WIN_EXPORT void __cdecl YGConfigFree(YGConfigRef config);
|
||||
WIN_EXPORT void __cdecl YGConfigCopy(YGConfigRef dest, YGConfigRef src);
|
||||
WIN_EXPORT int32_t __cdecl YGConfigGetInstanceCount(void);
|
||||
|
||||
WIN_EXPORT void __cdecl YGConfigSetExperimentalFeatureEnabled(
|
||||
YGConfigRef config,
|
||||
YGExperimentalFeature feature,
|
||||
bool enabled);
|
||||
WIN_EXPORT bool __cdecl YGConfigIsExperimentalFeatureEnabled(
|
||||
YGConfigRef config,
|
||||
YGExperimentalFeature feature);
|
||||
|
||||
// Using the web defaults is the preferred configuration for new projects. Usage
|
||||
// of non web defaults should be considered as legacy.
|
||||
WIN_EXPORT void __cdecl YGConfigSetUseWebDefaults(YGConfigRef config, bool enabled);
|
||||
WIN_EXPORT bool __cdecl YGConfigGetUseWebDefaults(YGConfigRef config);
|
||||
|
||||
WIN_EXPORT void __cdecl YGConfigSetCloneNodeFunc(
|
||||
YGConfigRef config,
|
||||
YGCloneNodeFunc callback);
|
||||
|
||||
// Export only for C#
|
||||
WIN_EXPORT YGConfigRef __cdecl YGConfigGetDefault(void);
|
||||
|
||||
WIN_EXPORT void __cdecl YGConfigSetContext(YGConfigRef config, void* context);
|
||||
WIN_EXPORT void* __cdecl YGConfigGetContext(YGConfigRef config);
|
||||
|
||||
WIN_EXPORT float __cdecl YGRoundValueToPixelGrid(
|
||||
float value,
|
||||
float pointScaleFactor,
|
||||
bool forceCeil,
|
||||
bool forceFloor);
|
||||
|
||||
YG_EXTERN_C_END
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
// Calls f on each node in the tree including the given node argument.
|
||||
void __cdecl YGTraversePreOrder(
|
||||
YGNodeRef node,
|
||||
std::function<void(YGNodeRef node)>&& f);
|
||||
|
||||
void __cdecl YGNodeSetChildren(YGNodeRef owner, const std::vector<YGNodeRef>& children);
|
||||
|
||||
#endif
|
|
@ -1,86 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#include "event.h"
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
|
||||
const char* __cdecl LayoutPassReasonToString(const LayoutPassReason value) {
|
||||
switch (value) {
|
||||
case LayoutPassReason::kInitial:
|
||||
return "initial";
|
||||
case LayoutPassReason::kAbsLayout:
|
||||
return "abs_layout";
|
||||
case LayoutPassReason::kStretch:
|
||||
return "stretch";
|
||||
case LayoutPassReason::kMultilineStretch:
|
||||
return "multiline_stretch";
|
||||
case LayoutPassReason::kFlexLayout:
|
||||
return "flex_layout";
|
||||
case LayoutPassReason::kMeasureChild:
|
||||
return "measure";
|
||||
case LayoutPassReason::kAbsMeasureChild:
|
||||
return "abs_measure";
|
||||
case LayoutPassReason::kFlexMeasure:
|
||||
return "flex_measure";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
struct Node {
|
||||
std::function<Event::Subscriber> subscriber = nullptr;
|
||||
Node* next = nullptr;
|
||||
|
||||
Node(std::function<Event::Subscriber>&& subscriber)
|
||||
: subscriber{std::move(subscriber)} {}
|
||||
};
|
||||
|
||||
std::atomic<Node*> subscribers{nullptr};
|
||||
|
||||
Node* push(Node* newHead) {
|
||||
Node* oldHead;
|
||||
do {
|
||||
oldHead = subscribers.load(std::memory_order_relaxed);
|
||||
if (newHead != nullptr) {
|
||||
newHead->next = oldHead;
|
||||
}
|
||||
} while (!subscribers.compare_exchange_weak(
|
||||
oldHead, newHead, std::memory_order_release, std::memory_order_relaxed));
|
||||
return oldHead;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void Event::reset() {
|
||||
auto head = push(nullptr);
|
||||
while (head != nullptr) {
|
||||
auto current = head;
|
||||
head = head->next;
|
||||
delete current;
|
||||
}
|
||||
}
|
||||
|
||||
void Event::subscribe(std::function<Subscriber>&& subscriber) {
|
||||
push(new Node{std::move(subscriber)});
|
||||
}
|
||||
|
||||
void Event::publish(const YGNode& node, Type eventType, const Data& eventData) {
|
||||
for (auto subscriber = subscribers.load(std::memory_order_relaxed);
|
||||
subscriber != nullptr;
|
||||
subscriber = subscriber->next) {
|
||||
subscriber->subscriber(node, eventType, eventData);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
|
@ -1,144 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <array>
|
||||
#include <yoga/YGEnums.h>
|
||||
|
||||
struct YGConfig;
|
||||
struct YGNode;
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
|
||||
enum struct LayoutType : int {
|
||||
kLayout = 0,
|
||||
kMeasure = 1,
|
||||
kCachedLayout = 2,
|
||||
kCachedMeasure = 3
|
||||
};
|
||||
|
||||
enum struct LayoutPassReason : int {
|
||||
kInitial = 0,
|
||||
kAbsLayout = 1,
|
||||
kStretch = 2,
|
||||
kMultilineStretch = 3,
|
||||
kFlexLayout = 4,
|
||||
kMeasureChild = 5,
|
||||
kAbsMeasureChild = 6,
|
||||
kFlexMeasure = 7,
|
||||
COUNT
|
||||
};
|
||||
|
||||
struct LayoutData {
|
||||
int layouts;
|
||||
int measures;
|
||||
int maxMeasureCache;
|
||||
int cachedLayouts;
|
||||
int cachedMeasures;
|
||||
int measureCallbacks;
|
||||
std::array<int, static_cast<uint8_t>(LayoutPassReason::COUNT)>
|
||||
measureCallbackReasonsCount;
|
||||
};
|
||||
|
||||
const char* __cdecl LayoutPassReasonToString(const LayoutPassReason value);
|
||||
|
||||
struct Event {
|
||||
enum Type {
|
||||
NodeAllocation,
|
||||
NodeDeallocation,
|
||||
NodeLayout,
|
||||
LayoutPassStart,
|
||||
LayoutPassEnd,
|
||||
MeasureCallbackStart,
|
||||
MeasureCallbackEnd,
|
||||
NodeBaselineStart,
|
||||
NodeBaselineEnd,
|
||||
};
|
||||
class Data;
|
||||
using Subscriber = void(const YGNode&, Type, Data);
|
||||
using Subscribers = std::vector<std::function<Subscriber>>;
|
||||
|
||||
template <Type E>
|
||||
struct TypedData {};
|
||||
|
||||
class Data {
|
||||
const void* data_;
|
||||
|
||||
public:
|
||||
template <Type E>
|
||||
Data(const TypedData<E>& data) : data_{&data} {}
|
||||
|
||||
template <Type E>
|
||||
const TypedData<E>& get() const {
|
||||
return *static_cast<const TypedData<E>*>(data_);
|
||||
};
|
||||
};
|
||||
|
||||
static void __cdecl reset();
|
||||
|
||||
static void __cdecl subscribe(std::function<Subscriber>&& subscriber);
|
||||
|
||||
template <Type E>
|
||||
static void __cdecl publish(const YGNode& node, const TypedData<E>& eventData = {}) {
|
||||
#ifdef YG_ENABLE_EVENTS
|
||||
publish(node, E, Data{eventData});
|
||||
#endif
|
||||
}
|
||||
|
||||
template <Type E>
|
||||
static void __cdecl publish(const YGNode* node, const TypedData<E>& eventData = {}) {
|
||||
publish<E>(*node, eventData);
|
||||
}
|
||||
|
||||
private:
|
||||
static void __cdecl publish(const YGNode&, Type, const Data&);
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Event::TypedData<Event::NodeAllocation> {
|
||||
YGConfig* config;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Event::TypedData<Event::NodeDeallocation> {
|
||||
YGConfig* config;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Event::TypedData<Event::LayoutPassStart> {
|
||||
void* layoutContext;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Event::TypedData<Event::LayoutPassEnd> {
|
||||
void* layoutContext;
|
||||
LayoutData* layoutData;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Event::TypedData<Event::MeasureCallbackEnd> {
|
||||
void* layoutContext;
|
||||
float width;
|
||||
YGMeasureMode widthMeasureMode;
|
||||
float height;
|
||||
YGMeasureMode heightMeasureMode;
|
||||
float measuredWidth;
|
||||
float measuredHeight;
|
||||
const LayoutPassReason reason;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct Event::TypedData<Event::NodeLayout> {
|
||||
LayoutType layoutType;
|
||||
void* layoutContext;
|
||||
};
|
||||
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "experiments.h"
|
||||
|
||||
#include <bitset>
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
namespace internal {
|
||||
|
||||
namespace detail {
|
||||
extern std::bitset<sizeof(int)> enabledExperiments;
|
||||
} // namespace detail
|
||||
|
||||
inline bool __cdecl isEnabled(Experiment experiment) {
|
||||
return detail::enabledExperiments.test(static_cast<size_t>(experiment));
|
||||
}
|
||||
|
||||
inline void __cdecl disableAllExperiments() {
|
||||
detail::enabledExperiments = 0;
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
namespace internal {
|
||||
|
||||
enum struct Experiment : size_t {
|
||||
kDoubleMeasureCallbacks,
|
||||
};
|
||||
|
||||
void __cdecl enable(Experiment);
|
||||
void __cdecl disable(Experiment);
|
||||
bool __cdecl toggle(Experiment);
|
||||
|
||||
} // namespace internal
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "YGEnums.h"
|
||||
|
||||
struct YGNode;
|
||||
struct YGConfig;
|
||||
|
||||
namespace facebook {
|
||||
namespace yoga {
|
||||
|
||||
namespace detail {
|
||||
|
||||
struct Log {
|
||||
static void __cdecl log(
|
||||
YGNode* node,
|
||||
YGLogLevel level,
|
||||
void*,
|
||||
const char* message,
|
||||
...) noexcept;
|
||||
|
||||
static void __cdecl log(
|
||||
YGConfig* config,
|
||||
YGLogLevel level,
|
||||
void*,
|
||||
const char* format,
|
||||
...) noexcept;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace yoga
|
||||
} // namespace facebook
|
|
@ -129,7 +129,7 @@
|
|||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets" Condition="Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets" Condition="Exists('$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets')" />
|
||||
|
@ -138,7 +138,7 @@
|
|||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets'))" />
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
<package id="boost" version="1.68.0.0" targetFramework="native" />
|
||||
<package id="ChakraCore.Debugger" version="0.0.0.42" targetFramework="native" />
|
||||
<package id="Microsoft.ChakraCore.vc140" version="1.11.13" targetFramework="native" developmentDependency="true" />
|
||||
<package id="ReactWindows.OpenSSL.v141.Static" version="1.1.1-d.1" targetFramework="native" />
|
||||
<package id="ReactWindows.OpenSSL.StdCall.Static" version="1.0.2-p.2" targetFramework="native" />
|
||||
</packages>
|
|
@ -5,8 +5,8 @@
|
|||
; **************************************************************************************************
|
||||
|
||||
EXPORTS
|
||||
??$str_to_floating@N@detail@folly@@YA?AV?$Expected@NW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??$str_to_integral@_J@detail@folly@@YA?AV?$Expected@_JW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??$str_to_floating@N@detail@folly@@YG?AV?$Expected@NW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??$str_to_integral@_J@detail@folly@@YG?AV?$Expected@_JW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??0ColdClass@cold_detail@folly@@QAE@XZ
|
||||
??0LayoutAnimation@react@facebook@@QAE@Udynamic@folly@@@Z
|
||||
??0TypeError@folly@@QAE@$$QAU01@@Z
|
||||
|
@ -19,21 +19,21 @@ EXPORTS
|
|||
??4dynamic@folly@@QAEAAU01@ABU01@@Z
|
||||
??8dynamic@folly@@QBE_NABU01@@Z
|
||||
??Adynamic@folly@@QGAEAAU01@V?$Range@PBD@1@@Z
|
||||
?CreateMemoryTracker@react@facebook@@YA?AV?$shared_ptr@VMemoryTracker@react@facebook@@@std@@$$QAV?$shared_ptr@VMessageQueueThread@react@facebook@@@4@@Z
|
||||
?CreateReactInstance@react@facebook@@YA?AV?$shared_ptr@UInstanceWrapper@react@facebook@@@std@@$$QAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@$$QAV?$vector@V?$tuple@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$function@$$A6A?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@XZ@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@std@@V?$allocator@V?$tuple@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$function@$$A6A?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@XZ@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@std@@@2@@4@V?$shared_ptr@VIUIManager@react@facebook@@@4@V?$shared_ptr@VMessageQueueThread@react@facebook@@@4@3V?$shared_ptr@UDevSettings@react@facebook@@@4@@Z
|
||||
?CreateMemoryTracker@react@facebook@@YG?AV?$shared_ptr@VMemoryTracker@react@facebook@@@std@@$$QAV?$shared_ptr@VMessageQueueThread@react@facebook@@@4@@Z
|
||||
?CreateReactInstance@react@facebook@@YG?AV?$shared_ptr@UInstanceWrapper@react@facebook@@@std@@$$QAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@$$QAV?$vector@V?$tuple@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$function@$$A6G?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@XZ@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@std@@V?$allocator@V?$tuple@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$function@$$A6G?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@XZ@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@std@@@2@@4@V?$shared_ptr@VIUIManager@react@facebook@@@4@V?$shared_ptr@VMessageQueueThread@react@facebook@@@4@3V?$shared_ptr@UDevSettings@react@facebook@@@4@@Z
|
||||
?GetConstants@ViewManagerBase@react@facebook@@UBE?AUdynamic@folly@@XZ
|
||||
?InitializeLogging@react@facebook@@YAX$$QAV?$function@$$A6AXW4RCTLogLevel@react@facebook@@PBD@Z@std@@@Z
|
||||
?InitializeTracing@react@facebook@@YAXPAUINativeTraceHandler@12@@Z
|
||||
?Make@IWebSocket@React@Microsoft@@SA?AV?$unique_ptr@UIWebSocket@React@Microsoft@@U?$default_delete@UIWebSocket@React@Microsoft@@@std@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@5@@Z
|
||||
?Make@JSBigAbiString@react@facebook@@SA?AV?$unique_ptr@$$CBUJSBigAbiString@react@facebook@@U?$default_delete@$$CBUJSBigAbiString@react@facebook@@@std@@@std@@$$QAV?$unique_ptr@U?$IAbiArray@D@AbiSafe@@UAbiObjectDeleter@2@@5@@Z
|
||||
?MakeMemoryMappedBuffer@JSI@Microsoft@@YA?AV?$shared_ptr@VBuffer@jsi@facebook@@@std@@QB_WI@Z
|
||||
?InitializeLogging@react@facebook@@YGX$$QAV?$function@$$A6GXW4RCTLogLevel@react@facebook@@PBD@Z@std@@@Z
|
||||
?InitializeTracing@react@facebook@@YGXPAUINativeTraceHandler@12@@Z
|
||||
?Make@IWebSocket@React@Microsoft@@SG?AV?$unique_ptr@UIWebSocket@React@Microsoft@@U?$default_delete@UIWebSocket@React@Microsoft@@@std@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@5@@Z
|
||||
?Make@JSBigAbiString@react@facebook@@SG?AV?$unique_ptr@$$CBUJSBigAbiString@react@facebook@@U?$default_delete@$$CBUJSBigAbiString@react@facebook@@@std@@@std@@$$QAV?$unique_ptr@U?$IAbiArray@D@AbiSafe@@UAbiObjectDeleter@2@@5@@Z
|
||||
?MakeMemoryMappedBuffer@JSI@Microsoft@@YG?AV?$shared_ptr@VBuffer@jsi@facebook@@@std@@QB_WI@Z
|
||||
?moduleNames@ModuleRegistry@react@facebook@@QAE?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@XZ
|
||||
?at@dynamic@folly@@QGBEABU12@V?$Range@PBD@2@@Z
|
||||
?atImpl@dynamic@folly@@AGBEABU12@ABU12@@Z
|
||||
?callJSFunction@Instance@react@facebook@@QAEX$$QAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0$$QAUdynamic@folly@@@Z
|
||||
?createI18nModule@windows@react@@YA?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@V?$unique_ptr@UII18nModule@windows@react@@U?$default_delete@UII18nModule@windows@react@@@std@@@4@@Z
|
||||
?createIUIManager@react@facebook@@YA?AV?$shared_ptr@VIUIManager@react@facebook@@@std@@$$QAV?$vector@V?$unique_ptr@VIViewManager@react@facebook@@U?$default_delete@VIViewManager@react@facebook@@@std@@@std@@V?$allocator@V?$unique_ptr@VIViewManager@react@facebook@@U?$default_delete@VIViewManager@react@facebook@@@std@@@std@@@2@@4@PAUINativeUIManager@12@@Z
|
||||
?createUIManagerModule@react@facebook@@YA?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@V?$shared_ptr@VIUIManager@react@facebook@@@4@@Z
|
||||
?createI18nModule@windows@react@@YG?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@V?$unique_ptr@UII18nModule@windows@react@@U?$default_delete@UII18nModule@windows@react@@@std@@@4@@Z
|
||||
?createIUIManager@react@facebook@@YG?AV?$shared_ptr@VIUIManager@react@facebook@@@std@@$$QAV?$vector@V?$unique_ptr@VIViewManager@react@facebook@@U?$default_delete@VIViewManager@react@facebook@@@std@@@std@@V?$allocator@V?$unique_ptr@VIViewManager@react@facebook@@U?$default_delete@VIViewManager@react@facebook@@@std@@@std@@@2@@4@PAUINativeUIManager@12@@Z
|
||||
?createUIManagerModule@react@facebook@@YG?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@V?$shared_ptr@VIUIManager@react@facebook@@@4@@Z
|
||||
?destroy@dynamic@folly@@AAEXXZ
|
||||
?dispatchCommand@ShadowNode@react@facebook@@UAEX_JABUdynamic@folly@@@Z
|
||||
?getModuleRegistry@Instance@react@facebook@@QAEAAVModuleRegistry@23@XZ
|
||||
|
@ -42,148 +42,148 @@ EXPORTS
|
|||
?get_ptrImpl@dynamic@folly@@AGBEPBU12@ABU12@@Z
|
||||
?hash@dynamic@folly@@QBEIXZ
|
||||
?loadScriptFromString@Instance@react@facebook@@QAEXV?$unique_ptr@$$CBVJSBigString@react@facebook@@U?$default_delete@$$CBVJSBigString@react@facebook@@@std@@@std@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@5@_N@Z
|
||||
?makeConversionError@folly@@YA?AVConversionError@1@W4ConversionCode@1@V?$Range@PBD@1@@Z
|
||||
?parseJson@folly@@YA?AUdynamic@1@V?$Range@PBD@1@@Z
|
||||
?makeConversionError@folly@@YG?AVConversionError@1@W4ConversionCode@1@V?$Range@PBD@1@@Z
|
||||
?parseJson@folly@@YG?AUdynamic@1@V?$Range@PBD@1@@Z
|
||||
?setGlobalVariable@Instance@react@facebook@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$unique_ptr@$$CBVJSBigString@react@facebook@@U?$default_delete@$$CBVJSBigString@react@facebook@@@std@@@5@@Z
|
||||
?size@dynamic@folly@@QBEIXZ
|
||||
?str_to_bool@detail@folly@@YA?AV?$Expected@_NW4ConversionCode@folly@@@2@PAV?$Range@PBD@2@@Z
|
||||
?toJson@folly@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABUdynamic@1@@Z
|
||||
?str_to_bool@detail@folly@@YG?AV?$Expected@_NW4ConversionCode@folly@@@2@PAV?$Range@PBD@2@@Z
|
||||
?toJson@folly@@YG?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABUdynamic@1@@Z
|
||||
?typeName@dynamic@folly@@QBEPBDXZ
|
||||
?updateProperties@ShadowNode@react@facebook@@UAEX$$QBUdynamic@folly@@@Z
|
||||
?Utf16ToUtf8@Unicode@Common@Microsoft@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@5@@Z
|
||||
?Utf16ToUtf8@Unicode@Common@Microsoft@@YG?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@5@@Z
|
||||
|
||||
YGAlignToString
|
||||
YGAssert
|
||||
YGAssertWithConfig
|
||||
YGAssertWithNode
|
||||
YGConfigCopy
|
||||
YGConfigFree
|
||||
YGConfigGetContext
|
||||
YGConfigGetDefault
|
||||
YGConfigGetInstanceCount
|
||||
YGConfigGetUseWebDefaults
|
||||
YGConfigIsExperimentalFeatureEnabled
|
||||
YGConfigNew
|
||||
YGConfigSetContext
|
||||
YGConfigSetExperimentalFeatureEnabled
|
||||
YGConfigSetLogger
|
||||
YGConfigSetPointScaleFactor
|
||||
YGConfigSetUseLegacyStretchBehaviour
|
||||
YGConfigSetUseWebDefaults
|
||||
YGDimensionToString
|
||||
YGDirectionToString
|
||||
YGDisplayToString
|
||||
YGEdgeToString
|
||||
YGExperimentalFeatureToString
|
||||
YGFlexDirectionToString
|
||||
YGFloatIsUndefined
|
||||
YGJustifyToString
|
||||
YGLogLevelToString
|
||||
YGMeasureModeToString
|
||||
YGNodeCalculateLayout
|
||||
YGNodeCanUseCachedMeasurement
|
||||
YGNodeCopyStyle
|
||||
YGNodeFree
|
||||
YGNodeFreeRecursive
|
||||
YGNodeGetChild
|
||||
YGNodeGetChildCount
|
||||
YGNodeGetContext
|
||||
YGNodeGetHasNewLayout
|
||||
YGNodeGetNodeType
|
||||
YGNodeGetParent
|
||||
YGNodeInsertChild
|
||||
YGNodeIsDirty
|
||||
YGNodeLayoutGetBorder
|
||||
YGNodeLayoutGetBottom
|
||||
YGNodeLayoutGetDirection
|
||||
YGNodeLayoutGetHeight
|
||||
YGNodeLayoutGetLeft
|
||||
YGNodeLayoutGetMargin
|
||||
YGNodeLayoutGetPadding
|
||||
YGNodeLayoutGetRight
|
||||
YGNodeLayoutGetTop
|
||||
YGNodeLayoutGetWidth
|
||||
YGNodeMarkDirty
|
||||
YGNodeNew
|
||||
YGNodeNewWithConfig
|
||||
YGNodeRemoveChild
|
||||
YGNodeReset
|
||||
YGNodeSetBaselineFunc
|
||||
YGNodeSetContext
|
||||
YGNodeSetHasNewLayout
|
||||
YGNodeSetMeasureFunc
|
||||
YGNodeSetNodeType
|
||||
YGNodeSetPrintFunc
|
||||
YGNodeStyleGetAlignContent
|
||||
YGNodeStyleGetAlignItems
|
||||
YGNodeStyleGetAlignSelf
|
||||
YGNodeStyleGetAspectRatio
|
||||
YGNodeStyleGetBorder
|
||||
YGNodeStyleGetDirection
|
||||
YGNodeStyleGetDisplay
|
||||
YGNodeStyleGetFlex
|
||||
YGNodeStyleGetFlexBasis
|
||||
YGNodeStyleGetFlexDirection
|
||||
YGNodeStyleGetFlexGrow
|
||||
YGNodeStyleGetFlexShrink
|
||||
YGNodeStyleGetFlexWrap
|
||||
YGNodeStyleGetHeight
|
||||
YGNodeStyleGetJustifyContent
|
||||
YGNodeStyleGetMargin
|
||||
YGNodeStyleGetMaxHeight
|
||||
YGNodeStyleGetMaxWidth
|
||||
YGNodeStyleGetMinHeight
|
||||
YGNodeStyleGetMinWidth
|
||||
YGNodeStyleGetOverflow
|
||||
YGNodeStyleGetPadding
|
||||
YGNodeStyleGetPosition
|
||||
YGNodeStyleGetPositionType
|
||||
YGNodeStyleGetWidth
|
||||
YGNodeStyleSetAlignContent
|
||||
YGNodeStyleSetAlignItems
|
||||
YGNodeStyleSetAlignSelf
|
||||
YGNodeStyleSetAspectRatio
|
||||
YGNodeStyleSetBorder
|
||||
YGNodeStyleSetDirection
|
||||
YGNodeStyleSetDisplay
|
||||
YGNodeStyleSetFlex
|
||||
YGNodeStyleSetFlexBasis
|
||||
YGNodeStyleSetFlexBasisAuto
|
||||
YGNodeStyleSetFlexBasisPercent
|
||||
YGNodeStyleSetFlexDirection
|
||||
YGNodeStyleSetFlexGrow
|
||||
YGNodeStyleSetFlexShrink
|
||||
YGNodeStyleSetFlexWrap
|
||||
YGNodeStyleSetHeight
|
||||
YGNodeStyleSetHeightAuto
|
||||
YGNodeStyleSetHeightPercent
|
||||
YGNodeStyleSetJustifyContent
|
||||
YGNodeStyleSetMargin
|
||||
YGNodeStyleSetMarginAuto
|
||||
YGNodeStyleSetMarginPercent
|
||||
YGNodeStyleSetMaxHeight
|
||||
YGNodeStyleSetMaxHeightPercent
|
||||
YGNodeStyleSetMaxWidth
|
||||
YGNodeStyleSetMaxWidthPercent
|
||||
YGNodeStyleSetMinHeight
|
||||
YGNodeStyleSetMinHeightPercent
|
||||
YGNodeStyleSetMinWidth
|
||||
YGNodeStyleSetMinWidthPercent
|
||||
YGNodeStyleSetOverflow
|
||||
YGNodeStyleSetPadding
|
||||
YGNodeStyleSetPaddingPercent
|
||||
YGNodeStyleSetPosition
|
||||
YGNodeStyleSetPositionPercent
|
||||
YGNodeStyleSetPositionType
|
||||
YGNodeStyleSetWidth
|
||||
YGNodeStyleSetWidthAuto
|
||||
YGNodeStyleSetWidthPercent
|
||||
YGNodeTypeToString
|
||||
YGOverflowToString
|
||||
YGPositionTypeToString
|
||||
YGPrintOptionsToString
|
||||
YGUnitToString
|
||||
YGWrapToString
|
||||
_YGAlignToString@4
|
||||
_YGAssert@8
|
||||
_YGAssertWithConfig@12
|
||||
_YGAssertWithNode@12
|
||||
_YGConfigCopy@8
|
||||
_YGConfigFree@4
|
||||
_YGConfigGetContext@4
|
||||
_YGConfigGetDefault@0
|
||||
_YGConfigGetInstanceCount@0
|
||||
_YGConfigGetUseWebDefaults@4
|
||||
_YGConfigIsExperimentalFeatureEnabled@8
|
||||
_YGConfigNew@0
|
||||
_YGConfigSetContext@8
|
||||
_YGConfigSetExperimentalFeatureEnabled@12
|
||||
_YGConfigSetLogger@8
|
||||
_YGConfigSetPointScaleFactor@8
|
||||
_YGConfigSetUseLegacyStretchBehaviour@8
|
||||
_YGConfigSetUseWebDefaults@8
|
||||
_YGDimensionToString@4
|
||||
_YGDirectionToString@4
|
||||
_YGDisplayToString@4
|
||||
_YGEdgeToString@4
|
||||
_YGExperimentalFeatureToString@4
|
||||
_YGFlexDirectionToString@4
|
||||
_YGFloatIsUndefined@4
|
||||
_YGJustifyToString@4
|
||||
_YGLogLevelToString@4
|
||||
_YGMeasureModeToString@4
|
||||
_YGNodeCalculateLayout@16
|
||||
_YGNodeCanUseCachedMeasurement@52
|
||||
_YGNodeCopyStyle@8
|
||||
_YGNodeFree@4
|
||||
_YGNodeFreeRecursive@4
|
||||
_YGNodeGetChild@8
|
||||
_YGNodeGetChildCount@4
|
||||
_YGNodeGetContext@4
|
||||
_YGNodeGetHasNewLayout@4
|
||||
_YGNodeGetNodeType@4
|
||||
_YGNodeGetParent@4
|
||||
_YGNodeInsertChild@12
|
||||
_YGNodeIsDirty@4
|
||||
_YGNodeLayoutGetBorder@8
|
||||
_YGNodeLayoutGetBottom@4
|
||||
_YGNodeLayoutGetDirection@4
|
||||
_YGNodeLayoutGetHeight@4
|
||||
_YGNodeLayoutGetLeft@4
|
||||
_YGNodeLayoutGetMargin@8
|
||||
_YGNodeLayoutGetPadding@8
|
||||
_YGNodeLayoutGetRight@4
|
||||
_YGNodeLayoutGetTop@4
|
||||
_YGNodeLayoutGetWidth@4
|
||||
_YGNodeMarkDirty@4
|
||||
_YGNodeNew@0
|
||||
_YGNodeNewWithConfig@4
|
||||
_YGNodeRemoveChild@8
|
||||
_YGNodeReset@4
|
||||
_YGNodeSetBaselineFunc@8
|
||||
_YGNodeSetContext@8
|
||||
_YGNodeSetHasNewLayout@8
|
||||
_YGNodeSetMeasureFunc@8
|
||||
_YGNodeSetNodeType@8
|
||||
_YGNodeSetPrintFunc@8
|
||||
_YGNodeStyleGetAlignContent@4
|
||||
_YGNodeStyleGetAlignItems@4
|
||||
_YGNodeStyleGetAlignSelf@4
|
||||
_YGNodeStyleGetAspectRatio@4
|
||||
_YGNodeStyleGetBorder@8
|
||||
_YGNodeStyleGetDirection@4
|
||||
_YGNodeStyleGetDisplay@4
|
||||
_YGNodeStyleGetFlex@4
|
||||
_YGNodeStyleGetFlexBasis@4
|
||||
_YGNodeStyleGetFlexDirection@4
|
||||
_YGNodeStyleGetFlexGrow@4
|
||||
_YGNodeStyleGetFlexShrink@4
|
||||
_YGNodeStyleGetFlexWrap@4
|
||||
_YGNodeStyleGetHeight@4
|
||||
_YGNodeStyleGetJustifyContent@4
|
||||
_YGNodeStyleGetMargin@8
|
||||
_YGNodeStyleGetMaxHeight@4
|
||||
_YGNodeStyleGetMaxWidth@4
|
||||
_YGNodeStyleGetMinHeight@4
|
||||
_YGNodeStyleGetMinWidth@4
|
||||
_YGNodeStyleGetOverflow@4
|
||||
_YGNodeStyleGetPadding@8
|
||||
_YGNodeStyleGetPosition@8
|
||||
_YGNodeStyleGetPositionType@4
|
||||
_YGNodeStyleGetWidth@4
|
||||
_YGNodeStyleSetAlignContent@8
|
||||
_YGNodeStyleSetAlignItems@8
|
||||
_YGNodeStyleSetAlignSelf@8
|
||||
_YGNodeStyleSetAspectRatio@8
|
||||
_YGNodeStyleSetBorder@12
|
||||
_YGNodeStyleSetDirection@8
|
||||
_YGNodeStyleSetDisplay@8
|
||||
_YGNodeStyleSetFlex@8
|
||||
_YGNodeStyleSetFlexBasis@8
|
||||
_YGNodeStyleSetFlexBasisAuto@4
|
||||
_YGNodeStyleSetFlexBasisPercent@8
|
||||
_YGNodeStyleSetFlexDirection@8
|
||||
_YGNodeStyleSetFlexGrow@8
|
||||
_YGNodeStyleSetFlexShrink@8
|
||||
_YGNodeStyleSetFlexWrap@8
|
||||
_YGNodeStyleSetHeight@8
|
||||
_YGNodeStyleSetHeightAuto@4
|
||||
_YGNodeStyleSetHeightPercent@8
|
||||
_YGNodeStyleSetJustifyContent@8
|
||||
_YGNodeStyleSetMargin@12
|
||||
_YGNodeStyleSetMarginAuto@8
|
||||
_YGNodeStyleSetMarginPercent@12
|
||||
_YGNodeStyleSetMaxHeight@8
|
||||
_YGNodeStyleSetMaxHeightPercent@8
|
||||
_YGNodeStyleSetMaxWidth@8
|
||||
_YGNodeStyleSetMaxWidthPercent@8
|
||||
_YGNodeStyleSetMinHeight@8
|
||||
_YGNodeStyleSetMinHeightPercent@8
|
||||
_YGNodeStyleSetMinWidth@8
|
||||
_YGNodeStyleSetMinWidthPercent@8
|
||||
_YGNodeStyleSetOverflow@8
|
||||
_YGNodeStyleSetPadding@12
|
||||
_YGNodeStyleSetPaddingPercent@12
|
||||
_YGNodeStyleSetPosition@12
|
||||
_YGNodeStyleSetPositionPercent@12
|
||||
_YGNodeStyleSetPositionType@8
|
||||
_YGNodeStyleSetWidth@8
|
||||
_YGNodeStyleSetWidthAuto@4
|
||||
_YGNodeStyleSetWidthPercent@8
|
||||
_YGNodeTypeToString@4
|
||||
_YGOverflowToString@4
|
||||
_YGPositionTypeToString@4
|
||||
_YGPrintOptionsToString@4
|
||||
_YGUnitToString@4
|
||||
_YGWrapToString@4
|
||||
|
||||
DllCanUnloadNow = WINRT_CanUnloadNow PRIVATE
|
||||
DllGetActivationFactory = WINRT_GetActivationFactory PRIVATE
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets" Condition="Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets" Condition="Exists('$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets')" />
|
||||
|
@ -114,7 +114,7 @@
|
|||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets'))" />
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
<package id="boost" version="1.68.0.0" targetFramework="native" />
|
||||
<package id="ChakraCore.Debugger" version="0.0.0.42" targetFramework="native" />
|
||||
<package id="Microsoft.ChakraCore.vc140" version="1.11.13" targetFramework="native" developmentDependency="true" />
|
||||
<package id="ReactWindows.OpenSSL.v141.Static" version="1.1.1-d.1" targetFramework="native" />
|
||||
<package id="ReactWindows.OpenSSL.StdCall.Static" version="1.0.2-p.2" targetFramework="native" />
|
||||
</packages>
|
|
@ -78,14 +78,14 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets" Condition="Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets'))" />
|
||||
</Target>
|
||||
<Target Name="GetTargetFileName" Returns="$(OutDir)$(TargetName).dll" />
|
||||
</Project>
|
|
@ -5,11 +5,11 @@ EXPORTS
|
|||
??0WebSocketServer@Test@React@Microsoft@@QAE@H_N@Z
|
||||
?Accept@WebSocketServer@Test@React@Microsoft@@AAEXXZ
|
||||
?OnAccept@WebSocketServer@Test@React@Microsoft@@AAEXVerror_code@system@boost@@@Z
|
||||
?SetMessageFactory@WebSocketServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6A?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@$$QAV12@@Z@std@@@Z
|
||||
?SetOnConnection@WebSocketServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6AXXZ@std@@@Z
|
||||
?SetOnError@WebSocketServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6AX$$QAUError@IWebSocket@React@Microsoft@@@Z@std@@@Z
|
||||
?SetOnHandshake@WebSocketServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6AXAAU?$message@$0A@U?$basic_string_body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic_fields@V?$allocator@D@std@@@234@@http@beast@boost@@@Z@std@@@Z
|
||||
?SetOnMessage@WebSocketServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6AXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z@std@@@Z
|
||||
?SetMessageFactory@WebSocketServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6G?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@$$QAV12@@Z@std@@@Z
|
||||
?SetOnConnection@WebSocketServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6GXXZ@std@@@Z
|
||||
?SetOnError@WebSocketServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6GX$$QAUError@IWebSocket@React@Microsoft@@@Z@std@@@Z
|
||||
?SetOnHandshake@WebSocketServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6GXAAU?$message@$0A@U?$basic_string_body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic_fields@V?$allocator@D@std@@@234@@http@beast@boost@@@Z@std@@@Z
|
||||
?SetOnMessage@WebSocketServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6GXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z@std@@@Z
|
||||
?Start@WebSocketServer@Test@React@Microsoft@@QAEXXZ
|
||||
?Stop@WebSocketServer@Test@React@Microsoft@@QAEXXZ
|
||||
|
||||
|
@ -18,10 +18,10 @@ EXPORTS
|
|||
??1HttpServer@Test@React@Microsoft@@QAE@XZ
|
||||
?Accept@HttpServer@Test@React@Microsoft@@QAEXXZ
|
||||
?OnAccept@HttpServer@Test@React@Microsoft@@AAEXVerror_code@system@boost@@@Z
|
||||
?SetOnGet@HttpServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6A?AU?$message@$0A@U?$basic_dynamic_body@V?$basic_multi_buffer@V?$allocator@D@std@@@beast@boost@@@http@beast@boost@@V?$basic_fields@V?$allocator@D@std@@@234@@http@beast@boost@@ABU?$message@$00U?$basic_string_body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic_fields@V?$allocator@D@std@@@234@@234@@Z@std@@@Z
|
||||
?SetOnResponseSent@HttpServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6AXXZ@std@@@Z
|
||||
?SetOnGet@HttpServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6G?AU?$message@$0A@U?$basic_dynamic_body@V?$basic_multi_buffer@V?$allocator@D@std@@@beast@boost@@@http@beast@boost@@V?$basic_fields@V?$allocator@D@std@@@234@@http@beast@boost@@ABU?$message@$00U?$basic_string_body@DU?$char_traits@D@std@@V?$allocator@D@2@@http@beast@boost@@V?$basic_fields@V?$allocator@D@std@@@234@@234@@Z@std@@@Z
|
||||
?SetOnResponseSent@HttpServer@Test@React@Microsoft@@QAEX$$QAV?$function@$$A6GXXZ@std@@@Z
|
||||
?Start@HttpServer@Test@React@Microsoft@@QAEXXZ
|
||||
?Stop@HttpServer@Test@React@Microsoft@@QAEXXZ
|
||||
|
||||
; Free functions
|
||||
?CreateStringResponseBody@Test@React@Microsoft@@YA?AV?$basic_multi_buffer@V?$allocator@D@std@@@beast@boost@@$$QAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
|
||||
?CreateStringResponseBody@Test@React@Microsoft@@YG?AV?$basic_multi_buffer@V?$allocator@D@std@@@beast@boost@@$$QAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="boost" version="1.68.0.0" targetFramework="native" />
|
||||
<package id="ReactWindows.OpenSSL.v141.Static" version="1.1.1-d.1" targetFramework="native" />
|
||||
<package id="ReactWindows.OpenSSL.StdCall.Static" version="1.0.2-p.2" targetFramework="native" />
|
||||
</packages>
|
|
@ -89,7 +89,7 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets" Condition="Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
@ -97,7 +97,7 @@
|
|||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets'))" />
|
||||
</Target>
|
||||
<Target Name="Test">
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
<packages>
|
||||
<package id="boost" version="1.68.0.0" targetFramework="native" />
|
||||
<package id="Microsoft.ChakraCore.vc140" version="1.11.13" targetFramework="native" developmentDependency="true" />
|
||||
<package id="ReactWindows.OpenSSL.v141.Static" version="1.1.1-d.1" targetFramework="native" />
|
||||
<package id="ReactWindows.OpenSSL.StdCall.Static" version="1.0.2-p.2" targetFramework="native" />
|
||||
</packages>
|
|
@ -49,8 +49,7 @@ private:
|
|||
g_internalHandler;
|
||||
}
|
||||
|
||||
uint32_t __cdecl NativeTraceEventSource::InitializeTracing(
|
||||
::winrt::facebook::react::INativeTraceHandler const &handler) {
|
||||
uint32_t NativeTraceEventSource::InitializeTracing(::winrt::facebook::react::INativeTraceHandler const &handler) {
|
||||
g_abiHandler = handler;
|
||||
::facebook::react::InitializeTracing(&g_internalHandler);
|
||||
return ++g_abiHandlerRegistrationCookie;
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace winrt::facebook::react::implementation {
|
|||
struct NativeTraceEventSource {
|
||||
NativeTraceEventSource() = default;
|
||||
|
||||
static uint32_t __cdecl InitializeTracing(facebook::react::INativeTraceHandler const &handler);
|
||||
static uint32_t InitializeTracing(facebook::react::INativeTraceHandler const &handler);
|
||||
static void UninitializeTracing(uint32_t cookie);
|
||||
};
|
||||
} // namespace winrt::facebook::react::implementation
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets" Condition="Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets" Condition="Exists('$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets')" />
|
||||
|
@ -173,7 +173,7 @@
|
|||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.ChakraCore.vc140.1.11.13\build\native\Microsoft.ChakraCore.vc140.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets'))" />
|
||||
|
|
|
@ -402,34 +402,34 @@ void BaseWebSocket<Protocol, SocketLayer, Stream, Resolver>::Ping() {
|
|||
#pragma region Handler setters
|
||||
|
||||
template <typename Protocol, typename SocketLayer, typename Stream, typename Resolver>
|
||||
void BaseWebSocket<Protocol, SocketLayer, Stream, Resolver>::SetOnConnect(function<void __cdecl()> &&handler) {
|
||||
void BaseWebSocket<Protocol, SocketLayer, Stream, Resolver>::SetOnConnect(function<void()> &&handler) {
|
||||
m_connectHandler = handler;
|
||||
}
|
||||
|
||||
template <typename Protocol, typename SocketLayer, typename Stream, typename Resolver>
|
||||
void BaseWebSocket<Protocol, SocketLayer, Stream, Resolver>::SetOnPing(function<void __cdecl()> &&handler) {
|
||||
void BaseWebSocket<Protocol, SocketLayer, Stream, Resolver>::SetOnPing(function<void()> &&handler) {
|
||||
m_pingHandler = handler;
|
||||
}
|
||||
|
||||
template <typename Protocol, typename SocketLayer, typename Stream, typename Resolver>
|
||||
void BaseWebSocket<Protocol, SocketLayer, Stream, Resolver>::SetOnSend(function<void __cdecl(size_t)> &&handler) {
|
||||
void BaseWebSocket<Protocol, SocketLayer, Stream, Resolver>::SetOnSend(function<void(size_t)> &&handler) {
|
||||
m_writeHandler = handler;
|
||||
}
|
||||
|
||||
template <typename Protocol, typename SocketLayer, typename Stream, typename Resolver>
|
||||
void BaseWebSocket<Protocol, SocketLayer, Stream, Resolver>::SetOnMessage(
|
||||
function<void __cdecl(size_t, const string &)> &&handler) {
|
||||
function<void(size_t, const string &)> &&handler) {
|
||||
m_readHandler = handler;
|
||||
}
|
||||
|
||||
template <typename Protocol, typename SocketLayer, typename Stream, typename Resolver>
|
||||
void BaseWebSocket<Protocol, SocketLayer, Stream, Resolver>::SetOnClose(
|
||||
function<void __cdecl(CloseCode, const string &)> &&handler) {
|
||||
function<void(CloseCode, const string &)> &&handler) {
|
||||
m_closeHandler = handler;
|
||||
}
|
||||
|
||||
template <typename Protocol, typename SocketLayer, typename Stream, typename Resolver>
|
||||
void BaseWebSocket<Protocol, SocketLayer, Stream, Resolver>::SetOnError(function<void __cdecl(Error &&)> &&handler) {
|
||||
void BaseWebSocket<Protocol, SocketLayer, Stream, Resolver>::SetOnError(function<void(Error &&)> &&handler) {
|
||||
m_errorHandler = handler;
|
||||
}
|
||||
|
||||
|
@ -474,7 +474,7 @@ void SecureWebSocket::Handshake(const IWebSocket::Options &options) {
|
|||
|
||||
#pragma region IWebSocket static members
|
||||
|
||||
/*static*/ unique_ptr<IWebSocket> __cdecl IWebSocket::Make(const string &urlString) {
|
||||
/*static*/ unique_ptr<IWebSocket> IWebSocket::Make(const string &urlString) {
|
||||
Url url(urlString);
|
||||
|
||||
if (url.scheme == "ws") {
|
||||
|
|
|
@ -18,11 +18,11 @@ template <
|
|||
typename Stream = boost::beast::websocket::stream<SocketLayer>,
|
||||
typename Resolver = boost::asio::ip::basic_resolver<Protocol>>
|
||||
class BaseWebSocket : public IWebSocket {
|
||||
std::function<void __cdecl()> m_connectHandler;
|
||||
std::function<void __cdecl()> m_pingHandler;
|
||||
std::function<void __cdecl(std::size_t)> m_writeHandler;
|
||||
std::function<void __cdecl(std::size_t, const std::string &)> m_readHandler;
|
||||
std::function<void __cdecl(CloseCode, const std::string &)> m_closeHandler;
|
||||
std::function<void()> m_connectHandler;
|
||||
std::function<void()> m_pingHandler;
|
||||
std::function<void(std::size_t)> m_writeHandler;
|
||||
std::function<void(std::size_t, const std::string &)> m_readHandler;
|
||||
std::function<void(CloseCode, const std::string &)> m_closeHandler;
|
||||
|
||||
Url m_url;
|
||||
ReadyState m_readyState{ReadyState::Connecting};
|
||||
|
@ -162,32 +162,32 @@ class BaseWebSocket : public IWebSocket {
|
|||
/// <summary>
|
||||
/// <see cref="IWebSocket::SetOnConnect" />
|
||||
/// </summary>
|
||||
void SetOnConnect(std::function<void __cdecl()> &&handler) override;
|
||||
void SetOnConnect(std::function<void()> &&handler) override;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IWebSocket::SetOnPing" />
|
||||
/// </summary>
|
||||
void SetOnPing(std::function<void __cdecl()> &&handler) override;
|
||||
void SetOnPing(std::function<void()> &&handler) override;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IWebSocket::SetOnSend" />
|
||||
/// </summary>
|
||||
void SetOnSend(std::function<void __cdecl(std::size_t)> &&handler) override;
|
||||
void SetOnSend(std::function<void(std::size_t)> &&handler) override;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IWebSocket::SetOnMessage" />
|
||||
/// </summary>
|
||||
void SetOnMessage(std::function<void __cdecl(std::size_t, const std::string &)> &&handler) override;
|
||||
void SetOnMessage(std::function<void(std::size_t, const std::string &)> &&handler) override;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IWebSocket::SetOnClose" />
|
||||
/// </summary>
|
||||
void SetOnClose(std::function<void __cdecl(CloseCode, const std::string &)> &&handler) override;
|
||||
void SetOnClose(std::function<void(CloseCode, const std::string &)> &&handler) override;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="IWebSocket::SetOnError" />
|
||||
/// </summary>
|
||||
void SetOnError(std::function<void __cdecl(Error &&)> &&handler) override;
|
||||
void SetOnError(std::function<void(Error &&)> &&handler) override;
|
||||
|
||||
#pragma endregion IWebSocket
|
||||
};
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
<package id="ChakraCore.Debugger" version="0.0.0.42" targetFramework="native" />
|
||||
<package id="Microsoft.ChakraCore.vc140" version="1.11.13" targetFramework="native" developmentDependency="true" />
|
||||
<package id="Microsoft.Windows.CppWinRT" version="2.0.190730.2" targetFramework="native" />
|
||||
<package id="ReactWindows.OpenSSL.v141.Static" version="1.1.1-d.1" targetFramework="native" />
|
||||
<package id="ReactWindows.OpenSSL.StdCall.Static" version="1.0.2-p.2" targetFramework="native" />
|
||||
</packages>
|
|
@ -268,9 +268,18 @@
|
|||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets'))" />
|
||||
</Target>
|
||||
<!-- <ItemGroup>
|
||||
<Target Name="DownloadFolly" BeforeTargets="PrepareForBuild">
|
||||
<Message Importance="High" Text="Downloading folly..." Condition="!Exists('$(FollyDir)..\.follyzip\folly-2019.09.30.00.zip')" />
|
||||
<DownloadFile Condition="!Exists('$(FollyDir)..\.follyzip\folly-2019.09.30.00.zip')" SourceUrl="https://github.com/facebook/folly/archive/v2019.09.30.00.zip" DestinationFileName="folly-2019.09.30.00.zip" DestinationFolder="$(FollyDir)..\.follyzip" />
|
||||
</Target>
|
||||
<Target Name="UnzipFolly" BeforeTargets="PrepareForBuild" DependsOnTargets="DownloadFolly">
|
||||
<Message Importance="High" Text="Unzipping folly to $([MSBuild]::NormalizePath($(FollyDir)..))." Condition="!Exists('$(FollyDir)folly\dynamic.h')" />
|
||||
<!-- Using ContinueOnError due to https://github.com/Microsoft/msbuild/issues/3884, https://github.com/microsoft/msbuild/pull/4935, We will still succeed, and this will be fixed in a newer version of MSBuild -->
|
||||
<Unzip Condition="!Exists('$(FollyDir)')" ContinueOnError="true" SourceFiles="$(FollyDir)..\.follyzip\folly-2019.09.30.00.zip" DestinationFolder="$([MSBuild]::NormalizePath($(FollyDir)..))" OverwriteReadOnlyFiles="true" />
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<TemporaryFollyPatchFiles Include="$(MSBuildThisFileDirectory)\TEMP_UntilFollyUpdate\**\*.*"/>
|
||||
</ItemGroup> -->
|
||||
</ItemGroup>
|
||||
<!-- Reenable this task if we need to temporarily replace any folly files for fixes, while we wait for PRs to land in folly -->
|
||||
<!--
|
||||
<Target Name="ApplyFollyTemporaryPatch" BeforeTargets="PrepareForBuild" DependsOnTargets="UnzipFolly">
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<ItemDefinitionGroup />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets" Condition="Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets" Condition="Exists('$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets')" />
|
||||
|
@ -125,7 +125,7 @@
|
|||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ChakraCore.Debugger.0.0.0.42\build\native\ChakraCore.Debugger.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets'))" />
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
<package id="ChakraCore.Debugger" version="0.0.0.42" targetFramework="native" />
|
||||
<package id="Microsoft.ChakraCore.vc140" version="1.11.13" targetFramework="native" developmentDependency="true" />
|
||||
<package id="Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn" version="1.8.1" targetFramework="native" />
|
||||
<package id="ReactWindows.OpenSSL.v141.Static" version="1.1.1-d.1" targetFramework="native" />
|
||||
<package id="ReactWindows.OpenSSL.StdCall.Static" version="1.0.2-p.2" targetFramework="native" />
|
||||
</packages>
|
|
@ -20,7 +20,7 @@
|
|||
<ReactNativeDir>$([MSBuild]::NormalizeDirectory( $([System.IO.Path]::Combine( $(MSBuildProjectDirectory), $(ReactNativeDir) )) ))</ReactNativeDir>
|
||||
|
||||
<YogaDir Condition="'$(YogaDir)' == ''">$(ReactNativeDir)\ReactCommon\yoga</YogaDir>
|
||||
<FollyDir Condition="'$(FollyDir)' == ''">$(MSBuildThisFileDirectory)\..\..\GitModules\folly</FollyDir>
|
||||
<FollyDir Condition="'$(FollyDir)' == '' AND Exists('$([MSBuild]::NormalizeDirectory($(ReactNativePackageDir)..\..\node_modules))')">$(ReactNativePackageDir)..\..\node_modules\.folly\folly-2019.09.30.00</FollyDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<CallingConvention>Cdecl</CallingConvention>
|
||||
<CallingConvention>StdCall</CallingConvention>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
;new EXPORT, add it to the other def files too. The EXPORTs are sorted to aid
|
||||
;in comparisons.
|
||||
EXPORTS
|
||||
??$str_to_floating@N@detail@folly@@YA?AV?$Expected@NW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??$str_to_integral@_J@detail@folly@@YA?AV?$Expected@_JW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??$str_to_floating@N@detail@folly@@YG?AV?$Expected@NW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??$str_to_integral@_J@detail@folly@@YG?AV?$Expected@_JW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??0AppState@react@facebook@@QAE@XZ
|
||||
??0AppStateModule@react@facebook@@QAE@$$QAV?$shared_ptr@VAppState@react@facebook@@@std@@@Z
|
||||
??0ColdClass@cold_detail@folly@@QAE@XZ
|
||||
|
@ -31,40 +31,40 @@ EXPORTS
|
|||
??4dynamic@folly@@QAEAAU01@ABU01@@Z
|
||||
??8dynamic@folly@@QBE_NABU01@@Z
|
||||
??Adynamic@folly@@QGAEAAU01@V?$Range@PBD@1@@Z
|
||||
?CreateMemoryTracker@react@facebook@@YA?AV?$shared_ptr@VMemoryTracker@react@facebook@@@std@@$$QAV?$shared_ptr@VMessageQueueThread@react@facebook@@@4@@Z
|
||||
?CreateTimingModule@react@facebook@@YA?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@ABV?$shared_ptr@VMessageQueueThread@react@facebook@@@4@@Z
|
||||
?CreateMemoryTracker@react@facebook@@YG?AV?$shared_ptr@VMemoryTracker@react@facebook@@@std@@$$QAV?$shared_ptr@VMessageQueueThread@react@facebook@@@4@@Z
|
||||
?CreateTimingModule@react@facebook@@YG?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@ABV?$shared_ptr@VMessageQueueThread@react@facebook@@@4@@Z
|
||||
?CreateWorkerMessageQueue@uwp@react@@YG?AV?$shared_ptr@VMessageQueueThread@react@facebook@@@std@@XZ
|
||||
?GetJavaScriptFromServer@DevSupportManager@uwp@react@@UAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV45@00@Z
|
||||
?InitializeLogging@react@facebook@@YAX$$QAV?$function@$$A6AXW4RCTLogLevel@react@facebook@@PBD@Z@std@@@Z
|
||||
?InitializeTracing@react@facebook@@YAXPAUINativeTraceHandler@12@@Z
|
||||
?JsPointerToStringUtf8@react@facebook@@YA?AW4_JsErrorCode@@PBDIPAPAX@Z
|
||||
?JsStringToStdStringUtf8@react@facebook@@YA?AW4_JsErrorCode@@PAXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
|
||||
?LoadJavaScriptInProxyMode@DevSupportManager@uwp@react@@UAE?AV?$function@$$A6A?AV?$unique_ptr@VJSExecutor@react@facebook@@U?$default_delete@VJSExecutor@react@facebook@@@std@@@std@@V?$shared_ptr@VExecutorDelegate@react@facebook@@@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@Z@std@@ABUDevSettings@3facebook@@@Z
|
||||
?LoadJavaScriptInSandboxMode@DevSupportManager@uwp@react@@UAE?AV?$function@$$A6A?AV?$unique_ptr@VJSExecutor@react@facebook@@U?$default_delete@VJSExecutor@react@facebook@@@std@@@std@@V?$shared_ptr@VExecutorDelegate@react@facebook@@@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@Z@std@@ABUDevSettings@3facebook@@@Z
|
||||
?Make@JSBigAbiString@react@facebook@@SA?AV?$unique_ptr@$$CBUJSBigAbiString@react@facebook@@U?$default_delete@$$CBUJSBigAbiString@react@facebook@@@std@@@std@@$$QAV?$unique_ptr@U?$IAbiArray@D@AbiSafe@@UAbiObjectDeleter@2@@5@@Z
|
||||
?StartPollingLiveReload@DevSupportManager@uwp@react@@UAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$function@$$A6AXXZ@5@@Z
|
||||
?InitializeLogging@react@facebook@@YGX$$QAV?$function@$$A6GXW4RCTLogLevel@react@facebook@@PBD@Z@std@@@Z
|
||||
?InitializeTracing@react@facebook@@YGXPAUINativeTraceHandler@12@@Z
|
||||
?JsPointerToStringUtf8@react@facebook@@YG?AW4_JsErrorCode@@PBDIPAPAX@Z
|
||||
?JsStringToStdStringUtf8@react@facebook@@YG?AW4_JsErrorCode@@PAXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
|
||||
?LoadJavaScriptInProxyMode@DevSupportManager@uwp@react@@UAE?AV?$function@$$A6G?AV?$unique_ptr@VJSExecutor@react@facebook@@U?$default_delete@VJSExecutor@react@facebook@@@std@@@std@@V?$shared_ptr@VExecutorDelegate@react@facebook@@@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@Z@std@@ABUDevSettings@3facebook@@@Z
|
||||
?LoadJavaScriptInSandboxMode@DevSupportManager@uwp@react@@UAE?AV?$function@$$A6G?AV?$unique_ptr@VJSExecutor@react@facebook@@U?$default_delete@VJSExecutor@react@facebook@@@std@@@std@@V?$shared_ptr@VExecutorDelegate@react@facebook@@@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@Z@std@@ABUDevSettings@3facebook@@@Z
|
||||
?Make@JSBigAbiString@react@facebook@@SG?AV?$unique_ptr@$$CBUJSBigAbiString@react@facebook@@U?$default_delete@$$CBUJSBigAbiString@react@facebook@@@std@@@std@@$$QAV?$unique_ptr@U?$IAbiArray@D@AbiSafe@@UAbiObjectDeleter@2@@5@@Z
|
||||
?StartPollingLiveReload@DevSupportManager@uwp@react@@UAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$function@$$A6GXXZ@5@@Z
|
||||
?StopPollingLiveReload@DevSupportManager@uwp@react@@UAEXXZ
|
||||
?assertionFailure@detail@folly@@YAXPBD00I0@Z
|
||||
?assume_check@detail@folly@@YAX_N@Z
|
||||
?assertionFailure@detail@folly@@YGXPBD00I0@Z
|
||||
?assume_check@detail@folly@@YGX_N@Z
|
||||
?at@dynamic@folly@@QGBEABU12@V?$Range@PBD@2@@Z
|
||||
?atImpl@dynamic@folly@@AGBEABU12@ABU12@@Z
|
||||
?callJSFunction@Instance@react@facebook@@QAEX$$QAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0$$QAUdynamic@folly@@@Z
|
||||
?createUIManagerModule@react@facebook@@YA?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@V?$shared_ptr@VIUIManager@react@facebook@@@4@@Z
|
||||
?demangle@folly@@YA?AV?$basic_fbstring@DU?$char_traits@D@std@@V?$allocator@D@2@V?$fbstring_core@D@folly@@@1@PBD@Z
|
||||
?createUIManagerModule@react@facebook@@YG?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@V?$shared_ptr@VIUIManager@react@facebook@@@4@@Z
|
||||
?demangle@folly@@YG?AV?$basic_fbstring@DU?$char_traits@D@std@@V?$allocator@D@2@V?$fbstring_core@D@folly@@@1@PBD@Z
|
||||
?destroy@dynamic@folly@@AAEXXZ
|
||||
?get_ptr@dynamic@folly@@QGBEPBU12@V?$Range@PBD@2@@Z
|
||||
?hash@dynamic@folly@@QBEIXZ
|
||||
?logTaggedMarker@ReactMarker@react@facebook@@3P6AXW4ReactMarkerId@123@PBD@ZA
|
||||
?makeConversionError@folly@@YA?AVConversionError@1@W4ConversionCode@1@V?$Range@PBD@1@@Z
|
||||
?parseJson@folly@@YA?AUdynamic@1@V?$Range@PBD@1@@Z
|
||||
?logTaggedMarker@ReactMarker@react@facebook@@3P6GXW4ReactMarkerId@123@PBD@ZA
|
||||
?makeConversionError@folly@@YG?AVConversionError@1@W4ConversionCode@1@V?$Range@PBD@1@@Z
|
||||
?parseJson@folly@@YG?AUdynamic@1@V?$Range@PBD@1@@Z
|
||||
?print_as_pseudo_json@dynamic@folly@@ABEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z
|
||||
?size@dynamic@folly@@QBEIXZ
|
||||
?str_to_bool@detail@folly@@YA?AV?$Expected@_NW4ConversionCode@folly@@@2@PAV?$Range@PBD@2@@Z
|
||||
?toJson@folly@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABUdynamic@1@@Z
|
||||
?str_to_bool@detail@folly@@YG?AV?$Expected@_NW4ConversionCode@folly@@@2@PAV?$Range@PBD@2@@Z
|
||||
?toJson@folly@@YG?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABUdynamic@1@@Z
|
||||
?typeName@dynamic@folly@@QBEPBDXZ
|
||||
?update@DeviceInfo@uwp@react@@QAEXXZ
|
||||
?Utf16ToUtf8@Unicode@Common@Microsoft@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@5@@Z
|
||||
?Utf16ToUtf8@Unicode@Common@Microsoft@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$basic_string_view@_WU?$char_traits@_W@std@@@5@@Z
|
||||
?Utf16ToUtf8@Unicode@Common@Microsoft@@YG?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@5@@Z
|
||||
?Utf16ToUtf8@Unicode@Common@Microsoft@@YG?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$basic_string_view@_WU?$char_traits@_W@std@@@5@@Z
|
||||
;?warnAboutToCrash@ScopeGuardImplBase@detail@folly@@KAXXZ
|
||||
dallocxWeak
|
||||
mallctlWeak
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
;new EXPORT, add it to the other def files too. The EXPORTs are sorted to aid
|
||||
;in comparisons.
|
||||
EXPORTS
|
||||
??$str_to_floating@N@detail@folly@@YA?AV?$Expected@NW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??$str_to_integral@_J@detail@folly@@YA?AV?$Expected@_JW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??$str_to_floating@N@detail@folly@@YG?AV?$Expected@NW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??$str_to_integral@_J@detail@folly@@YG?AV?$Expected@_JW4ConversionCode@folly@@@1@PAV?$Range@PBD@1@@Z
|
||||
??0AppState@react@facebook@@QAE@XZ
|
||||
??0AppStateModule@react@facebook@@QAE@$$QAV?$shared_ptr@VAppState@react@facebook@@@std@@@Z
|
||||
??0ColdClass@cold_detail@folly@@QAE@XZ
|
||||
|
@ -31,41 +31,41 @@ EXPORTS
|
|||
??4dynamic@folly@@QAEAAU01@ABU01@@Z
|
||||
??8dynamic@folly@@QBE_NABU01@@Z
|
||||
??Adynamic@folly@@QGAEAAU01@V?$Range@PBD@1@@Z
|
||||
?CreateMemoryTracker@react@facebook@@YA?AV?$shared_ptr@VMemoryTracker@react@facebook@@@std@@$$QAV?$shared_ptr@VMessageQueueThread@react@facebook@@@4@@Z
|
||||
?CreateTimingModule@react@facebook@@YA?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@ABV?$shared_ptr@VMessageQueueThread@react@facebook@@@4@@Z
|
||||
?CreateMemoryTracker@react@facebook@@YG?AV?$shared_ptr@VMemoryTracker@react@facebook@@@std@@$$QAV?$shared_ptr@VMessageQueueThread@react@facebook@@@4@@Z
|
||||
?CreateTimingModule@react@facebook@@YG?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@ABV?$shared_ptr@VMessageQueueThread@react@facebook@@@4@@Z
|
||||
?CreateWorkerMessageQueue@uwp@react@@YG?AV?$shared_ptr@VMessageQueueThread@react@facebook@@@std@@XZ
|
||||
?GetJavaScriptFromServer@DevSupportManager@uwp@react@@UAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV45@00@Z
|
||||
?InitializeLogging@react@facebook@@YAX$$QAV?$function@$$A6AXW4RCTLogLevel@react@facebook@@PBD@Z@std@@@Z
|
||||
?InitializeTracing@react@facebook@@YAXPAUINativeTraceHandler@12@@Z
|
||||
?JsPointerToStringUtf8@react@facebook@@YA?AW4_JsErrorCode@@PBDIPAPAX@Z
|
||||
?JsStringToStdStringUtf8@react@facebook@@YA?AW4_JsErrorCode@@PAXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
|
||||
?LoadJavaScriptInProxyMode@DevSupportManager@uwp@react@@UAE?AV?$function@$$A6A?AV?$unique_ptr@VJSExecutor@react@facebook@@U?$default_delete@VJSExecutor@react@facebook@@@std@@@std@@V?$shared_ptr@VExecutorDelegate@react@facebook@@@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@Z@std@@ABUDevSettings@3facebook@@@Z
|
||||
;?LoadJavaScriptInSandboxMode@DevSupportManager@uwp@react@@UAE?AV?$function@$$A6A?AV?$unique_ptr@VJSExecutor@react@facebook@@U?$default_delete@VJSExecutor@react@facebook@@@std@@@std@@V?$shared_ptr@VExecutorDelegate@react@facebook@@@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@Z@std@@ABUDevSettings@3facebook@@@Z
|
||||
?Make@JSBigAbiString@react@facebook@@SA?AV?$unique_ptr@$$CBUJSBigAbiString@react@facebook@@U?$default_delete@$$CBUJSBigAbiString@react@facebook@@@std@@@std@@$$QAV?$unique_ptr@U?$IAbiArray@D@AbiSafe@@UAbiObjectDeleter@2@@5@@Z
|
||||
?InitializeLogging@react@facebook@@YGX$$QAV?$function@$$A6GXW4RCTLogLevel@react@facebook@@PBD@Z@std@@@Z
|
||||
?InitializeTracing@react@facebook@@YGXPAUINativeTraceHandler@12@@Z
|
||||
?JsPointerToStringUtf8@react@facebook@@YG?AW4_JsErrorCode@@PBDIPAPAX@Z
|
||||
?JsStringToStdStringUtf8@react@facebook@@YG?AW4_JsErrorCode@@PAXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z
|
||||
?LoadJavaScriptInProxyMode@DevSupportManager@uwp@react@@UAE?AV?$function@$$A6G?AV?$unique_ptr@VJSExecutor@react@facebook@@U?$default_delete@VJSExecutor@react@facebook@@@std@@@std@@V?$shared_ptr@VExecutorDelegate@react@facebook@@@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@Z@std@@ABUDevSettings@3facebook@@@Z
|
||||
;?LoadJavaScriptInSandboxMode@DevSupportManager@uwp@react@@UAE?AV?$function@$$A6G?AV?$unique_ptr@VJSExecutor@react@facebook@@U?$default_delete@VJSExecutor@react@facebook@@@std@@@std@@V?$shared_ptr@VExecutorDelegate@react@facebook@@@2@V?$shared_ptr@VMessageQueueThread@react@facebook@@@2@@Z@std@@ABUDevSettings@3facebook@@@Z
|
||||
?Make@JSBigAbiString@react@facebook@@SG?AV?$unique_ptr@$$CBUJSBigAbiString@react@facebook@@U?$default_delete@$$CBUJSBigAbiString@react@facebook@@@std@@@std@@$$QAV?$unique_ptr@U?$IAbiArray@D@AbiSafe@@UAbiObjectDeleter@2@@5@@Z
|
||||
;?MakeMemoryMappedBuffer@JSI@Microsoft@@YG?AV?$shared_ptr@VBuffer@jsi@facebook@@@std@@QB_WI@Z
|
||||
?StartPollingLiveReload@DevSupportManager@uwp@react@@UAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$function@$$A6AXXZ@5@@Z
|
||||
?StartPollingLiveReload@DevSupportManager@uwp@react@@UAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$function@$$A6GXXZ@5@@Z
|
||||
?StopPollingLiveReload@DevSupportManager@uwp@react@@UAEXXZ
|
||||
?assertionFailure@detail@folly@@YAXPBD00I0@Z
|
||||
?assume_check@detail@folly@@YAX_N@Z
|
||||
?assertionFailure@detail@folly@@YGXPBD00I0@Z
|
||||
?assume_check@detail@folly@@YGX_N@Z
|
||||
?at@dynamic@folly@@QGBEABU12@V?$Range@PBD@2@@Z
|
||||
?atImpl@dynamic@folly@@AGBEABU12@ABU12@@Z
|
||||
?callJSFunction@Instance@react@facebook@@QAEX$$QAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0$$QAUdynamic@folly@@@Z
|
||||
?createUIManagerModule@react@facebook@@YA?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@V?$shared_ptr@VIUIManager@react@facebook@@@4@@Z
|
||||
?demangle@folly@@YA?AV?$basic_fbstring@DU?$char_traits@D@std@@V?$allocator@D@2@V?$fbstring_core@D@folly@@@1@PBD@Z
|
||||
?createUIManagerModule@react@facebook@@YG?AV?$unique_ptr@VCxxModule@module@xplat@facebook@@U?$default_delete@VCxxModule@module@xplat@facebook@@@std@@@std@@V?$shared_ptr@VIUIManager@react@facebook@@@4@@Z
|
||||
?demangle@folly@@YG?AV?$basic_fbstring@DU?$char_traits@D@std@@V?$allocator@D@2@V?$fbstring_core@D@folly@@@1@PBD@Z
|
||||
?destroy@dynamic@folly@@AAEXXZ
|
||||
?get_ptr@dynamic@folly@@QGBEPBU12@V?$Range@PBD@2@@Z
|
||||
?hash@dynamic@folly@@QBEIXZ
|
||||
?logTaggedMarker@ReactMarker@react@facebook@@3P6AXW4ReactMarkerId@123@PBD@ZA
|
||||
?makeConversionError@folly@@YA?AVConversionError@1@W4ConversionCode@1@V?$Range@PBD@1@@Z
|
||||
?parseJson@folly@@YA?AUdynamic@1@V?$Range@PBD@1@@Z
|
||||
?logTaggedMarker@ReactMarker@react@facebook@@3P6GXW4ReactMarkerId@123@PBD@ZA
|
||||
?makeConversionError@folly@@YG?AVConversionError@1@W4ConversionCode@1@V?$Range@PBD@1@@Z
|
||||
?parseJson@folly@@YG?AUdynamic@1@V?$Range@PBD@1@@Z
|
||||
?print_as_pseudo_json@dynamic@folly@@ABEXAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z
|
||||
?size@dynamic@folly@@QBEIXZ
|
||||
?str_to_bool@detail@folly@@YA?AV?$Expected@_NW4ConversionCode@folly@@@2@PAV?$Range@PBD@2@@Z
|
||||
?toJson@folly@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABUdynamic@1@@Z
|
||||
?str_to_bool@detail@folly@@YG?AV?$Expected@_NW4ConversionCode@folly@@@2@PAV?$Range@PBD@2@@Z
|
||||
?toJson@folly@@YG?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABUdynamic@1@@Z
|
||||
?typeName@dynamic@folly@@QBEPBDXZ
|
||||
?update@DeviceInfo@uwp@react@@QAEXXZ
|
||||
?Utf16ToUtf8@Unicode@Common@Microsoft@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@5@@Z
|
||||
?Utf16ToUtf8@Unicode@Common@Microsoft@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$basic_string_view@_WU?$char_traits@_W@std@@@5@@Z
|
||||
?Utf16ToUtf8@Unicode@Common@Microsoft@@YG?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@5@@Z
|
||||
?Utf16ToUtf8@Unicode@Common@Microsoft@@YG?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$basic_string_view@_WU?$char_traits@_W@std@@@5@@Z
|
||||
;?warnAboutToCrash@ScopeGuardImplBase@detail@folly@@KAXXZ
|
||||
dallocxWeak
|
||||
mallctlWeak
|
||||
|
|
|
@ -158,9 +158,7 @@ std::future<winrt::Windows::Web::Http::HttpStatusCode> PollForLiveReload(const s
|
|||
co_return responseMessage.StatusCode();
|
||||
}
|
||||
|
||||
void DevSupportManager::StartPollingLiveReload(
|
||||
const std::string &debugHost,
|
||||
std::function<void __cdecl()> onChangeCallback) {
|
||||
void DevSupportManager::StartPollingLiveReload(const std::string &debugHost, std::function<void()> onChangeCallback) {
|
||||
m_cancellation_token = false;
|
||||
|
||||
std::string refreshUrl = facebook::react::DevServerHelper::get_OnChangeEndpointUrl(debugHost);
|
||||
|
|
|
@ -35,8 +35,7 @@ class DevSupportManager : public facebook::react::IDevSupportManager {
|
|||
const std::string &debugHost,
|
||||
const std::string &jsBundleName,
|
||||
const std::string &platform) override;
|
||||
virtual void StartPollingLiveReload(const std::string &debugHost, std::function<void __cdecl()> onChangeCallback)
|
||||
override;
|
||||
virtual void StartPollingLiveReload(const std::string &debugHost, std::function<void()> onChangeCallback) override;
|
||||
virtual void StopPollingLiveReload() override;
|
||||
virtual bool HasException() override {
|
||||
return m_exceptionCaught;
|
||||
|
|
|
@ -23,7 +23,7 @@ struct IDevSupportManager {
|
|||
const std::string &debugHost,
|
||||
const std::string &jsBundleName,
|
||||
const std::string &platform) = 0;
|
||||
virtual void StartPollingLiveReload(const std::string &debugHost, std::function<void __cdecl()> onChangeCallback) = 0;
|
||||
virtual void StartPollingLiveReload(const std::string &debugHost, std::function<void()> onChangeCallback) = 0;
|
||||
virtual void StopPollingLiveReload() = 0;
|
||||
virtual bool HasException() = 0;
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@ class IUIManager {
|
|||
facebook::xplat::module::CxxModule::Callback callback) = 0;
|
||||
};
|
||||
|
||||
std::shared_ptr<IUIManager> __cdecl createIUIManager(
|
||||
std::shared_ptr<IUIManager> createIUIManager(
|
||||
std::vector<std::unique_ptr<IViewManager>> &&viewManagers,
|
||||
INativeUIManager *nativeManager);
|
||||
|
||||
|
@ -76,8 +76,7 @@ std::unique_ptr<facebook::xplat::module::CxxModule> createUIManagerModule(
|
|||
|
||||
// Deprecated: use the overloaded version with two parameters.
|
||||
// It is here because it is being exported
|
||||
std::unique_ptr<facebook::xplat::module::CxxModule> __cdecl createUIManagerModule(
|
||||
std::shared_ptr<IUIManager> uimanager);
|
||||
std::unique_ptr<facebook::xplat::module::CxxModule> createUIManagerModule(std::shared_ptr<IUIManager> uimanager);
|
||||
|
||||
std::shared_ptr<IUIManager> createBatchingUIManager(
|
||||
std::vector<std::unique_ptr<IViewManager>> &&viewManagers,
|
||||
|
|
|
@ -84,7 +84,7 @@ struct IWebSocket {
|
|||
/// WebSocket URL address the instance will connect to.
|
||||
/// The address's scheme can be either ws:// or wss://.
|
||||
/// </param>
|
||||
static std::unique_ptr<IWebSocket> __cdecl Make(const std::string &url);
|
||||
static std::unique_ptr<IWebSocket> Make(const std::string &url);
|
||||
|
||||
virtual ~IWebSocket() {}
|
||||
|
||||
|
@ -141,7 +141,7 @@ struct IWebSocket {
|
|||
/// </summary>
|
||||
/// <param name="handler">
|
||||
/// </param>
|
||||
virtual void SetOnConnect(std::function<void __cdecl()> &&handler) = 0;
|
||||
virtual void SetOnConnect(std::function<void()> &&handler) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the optional custom behavior on a successful ping to the remote
|
||||
|
@ -149,14 +149,14 @@ struct IWebSocket {
|
|||
/// </summary>
|
||||
/// <param name="handler">
|
||||
/// </param>
|
||||
virtual void SetOnPing(std::function<void __cdecl()> &&handler) = 0;
|
||||
virtual void SetOnPing(std::function<void()> &&handler) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the optional custom behavior on a message sending.
|
||||
/// </summary>
|
||||
/// <param name="handler">
|
||||
/// </param>
|
||||
virtual void SetOnSend(std::function<void __cdecl(std::size_t)> &&handler) = 0;
|
||||
virtual void SetOnSend(std::function<void(std::size_t)> &&handler) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the optional custom behavior to run when there is an incoming
|
||||
|
@ -164,21 +164,21 @@ struct IWebSocket {
|
|||
/// </summary>
|
||||
/// <param name="handler">
|
||||
/// </param>
|
||||
virtual void SetOnMessage(std::function<void __cdecl(std::size_t, const std::string &)> &&handler) = 0;
|
||||
virtual void SetOnMessage(std::function<void(std::size_t, const std::string &)> &&handler) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the optional custom behavior to run when this instance is closed.
|
||||
/// </summary>
|
||||
/// <param name="handler">
|
||||
/// </param>
|
||||
virtual void SetOnClose(std::function<void __cdecl(CloseCode, const std::string &)> &&handler) = 0;
|
||||
virtual void SetOnClose(std::function<void(CloseCode, const std::string &)> &&handler) = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the optional custom behavior on an error condition.
|
||||
/// </summary>
|
||||
/// <param name="handler">
|
||||
/// </param>
|
||||
virtual void SetOnError(std::function<void __cdecl(Error &&)> &&handler) = 0;
|
||||
virtual void SetOnError(std::function<void(Error &&)> &&handler) = 0;
|
||||
};
|
||||
|
||||
} // namespace Microsoft::React
|
||||
|
|
|
@ -40,7 +40,7 @@ struct InstanceWrapper {
|
|||
|
||||
// Things that used to be exported from InstanceManager, but probably belong
|
||||
// elsewhere
|
||||
std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstance(
|
||||
std::shared_ptr<InstanceWrapper> CreateReactInstance(
|
||||
std::string &&jsBundleRelativePath,
|
||||
std::vector<
|
||||
std::tuple<std::string, facebook::xplat::module::CxxModule::Provider, std::shared_ptr<MessageQueueThread>>>
|
||||
|
@ -50,7 +50,7 @@ std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstance(
|
|||
std::shared_ptr<MessageQueueThread> nativeQueue,
|
||||
std::shared_ptr<DevSettings> devSettings) noexcept;
|
||||
|
||||
std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstance(
|
||||
std::shared_ptr<InstanceWrapper> CreateReactInstance(
|
||||
std::string &&jsBundleBasePath,
|
||||
std::string &&jsBundleRelativePath,
|
||||
std::vector<
|
||||
|
@ -62,7 +62,7 @@ std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstance(
|
|||
std::shared_ptr<DevSettings> devSettings) noexcept;
|
||||
|
||||
#ifdef PATCH_RN
|
||||
std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstanceForSandbox(
|
||||
std::shared_ptr<InstanceWrapper> CreateReactInstanceForSandbox(
|
||||
std::string &&jsString,
|
||||
std::string &&configsString,
|
||||
std::string &&sourceUrl,
|
||||
|
@ -71,7 +71,7 @@ std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstanceForSandbox(
|
|||
std::shared_ptr<DevSettings> devSettings,
|
||||
std::function<void(std::string &&message)> &&sendNativeModuleCall) noexcept;
|
||||
|
||||
std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstanceForSandbox(
|
||||
std::shared_ptr<InstanceWrapper> CreateReactInstanceForSandbox(
|
||||
std::string &&jsBundleBasePath,
|
||||
std::string &&jsBundleRelativePath,
|
||||
std::string &&configsString,
|
||||
|
|
|
@ -18,7 +18,7 @@ enum class RCTLogLevel {
|
|||
};
|
||||
|
||||
using NativeLoggingHook = std::function<void(RCTLogLevel logLevel, const char *message)>;
|
||||
void __cdecl InitializeLogging(NativeLoggingHook &&hook);
|
||||
void InitializeLogging(NativeLoggingHook &&hook);
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
|
|
|
@ -8,8 +8,6 @@ namespace Microsoft::JSI {
|
|||
|
||||
// We only support files whose size can fit within an uint32_t. Memory
|
||||
// mapping an empty or a larger file fails.
|
||||
std::shared_ptr<facebook::jsi::Buffer> __cdecl MakeMemoryMappedBuffer(
|
||||
const wchar_t *const filename,
|
||||
uint32_t offset = 0);
|
||||
std::shared_ptr<facebook::jsi::Buffer> MakeMemoryMappedBuffer(const wchar_t *const filename, uint32_t offset = 0);
|
||||
|
||||
} // namespace Microsoft::JSI
|
||||
|
|
|
@ -148,7 +148,7 @@ MemoryTrackerImpl::ThresholdCallbackRecord::ThresholdCallbackRecord(
|
|||
MemoryThresholdCallback &&callback) noexcept
|
||||
: Threshold{threshold}, MinCallbackInterval{minCallbackInterval}, Callback{std::move(callback)} {}
|
||||
|
||||
std::shared_ptr<MemoryTracker> __cdecl CreateMemoryTracker(
|
||||
std::shared_ptr<MemoryTracker> CreateMemoryTracker(
|
||||
std::shared_ptr<MessageQueueThread> &&callbackMessageQueueThread) noexcept {
|
||||
return std::make_shared<MemoryTrackerImpl>(std::move(callbackMessageQueueThread));
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ class MemoryTracker {
|
|||
* must be set via MemoryTracker::SetCallbackMessageQueueThread before callbacks
|
||||
* are going to be invoked.
|
||||
*/
|
||||
std::shared_ptr<MemoryTracker> __cdecl CreateMemoryTracker(
|
||||
std::shared_ptr<MemoryTracker> CreateMemoryTracker(
|
||||
std::shared_ptr<MessageQueueThread> &&callbackMessageQueueThread = nullptr) noexcept;
|
||||
|
||||
} // namespace react
|
||||
|
|
|
@ -21,9 +21,9 @@ std::vector<facebook::xplat::module::CxxModule::Method> I18nModule::getMethods()
|
|||
return {};
|
||||
}
|
||||
|
||||
std::unique_ptr<facebook::xplat::module::CxxModule> __cdecl createI18nModule(std::unique_ptr<II18nModule> module) {
|
||||
std::unique_ptr<facebook::xplat::module::CxxModule> createI18nModule(std::unique_ptr<II18nModule> module) {
|
||||
return std::make_unique<I18nModule>(std::move(module));
|
||||
}
|
||||
|
||||
} // namespace windows
|
||||
} // namespace react
|
||||
} // namespace react
|
|
@ -22,7 +22,7 @@ class I18nModule : public facebook::xplat::module::CxxModule {
|
|||
std::unique_ptr<II18nModule> m_module;
|
||||
};
|
||||
|
||||
std::unique_ptr<facebook::xplat::module::CxxModule> __cdecl createI18nModule(std::unique_ptr<II18nModule> module);
|
||||
std::unique_ptr<facebook::xplat::module::CxxModule> createI18nModule(std::unique_ptr<II18nModule> module);
|
||||
|
||||
} // namespace windows
|
||||
} // namespace react
|
||||
|
|
|
@ -543,7 +543,7 @@ std::vector<facebook::xplat::module::CxxModule::Method> UIManagerModule::getMeth
|
|||
};
|
||||
}
|
||||
|
||||
shared_ptr<IUIManager> __cdecl createIUIManager(
|
||||
shared_ptr<IUIManager> createIUIManager(
|
||||
std::vector<std::unique_ptr<IViewManager>> &&viewManagers,
|
||||
INativeUIManager *nativeManager) {
|
||||
return std::make_shared<UIManager>(std::move(viewManagers), nativeManager);
|
||||
|
@ -556,8 +556,7 @@ std::unique_ptr<facebook::xplat::module::CxxModule> createUIManagerModule(
|
|||
}
|
||||
|
||||
// Deprecated
|
||||
std::unique_ptr<facebook::xplat::module::CxxModule> __cdecl createUIManagerModule(
|
||||
std::shared_ptr<IUIManager> uimanager) {
|
||||
std::unique_ptr<facebook::xplat::module::CxxModule> createUIManagerModule(std::shared_ptr<IUIManager> uimanager) {
|
||||
return createUIManagerModule(std::move(uimanager), nullptr);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ struct INativeTraceHandler {
|
|||
NativeEndSection(const char *profileName, const char *args, std::chrono::nanoseconds duration) noexcept = 0;
|
||||
};
|
||||
|
||||
void __cdecl InitializeTracing(INativeTraceHandler *handler);
|
||||
void InitializeTracing(INativeTraceHandler *handler);
|
||||
|
||||
} // namespace react
|
||||
} // namespace facebook
|
||||
|
|
|
@ -14,17 +14,13 @@
|
|||
<file src="$vcpkgroot$\installed\x86-windows-static\include\openssl\**\*.*" target="include\x86\openssl" />
|
||||
<file src="$vcpkgroot$\installed\x86-windows-static\debug\lib\libcrypto.lib" target="lib\x86\Debug" />
|
||||
<file src="$vcpkgroot$\installed\x86-windows-static\debug\lib\libssl.lib" target="lib\x86\Debug" />
|
||||
<file src="$vcpkgroot$\installed\x86-windows-static\debug\lib\ossl_static.pdb" target="lib\x86\Debug" />
|
||||
<file src="$vcpkgroot$\installed\x86-windows-static\lib\libcrypto.lib" target="lib\x86\Release" />
|
||||
<file src="$vcpkgroot$\installed\x86-windows-static\lib\libssl.lib" target="lib\x86\Release" />
|
||||
<file src="$vcpkgroot$\installed\x86-windows-static\lib\ossl_static.pdb" target="lib\x86\Release" />
|
||||
|
||||
<file src="$vcpkgroot$\installed\x64-windows-static\include\openssl\**\*.*" target="include\x64\openssl" />
|
||||
<file src="$vcpkgroot$\installed\x64-windows-static\debug\lib\libcrypto.lib" target="lib\x64\Debug" />
|
||||
<file src="$vcpkgroot$\installed\x64-windows-static\debug\lib\libssl.lib" target="lib\x64\Debug" />
|
||||
<file src="$vcpkgroot$\installed\x64-windows-static\debug\lib\ossl_static.pdb" target="lib\x64\Debug" />
|
||||
<file src="$vcpkgroot$\installed\x64-windows-static\lib\libcrypto.lib" target="lib\x64\Release" />
|
||||
<file src="$vcpkgroot$\installed\x64-windows-static\lib\libssl.lib" target="lib\x64\Release" />
|
||||
<file src="$vcpkgroot$\installed\x64-windows-static\lib\ossl_static.pdb" target="lib\x64\Release" />
|
||||
</files>
|
||||
</package>
|
||||
|
|
|
@ -24,7 +24,7 @@ const std::shared_ptr<IDevSupportManager> &GetSharedDevManager() noexcept {
|
|||
|
||||
} // namespace
|
||||
|
||||
std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstance(
|
||||
std::shared_ptr<InstanceWrapper> CreateReactInstance(
|
||||
std::string &&jsBundleBasePath,
|
||||
std::vector<
|
||||
std::tuple<std::string, facebook::xplat::module::CxxModule::Provider, std::shared_ptr<MessageQueueThread>>>
|
||||
|
@ -46,7 +46,7 @@ std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstance(
|
|||
return instance;
|
||||
}
|
||||
|
||||
std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstance(
|
||||
std::shared_ptr<InstanceWrapper> CreateReactInstance(
|
||||
std::string &&jsBundleBasePath,
|
||||
std::string &&jsBundleRelativePath,
|
||||
std::vector<
|
||||
|
@ -72,7 +72,7 @@ std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstance(
|
|||
|
||||
#if (defined(_MSC_VER) && !defined(WINRT))
|
||||
#ifdef PATCH_RN
|
||||
std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstanceForSandbox(
|
||||
std::shared_ptr<InstanceWrapper> CreateReactInstanceForSandbox(
|
||||
std::string &&jsString,
|
||||
std::string &&configsString,
|
||||
std::string &&sourceUrl,
|
||||
|
@ -91,7 +91,7 @@ std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstanceForSandbox(
|
|||
std::move(sendNativeModuleCall));
|
||||
};
|
||||
|
||||
std::shared_ptr<InstanceWrapper> __cdecl CreateReactInstanceForSandbox(
|
||||
std::shared_ptr<InstanceWrapper> CreateReactInstanceForSandbox(
|
||||
std::string &&jsBundleBasePath,
|
||||
std::string &&jsBundleRelativePath,
|
||||
std::string &&configsString,
|
||||
|
|
|
@ -27,7 +27,7 @@ static double nativePerformanceNow() {
|
|||
void logMarker(const ReactMarker::ReactMarkerId /*id*/, const char * /*tag*/) {}
|
||||
} // end anonymous namespace
|
||||
|
||||
void __cdecl InitializeLogging(NativeLoggingHook &&hook) {
|
||||
void InitializeLogging(NativeLoggingHook &&hook) {
|
||||
g_nativeLogHook = std::move(hook);
|
||||
|
||||
JSNativeHooks::loggingHook = LogHook;
|
||||
|
|
|
@ -124,7 +124,7 @@ const uint8_t *MemoryMappedBuffer::data() const {
|
|||
|
||||
namespace Microsoft::JSI {
|
||||
|
||||
std::shared_ptr<facebook::jsi::Buffer> __cdecl MakeMemoryMappedBuffer(const wchar_t *const filename, uint32_t offset) {
|
||||
std::shared_ptr<facebook::jsi::Buffer> MakeMemoryMappedBuffer(const wchar_t *const filename, uint32_t offset) {
|
||||
return std::make_shared<MemoryMappedBuffer>(filename, offset);
|
||||
}
|
||||
|
||||
|
|
|
@ -237,12 +237,12 @@ void HttpServer::Stop() {
|
|||
m_acceptor.close();
|
||||
}
|
||||
|
||||
void HttpServer::SetOnResponseSent(function<void __cdecl()> &&handler) noexcept {
|
||||
void HttpServer::SetOnResponseSent(function<void()> &&handler) noexcept {
|
||||
m_callbacks.OnResponseSent = std::move(handler);
|
||||
}
|
||||
|
||||
void HttpServer::SetOnGet(
|
||||
function<http::response<http::dynamic_body> __cdecl(const http::request<http::string_body> &)> &&handler) noexcept {
|
||||
function<http::response<http::dynamic_body>(const http::request<http::string_body> &)> &&handler) noexcept {
|
||||
m_callbacks.OnGet = std::move(handler);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ boost::beast::multi_buffer CreateStringResponseBody(std::string &&content);
|
|||
#pragma endregion Utility functions
|
||||
|
||||
struct HttpCallbacks {
|
||||
std::function<void __cdecl()> OnResponseSent;
|
||||
std::function<boost::beast::http::response<boost::beast::http::dynamic_body> __cdecl(
|
||||
std::function<void()> OnResponseSent;
|
||||
std::function<boost::beast::http::response<boost::beast::http::dynamic_body>(
|
||||
const boost::beast::http::request<boost::beast::http::string_body> &)>
|
||||
OnGet;
|
||||
};
|
||||
|
@ -80,13 +80,13 @@ class HttpServer : public std::enable_shared_from_this<HttpServer> {
|
|||
///
|
||||
// Callback to invoke after a successful response is sent.
|
||||
///
|
||||
void SetOnResponseSent(std::function<void __cdecl()> &&handler) noexcept;
|
||||
void SetOnResponseSent(std::function<void()> &&handler) noexcept;
|
||||
|
||||
///
|
||||
// Function that creates an HTTP response to send to the client on GET
|
||||
// requests.
|
||||
///
|
||||
void SetOnGet(std::function<boost::beast::http::response<boost::beast::http::dynamic_body> __cdecl(
|
||||
void SetOnGet(std::function<boost::beast::http::response<boost::beast::http::dynamic_body>(
|
||||
const boost::beast::http::request<boost::beast::http::string_body> &)> &&onGet) noexcept;
|
||||
};
|
||||
|
||||
|
|
|
@ -68,13 +68,13 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
<Import Project="$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets" Condition="Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" />
|
||||
<Import Project="$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets" Condition="Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" />
|
||||
</ImportGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\boost.1.68.0.0\build\boost.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.v141.Static.1.1.1-d.1\build\native\ReactWindows.OpenSSL.v141.Static.targets'))" />
|
||||
<Error Condition="!Exists('$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\ReactWindows.OpenSSL.StdCall.Static.1.0.2-p.2\build\native\ReactWindows.OpenSSL.StdCall.Static.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -334,23 +334,23 @@ void WebSocketServer::OnAccept(error_code ec) {
|
|||
// Accept();
|
||||
}
|
||||
|
||||
void WebSocketServer::SetOnConnection(function<void __cdecl()> &&func) {
|
||||
void WebSocketServer::SetOnConnection(function<void()> &&func) {
|
||||
m_callbacks.OnConnection = std::move(func);
|
||||
}
|
||||
|
||||
void WebSocketServer::SetOnHandshake(function<void __cdecl(websocket::response_type &)> &&func) {
|
||||
void WebSocketServer::SetOnHandshake(function<void(websocket::response_type &)> &&func) {
|
||||
m_callbacks.OnHandshake = std::move(func);
|
||||
}
|
||||
|
||||
void WebSocketServer::SetOnMessage(function<void __cdecl(string)> &&func) {
|
||||
void WebSocketServer::SetOnMessage(function<void(string)> &&func) {
|
||||
m_callbacks.OnMessage = std::move(func);
|
||||
}
|
||||
|
||||
void WebSocketServer::SetMessageFactory(function<string __cdecl(string &&)> &&func) {
|
||||
void WebSocketServer::SetMessageFactory(function<string(string &&)> &&func) {
|
||||
m_callbacks.MessageFactory = std::move(func);
|
||||
}
|
||||
|
||||
void WebSocketServer::SetOnError(function<void __cdecl(IWebSocket::Error &&)> &&func) {
|
||||
void WebSocketServer::SetOnError(function<void(IWebSocket::Error &&)> &&func) {
|
||||
m_callbacks.OnError = std::move(func);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
namespace Microsoft::React::Test {
|
||||
|
||||
struct WebSocketServiceCallbacks {
|
||||
std::function<void __cdecl()> OnConnection;
|
||||
std::function<void __cdecl(boost::beast::websocket::response_type &)> OnHandshake;
|
||||
std::function<void __cdecl(std::string)> OnMessage;
|
||||
std::function<std::string __cdecl(std::string &&)> MessageFactory;
|
||||
std::function<void __cdecl(IWebSocket::Error &&)> OnError;
|
||||
std::function<void()> OnConnection;
|
||||
std::function<void(boost::beast::websocket::response_type &)> OnHandshake;
|
||||
std::function<void(std::string)> OnMessage;
|
||||
std::function<std::string(std::string &&)> MessageFactory;
|
||||
std::function<void(IWebSocket::Error &&)> OnError;
|
||||
};
|
||||
|
||||
struct IWebSocketSession {
|
||||
|
@ -31,7 +31,7 @@ class BaseWebSocketSession : public IWebSocketSession {
|
|||
WebSocketServiceCallbacks &m_callbacks;
|
||||
State m_state;
|
||||
|
||||
std::function<void __cdecl(IWebSocket::Error &&)> m_errorHandler;
|
||||
std::function<void(IWebSocket::Error &&)> m_errorHandler;
|
||||
|
||||
void Read();
|
||||
|
||||
|
@ -102,11 +102,11 @@ class WebSocketServer : public std::enable_shared_from_this<WebSocketServer> {
|
|||
void Start();
|
||||
void Stop();
|
||||
|
||||
void SetOnConnection(std::function<void __cdecl()> &&func);
|
||||
void SetOnHandshake(std::function<void __cdecl(boost::beast::websocket::response_type &)> &&func);
|
||||
void SetOnMessage(std::function<void __cdecl(std::string)> &&func);
|
||||
void SetMessageFactory(std::function<std::string __cdecl(std::string &&)> &&func);
|
||||
void SetOnError(std::function<void __cdecl(IWebSocket::Error &&)> &&func);
|
||||
void SetOnConnection(std::function<void()> &&func);
|
||||
void SetOnHandshake(std::function<void(boost::beast::websocket::response_type &)> &&func);
|
||||
void SetOnMessage(std::function<void(std::string)> &&func);
|
||||
void SetMessageFactory(std::function<std::string(std::string &&)> &&func);
|
||||
void SetOnError(std::function<void(IWebSocket::Error &&)> &&func);
|
||||
};
|
||||
|
||||
} // namespace Microsoft::React::Test
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="boost" version="1.68.0.0" targetFramework="native" />
|
||||
<package id="ReactWindows.OpenSSL.v141.Static" version="1.1.1-d.1" targetFramework="native" />
|
||||
<package id="ReactWindows.OpenSSL.StdCall.Static" version="1.0.2-p.2" targetFramework="native" />
|
||||
</packages>
|
|
@ -14,6 +14,6 @@ struct II18nModule {
|
|||
virtual bool getIsRTL() = 0;
|
||||
};
|
||||
|
||||
std::unique_ptr<facebook::xplat::module::CxxModule> __cdecl createI18nModule(std::unique_ptr<II18nModule> module);
|
||||
std::unique_ptr<facebook::xplat::module::CxxModule> createI18nModule(std::unique_ptr<II18nModule> module);
|
||||
} // namespace windows
|
||||
} // namespace react
|
||||
} // namespace react
|
Загрузка…
Ссылка в новой задаче