Class YGLayout

  • All Implemented Interfaces:
    Pointer

    public class YGLayout
    extends Struct

    Layout

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

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • POSITIONS, DIMENSIONS, MARGIN, BORDER, PADDING, DIRECTION, COMPUTEDFLEXBASISGENERATION, COMPUTEDFLEXBASIS, HADOVERFLOW, GENERATIONCOUNT, LASTOWNERDIRECTION, NEXTCACHEDMEASUREMENTSINDEX, CACHEDMEASUREMENTS, MEASUREDDIMENSIONS, CACHEDLAYOUT, DIDUSELEGACYFLAG, DOESLEGACYSTRETCHFLAGAFFECTSLAYOUT

        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.
      • computedFlexBasisGeneration

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

        public boolean hadOverflow()
        Returns the value of the hadOverflow 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.
      • didUseLegacyFlag

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

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

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

        @Nullable
        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.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        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.
      • ndirection

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

        public static int ncomputedFlexBasisGeneration​(long struct)
      • nhadOverflow

        public static boolean nhadOverflow​(long struct)
        Unsafe version of hadOverflow().
      • 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.
      • ndidUseLegacyFlag

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