mirror of
https://github.com/status-im/react-native.git
synced 2025-01-28 10:14:49 +00:00
0ec984e69a
Summary: See facebook/yoga#453. Optimizes the node log print by generating some enum text via ```enum.py``` and moving printing to new functions to reduce boilerplate code. Changes the log output to format the nodes in html to be able to copy paste it into browsers for quick debugging. Hides all default values. Closes https://github.com/facebook/yoga/pull/479 Reviewed By: gkassabli Differential Revision: D4802184 Pulled By: emilsjolander fbshipit-source-id: 143bd63cbc31fb0755d711062cb4e6a448049ba3
151 lines
3.9 KiB
C
151 lines
3.9 KiB
C
/**
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "YGMacros.h"
|
|
|
|
YG_EXTERN_C_BEGIN
|
|
|
|
#define YGAlignCount 8
|
|
typedef YG_ENUM_BEGIN(YGAlign) {
|
|
YGAlignAuto,
|
|
YGAlignFlexStart,
|
|
YGAlignCenter,
|
|
YGAlignFlexEnd,
|
|
YGAlignStretch,
|
|
YGAlignBaseline,
|
|
YGAlignSpaceBetween,
|
|
YGAlignSpaceAround,
|
|
} YG_ENUM_END(YGAlign);
|
|
WIN_EXPORT const char *YGAlignToString(const YGAlign value);
|
|
|
|
#define YGDimensionCount 2
|
|
typedef YG_ENUM_BEGIN(YGDimension) {
|
|
YGDimensionWidth,
|
|
YGDimensionHeight,
|
|
} YG_ENUM_END(YGDimension);
|
|
WIN_EXPORT const char *YGDimensionToString(const YGDimension value);
|
|
|
|
#define YGDirectionCount 3
|
|
typedef YG_ENUM_BEGIN(YGDirection) {
|
|
YGDirectionInherit,
|
|
YGDirectionLTR,
|
|
YGDirectionRTL,
|
|
} YG_ENUM_END(YGDirection);
|
|
WIN_EXPORT const char *YGDirectionToString(const YGDirection value);
|
|
|
|
#define YGDisplayCount 2
|
|
typedef YG_ENUM_BEGIN(YGDisplay) {
|
|
YGDisplayFlex,
|
|
YGDisplayNone,
|
|
} YG_ENUM_END(YGDisplay);
|
|
WIN_EXPORT const char *YGDisplayToString(const YGDisplay value);
|
|
|
|
#define YGEdgeCount 9
|
|
typedef YG_ENUM_BEGIN(YGEdge) {
|
|
YGEdgeLeft,
|
|
YGEdgeTop,
|
|
YGEdgeRight,
|
|
YGEdgeBottom,
|
|
YGEdgeStart,
|
|
YGEdgeEnd,
|
|
YGEdgeHorizontal,
|
|
YGEdgeVertical,
|
|
YGEdgeAll,
|
|
} YG_ENUM_END(YGEdge);
|
|
WIN_EXPORT const char *YGEdgeToString(const YGEdge value);
|
|
|
|
#define YGExperimentalFeatureCount 3
|
|
typedef YG_ENUM_BEGIN(YGExperimentalFeature) {
|
|
YGExperimentalFeatureRounding,
|
|
YGExperimentalFeatureWebFlexBasis,
|
|
YGExperimentalFeatureMinFlexFix,
|
|
} YG_ENUM_END(YGExperimentalFeature);
|
|
WIN_EXPORT const char *YGExperimentalFeatureToString(const YGExperimentalFeature value);
|
|
|
|
#define YGFlexDirectionCount 4
|
|
typedef YG_ENUM_BEGIN(YGFlexDirection) {
|
|
YGFlexDirectionColumn,
|
|
YGFlexDirectionColumnReverse,
|
|
YGFlexDirectionRow,
|
|
YGFlexDirectionRowReverse,
|
|
} YG_ENUM_END(YGFlexDirection);
|
|
WIN_EXPORT const char *YGFlexDirectionToString(const YGFlexDirection value);
|
|
|
|
#define YGJustifyCount 5
|
|
typedef YG_ENUM_BEGIN(YGJustify) {
|
|
YGJustifyFlexStart,
|
|
YGJustifyCenter,
|
|
YGJustifyFlexEnd,
|
|
YGJustifySpaceBetween,
|
|
YGJustifySpaceAround,
|
|
} YG_ENUM_END(YGJustify);
|
|
WIN_EXPORT const char *YGJustifyToString(const YGJustify value);
|
|
|
|
#define YGLogLevelCount 5
|
|
typedef YG_ENUM_BEGIN(YGLogLevel) {
|
|
YGLogLevelError,
|
|
YGLogLevelWarn,
|
|
YGLogLevelInfo,
|
|
YGLogLevelDebug,
|
|
YGLogLevelVerbose,
|
|
} YG_ENUM_END(YGLogLevel);
|
|
WIN_EXPORT const char *YGLogLevelToString(const YGLogLevel value);
|
|
|
|
#define YGMeasureModeCount 3
|
|
typedef YG_ENUM_BEGIN(YGMeasureMode) {
|
|
YGMeasureModeUndefined,
|
|
YGMeasureModeExactly,
|
|
YGMeasureModeAtMost,
|
|
} YG_ENUM_END(YGMeasureMode);
|
|
WIN_EXPORT const char *YGMeasureModeToString(const YGMeasureMode value);
|
|
|
|
#define YGOverflowCount 3
|
|
typedef YG_ENUM_BEGIN(YGOverflow) {
|
|
YGOverflowVisible,
|
|
YGOverflowHidden,
|
|
YGOverflowScroll,
|
|
} YG_ENUM_END(YGOverflow);
|
|
WIN_EXPORT const char *YGOverflowToString(const YGOverflow value);
|
|
|
|
#define YGPositionTypeCount 2
|
|
typedef YG_ENUM_BEGIN(YGPositionType) {
|
|
YGPositionTypeRelative,
|
|
YGPositionTypeAbsolute,
|
|
} YG_ENUM_END(YGPositionType);
|
|
WIN_EXPORT const char *YGPositionTypeToString(const YGPositionType value);
|
|
|
|
#define YGPrintOptionsCount 3
|
|
typedef YG_ENUM_BEGIN(YGPrintOptions) {
|
|
YGPrintOptionsLayout = 1,
|
|
YGPrintOptionsStyle = 2,
|
|
YGPrintOptionsChildren = 4,
|
|
} YG_ENUM_END(YGPrintOptions);
|
|
WIN_EXPORT const char *YGPrintOptionsToString(const YGPrintOptions value);
|
|
|
|
#define YGUnitCount 4
|
|
typedef YG_ENUM_BEGIN(YGUnit) {
|
|
YGUnitUndefined,
|
|
YGUnitPoint,
|
|
YGUnitPercent,
|
|
YGUnitAuto,
|
|
} YG_ENUM_END(YGUnit);
|
|
WIN_EXPORT const char *YGUnitToString(const YGUnit value);
|
|
|
|
#define YGWrapCount 3
|
|
typedef YG_ENUM_BEGIN(YGWrap) {
|
|
YGWrapNoWrap,
|
|
YGWrapWrap,
|
|
YGWrapWrapReverse,
|
|
} YG_ENUM_END(YGWrap);
|
|
WIN_EXPORT const char *YGWrapToString(const YGWrap value);
|
|
|
|
YG_EXTERN_C_END
|