slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
NodeToString.h
浏览该文件的文档.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#pragma once
9
10#include <chrono>
11#include <string>
12
13#include <capture/CaptureTree.h>
14#include <nlohmann/json.hpp>
15#include <yoga/Yoga.h>
16
17namespace facebook::yoga {
18
19enum class PrintOptions : uint8_t {
20 Layout = 1 << 0,
21 Children = 1 << 1,
22 Style = 1 << 2,
23 Config = 1 << 3,
24 Node = 1 << 4,
25};
27
28void serializeTree(
29 nlohmann::json& j,
30 SerializedMeasureFuncMap& nodesToMeasureFuncs,
31 YGNodeRef node,
32 PrintOptions options);
33
35 nlohmann::json& j,
36 float availableWidth,
37 float availableHeight,
38 YGDirection ownerDirection);
39
40} // namespace facebook::yoga
typedefYG_EXTERN_C_BEGIN struct YGNode * YGNodeRef
Definition YGConfig.h:19
#define YG_DEFINE_ENUM_FLAG_OPERATORS(name)
Definition YGMacros.h:96
float YGMeasureMode float availableHeight
Definition YGNode.h:293
float availableWidth
Definition YGNode.h:291
Definition Config.h:33
Definition Style.h:40
Definition Benchmark.cpp:19
PrintOptions
Definition NodeToString.h:19
void serializeTree(json &j, SerializedMeasureFuncMap &nodesToMeasureFuncs, YGNodeRef node, PrintOptions options)
Definition NodeToString.cpp:339
std::unordered_map< YGNodeConstRef, std::vector< SerializedMeasureFunc > > SerializedMeasureFuncMap
Definition CaptureTree.h:28
void serializeLayoutInputs(json &j, float availableWidth, float availableHeight, YGDirection ownerDirection)
Definition NodeToString.cpp:347