Class JAWTWin32DrawingSurfaceInfo

All Implemented Interfaces:
Pointer

public class JAWTWin32DrawingSurfaceInfo extends Struct<JAWTWin32DrawingSurfaceInfo>
Win32-specific declarations for AWT native interface.

Layout


 struct JAWT_Win32DrawingSurfaceInfo {
     union {
         HWND hwnd();
         HBITMAP hbitmap();
         void * pbits(int);
     };
     HDC hdc();
     HPALETTE hpalette();
 }
  • Field Details

    • SIZEOF

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

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

      public static final int HWND
      The struct member offsets.
    • HBITMAP

      public static final int HBITMAP
      The struct member offsets.
    • PBITS

      public static final int PBITS
      The struct member offsets.
    • HDC

      public static final int HDC
      The struct member offsets.
    • HPALETTE

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

    • JAWTWin32DrawingSurfaceInfo

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

      public long hwnd()
      the native window handle
    • hbitmap

      public long hbitmap()
      the DDB handle
    • pbits

      public ByteBuffer pbits(int capacity)
      Parameters:
      capacity - the number of elements in the returned buffer
      Returns:
      the DIB handle
    • hdc

      public long hdc()
      the device context handle. This HDC should always be used instead of the HDC returned from BeginPaint() or any calls to User32.GetDC(long).
    • hpalette

      public long hpalette()
      the palette handle
    • create

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

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

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

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

      public static long nhwnd(long struct)
      Unsafe version of hwnd().
    • nhbitmap

      public static long nhbitmap(long struct)
      Unsafe version of hbitmap().
    • npbits

      public static ByteBuffer npbits(long struct, int capacity)
      Unsafe version of pbits.
    • nhdc

      public static long nhdc(long struct)
      Unsafe version of hdc().
    • nhpalette

      public static long nhpalette(long struct)
      Unsafe version of hpalette().