File tree Expand file tree Collapse file tree 3 files changed +9
-18
lines changed Expand file tree Collapse file tree 3 files changed +9
-18
lines changed Original file line number Diff line number Diff line change 2020#define WIN_EXPORT
2121#endif
2222
23- #ifdef WINARMDLL
24- #define WIN_STRUCT (type ) type*
25- #define WIN_STRUCT_REF (value ) &value
26- #else
27- #define WIN_STRUCT (type ) type
28- #define WIN_STRUCT_REF (value ) value
29- #endif
30-
3123#ifdef NS_ENUM
3224// Cannot use NSInteger as NSInteger has a different size than int (which is the
3325// default type of a enum). Therefor when linking the Yoga C library into obj-c
Original file line number Diff line number Diff line change @@ -602,12 +602,12 @@ inline detail::CompactValue Value::create<YGUnitAuto>(float) {
602602template <YGStyle::Dimensions YGStyle::*P>
603603struct DimensionProp {
604604 template <YGDimension idx>
605- static WIN_STRUCT ( YGValue) get(YGNodeRef node) {
605+ static YGValue get (YGNodeRef node) {
606606 YGValue value = (node->getStyle ().*P)[idx];
607607 if (value.unit == YGUnitUndefined || value.unit == YGUnitAuto) {
608608 value.value = YGUndefined;
609609 }
610- return WIN_STRUCT_REF ( value) ;
610+ return value;
611611 }
612612
613613 template <YGDimension idx, YGUnit U>
@@ -690,13 +690,12 @@ struct DimensionProp {
690690 } \
691691 } \
692692 \
693- WIN_STRUCT (type) \
694- YGNodeStyleGet##name(const YGNodeRef node, const YGEdge edge) { \
693+ type YGNodeStyleGet##name(const YGNodeRef node, const YGEdge edge) { \
695694 YGValue value = node->getStyle ().instanceName [edge]; \
696695 if (value.unit == YGUnitUndefined || value.unit == YGUnitAuto) { \
697696 value.value = YGUndefined; \
698697 } \
699- return WIN_STRUCT_REF ( value); \
698+ return value; \
700699 }
701700
702701#define YG_NODE_LAYOUT_PROPERTY_IMPL (type, name, instanceName ) \
Original file line number Diff line number Diff line change @@ -140,11 +140,11 @@ YGDirtiedFunc YGNodeGetDirtiedFunc(YGNodeRef node);
140140void YGNodeSetDirtiedFunc (YGNodeRef node, YGDirtiedFunc dirtiedFunc);
141141YGPrintFunc YGNodeGetPrintFunc (YGNodeRef node);
142142void YGNodeSetPrintFunc (YGNodeRef node, YGPrintFunc printFunc);
143- bool YGNodeGetHasNewLayout (YGNodeRef node);
144- void YGNodeSetHasNewLayout (YGNodeRef node, bool hasNewLayout);
143+ WIN_EXPORT bool YGNodeGetHasNewLayout (YGNodeRef node);
144+ WIN_EXPORT void YGNodeSetHasNewLayout (YGNodeRef node, bool hasNewLayout);
145145YGNodeType YGNodeGetNodeType (YGNodeRef node);
146146void YGNodeSetNodeType (YGNodeRef node, YGNodeType nodeType);
147- bool YGNodeIsDirty (YGNodeRef node);
147+ WIN_EXPORT bool YGNodeIsDirty (YGNodeRef node);
148148bool YGNodeLayoutGetDidUseLegacyFlag (const YGNodeRef node);
149149
150150WIN_EXPORT void YGNodeStyleSetDirection (
@@ -227,8 +227,8 @@ WIN_EXPORT void YGNodeStyleSetPositionPercent(
227227 const YGNodeRef node,
228228 const YGEdge edge,
229229 const float position);
230- WIN_EXPORT WIN_STRUCT ( YGValue)
231- YGNodeStyleGetPosition(const YGNodeRef node, const YGEdge edge);
230+ WIN_EXPORT YGValue
231+ YGNodeStyleGetPosition (const YGNodeRef node, const YGEdge edge);
232232
233233WIN_EXPORT void YGNodeStyleSetMargin (
234234 const YGNodeRef node,
You can’t perform that action at this time.
0 commit comments