mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Migrate YogaConfig to Kotlin
Summary: Migrate com.facebook.yoga.YogaConfig to Kotlin. X-link: https://github.com/facebook/yoga/pull/1841 Reviewed By: rshest Differential Revision: D79897694 Pulled By: cortinico fbshipit-source-id: 0eff36f47bbb8da6a91087f2ea69bc4e40a732ac
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2ab6f22f26
commit
4d5caef76b
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.yoga;
|
||||
|
||||
public abstract class YogaConfig {
|
||||
|
||||
public static int SPACING_TYPE = 1;
|
||||
|
||||
public abstract void setExperimentalFeatureEnabled(YogaExperimentalFeature feature, boolean enabled);
|
||||
|
||||
public abstract void setUseWebDefaults(boolean useWebDefaults);
|
||||
|
||||
public abstract void setPointScaleFactor(float pixelsInPoint);
|
||||
|
||||
public abstract void setErrata(YogaErrata errata);
|
||||
|
||||
public abstract YogaErrata getErrata();
|
||||
|
||||
public abstract void setLogger(YogaLogger logger);
|
||||
|
||||
public abstract YogaLogger getLogger();
|
||||
|
||||
protected abstract long getNativePointer();
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.yoga
|
||||
|
||||
public abstract class YogaConfig {
|
||||
public abstract fun setExperimentalFeatureEnabled(
|
||||
feature: YogaExperimentalFeature,
|
||||
enabled: Boolean
|
||||
)
|
||||
|
||||
public abstract fun setUseWebDefaults(useWebDefaults: Boolean)
|
||||
|
||||
public abstract fun setPointScaleFactor(pixelsInPoint: Float)
|
||||
|
||||
public abstract fun setErrata(errata: YogaErrata)
|
||||
|
||||
public abstract fun getErrata(): YogaErrata
|
||||
|
||||
public abstract fun setLogger(logger: YogaLogger)
|
||||
|
||||
public abstract fun getLogger(): YogaLogger
|
||||
|
||||
protected abstract fun getNativePointer(): Long
|
||||
|
||||
public companion object {
|
||||
public var SPACING_TYPE: Int = 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user