Deleted YGSetMemoryFucs as it is unused
Summary: Removed YGSetMemoryFuncs, as it is not used internally and barely externally. Reviewed By: emilsjolander Differential Revision: D6374147 fbshipit-source-id: 8c896dce23571268a1a52df5cc72486af9d66df7
This commit is contained in:
committed by
Facebook Github Bot
parent
5b0dfa471f
commit
d98e5aef97
@@ -52,7 +52,7 @@ typedef enum YGFlexDirection {
|
||||
YGFlexDirectionRowReverse,
|
||||
} YGFlexDirection;
|
||||
|
||||
void YGNodeStyleSetFlexDirection(YGNodeRef node,
|
||||
void YGNodeStyleSetFlexDirection(YGNodeRef node,
|
||||
YGFlexDirection flexDirection);
|
||||
YGFlexDirection YGNodeStyleGetFlexDirection(YGNodeRef node);
|
||||
|
||||
@@ -64,7 +64,7 @@ typedef enum YGJustify {
|
||||
YGJustifySpaceAround,
|
||||
} YGJustify;
|
||||
|
||||
void YGNodeStyleSetJustifyContent(YGNodeRef node,
|
||||
void YGNodeStyleSetJustifyContent(YGNodeRef node,
|
||||
YGJustify justifyContent);
|
||||
YGJustify YGNodeStyleGetJustifyContent(YGNodeRef node);
|
||||
|
||||
@@ -90,7 +90,7 @@ typedef enum YGPositionType {
|
||||
YGPositionTypeAbsolute,
|
||||
} YGPositionType;
|
||||
|
||||
void YGNodeStyleSetPositionType(YGNodeRef node,
|
||||
void YGNodeStyleSetPositionType(YGNodeRef node,
|
||||
YGPositionType positionType);
|
||||
YGPositionType YGNodeStyleGetPositionType(YGNodeRef node);
|
||||
|
||||
@@ -173,9 +173,9 @@ float YGNodeStyleGetAspectRatio(YGNodeRef node);
|
||||
Once you have set up a tree of nodes with styles you will want to get the result of a layout calculation. Call `YGNodeCalculateLayout` with the desired width and height or `YGUndefined` to perform the layout calculation. Once this function returns the results of the layout calculation is stored on each node. Traverse the tree and retrieve the values from each node.
|
||||
|
||||
```c
|
||||
void YGNodeCalculateLayout(YGNodeRef node,
|
||||
float availableWidth,
|
||||
float availableHeight,
|
||||
void YGNodeCalculateLayout(YGNodeRef node,
|
||||
float availableWidth,
|
||||
float availableHeight,
|
||||
YGDirection parentDirection);
|
||||
float YGNodeLayoutGetLeft(YGNodeRef node);
|
||||
float YGNodeLayoutGetTop(YGNodeRef node);
|
||||
@@ -255,27 +255,11 @@ typedef enum YGExperimentalFeature {
|
||||
// Current experiments
|
||||
} YGExperimentalFeature;
|
||||
|
||||
void YGSetExperimentalFeatureEnabled(YGExperimentalFeature feature,
|
||||
void YGSetExperimentalFeatureEnabled(YGExperimentalFeature feature,
|
||||
bool enabled);
|
||||
bool YGIsExperimentalFeatureEnabled(YGExperimentalFeature feature);
|
||||
```
|
||||
|
||||
### Custom allocators
|
||||
|
||||
You may want to swap out the allocator used in Yoga. These functions allow that.
|
||||
|
||||
```c
|
||||
typedef void *(*YGMalloc)(size_t size);
|
||||
typedef void *(*YGCalloc)(size_t count, size_t size);
|
||||
typedef void *(*YGRealloc)(void *ptr, size_t size);
|
||||
typedef void (*YGFree)(void *ptr);
|
||||
|
||||
void YGSetMemoryFuncs(YGMalloc cssMalloc,
|
||||
YGCalloc cssCalloc,
|
||||
YGRealloc cssRealloc,
|
||||
YGFree cssFree);
|
||||
```
|
||||
|
||||
### Printing
|
||||
|
||||
Yoga has some hooks to print debug information while calculating layout. With the printing APIs you can add additional information to a node when it is printed.
|
||||
|
Reference in New Issue
Block a user