Add function to set marker callbacks

Summary:
@public

Adds a function to allow to configure markers. The function is declared in `YGMarker.h`

Reviewed By: SidharthGuglani

Differential Revision: D13819111

fbshipit-source-id: f9158b3d4e5727da4e151c84b523c7c7e8158620
This commit is contained in:
David Aurelio
2019-01-29 03:48:31 -08:00
committed by Facebook Github Bot
parent 96dfe068ee
commit 390fade8c0
2 changed files with 17 additions and 0 deletions

14
yoga/YGMarker.cpp Normal file
View File

@@ -0,0 +1,14 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*/
#include "YGMarker.h"
#include "YGConfig.h"
void YGConfigSetMarkerCallbacks(
YGConfigRef config,
YGMarkerCallbacks markerCallbacks) {
config->markerCallbacks = markerCallbacks;
}

View File

@@ -11,6 +11,7 @@
YG_EXTERN_C_BEGIN
typedef struct YGNode* YGNodeRef;
typedef struct YGConfig* YGConfigRef;
typedef YG_ENUM_BEGIN(YGMarker){
YGMarkerLayout,
@@ -33,4 +34,6 @@ typedef struct {
void (*endMarker)(YGMarker, YGNodeRef, YGMarkerData, void* id);
} YGMarkerCallbacks;
void YGConfigSetMarkerCallbacks(YGConfigRef, YGMarkerCallbacks);
YG_EXTERN_C_END