|
| 1 | +/* |
| 2 | + * Copyright (c) Facebook, Inc. and its affiliates. |
| 3 | + * |
| 4 | + * This source code is licensed under the MIT license found in the |
| 5 | + * LICENSE file in the root directory of this source tree. |
| 6 | + */ |
| 7 | + |
| 8 | +package com.facebook.yoga; |
| 9 | + |
| 10 | +public interface YogaProps { |
| 11 | + |
| 12 | + /* Width properties */ |
| 13 | + |
| 14 | + void setWidth(float width); |
| 15 | + |
| 16 | + void setWidthPercent(float percent); |
| 17 | + |
| 18 | + void setMinWidth(float minWidth); |
| 19 | + |
| 20 | + void setMinWidthPercent(float percent); |
| 21 | + |
| 22 | + void setMaxWidth(float maxWidth); |
| 23 | + |
| 24 | + void setMaxWidthPercent(float percent); |
| 25 | + |
| 26 | + void setWidthAuto(); |
| 27 | + |
| 28 | + /* Height properties */ |
| 29 | + |
| 30 | + void setHeight(float height); |
| 31 | + |
| 32 | + void setHeightPercent(float percent); |
| 33 | + |
| 34 | + void setMinHeight(float minHeight); |
| 35 | + |
| 36 | + void setMinHeightPercent(float percent); |
| 37 | + |
| 38 | + void setMaxHeight(float maxHeight); |
| 39 | + |
| 40 | + void setMaxHeightPercent(float percent); |
| 41 | + |
| 42 | + void setHeightAuto(); |
| 43 | + |
| 44 | + /* Margin properties */ |
| 45 | + |
| 46 | + void setMargin(YogaEdge edge, float margin); |
| 47 | + |
| 48 | + void setMarginPercent(YogaEdge edge, float percent); |
| 49 | + |
| 50 | + void setMarginAuto(YogaEdge edge); |
| 51 | + |
| 52 | + /* Padding properties */ |
| 53 | + |
| 54 | + void setPadding(YogaEdge edge, float padding); |
| 55 | + |
| 56 | + void setPaddingPercent(YogaEdge edge, float percent); |
| 57 | + |
| 58 | + /* Position properties */ |
| 59 | + |
| 60 | + void setPositionType(YogaPositionType positionType); |
| 61 | + |
| 62 | + void setPosition(YogaEdge edge, float position); |
| 63 | + |
| 64 | + void setPositionPercent(YogaEdge edge, float percent); |
| 65 | + |
| 66 | + /* Alignment properties */ |
| 67 | + |
| 68 | + void setAlignContent(YogaAlign alignContent); |
| 69 | + |
| 70 | + void setAlignItems(YogaAlign alignItems); |
| 71 | + |
| 72 | + void setAlignSelf(YogaAlign alignSelf); |
| 73 | + |
| 74 | + /* Flex properties */ |
| 75 | + |
| 76 | + void setFlex(float flex); |
| 77 | + |
| 78 | + void setFlexBasisAuto(); |
| 79 | + |
| 80 | + void setFlexBasisPercent(float percent); |
| 81 | + |
| 82 | + void setFlexBasis(float flexBasis); |
| 83 | + |
| 84 | + void setFlexDirection(YogaFlexDirection direction); |
| 85 | + |
| 86 | + void setFlexGrow(float flexGrow); |
| 87 | + |
| 88 | + void setFlexShrink(float flexShrink); |
| 89 | + |
| 90 | + /* Other properties */ |
| 91 | + |
| 92 | + void setJustifyContent(YogaJustify justifyContent); |
| 93 | + |
| 94 | + void setDirection(YogaDirection direction); |
| 95 | + |
| 96 | + void setBorder(YogaEdge edge, float value); |
| 97 | + |
| 98 | + void setWrap(YogaWrap wrap); |
| 99 | + |
| 100 | + void setAspectRatio(float aspectRatio); |
| 101 | + |
| 102 | + void setIsReferenceBaseline(boolean isReferenceBaseline); |
| 103 | + |
| 104 | + void setMeasureFunction(YogaMeasureFunction measureFunction); |
| 105 | + |
| 106 | + void setBaselineFunction(YogaBaselineFunction yogaBaselineFunction); |
| 107 | + |
| 108 | + /* Getters */ |
| 109 | + |
| 110 | + YogaValue getWidth(); |
| 111 | + |
| 112 | + YogaValue getMinWidth(); |
| 113 | + |
| 114 | + YogaValue getMaxWidth(); |
| 115 | + |
| 116 | + YogaValue getHeight(); |
| 117 | + |
| 118 | + YogaValue getMinHeight(); |
| 119 | + |
| 120 | + YogaValue getMaxHeight(); |
| 121 | + |
| 122 | + YogaDirection getStyleDirection(); |
| 123 | + |
| 124 | + YogaFlexDirection getFlexDirection(); |
| 125 | + |
| 126 | + YogaJustify getJustifyContent(); |
| 127 | + |
| 128 | + YogaAlign getAlignItems(); |
| 129 | + |
| 130 | + YogaAlign getAlignSelf(); |
| 131 | + |
| 132 | + YogaAlign getAlignContent(); |
| 133 | + |
| 134 | + YogaPositionType getPositionType(); |
| 135 | + |
| 136 | + float getFlexGrow(); |
| 137 | + |
| 138 | + float getFlexShrink(); |
| 139 | + |
| 140 | + YogaValue getFlexBasis(); |
| 141 | + |
| 142 | + float getAspectRatio(); |
| 143 | + |
| 144 | + YogaValue getMargin(YogaEdge edge); |
| 145 | + |
| 146 | + YogaValue getPadding(YogaEdge edge); |
| 147 | + |
| 148 | + YogaValue getPosition(YogaEdge edge); |
| 149 | + |
| 150 | + float getBorder(YogaEdge edge); |
| 151 | +} |
0 commit comments