2019-06-06 19:36:56 -07:00
|
|
|
/*
|
2018-09-11 15:27:47 -07:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2017-03-01 09:19:55 -08:00
|
|
|
*
|
2019-03-25 05:37:36 -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
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <nbind/api.h>
|
|
|
|
#include <nbind/BindDefiner.h>
|
|
|
|
#include <yoga/Yoga.h>
|
|
|
|
|
|
|
|
class Config {
|
|
|
|
|
2019-03-25 05:37:36 -07:00
|
|
|
friend class Node;
|
2017-03-28 10:28:53 -07:00
|
|
|
|
2019-03-25 05:37:36 -07:00
|
|
|
public:
|
|
|
|
static Config* create(void);
|
2017-03-28 10:28:53 -07:00
|
|
|
|
2019-03-25 05:37:36 -07:00
|
|
|
static void destroy(Config* config);
|
2017-03-28 10:28:53 -07:00
|
|
|
|
2019-03-25 05:37:36 -07:00
|
|
|
private:
|
|
|
|
Config(void);
|
2017-03-28 10:28:53 -07:00
|
|
|
|
2019-03-25 05:37:36 -07:00
|
|
|
public:
|
|
|
|
~Config(void);
|
2017-03-28 10:28:53 -07:00
|
|
|
|
2019-03-25 05:37:36 -07:00
|
|
|
public: // Prevent accidental copy
|
|
|
|
Config(Config const&) = delete;
|
2017-03-28 10:28:53 -07:00
|
|
|
|
2019-03-25 05:37:36 -07:00
|
|
|
Config const& operator=(Config const&) = delete;
|
2017-03-28 10:28:53 -07:00
|
|
|
|
2019-03-25 05:37:36 -07:00
|
|
|
public: // Setters
|
|
|
|
void setExperimentalFeatureEnabled(int feature, bool enabled);
|
|
|
|
void setPointScaleFactor(float pixelsInPoint);
|
2017-03-28 10:28:53 -07:00
|
|
|
|
2019-03-25 05:37:36 -07:00
|
|
|
public: // Getters
|
|
|
|
bool isExperimentalFeatureEnabled(int feature) const;
|
2017-03-01 09:19:55 -08:00
|
|
|
|
2019-03-25 05:37:36 -07:00
|
|
|
private:
|
|
|
|
YGConfigRef m_config;
|
2017-03-01 09:19:55 -08:00
|
|
|
};
|