slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
类型定义 | 函数
YGConfig.h 文件参考
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <yoga/YGEnums.h>
#include <yoga/YGMacros.h>
YGConfig.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

类型定义

typedef typedefYG_EXTERN_C_BEGIN struct YGNodeYGNodeRef
 
typedef const struct YGNodeYGNodeConstRef
 
typedef struct YGConfigYGConfigRef
 
typedef const struct YGConfigYGConfigConstRef
 
typedef int(* YGLogger) (YGConfigConstRef config, YGNodeConstRef node, YGLogLevel level, const char *format, va_list args)
 
typedef YGNodeRef(* YGCloneNodeFunc) (YGNodeConstRef oldNode, YGNodeConstRef owner, size_t childIndex)
 

函数

YG_EXPORT YGConfigRef YGConfigNew (void)
 
YG_EXPORT void YGConfigFree (YGConfigRef config)
 
YG_EXPORT YGConfigConstRef YGConfigGetDefault (void)
 
YG_EXPORT void YGConfigSetUseWebDefaults (YGConfigRef config, bool enabled)
 
YG_EXPORT bool YGConfigGetUseWebDefaults (YGConfigConstRef config)
 
YG_EXPORT void YGConfigSetPointScaleFactor (YGConfigRef config, float pixelsInPoint)
 
YG_EXPORT float YGConfigGetPointScaleFactor (YGConfigConstRef config)
 
YG_EXPORT void YGConfigSetErrata (YGConfigRef config, YGErrata errata)
 
YG_EXPORT YGErrata YGConfigGetErrata (YGConfigConstRef config)
 
YG_EXPORT void YGConfigSetLogger (YGConfigRef config, YGLogger logger)
 
YG_EXPORT void YGConfigSetContext (YGConfigRef config, void *context)
 
YG_EXPORT void * YGConfigGetContext (YGConfigConstRef config)
 
YG_EXPORT void YGConfigSetExperimentalFeatureEnabled (YGConfigRef config, YGExperimentalFeature feature, bool enabled)
 
YG_EXPORT bool YGConfigIsExperimentalFeatureEnabled (YGConfigConstRef config, YGExperimentalFeature feature)
 
YG_EXPORT void YGConfigSetCloneNodeFunc (YGConfigRef config, YGCloneNodeFunc callback)
 

类型定义说明

◆ YGCloneNodeFunc

typedef YGNodeRef(* YGCloneNodeFunc) (YGNodeConstRef oldNode, YGNodeConstRef owner, size_t childIndex)

Function pointer type for YGConfigSetCloneNodeFunc.

◆ YGConfigConstRef

typedef const struct YGConfig* YGConfigConstRef

Handle to an immutable Yoga configuration.

◆ YGConfigRef

typedef struct YGConfig* YGConfigRef

Handle to a mutable Yoga configuration.

◆ YGLogger

typedef int(* YGLogger) (YGConfigConstRef config, YGNodeConstRef node, YGLogLevel level, const char *format, va_list args)

Function pointer type for YGConfigSetLogger.

◆ YGNodeConstRef

typedef const struct YGNode* YGNodeConstRef

◆ YGNodeRef

typedef typedefYG_EXTERN_C_BEGIN struct YGNode* YGNodeRef

函数说明

◆ YGConfigFree()

YG_EXPORT void YGConfigFree ( YGConfigRef config)

Frees the associated Yoga configuration.

函数调用图:

◆ YGConfigGetContext()

YG_EXPORT void * YGConfigGetContext ( YGConfigConstRef config)

Gets the currently set context.

函数调用图:
这是这个函数的调用关系图:

◆ YGConfigGetDefault()

YG_EXPORT YGConfigConstRef YGConfigGetDefault ( void )

Returns the default config values set by Yoga.

函数调用图:
这是这个函数的调用关系图:

◆ YGConfigGetErrata()

YG_EXPORT YGErrata YGConfigGetErrata ( YGConfigConstRef config)

Get the currently set errata.

函数调用图:
这是这个函数的调用关系图:

◆ YGConfigGetPointScaleFactor()

YG_EXPORT float YGConfigGetPointScaleFactor ( YGConfigConstRef config)

Get the currently set point scale factor.

函数调用图:
这是这个函数的调用关系图:

◆ YGConfigGetUseWebDefaults()

YG_EXPORT bool YGConfigGetUseWebDefaults ( YGConfigConstRef config)

Whether the configuration is set to use web defaults.

函数调用图:
这是这个函数的调用关系图:

◆ YGConfigIsExperimentalFeatureEnabled()

YG_EXPORT bool YGConfigIsExperimentalFeatureEnabled ( YGConfigConstRef config,
YGExperimentalFeature feature )

Whether an experimental feature is set.

函数调用图:
这是这个函数的调用关系图:

◆ YGConfigNew()

YG_EXPORT YGConfigRef YGConfigNew ( void )

Allocates a set of configuration options. The configuration may be applied to multiple nodes (i.e. a single global config), or can be applied more granularly per-node.

函数调用图:

◆ YGConfigSetCloneNodeFunc()

YG_EXPORT void YGConfigSetCloneNodeFunc ( YGConfigRef config,
YGCloneNodeFunc callback )

Sets a callback, called during layout, to create a new mutable Yoga node if Yoga must write to it and its owner is not its parent observed during layout.

函数调用图:
这是这个函数的调用关系图:

◆ YGConfigSetContext()

YG_EXPORT void YGConfigSetContext ( YGConfigRef config,
void * context )

Sets an arbitrary context pointer on the config which may be read from during callbacks.

函数调用图:
这是这个函数的调用关系图:

◆ YGConfigSetErrata()

YG_EXPORT void YGConfigSetErrata ( YGConfigRef config,
YGErrata errata )

Configures how Yoga balances W3C conformance vs compatibility with layouts created against earlier versions of Yoga.

By default Yoga will prioritize W3C conformance. Errata may be set to ask Yoga to produce specific incorrect behaviors. E.g. YGConfigSetErrata(config, YGErrataStretchFlexBasis).

YGErrata is a bitmask, and multiple errata may be set at once. Predefined constants exist for convenience:

  1. YGErrataNone: No errata
  2. YGErrataClassic: Match layout behaviors of Yoga 1.x
  3. YGErrataAll: Match layout behaviors of Yoga 1.x, including UseLegacyStretchBehaviour
函数调用图:
这是这个函数的调用关系图:

◆ YGConfigSetExperimentalFeatureEnabled()

YG_EXPORT void YGConfigSetExperimentalFeatureEnabled ( YGConfigRef config,
YGExperimentalFeature feature,
bool enabled )

Enable an experimental/unsupported feature in Yoga.

函数调用图:
这是这个函数的调用关系图:

◆ YGConfigSetLogger()

YG_EXPORT void YGConfigSetLogger ( YGConfigRef config,
YGLogger logger )

Set a custom log function for to use when logging diagnostics or fatal. errors.

函数调用图:
这是这个函数的调用关系图:

◆ YGConfigSetPointScaleFactor()

YG_EXPORT void YGConfigSetPointScaleFactor ( YGConfigRef config,
float pixelsInPoint )

Yoga will by default round final layout positions and dimensions to the nearst point. pointScaleFactor controls the density of the grid used for layout rounding (e.g. to round to the closest display pixel).

May be set to 0.0f to avoid rounding the layout results.

函数调用图:
这是这个函数的调用关系图:

◆ YGConfigSetUseWebDefaults()

YG_EXPORT void YGConfigSetUseWebDefaults ( YGConfigRef config,
bool enabled )

Yoga by default creates new nodes with style defaults different from flexbox on web (e.g. YGFlexDirectionColumn and YGPositionRelative). UseWebDefaults instructs Yoga to instead use a default style consistent with the web.

函数调用图:
这是这个函数的调用关系图: