diff --git a/React/CSSLayout/CSSLayout.h b/React/CSSLayout/CSSLayout.h index 3ebce6855e1..f3353fdf05e 100644 --- a/React/CSSLayout/CSSLayout.h +++ b/React/CSSLayout/CSSLayout.h @@ -122,16 +122,16 @@ typedef CSSSize (*CSSMeasureFunc)(void *context, typedef void (*CSSPrintFunc)(void *context); // CSSNode -CSSNodeRef CSSNodeNew(); -void CSSNodeInit(const CSSNodeRef node); -void CSSNodeFree(const CSSNodeRef node); +WIN_EXPORT CSSNodeRef CSSNodeNew(); +WIN_EXPORT void CSSNodeInit(const CSSNodeRef node); +WIN_EXPORT void CSSNodeFree(const CSSNodeRef node); -void CSSNodeInsertChild(const CSSNodeRef node, const CSSNodeRef child, const uint32_t index); -void CSSNodeRemoveChild(const CSSNodeRef node, const CSSNodeRef child); -CSSNodeRef CSSNodeGetChild(const CSSNodeRef node, const uint32_t index); -uint32_t CSSNodeChildCount(const CSSNodeRef node); +WIN_EXPORT void CSSNodeInsertChild(const CSSNodeRef node, const CSSNodeRef child, const uint32_t index); +WIN_EXPORT void CSSNodeRemoveChild(const CSSNodeRef node, const CSSNodeRef child); +WIN_EXPORT CSSNodeRef CSSNodeGetChild(const CSSNodeRef node, const uint32_t index); +WIN_EXPORT uint32_t CSSNodeChildCount(const CSSNodeRef node); -void CSSNodeCalculateLayout(const CSSNodeRef node, +WIN_EXPORT void CSSNodeCalculateLayout(const CSSNodeRef node, const float availableWidth, const float availableHeight, const CSSDirection parentDirection); @@ -142,26 +142,26 @@ void CSSNodeCalculateLayout(const CSSNodeRef node, // measure functions // depends on information not known to CSSLayout they must perform this dirty // marking manually. -void CSSNodeMarkDirty(const CSSNodeRef node); -bool CSSNodeIsDirty(const CSSNodeRef node); +WIN_EXPORT void CSSNodeMarkDirty(const CSSNodeRef node); +WIN_EXPORT bool CSSNodeIsDirty(const CSSNodeRef node); -void CSSNodePrint(const CSSNodeRef node, const CSSPrintOptions options); +WIN_EXPORT void CSSNodePrint(const CSSNodeRef node, const CSSPrintOptions options); -bool CSSValueIsUndefined(const float value); +WIN_EXPORT bool CSSValueIsUndefined(const float value); #define CSS_NODE_PROPERTY(type, name, paramName) \ - void CSSNodeSet##name(const CSSNodeRef node, type paramName); \ - type CSSNodeGet##name(const CSSNodeRef node); + WIN_EXPORT void CSSNodeSet##name(const CSSNodeRef node, type paramName); \ + WIN_EXPORT type CSSNodeGet##name(const CSSNodeRef node); #define CSS_NODE_STYLE_PROPERTY(type, name, paramName) \ - void CSSNodeStyleSet##name(const CSSNodeRef node, const type paramName); \ - type CSSNodeStyleGet##name(const CSSNodeRef node); + WIN_EXPORT void CSSNodeStyleSet##name(const CSSNodeRef node, const type paramName); \ + WIN_EXPORT type CSSNodeStyleGet##name(const CSSNodeRef node); #define CSS_NODE_STYLE_EDGE_PROPERTY(type, name, paramName) \ - void CSSNodeStyleSet##name(const CSSNodeRef node, const CSSEdge edge, const type paramName); \ - type CSSNodeStyleGet##name(const CSSNodeRef node, const CSSEdge edge); + WIN_EXPORT void CSSNodeStyleSet##name(const CSSNodeRef node, const CSSEdge edge, const type paramName); \ + WIN_EXPORT type CSSNodeStyleGet##name(const CSSNodeRef node, const CSSEdge edge); -#define CSS_NODE_LAYOUT_PROPERTY(type, name) type CSSNodeLayoutGet##name(const CSSNodeRef node); +#define CSS_NODE_LAYOUT_PROPERTY(type, name) WIN_EXPORT type CSSNodeLayoutGet##name(const CSSNodeRef node); CSS_NODE_PROPERTY(void *, Context, context); CSS_NODE_PROPERTY(CSSMeasureFunc, MeasureFunc, measureFunc); diff --git a/React/CSSLayout/CSSMacros.h b/React/CSSLayout/CSSMacros.h index eb05985699a..f4e29a1e3ff 100644 --- a/React/CSSLayout/CSSMacros.h +++ b/React/CSSLayout/CSSMacros.h @@ -17,6 +17,12 @@ #define CSS_EXTERN_C_END #endif +#ifdef _WINDLL +#define WIN_EXPORT __declspec(dllexport) +#else +#define WIN_EXPORT +#endif + #ifndef FB_ASSERTIONS_ENABLED #define FB_ASSERTIONS_ENABLED 1 #endif