2019-10-15 10:30:08 -07:00
|
|
|
/*
|
2021-12-30 15:08:43 -08:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2017-03-01 09:19:55 -08:00
|
|
|
*
|
2019-10-15 10:30:08 -07:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2017-03-01 09:19:55 -08:00
|
|
|
*/
|
2019-10-15 10:30:08 -07:00
|
|
|
|
2017-03-01 09:19:55 -08:00
|
|
|
package com.facebook.yoga;
|
|
|
|
|
2019-09-18 00:36:26 -07:00
|
|
|
public abstract class YogaConfig {
|
2017-03-01 09:19:55 -08:00
|
|
|
|
2018-01-12 04:44:21 -08:00
|
|
|
public static int SPACING_TYPE = 1;
|
|
|
|
|
2019-09-18 00:36:26 -07:00
|
|
|
public abstract void setExperimentalFeatureEnabled(YogaExperimentalFeature feature, boolean enabled);
|
2017-04-26 12:20:02 -07:00
|
|
|
|
2019-09-18 00:36:26 -07:00
|
|
|
public abstract void setUseWebDefaults(boolean useWebDefaults);
|
2018-08-30 04:40:48 -07:00
|
|
|
|
2019-09-18 00:36:26 -07:00
|
|
|
public abstract void setPrintTreeFlag(boolean enable);
|
2017-04-28 06:13:51 -07:00
|
|
|
|
2019-09-18 00:36:26 -07:00
|
|
|
public abstract void setPointScaleFactor(float pixelsInPoint);
|
2017-04-28 06:13:51 -07:00
|
|
|
/**
|
|
|
|
* Yoga previously had an error where containers would take the maximum space possible instead of the minimum
|
|
|
|
* like they are supposed to. In practice this resulted in implicit behaviour similar to align-self: stretch;
|
|
|
|
* Because this was such a long-standing bug we must allow legacy users to switch back to this behaviour.
|
2023-04-27 12:32:28 -07:00
|
|
|
*
|
|
|
|
* @deprecated "setUseLegacyStretchBehaviour" will be removed in the next release. Usage should be replaced with
|
|
|
|
* "setErrata(YogaErrata.ALL)" to opt out of all future breaking conformance fixes, or
|
|
|
|
* "setErrata(YogaErrata.STRETCH_FLEX_BASIS)" to opt out of the specific conformance fix previously disabled by
|
|
|
|
* "UseLegacyStretchBehaviour".
|
2017-04-28 06:13:51 -07:00
|
|
|
*/
|
2023-04-27 12:32:28 -07:00
|
|
|
@Deprecated
|
2019-09-18 00:36:26 -07:00
|
|
|
public abstract void setUseLegacyStretchBehaviour(boolean useLegacyStretchBehaviour);
|
2017-05-03 09:22:35 -07:00
|
|
|
|
2023-04-27 06:48:04 -07:00
|
|
|
public abstract void setErrata(YogaErrata errata);
|
|
|
|
|
|
|
|
public abstract YogaErrata getErrata();
|
|
|
|
|
2019-09-18 00:36:26 -07:00
|
|
|
public abstract void setLogger(YogaLogger logger);
|
2017-05-03 09:22:35 -07:00
|
|
|
|
2019-09-18 00:36:26 -07:00
|
|
|
public abstract YogaLogger getLogger();
|
2019-09-17 06:52:49 -07:00
|
|
|
|
2019-09-18 00:36:26 -07:00
|
|
|
abstract long getNativePointer();
|
2017-03-01 09:19:55 -08:00
|
|
|
}
|