| Interface | Description |
|---|---|
| YGBaselineFuncI |
Type
|
| YGCloneNodeFuncI |
Type
|
| YGDirtiedFuncI |
Type
|
| YGLoggerI |
Type
|
| YGMeasureFuncI |
Type
|
| YGNodeCleanupFuncI |
Type
|
| YGPrintFuncI |
Type
|
| Class | Description |
|---|---|
| CompactValue |
Unstable/private API.
|
| CompactValue.Buffer |
An array of
CompactValue structs. |
| YGBaselineFunc |
Type
|
| YGCachedMeasurement |
Unstable/private API.
|
| YGCachedMeasurement.Buffer |
An array of
YGCachedMeasurement structs. |
| YGCloneNodeFunc |
Type
|
| YGDirtiedFunc |
Type
|
| YGFloatOptional |
Layout
|
| YGFloatOptional.Buffer |
An array of
YGFloatOptional structs. |
| YGLayout |
Unstable/private API.
|
| YGLayout.Buffer |
An array of
YGLayout structs. |
| YGLogger |
Type
|
| YGMeasureFunc |
Type
|
| YGNode |
Unstable/private API.
|
| YGNode.Buffer |
An array of
YGNode structs. |
| YGNodeCleanupFunc |
Type
|
| YGPrintFunc |
Type
|
| YGSize |
Layout
|
| YGSize.Buffer |
An array of
YGSize structs. |
| YGStyle |
Unstable/private API.
|
| YGStyle.Buffer |
An array of
YGStyle structs. |
| YGValue |
Layout
|
| YGValue.Buffer |
An array of
YGValue structs. |
| Yoga |
Native bindings to Yoga.
|
Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API familiar to many designers and opening it up to developers across different platforms.
Unlike the official Yoga Java bindings, the LWJGL bindings directly expose the native C API. YGNodeRef handles do not need to be wrapped in Java
instances, so there is no memory overhead. The internal Yoga structs are also exposed, which makes it very efficient to read the current tree layout
after a call to NodeCalculateLayout:
// Public API, 4x JNI call overhead
float l = YGNodeLayoutGetLeft(node);
float t = YGNodeLayoutGetTop(node);
float w = YGNodeLayoutGetWidth(node);
float h = YGNodeLayoutGetHeight(node);
// Internal API without overhead (plain memory accesses, assuming allocations are eliminated via EA)
YGLayout layout = YGNode.create(node).layout();
float l = layout.positions(YGEdgeLeft);
float t = layout.positions(YGEdgeTop);
float w = layout.dimensions(YGDimensionWidth);
float h = layout.dimensions(YGDimensionHeight);Copyright LWJGL. All Rights Reserved. License terms.