Class YGStyle

All Implemented Interfaces:
Pointer

public class YGStyle extends Struct<YGStyle>
Unstable/private API.

Layout


 struct YGStyle {
     YGDirection direction : 2;
     YGFlexDirection flexDirection : 2;
     YGJustify justifyContent : 3;
     YGAlign alignContent : 3;
     YGAlign alignItems : 3;
     YGAlign alignSelf : 3;
     YGPositionType positionType : 2;
     YGWrap flexWrap : 2;
     YGOverflow overflow : 2;
     YGDisplay display : 1;
     YGFloatOptional flex;
     YGFloatOptional flexGrow;
     YGFloatOptional flexShrink;
     CompactValue flexBasis;
     CompactValue margin[9];
     CompactValue positions[9];
     CompactValue padding[9];
     CompactValue border[9];
     CompactValue gap_[3];
     CompactValue dimensions[2];
     CompactValue minDimensions[2];
     CompactValue maxDimensions[2];
     YGFloatOptional aspectRatio;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • FLEX

      public static final int FLEX
      The struct member offsets.
    • FLEXGROW

      public static final int FLEXGROW
      The struct member offsets.
    • FLEXSHRINK

      public static final int FLEXSHRINK
      The struct member offsets.
    • FLEXBASIS

      public static final int FLEXBASIS
      The struct member offsets.
    • MARGIN

      public static final int MARGIN
      The struct member offsets.
    • POSITIONS

      public static final int POSITIONS
      The struct member offsets.
    • PADDING

      public static final int PADDING
      The struct member offsets.
    • BORDER

      public static final int BORDER
      The struct member offsets.
    • GAP_

      public static final int GAP_
      The struct member offsets.
    • DIMENSIONS

      public static final int DIMENSIONS
      The struct member offsets.
    • MINDIMENSIONS

      public static final int MINDIMENSIONS
      The struct member offsets.
    • MAXDIMENSIONS

      public static final int MAXDIMENSIONS
      The struct member offsets.
    • ASPECTRATIO

      public static final int ASPECTRATIO
      The struct member offsets.
  • Constructor Details

    • YGStyle

      public YGStyle(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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<YGStyle>
    • 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.
    • flex

      public YGFloatOptional flex()
      Returns:
      a YGFloatOptional view of the flex field.
    • flexGrow

      public YGFloatOptional flexGrow()
      Returns:
      a YGFloatOptional view of the flexGrow field.
    • flexShrink

      public YGFloatOptional flexShrink()
      Returns:
      a YGFloatOptional view of the flexShrink field.
    • flexBasis

      public CompactValue flexBasis()
      Returns:
      a CompactValue view of the flexBasis field.
    • margin

      public CompactValue.Buffer margin()
      Returns:
      a CompactValue.Buffer view of the margin field.
    • margin

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

      public CompactValue.Buffer positions()
      Returns:
      a CompactValue.Buffer view of the positions field.
    • positions

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

      public CompactValue.Buffer padding()
      Returns:
      a CompactValue.Buffer view of the padding field.
    • padding

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

      public CompactValue.Buffer border()
      Returns:
      a CompactValue.Buffer view of the border field.
    • border

      public CompactValue border(int index)
      Returns:
      a CompactValue view of the struct at the specified index of the border field.
    • gap_

      public CompactValue.Buffer gap_()
      Returns:
      a CompactValue.Buffer view of the gap_ field.
    • gap_

      public CompactValue gap_(int index)
      Returns:
      a CompactValue view of the struct at the specified index of the gap_ field.
    • dimensions

      public CompactValue.Buffer dimensions()
      Returns:
      a CompactValue.Buffer view of the dimensions field.
    • dimensions

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

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

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

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

      public CompactValue maxDimensions(int index)
      Returns:
      a CompactValue view of the struct at the specified index of the maxDimensions field.
    • aspectRatio

      public YGFloatOptional aspectRatio()
      Returns:
      a YGFloatOptional view of the aspectRatio 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.
    • nflags

      public static int nflags(long struct)
    • 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().
    • nflex

      public static YGFloatOptional nflex(long struct)
      Unsafe version of flex().
    • nflexGrow

      public static YGFloatOptional nflexGrow(long struct)
      Unsafe version of flexGrow().
    • nflexShrink

      public static YGFloatOptional nflexShrink(long struct)
      Unsafe version of flexShrink().
    • nflexBasis

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

      public static CompactValue.Buffer nmargin(long struct)
      Unsafe version of margin().
    • nmargin

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

      public static CompactValue.Buffer npositions(long struct)
      Unsafe version of positions().
    • npositions

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

      public static CompactValue.Buffer npadding(long struct)
      Unsafe version of padding().
    • npadding

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

      public static CompactValue.Buffer nborder(long struct)
      Unsafe version of border().
    • nborder

      public static CompactValue nborder(long struct, int index)
      Unsafe version of border.
    • ngap_

      public static CompactValue.Buffer ngap_(long struct)
      Unsafe version of gap_().
    • ngap_

      public static CompactValue ngap_(long struct, int index)
      Unsafe version of gap_.
    • ndimensions

      public static CompactValue.Buffer ndimensions(long struct)
      Unsafe version of dimensions().
    • ndimensions

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

      public static CompactValue.Buffer nminDimensions(long struct)
      Unsafe version of minDimensions().
    • nminDimensions

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

      public static CompactValue.Buffer nmaxDimensions(long struct)
      Unsafe version of maxDimensions().
    • nmaxDimensions

      public static CompactValue nmaxDimensions(long struct, int index)
      Unsafe version of maxDimensions.
    • naspectRatio

      public static YGFloatOptional naspectRatio(long struct)
      Unsafe version of aspectRatio().