Skip to content

Commit b5f027d

Browse files
davidaureliofacebook-github-bot
authored andcommitted
Add YogaNodeProperties interface
Summary: `YogaNodeProperties` will serve as abstraction over JNI adapters / storage backends in follow-ups. @public Reviewed By: IanChilds Differential Revision: D8818805 fbshipit-source-id: 7998a56daebea60dd13b07228dffdf14be852554
1 parent f0d3590 commit b5f027d

File tree

1 file changed

+167
-0
lines changed

1 file changed

+167
-0
lines changed
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
/*
2+
* Copyright (c) 2018-present, Facebook, Inc.
3+
*
4+
* This source code is licensed under the MIT license found in the LICENSE
5+
* file in the root directory of this source tree.
6+
*
7+
*/
8+
package com.facebook.yoga;
9+
10+
public interface YogaNodeProperties {
11+
12+
YogaNodeProperties clone(YogaNode node);
13+
14+
long getNativePointer();
15+
16+
void onAfterCalculateLayout();
17+
18+
void reset();
19+
20+
boolean hasNewLayout();
21+
22+
boolean isDirty();
23+
24+
void markLayoutSeen();
25+
26+
YogaDirection getStyleDirection();
27+
28+
void setDirection(YogaDirection direction);
29+
30+
YogaFlexDirection getFlexDirection();
31+
32+
void setFlexDirection(YogaFlexDirection flexDirection);
33+
34+
YogaJustify getJustifyContent();
35+
36+
void setJustifyContent(YogaJustify justifyContent);
37+
38+
YogaAlign getAlignItems();
39+
40+
void setAlignItems(YogaAlign alignItems);
41+
42+
YogaAlign getAlignSelf();
43+
44+
void setAlignSelf(YogaAlign alignSelf);
45+
46+
YogaAlign getAlignContent();
47+
48+
void setAlignContent(YogaAlign alignContent);
49+
50+
YogaPositionType getPositionType();
51+
52+
void setPositionType(YogaPositionType positionType);
53+
54+
void setWrap(YogaWrap flexWrap);
55+
56+
YogaOverflow getOverflow();
57+
58+
void setOverflow(YogaOverflow overflow);
59+
60+
YogaDisplay getDisplay();
61+
62+
void setDisplay(YogaDisplay display);
63+
64+
void setFlex(float flex);
65+
66+
float getFlexGrow();
67+
68+
void setFlexGrow(float flexGrow);
69+
70+
float getFlexShrink();
71+
72+
void setFlexShrink(float flexShrink);
73+
74+
YogaValue getFlexBasis();
75+
76+
void setFlexBasis(float flexBasis);
77+
78+
void setFlexBasisPercent(float percent);
79+
80+
void setFlexBasisAuto();
81+
82+
YogaValue getMargin(YogaEdge edge);
83+
84+
void setMargin(YogaEdge edge, float margin);
85+
86+
void setMarginPercent(YogaEdge edge, float percent);
87+
88+
void setMarginAuto(YogaEdge edge);
89+
90+
YogaValue getPadding(YogaEdge edge);
91+
92+
void setPadding(YogaEdge edge, float padding);
93+
94+
void setPaddingPercent(YogaEdge edge, float percent);
95+
96+
float getBorder(YogaEdge edge);
97+
98+
void setBorder(YogaEdge edge, float border);
99+
100+
YogaValue getPosition(YogaEdge edge);
101+
102+
void setPosition(YogaEdge edge, float position);
103+
104+
void setPositionPercent(YogaEdge edge, float percent);
105+
106+
YogaValue getWidth();
107+
108+
void setWidth(float width);
109+
110+
void setWidthPercent(float percent);
111+
112+
void setWidthAuto();
113+
114+
YogaValue getHeight();
115+
116+
void setHeight(float height);
117+
118+
void setHeightPercent(float percent);
119+
120+
void setHeightAuto();
121+
122+
YogaValue getMinWidth();
123+
124+
void setMinWidth(float minWidth);
125+
126+
void setMinWidthPercent(float percent);
127+
128+
YogaValue getMinHeight();
129+
130+
void setMinHeight(float minHeight);
131+
132+
void setMinHeightPercent(float percent);
133+
134+
YogaValue getMaxWidth();
135+
136+
void setMaxWidth(float maxWidth);
137+
138+
void setMaxWidthPercent(float percent);
139+
140+
YogaValue getMaxHeight();
141+
142+
void setMaxHeight(float maxheight);
143+
144+
void setMaxHeightPercent(float percent);
145+
146+
float getAspectRatio();
147+
148+
void setAspectRatio(float aspectRatio);
149+
150+
float getLayoutX();
151+
152+
float getLayoutY();
153+
154+
float getLayoutWidth();
155+
156+
float getLayoutHeight();
157+
158+
boolean getDoesLegacyStretchFlagAffectsLayout();
159+
160+
float getLayoutMargin(YogaEdge edge);
161+
162+
float getLayoutPadding(YogaEdge edge);
163+
164+
float getLayoutBorder(YogaEdge edge);
165+
166+
YogaDirection getLayoutDirection();
167+
}

0 commit comments

Comments
 (0)