Class JAWTWin32DrawingSurfaceInfo

  • All Implemented Interfaces:

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

    Member documentation

    • <union>
      • hwnd – the native window handle
      • hbitmap – the DDB handle
      • pbits – the DIB handle
    • 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 – the palette handle


     struct JAWT_Win32DrawingSurfaceInfo {
         union {
             HWND hwnd;
             HBITMAP hbitmap;
             void * pbits;
         HDC hdc;
         HPALETTE hpalette;
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.

        The struct member offsets.
    • Constructor Detail

      • JAWTWin32DrawingSurfaceInfo

        public JAWTWin32DrawingSurfaceInfo​(java.nio.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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • hwnd

        public long hwnd()
        Returns the value of the hwnd field.
      • hbitmap

        public long hbitmap()
        Returns the value of the hbitmap field.
      • pbits

        public java.nio.ByteBuffer pbits​(int capacity)
        Returns a ByteBuffer view of the data pointed to by the pbits field.
        capacity - the number of elements in the returned buffer
      • hdc

        public long hdc()
        Returns the value of the hdc field.
      • hpalette

        public long hpalette()
        Returns the value of the hpalette field.
      • create

        public static JAWTWin32DrawingSurfaceInfo create​(long address)
        Returns a new JAWTWin32DrawingSurfaceInfo instance for the specified memory address.
      • 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 java.nio.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().