2017-01-02 02:22:45 -08:00
|
|
|
/**
|
2018-09-11 15:27:47 -07:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2017-01-02 02:22:45 -08:00
|
|
|
*
|
2018-11-29 11:35:34 -08:00
|
|
|
* This source code is licensed under the MIT license found in the LICENSE
|
|
|
|
* file in the root directory of this source tree.
|
2017-01-02 02:22:45 -08:00
|
|
|
*/
|
|
|
|
#include <yoga/Yoga.h>
|
|
|
|
|
|
|
|
#include "./Node.hh"
|
|
|
|
#include "./Layout.hh"
|
|
|
|
#include "./Size.hh"
|
2017-01-04 04:33:39 -08:00
|
|
|
#include "./Value.hh"
|
2017-03-01 09:19:55 -08:00
|
|
|
#include "./Config.hh"
|
2017-01-02 02:22:45 -08:00
|
|
|
#include "./global.hh"
|
|
|
|
|
|
|
|
#include <nbind/nbind.h>
|
|
|
|
|
|
|
|
NBIND_GLOBAL()
|
|
|
|
{
|
|
|
|
function(getInstanceCount);
|
|
|
|
}
|
|
|
|
|
|
|
|
NBIND_CLASS(Size)
|
|
|
|
{
|
|
|
|
construct<>();
|
|
|
|
construct<double, double>();
|
|
|
|
}
|
|
|
|
|
|
|
|
NBIND_CLASS(Layout)
|
|
|
|
{
|
|
|
|
construct<>();
|
|
|
|
}
|
|
|
|
|
2017-01-04 04:33:39 -08:00
|
|
|
NBIND_CLASS(Value)
|
|
|
|
{
|
|
|
|
construct<>();
|
|
|
|
construct<int, double>();
|
|
|
|
}
|
|
|
|
|
2017-03-01 09:19:55 -08:00
|
|
|
NBIND_CLASS(Config)
|
|
|
|
{
|
|
|
|
method(create);
|
2017-03-28 10:28:53 -07:00
|
|
|
|
2017-03-01 09:19:55 -08:00
|
|
|
method(destroy);
|
2017-03-28 10:28:53 -07:00
|
|
|
|
2017-03-01 09:19:55 -08:00
|
|
|
method(setExperimentalFeatureEnabled);
|
2017-11-27 04:55:17 -08:00
|
|
|
method(setPointScaleFactor);
|
2017-03-28 10:28:53 -07:00
|
|
|
|
|
|
|
method(isExperimentalFeatureEnabled);
|
2017-03-01 09:19:55 -08:00
|
|
|
}
|
|
|
|
|
2017-01-02 02:22:45 -08:00
|
|
|
NBIND_CLASS(Node)
|
|
|
|
{
|
2017-03-28 10:28:53 -07:00
|
|
|
method(createDefault);
|
|
|
|
method(createWithConfig);
|
2017-01-02 02:22:45 -08:00
|
|
|
method(destroy);
|
|
|
|
|
|
|
|
method(reset);
|
|
|
|
|
|
|
|
method(copyStyle);
|
|
|
|
|
|
|
|
method(setPositionType);
|
|
|
|
method(setPosition);
|
2017-01-04 04:33:39 -08:00
|
|
|
method(setPositionPercent);
|
2017-01-02 02:22:45 -08:00
|
|
|
|
|
|
|
method(setAlignContent);
|
|
|
|
method(setAlignItems);
|
|
|
|
method(setAlignSelf);
|
|
|
|
method(setFlexDirection);
|
|
|
|
method(setFlexWrap);
|
|
|
|
method(setJustifyContent);
|
|
|
|
|
|
|
|
method(setMargin);
|
2017-01-04 04:33:39 -08:00
|
|
|
method(setMarginPercent);
|
2017-02-14 14:26:09 -08:00
|
|
|
method(setMarginAuto);
|
2017-01-02 02:22:45 -08:00
|
|
|
|
|
|
|
method(setOverflow);
|
2017-02-06 09:31:22 -08:00
|
|
|
method(setDisplay);
|
2017-01-02 02:22:45 -08:00
|
|
|
|
|
|
|
method(setFlex);
|
|
|
|
method(setFlexBasis);
|
2017-01-04 04:33:39 -08:00
|
|
|
method(setFlexBasisPercent);
|
2017-01-02 02:22:45 -08:00
|
|
|
method(setFlexGrow);
|
|
|
|
method(setFlexShrink);
|
|
|
|
|
|
|
|
method(setWidth);
|
2017-01-04 04:33:39 -08:00
|
|
|
method(setWidthPercent);
|
2017-02-14 14:26:09 -08:00
|
|
|
method(setWidthAuto);
|
2017-01-02 02:22:45 -08:00
|
|
|
method(setHeight);
|
2017-01-04 04:33:39 -08:00
|
|
|
method(setHeightPercent);
|
2017-02-14 14:26:09 -08:00
|
|
|
method(setHeightAuto);
|
2017-01-02 02:22:45 -08:00
|
|
|
|
|
|
|
method(setMinWidth);
|
2017-01-04 04:33:39 -08:00
|
|
|
method(setMinWidthPercent);
|
2017-01-02 02:22:45 -08:00
|
|
|
method(setMinHeight);
|
2017-01-04 04:33:39 -08:00
|
|
|
method(setMinHeightPercent);
|
2017-01-02 02:22:45 -08:00
|
|
|
|
|
|
|
method(setMaxWidth);
|
2017-01-04 04:33:39 -08:00
|
|
|
method(setMaxWidthPercent);
|
2017-01-02 02:22:45 -08:00
|
|
|
method(setMaxHeight);
|
2017-01-04 04:33:39 -08:00
|
|
|
method(setMaxHeightPercent);
|
2017-01-02 02:22:45 -08:00
|
|
|
|
|
|
|
method(setAspectRatio);
|
|
|
|
|
|
|
|
method(setBorder);
|
|
|
|
|
|
|
|
method(setPadding);
|
2017-01-04 04:33:39 -08:00
|
|
|
method(setPaddingPercent);
|
2017-01-02 02:22:45 -08:00
|
|
|
|
|
|
|
method(getPositionType);
|
|
|
|
method(getPosition);
|
|
|
|
|
|
|
|
method(getAlignContent);
|
|
|
|
method(getAlignItems);
|
|
|
|
method(getAlignSelf);
|
|
|
|
method(getFlexDirection);
|
|
|
|
method(getFlexWrap);
|
|
|
|
method(getJustifyContent);
|
|
|
|
|
|
|
|
method(getMargin);
|
|
|
|
|
|
|
|
method(getFlexBasis);
|
|
|
|
method(getFlexGrow);
|
|
|
|
method(getFlexShrink);
|
|
|
|
|
|
|
|
method(getWidth);
|
|
|
|
method(getHeight);
|
|
|
|
|
|
|
|
method(getMinWidth);
|
|
|
|
method(getMinHeight);
|
|
|
|
|
|
|
|
method(getMaxWidth);
|
|
|
|
method(getMaxHeight);
|
|
|
|
|
|
|
|
method(getAspectRatio);
|
|
|
|
|
|
|
|
method(getBorder);
|
|
|
|
|
2017-02-06 09:31:22 -08:00
|
|
|
method(getOverflow);
|
|
|
|
method(getDisplay);
|
|
|
|
|
2017-01-02 02:22:45 -08:00
|
|
|
method(getPadding);
|
|
|
|
|
|
|
|
method(insertChild);
|
|
|
|
method(removeChild);
|
|
|
|
|
|
|
|
method(getChildCount);
|
|
|
|
|
|
|
|
method(getParent);
|
|
|
|
method(getChild);
|
|
|
|
|
2018-11-14 02:49:27 -08:00
|
|
|
method(isReferenceBaseline);
|
|
|
|
method(setIsReferenceBaseline);
|
|
|
|
|
2017-01-02 02:22:45 -08:00
|
|
|
method(setMeasureFunc);
|
|
|
|
method(unsetMeasureFunc);
|
|
|
|
|
2019-01-31 09:06:57 -08:00
|
|
|
method(setDirtiedFunc);
|
|
|
|
method(unsetDirtiedFunc);
|
|
|
|
|
2017-01-02 02:22:45 -08:00
|
|
|
method(markDirty);
|
|
|
|
method(isDirty);
|
|
|
|
|
|
|
|
method(calculateLayout);
|
|
|
|
|
|
|
|
method(getComputedLeft);
|
|
|
|
method(getComputedRight);
|
|
|
|
|
|
|
|
method(getComputedTop);
|
|
|
|
method(getComputedBottom);
|
|
|
|
|
|
|
|
method(getComputedWidth);
|
|
|
|
method(getComputedHeight);
|
|
|
|
|
|
|
|
method(getComputedLayout);
|
2017-01-15 15:16:10 -08:00
|
|
|
|
|
|
|
method(getComputedMargin);
|
2017-01-26 13:36:38 -08:00
|
|
|
method(getComputedBorder);
|
2017-01-15 15:16:10 -08:00
|
|
|
method(getComputedPadding);
|
2017-01-02 02:22:45 -08:00
|
|
|
}
|