Class PIXELFORMATDESCRIPTOR

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class PIXELFORMATDESCRIPTOR extends Struct<PIXELFORMATDESCRIPTOR> implements NativeResource

 struct PIXELFORMATDESCRIPTOR {
     WORD nSize;
     WORD nVersion;
     DWORD dwFlags;
     BYTE iPixelType;
     BYTE cColorBits;
     BYTE cRedBits;
     BYTE cRedShift;
     BYTE cGreenBits;
     BYTE cGreenShift;
     BYTE cBlueBits;
     BYTE cBlueShift;
     BYTE cAlphaBits;
     BYTE cAlphaShift;
     BYTE cAccumBits;
     BYTE cAccumRedBits;
     BYTE cAccumGreenBits;
     BYTE cAccumBlueBits;
     BYTE cAccumAlphaBits;
     BYTE cDepthBits;
     BYTE cStencilBits;
     BYTE cAuxBuffers;
     BYTE iLayerType;
     BYTE bReserved;
     DWORD dwLayerMask;
     DWORD dwVisibleMask;
     DWORD dwDamageMask;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int NSIZE
      The struct member offsets.
    • NVERSION

      public static final int NVERSION
      The struct member offsets.
    • DWFLAGS

      public static final int DWFLAGS
      The struct member offsets.
    • IPIXELTYPE

      public static final int IPIXELTYPE
      The struct member offsets.
    • CCOLORBITS

      public static final int CCOLORBITS
      The struct member offsets.
    • CREDBITS

      public static final int CREDBITS
      The struct member offsets.
    • CREDSHIFT

      public static final int CREDSHIFT
      The struct member offsets.
    • CGREENBITS

      public static final int CGREENBITS
      The struct member offsets.
    • CGREENSHIFT

      public static final int CGREENSHIFT
      The struct member offsets.
    • CBLUEBITS

      public static final int CBLUEBITS
      The struct member offsets.
    • CBLUESHIFT

      public static final int CBLUESHIFT
      The struct member offsets.
    • CALPHABITS

      public static final int CALPHABITS
      The struct member offsets.
    • CALPHASHIFT

      public static final int CALPHASHIFT
      The struct member offsets.
    • CACCUMBITS

      public static final int CACCUMBITS
      The struct member offsets.
    • CACCUMREDBITS

      public static final int CACCUMREDBITS
      The struct member offsets.
    • CACCUMGREENBITS

      public static final int CACCUMGREENBITS
      The struct member offsets.
    • CACCUMBLUEBITS

      public static final int CACCUMBLUEBITS
      The struct member offsets.
    • CACCUMALPHABITS

      public static final int CACCUMALPHABITS
      The struct member offsets.
    • CDEPTHBITS

      public static final int CDEPTHBITS
      The struct member offsets.
    • CSTENCILBITS

      public static final int CSTENCILBITS
      The struct member offsets.
    • CAUXBUFFERS

      public static final int CAUXBUFFERS
      The struct member offsets.
    • ILAYERTYPE

      public static final int ILAYERTYPE
      The struct member offsets.
    • BRESERVED

      public static final int BRESERVED
      The struct member offsets.
    • DWLAYERMASK

      public static final int DWLAYERMASK
      The struct member offsets.
    • DWVISIBLEMASK

      public static final int DWVISIBLEMASK
      The struct member offsets.
    • DWDAMAGEMASK

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

    • PIXELFORMATDESCRIPTOR

      public PIXELFORMATDESCRIPTOR(ByteBuffer container)
      Creates a PIXELFORMATDESCRIPTOR 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<PIXELFORMATDESCRIPTOR>
    • nSize

      public short nSize()
      Returns:
      the value of the nSize field.
    • nVersion

      public short nVersion()
      Returns:
      the value of the nVersion field.
    • dwFlags

      public int dwFlags()
      Returns:
      the value of the dwFlags field.
    • iPixelType

      public byte iPixelType()
      Returns:
      the value of the iPixelType field.
    • cColorBits

      public byte cColorBits()
      Returns:
      the value of the cColorBits field.
    • cRedBits

      public byte cRedBits()
      Returns:
      the value of the cRedBits field.
    • cRedShift

      public byte cRedShift()
      Returns:
      the value of the cRedShift field.
    • cGreenBits

      public byte cGreenBits()
      Returns:
      the value of the cGreenBits field.
    • cGreenShift

      public byte cGreenShift()
      Returns:
      the value of the cGreenShift field.
    • cBlueBits

      public byte cBlueBits()
      Returns:
      the value of the cBlueBits field.
    • cBlueShift

      public byte cBlueShift()
      Returns:
      the value of the cBlueShift field.
    • cAlphaBits

      public byte cAlphaBits()
      Returns:
      the value of the cAlphaBits field.
    • cAlphaShift

      public byte cAlphaShift()
      Returns:
      the value of the cAlphaShift field.
    • cAccumBits

      public byte cAccumBits()
      Returns:
      the value of the cAccumBits field.
    • cAccumRedBits

      public byte cAccumRedBits()
      Returns:
      the value of the cAccumRedBits field.
    • cAccumGreenBits

      public byte cAccumGreenBits()
      Returns:
      the value of the cAccumGreenBits field.
    • cAccumBlueBits

      public byte cAccumBlueBits()
      Returns:
      the value of the cAccumBlueBits field.
    • cAccumAlphaBits

      public byte cAccumAlphaBits()
      Returns:
      the value of the cAccumAlphaBits field.
    • cDepthBits

      public byte cDepthBits()
      Returns:
      the value of the cDepthBits field.
    • cStencilBits

      public byte cStencilBits()
      Returns:
      the value of the cStencilBits field.
    • cAuxBuffers

      public byte cAuxBuffers()
      Returns:
      the value of the cAuxBuffers field.
    • iLayerType

      public byte iLayerType()
      Returns:
      the value of the iLayerType field.
    • bReserved

      public byte bReserved()
      Returns:
      the value of the bReserved field.
    • dwLayerMask

      public int dwLayerMask()
      Returns:
      the value of the dwLayerMask field.
    • dwVisibleMask

      public int dwVisibleMask()
      Returns:
      the value of the dwVisibleMask field.
    • dwDamageMask

      public int dwDamageMask()
      Returns:
      the value of the dwDamageMask field.
    • nSize

      public PIXELFORMATDESCRIPTOR nSize(short value)
      Sets the specified value to the nSize field.
    • nVersion

      public PIXELFORMATDESCRIPTOR nVersion(short value)
      Sets the specified value to the nVersion field.
    • dwFlags

      public PIXELFORMATDESCRIPTOR dwFlags(int value)
      Sets the specified value to the dwFlags field.
    • iPixelType

      public PIXELFORMATDESCRIPTOR iPixelType(byte value)
      Sets the specified value to the iPixelType field.
    • cColorBits

      public PIXELFORMATDESCRIPTOR cColorBits(byte value)
      Sets the specified value to the cColorBits field.
    • cRedBits

      public PIXELFORMATDESCRIPTOR cRedBits(byte value)
      Sets the specified value to the cRedBits field.
    • cRedShift

      public PIXELFORMATDESCRIPTOR cRedShift(byte value)
      Sets the specified value to the cRedShift field.
    • cGreenBits

      public PIXELFORMATDESCRIPTOR cGreenBits(byte value)
      Sets the specified value to the cGreenBits field.
    • cGreenShift

      public PIXELFORMATDESCRIPTOR cGreenShift(byte value)
      Sets the specified value to the cGreenShift field.
    • cBlueBits

      public PIXELFORMATDESCRIPTOR cBlueBits(byte value)
      Sets the specified value to the cBlueBits field.
    • cBlueShift

      public PIXELFORMATDESCRIPTOR cBlueShift(byte value)
      Sets the specified value to the cBlueShift field.
    • cAlphaBits

      public PIXELFORMATDESCRIPTOR cAlphaBits(byte value)
      Sets the specified value to the cAlphaBits field.
    • cAlphaShift

      public PIXELFORMATDESCRIPTOR cAlphaShift(byte value)
      Sets the specified value to the cAlphaShift field.
    • cAccumBits

      public PIXELFORMATDESCRIPTOR cAccumBits(byte value)
      Sets the specified value to the cAccumBits field.
    • cAccumRedBits

      public PIXELFORMATDESCRIPTOR cAccumRedBits(byte value)
      Sets the specified value to the cAccumRedBits field.
    • cAccumGreenBits

      public PIXELFORMATDESCRIPTOR cAccumGreenBits(byte value)
      Sets the specified value to the cAccumGreenBits field.
    • cAccumBlueBits

      public PIXELFORMATDESCRIPTOR cAccumBlueBits(byte value)
      Sets the specified value to the cAccumBlueBits field.
    • cAccumAlphaBits

      public PIXELFORMATDESCRIPTOR cAccumAlphaBits(byte value)
      Sets the specified value to the cAccumAlphaBits field.
    • cDepthBits

      public PIXELFORMATDESCRIPTOR cDepthBits(byte value)
      Sets the specified value to the cDepthBits field.
    • cStencilBits

      public PIXELFORMATDESCRIPTOR cStencilBits(byte value)
      Sets the specified value to the cStencilBits field.
    • cAuxBuffers

      public PIXELFORMATDESCRIPTOR cAuxBuffers(byte value)
      Sets the specified value to the cAuxBuffers field.
    • iLayerType

      public PIXELFORMATDESCRIPTOR iLayerType(byte value)
      Sets the specified value to the iLayerType field.
    • bReserved

      public PIXELFORMATDESCRIPTOR bReserved(byte value)
      Sets the specified value to the bReserved field.
    • dwLayerMask

      public PIXELFORMATDESCRIPTOR dwLayerMask(int value)
      Sets the specified value to the dwLayerMask field.
    • dwVisibleMask

      public PIXELFORMATDESCRIPTOR dwVisibleMask(int value)
      Sets the specified value to the dwVisibleMask field.
    • dwDamageMask

      public PIXELFORMATDESCRIPTOR dwDamageMask(int value)
      Sets the specified value to the dwDamageMask field.
    • set

      public PIXELFORMATDESCRIPTOR set(short nSize, short nVersion, int dwFlags, byte iPixelType, byte cColorBits, byte cRedBits, byte cRedShift, byte cGreenBits, byte cGreenShift, byte cBlueBits, byte cBlueShift, byte cAlphaBits, byte cAlphaShift, byte cAccumBits, byte cAccumRedBits, byte cAccumGreenBits, byte cAccumBlueBits, byte cAccumAlphaBits, byte cDepthBits, byte cStencilBits, byte cAuxBuffers, byte iLayerType, byte bReserved, int dwLayerMask, int dwVisibleMask, int dwDamageMask)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static PIXELFORMATDESCRIPTOR malloc()
      Returns a new PIXELFORMATDESCRIPTOR instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static PIXELFORMATDESCRIPTOR calloc()
      Returns a new PIXELFORMATDESCRIPTOR instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static PIXELFORMATDESCRIPTOR create()
      Returns a new PIXELFORMATDESCRIPTOR instance allocated with BufferUtils.
    • create

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

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

      public static PIXELFORMATDESCRIPTOR.Buffer malloc(int capacity)
      Returns a new PIXELFORMATDESCRIPTOR.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static PIXELFORMATDESCRIPTOR.Buffer calloc(int capacity)
      Returns a new PIXELFORMATDESCRIPTOR.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static PIXELFORMATDESCRIPTOR.Buffer create(int capacity)
      Returns a new PIXELFORMATDESCRIPTOR.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

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

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

      @Deprecated public static PIXELFORMATDESCRIPTOR mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static PIXELFORMATDESCRIPTOR callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static PIXELFORMATDESCRIPTOR mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static PIXELFORMATDESCRIPTOR callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static PIXELFORMATDESCRIPTOR.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static PIXELFORMATDESCRIPTOR.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static PIXELFORMATDESCRIPTOR.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static PIXELFORMATDESCRIPTOR.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static PIXELFORMATDESCRIPTOR malloc(MemoryStack stack)
      Returns a new PIXELFORMATDESCRIPTOR instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static PIXELFORMATDESCRIPTOR calloc(MemoryStack stack)
      Returns a new PIXELFORMATDESCRIPTOR instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static PIXELFORMATDESCRIPTOR.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new PIXELFORMATDESCRIPTOR.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static PIXELFORMATDESCRIPTOR.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new PIXELFORMATDESCRIPTOR.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nnSize

      public static short nnSize(long struct)
      Unsafe version of nSize().
    • nnVersion

      public static short nnVersion(long struct)
      Unsafe version of nVersion().
    • ndwFlags

      public static int ndwFlags(long struct)
      Unsafe version of dwFlags().
    • niPixelType

      public static byte niPixelType(long struct)
      Unsafe version of iPixelType().
    • ncColorBits

      public static byte ncColorBits(long struct)
      Unsafe version of cColorBits().
    • ncRedBits

      public static byte ncRedBits(long struct)
      Unsafe version of cRedBits().
    • ncRedShift

      public static byte ncRedShift(long struct)
      Unsafe version of cRedShift().
    • ncGreenBits

      public static byte ncGreenBits(long struct)
      Unsafe version of cGreenBits().
    • ncGreenShift

      public static byte ncGreenShift(long struct)
      Unsafe version of cGreenShift().
    • ncBlueBits

      public static byte ncBlueBits(long struct)
      Unsafe version of cBlueBits().
    • ncBlueShift

      public static byte ncBlueShift(long struct)
      Unsafe version of cBlueShift().
    • ncAlphaBits

      public static byte ncAlphaBits(long struct)
      Unsafe version of cAlphaBits().
    • ncAlphaShift

      public static byte ncAlphaShift(long struct)
      Unsafe version of cAlphaShift().
    • ncAccumBits

      public static byte ncAccumBits(long struct)
      Unsafe version of cAccumBits().
    • ncAccumRedBits

      public static byte ncAccumRedBits(long struct)
      Unsafe version of cAccumRedBits().
    • ncAccumGreenBits

      public static byte ncAccumGreenBits(long struct)
      Unsafe version of cAccumGreenBits().
    • ncAccumBlueBits

      public static byte ncAccumBlueBits(long struct)
      Unsafe version of cAccumBlueBits().
    • ncAccumAlphaBits

      public static byte ncAccumAlphaBits(long struct)
      Unsafe version of cAccumAlphaBits().
    • ncDepthBits

      public static byte ncDepthBits(long struct)
      Unsafe version of cDepthBits().
    • ncStencilBits

      public static byte ncStencilBits(long struct)
      Unsafe version of cStencilBits().
    • ncAuxBuffers

      public static byte ncAuxBuffers(long struct)
      Unsafe version of cAuxBuffers().
    • niLayerType

      public static byte niLayerType(long struct)
      Unsafe version of iLayerType().
    • nbReserved

      public static byte nbReserved(long struct)
      Unsafe version of bReserved().
    • ndwLayerMask

      public static int ndwLayerMask(long struct)
      Unsafe version of dwLayerMask().
    • ndwVisibleMask

      public static int ndwVisibleMask(long struct)
      Unsafe version of dwVisibleMask().
    • ndwDamageMask

      public static int ndwDamageMask(long struct)
      Unsafe version of dwDamageMask().
    • nnSize

      public static void nnSize(long struct, short value)
      Unsafe version of nSize.
    • nnVersion

      public static void nnVersion(long struct, short value)
      Unsafe version of nVersion.
    • ndwFlags

      public static void ndwFlags(long struct, int value)
      Unsafe version of dwFlags.
    • niPixelType

      public static void niPixelType(long struct, byte value)
      Unsafe version of iPixelType.
    • ncColorBits

      public static void ncColorBits(long struct, byte value)
      Unsafe version of cColorBits.
    • ncRedBits

      public static void ncRedBits(long struct, byte value)
      Unsafe version of cRedBits.
    • ncRedShift

      public static void ncRedShift(long struct, byte value)
      Unsafe version of cRedShift.
    • ncGreenBits

      public static void ncGreenBits(long struct, byte value)
      Unsafe version of cGreenBits.
    • ncGreenShift

      public static void ncGreenShift(long struct, byte value)
      Unsafe version of cGreenShift.
    • ncBlueBits

      public static void ncBlueBits(long struct, byte value)
      Unsafe version of cBlueBits.
    • ncBlueShift

      public static void ncBlueShift(long struct, byte value)
      Unsafe version of cBlueShift.
    • ncAlphaBits

      public static void ncAlphaBits(long struct, byte value)
      Unsafe version of cAlphaBits.
    • ncAlphaShift

      public static void ncAlphaShift(long struct, byte value)
      Unsafe version of cAlphaShift.
    • ncAccumBits

      public static void ncAccumBits(long struct, byte value)
      Unsafe version of cAccumBits.
    • ncAccumRedBits

      public static void ncAccumRedBits(long struct, byte value)
      Unsafe version of cAccumRedBits.
    • ncAccumGreenBits

      public static void ncAccumGreenBits(long struct, byte value)
      Unsafe version of cAccumGreenBits.
    • ncAccumBlueBits

      public static void ncAccumBlueBits(long struct, byte value)
      Unsafe version of cAccumBlueBits.
    • ncAccumAlphaBits

      public static void ncAccumAlphaBits(long struct, byte value)
      Unsafe version of cAccumAlphaBits.
    • ncDepthBits

      public static void ncDepthBits(long struct, byte value)
      Unsafe version of cDepthBits.
    • ncStencilBits

      public static void ncStencilBits(long struct, byte value)
      Unsafe version of cStencilBits.
    • ncAuxBuffers

      public static void ncAuxBuffers(long struct, byte value)
      Unsafe version of cAuxBuffers.
    • niLayerType

      public static void niLayerType(long struct, byte value)
      Unsafe version of iLayerType.
    • nbReserved

      public static void nbReserved(long struct, byte value)
      Unsafe version of bReserved.
    • ndwLayerMask

      public static void ndwLayerMask(long struct, int value)
      Unsafe version of dwLayerMask.
    • ndwVisibleMask

      public static void ndwVisibleMask(long struct, int value)
      Unsafe version of dwVisibleMask.
    • ndwDamageMask

      public static void ndwDamageMask(long struct, int value)
      Unsafe version of dwDamageMask.