Class YGNode.Buffer

    • Constructor Detail

      • Buffer

        public Buffer​(java.nio.ByteBuffer container)
        Creates a new YGNode.Buffer instance backed by the specified container. Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by YGNode.SIZEOF, and its mark will be undefined.

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

      • Buffer

        public Buffer​(long address,
                      int cap)
    • Method Detail

      • context

        public long context()
        Returns the value of the context field.
      • hasNewLayout

        public boolean hasNewLayout()
        Returns the value of the hasNewLayout field.
      • isReferenceBaseline

        public boolean isReferenceBaseline()
        Returns the value of the isReferenceBaseline field.
      • isDirty

        public boolean isDirty()
        Returns the value of the isDirty field.
      • nodeType

        public int nodeType()
        Returns the value of the nodeType field.
      • measureUsesContext

        public boolean measureUsesContext()
        Returns the value of the measureUsesContext field.
      • baselineUsesContext

        public boolean baselineUsesContext()
        Returns the value of the baselineUsesContext field.
      • printUsesContext

        public boolean printUsesContext()
        Returns the value of the printUsesContext field.
      • useWebDefaults

        public boolean useWebDefaults()
        Returns the value of the useWebDefaults field.
      • measure_noContext

        @Nullable
        public YGMeasureFunc measure_noContext()
        Returns the value of the measure.noContext field.
      • measure_withContext

        public long measure_withContext()
        Returns the value of the measure.withContext field.
      • baseline_noContext

        @Nullable
        public YGBaselineFunc baseline_noContext()
        Returns the value of the baseline.noContext field.
      • baseline_withContext

        public long baseline_withContext()
        Returns the value of the baseline.withContext field.
      • print_noContext

        @Nullable
        public YGPrintFunc print_noContext()
        Returns the value of the print.noContext field.
      • print_withContext

        public long print_withContext()
        Returns the value of the print.withContext field.
      • dirtied

        @Nullable
        public YGDirtiedFunc dirtied()
        Returns the value of the dirtied field.
      • style

        public YGStyle style()
        Returns a YGStyle view of the style field.
      • layout

        public YGLayout layout()
        Returns a YGLayout view of the layout field.
      • lineIndex

        public int lineIndex()
        Returns the value of the lineIndex field.
      • owner

        public long owner()
        Returns the value of the owner field.
      • config

        public long config()
        Returns the value of the config field.
      • resolvedDimensions

        public YGValue.Buffer resolvedDimensions()
        Returns a YGValue.Buffer view of the resolvedDimensions field.
      • resolvedDimensions

        public YGValue resolvedDimensions​(int index)
        Returns a YGValue view of the struct at the specified index of the resolvedDimensions field.
      • context

        public YGNode.Buffer context​(long value)
        Sets the specified value to the context field.
      • hasNewLayout

        public YGNode.Buffer hasNewLayout​(boolean value)
        Sets the specified value to the hasNewLayout field.
      • isReferenceBaseline

        public YGNode.Buffer isReferenceBaseline​(boolean value)
        Sets the specified value to the isReferenceBaseline field.
      • isDirty

        public YGNode.Buffer isDirty​(boolean value)
        Sets the specified value to the isDirty field.
      • nodeType

        public YGNode.Buffer nodeType​(int value)
        Sets the specified value to the nodeType field.
      • measureUsesContext

        public YGNode.Buffer measureUsesContext​(boolean value)
        Sets the specified value to the measureUsesContext field.
      • baselineUsesContext

        public YGNode.Buffer baselineUsesContext​(boolean value)
        Sets the specified value to the baselineUsesContext field.
      • printUsesContext

        public YGNode.Buffer printUsesContext​(boolean value)
        Sets the specified value to the printUsesContext field.
      • useWebDefaults

        public YGNode.Buffer useWebDefaults​(boolean value)
        Sets the specified value to the useWebDefaults field.
      • measure_noContext

        public YGNode.Buffer measure_noContext​(@Nullable
                                               YGMeasureFuncI value)
        Sets the specified value to the measure.noContext field.
      • measure_withContext

        public YGNode.Buffer measure_withContext​(long value)
        Sets the specified value to the measure.withContext field.
      • baseline_noContext

        public YGNode.Buffer baseline_noContext​(@Nullable
                                                YGBaselineFuncI value)
        Sets the specified value to the baseline.noContext field.
      • baseline_withContext

        public YGNode.Buffer baseline_withContext​(long value)
        Sets the specified value to the baseline.withContext field.
      • print_noContext

        public YGNode.Buffer print_noContext​(@Nullable
                                             YGPrintFuncI value)
        Sets the specified value to the print.noContext field.
      • print_withContext

        public YGNode.Buffer print_withContext​(long value)
        Sets the specified value to the print.withContext field.
      • lineIndex

        public YGNode.Buffer lineIndex​(int value)
        Sets the specified value to the lineIndex field.
      • owner

        public YGNode.Buffer owner​(long value)
        Sets the specified value to the owner field.
      • config

        public YGNode.Buffer config​(long value)
        Sets the specified value to the config field.
      • resolvedDimensions

        public YGNode.Buffer resolvedDimensions​(int index,
                                                YGValue value)
        Copies the specified YGValue at the specified index of the resolvedDimensions field.
      • resolvedDimensions

        public YGNode.Buffer resolvedDimensions​(java.util.function.Consumer<YGValue.Buffer> consumer)
        Passes the resolvedDimensions field to the specified Consumer.
      • resolvedDimensions

        public YGNode.Buffer resolvedDimensions​(int index,
                                                java.util.function.Consumer<YGValue> consumer)
        Passes the element at index of the resolvedDimensions field to the specified Consumer.