2014-10-29 08:01:22 -07:00
|
|
|
/**
|
2018-09-11 15:27:47 -07:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2014-10-29 08:01:22 -07:00
|
|
|
*
|
2018-02-16 18:24:55 -08:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2014-10-29 08:01:22 -07:00
|
|
|
*/
|
2014-09-18 15:15:21 -07:00
|
|
|
|
2016-08-02 08:07:09 -07:00
|
|
|
#pragma once
|
2014-09-18 15:15:21 -07:00
|
|
|
|
2016-07-25 06:31:32 -07:00
|
|
|
#ifdef __cplusplus
|
2016-12-03 04:40:18 -08:00
|
|
|
#define YG_EXTERN_C_BEGIN extern "C" {
|
|
|
|
#define YG_EXTERN_C_END }
|
2016-07-25 06:31:32 -07:00
|
|
|
#else
|
2016-12-03 04:40:18 -08:00
|
|
|
#define YG_EXTERN_C_BEGIN
|
|
|
|
#define YG_EXTERN_C_END
|
2016-07-25 06:31:32 -07:00
|
|
|
#endif
|
2016-08-02 08:07:11 -07:00
|
|
|
|
2016-09-22 16:22:34 -07:00
|
|
|
#ifdef _WINDLL
|
|
|
|
#define WIN_EXPORT __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define WIN_EXPORT
|
|
|
|
#endif
|
|
|
|
|
2017-03-06 11:29:52 -08:00
|
|
|
#ifdef WINARMDLL
|
2017-05-03 09:22:35 -07:00
|
|
|
#define WIN_STRUCT(type) type *
|
2017-03-06 11:29:52 -08:00
|
|
|
#define WIN_STRUCT_REF(value) &value
|
|
|
|
#else
|
|
|
|
#define WIN_STRUCT(type) type
|
|
|
|
#define WIN_STRUCT_REF(value) value
|
|
|
|
#endif
|
|
|
|
|
2017-01-09 08:34:56 -08:00
|
|
|
#ifdef NS_ENUM
|
2017-01-26 13:36:39 -08:00
|
|
|
// Cannot use NSInteger as NSInteger has a different size than int (which is the default type of a
|
|
|
|
// enum).
|
2017-01-09 08:34:56 -08:00
|
|
|
// Therefor when linking the Yoga C library into obj-c the header is a missmatch for the Yoga ABI.
|
|
|
|
#define YG_ENUM_BEGIN(name) NS_ENUM(int, name)
|
|
|
|
#define YG_ENUM_END(name)
|
2017-01-08 11:42:43 -08:00
|
|
|
#else
|
2017-01-09 08:34:56 -08:00
|
|
|
#define YG_ENUM_BEGIN(name) enum name
|
2017-01-08 11:42:43 -08:00
|
|
|
#define YG_ENUM_END(name) name
|
|
|
|
#endif
|