Class YGStyle

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • DIRECTION, FLEXDIRECTION, JUSTIFYCONTENT, ALIGNCONTENT, ALIGNITEMS, ALIGNSELF, POSITIONTYPE, FLEXWRAP, OVERFLOW, DISPLAY, FLEX, FLEXGROW, FLEXSHRINK, FLEXBASIS, MARGIN, POSITIONS, PADDING, BORDER, DIMENSIONS, MINDIMENSIONS, MAXDIMENSIONS, ASPECTRATIO

        The struct member offsets.
    • Constructor Detail

      • YGStyle

        public YGStyle​(java.nio.ByteBuffer container)
        Creates a YGStyle 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
      • direction

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

        public int flexDirection()
        Returns the value of the flexDirection field.
      • justifyContent

        public int justifyContent()
        Returns the value of the justifyContent field.
      • alignContent

        public int alignContent()
        Returns the value of the alignContent field.
      • alignItems

        public int alignItems()
        Returns the value of the alignItems field.
      • alignSelf

        public int alignSelf()
        Returns the value of the alignSelf field.
      • positionType

        public int positionType()
        Returns the value of the positionType field.
      • flexWrap

        public int flexWrap()
        Returns the value of the flexWrap field.
      • overflow

        public int overflow()
        Returns the value of the overflow field.
      • display

        public int display()
        Returns the value of the display field.
      • flexBasis

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

        public YGStyle flexBasis​(java.util.function.Consumer<YGValue> consumer)
        Passes the flexBasis field to the specified Consumer.
      • margin

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

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

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

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

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

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

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

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

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

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

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

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

        @Nullable
        public static YGStyle.Buffer createSafe​(long address,
                                                int capacity)
        Like create, but returns null if address is NULL.
      • ndirection

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

        public static int nflexDirection​(long struct)
        Unsafe version of flexDirection().
      • njustifyContent

        public static int njustifyContent​(long struct)
        Unsafe version of justifyContent().
      • nalignContent

        public static int nalignContent​(long struct)
        Unsafe version of alignContent().
      • nalignItems

        public static int nalignItems​(long struct)
        Unsafe version of alignItems().
      • nalignSelf

        public static int nalignSelf​(long struct)
        Unsafe version of alignSelf().
      • npositionType

        public static int npositionType​(long struct)
        Unsafe version of positionType().
      • nflexWrap

        public static int nflexWrap​(long struct)
        Unsafe version of flexWrap().
      • noverflow

        public static int noverflow​(long struct)
        Unsafe version of overflow().
      • ndisplay

        public static int ndisplay​(long struct)
        Unsafe version of display().
      • nflexBasis

        public static YGValue nflexBasis​(long struct)
        Unsafe version of flexBasis().
      • nmargin

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

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

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

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

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

        public static YGValue nminDimensions​(long struct,
                                             int index)
        Unsafe version of minDimensions.
      • nmaxDimensions

        public static YGValue nmaxDimensions​(long struct,
                                             int index)
        Unsafe version of maxDimensions.