Class YGLayout

  • All Implemented Interfaces:

    public class YGLayout
    extends Struct
    Unstable/private API.


     struct YGLayout {
         float positions[4];
         float dimensions[2];
         float margin[4];
         float border[4];
         float padding[4];
         YGDirection direction : 2;
         bool didUseLegacyFlag : 1;
         bool doesLegacyStretchFlagAffectsLayout : 1;
         bool hadOverflow : 1;
         uint32_t computedFlexBasisGeneration;
         YGFloatOptional computedFlexBasis;
         uint32_t generationCount;
         YGDirection lastOwnerDirection;
         uint32_t nextCachedMeasurementsIndex;
         YGCachedMeasurement cachedMeasurements[16];
         float measuredDimensions[2];
         YGCachedMeasurement cachedLayout;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • YGLayout

        public YGLayout​(java.nio.ByteBuffer container)
        Creates a YGLayout instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • positions

        public java.nio.FloatBuffer positions()
        Returns a FloatBuffer view of the positions field.
      • positions

        public float positions​(int index)
        Returns the value at the specified index of the positions field.
      • dimensions

        public java.nio.FloatBuffer dimensions()
        Returns a FloatBuffer view of the dimensions field.
      • dimensions

        public float dimensions​(int index)
        Returns the value at the specified index of the dimensions field.
      • margin

        public java.nio.FloatBuffer margin()
        Returns a FloatBuffer view of the margin field.
      • margin

        public float margin​(int index)
        Returns the value at the specified index of the margin field.
      • border

        public java.nio.FloatBuffer border()
        Returns a FloatBuffer view of the border field.
      • border

        public float border​(int index)
        Returns the value at the specified index of the border field.
      • padding

        public java.nio.FloatBuffer padding()
        Returns a FloatBuffer view of the padding field.
      • padding

        public float padding​(int index)
        Returns the value at the specified index of the padding field.
      • direction

        public int direction()
        Returns the value of the direction field.
      • didUseLegacyFlag

        public boolean didUseLegacyFlag()
        Returns the value of the didUseLegacyFlag field.
      • doesLegacyStretchFlagAffectsLayout

        public boolean doesLegacyStretchFlagAffectsLayout()
        Returns the value of the doesLegacyStretchFlagAffectsLayout field.
      • hadOverflow

        public boolean hadOverflow()
        Returns the value of the hadOverflow field.
      • computedFlexBasisGeneration

        public int computedFlexBasisGeneration()
        Returns the value of the computedFlexBasisGeneration field.
      • generationCount

        public int generationCount()
        Returns the value of the generationCount field.
      • lastOwnerDirection

        public int lastOwnerDirection()
        Returns the value of the lastOwnerDirection field.
      • nextCachedMeasurementsIndex

        public int nextCachedMeasurementsIndex()
        Returns the value of the nextCachedMeasurementsIndex field.
      • measuredDimensions

        public java.nio.FloatBuffer measuredDimensions()
        Returns a FloatBuffer view of the measuredDimensions field.
      • measuredDimensions

        public float measuredDimensions​(int index)
        Returns the value at the specified index of the measuredDimensions field.
      • create

        public static YGLayout create​(long address)
        Returns a new YGLayout instance for the specified memory address.
      • createSafe

        public static YGLayout createSafe​(long address)
        Like create, but returns null if address is NULL.
      • create

        public static YGLayout.Buffer create​(long address,
                                             int capacity)
        Create a YGLayout.Buffer instance at the specified memory.
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        public static YGLayout.Buffer createSafe​(long address,
                                                 int capacity)
        Like create, but returns null if address is NULL.
      • npositions

        public static java.nio.FloatBuffer npositions​(long struct)
        Unsafe version of positions().
      • npositions

        public static float npositions​(long struct,
                                       int index)
        Unsafe version of positions.
      • ndimensions

        public static java.nio.FloatBuffer ndimensions​(long struct)
        Unsafe version of dimensions().
      • ndimensions

        public static float ndimensions​(long struct,
                                        int index)
        Unsafe version of dimensions.
      • nmargin

        public static java.nio.FloatBuffer nmargin​(long struct)
        Unsafe version of margin().
      • nmargin

        public static float nmargin​(long struct,
                                    int index)
        Unsafe version of margin.
      • nborder

        public static java.nio.FloatBuffer nborder​(long struct)
        Unsafe version of border().
      • nborder

        public static float nborder​(long struct,
                                    int index)
        Unsafe version of border.
      • npadding

        public static java.nio.FloatBuffer npadding​(long struct)
        Unsafe version of padding().
      • npadding

        public static float npadding​(long struct,
                                     int index)
        Unsafe version of padding.
      • nbitfield

        public static byte nbitfield​(long struct)
      • ndirection

        public static int ndirection​(long struct)
        Unsafe version of direction().
      • ndidUseLegacyFlag

        public static boolean ndidUseLegacyFlag​(long struct)
        Unsafe version of didUseLegacyFlag().
      • nhadOverflow

        public static boolean nhadOverflow​(long struct)
        Unsafe version of hadOverflow().
      • ncomputedFlexBasisGeneration

        public static int ncomputedFlexBasisGeneration​(long struct)
      • ngenerationCount

        public static int ngenerationCount​(long struct)
        Unsafe version of generationCount().
      • nlastOwnerDirection

        public static int nlastOwnerDirection​(long struct)
        Unsafe version of lastOwnerDirection().
      • nnextCachedMeasurementsIndex

        public static int nnextCachedMeasurementsIndex​(long struct)
      • nmeasuredDimensions

        public static java.nio.FloatBuffer nmeasuredDimensions​(long struct)
        Unsafe version of measuredDimensions().
      • nmeasuredDimensions

        public static float nmeasuredDimensions​(long struct,
                                                int index)
        Unsafe version of measuredDimensions.