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:
committed by
Facebook Github Bot
parent
96dfe068ee
commit
390fade8c0
14
yoga/YGMarker.cpp
Normal file
14
yoga/YGMarker.cpp
Normal 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;
|
||||
}
|
@@ -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
|
||||
|
Reference in New Issue
Block a user